快乐的昕的电脑
2025-12-03 ff7f9e4c7ee28a10e6c5c1459f8a8cf1b31b34e1
回调
已修改1个文件
17 ■■■■ 文件已修改
components/mold.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/mold.vue
@@ -210,15 +210,11 @@
            // 新增:刷新按钮处理方法
            async handleRefresh() {
                // 刷新刀具列表和表单数据
                this.fetchTools('');
                if (this.machineNo && this.workOrderNo) {
                    await this.fetchFormData();
                    await this.fetchDefaultToolFromWorkOrder();
                    // 只更新第一行 currentCjNum
                    if (this.toolRecords.length > 0) {
                        const cjNum = await this.fetchCurrentCjNum(this.toolRecords[0].no);
                        this.$set(this.toolRecords[0], 'currentCjNum', cjNum);
                    }
                }
                this.$showMessage('刷新完成');
            },
@@ -675,15 +671,8 @@
            //this.lifeWarnInput = '90';
            if (this.machineNo && this.workOrderNo) {
                this.fetchFormData().then(async () => {
                    // 加载工单刀具信息
                    await this.fetchDefaultToolFromWorkOrder();
                    // 进入页面时加载第一行 currentCjNum
                    if (this.toolRecords.length > 0) {
                        const cjNum = await this.fetchCurrentCjNum(this.toolRecords[0].no);
                        this.$set(this.toolRecords[0], 'currentCjNum', cjNum);
                    }
                });
                this.fetchFormData();
                this.fetchDefaultToolFromWorkOrder();
            } else {
                console.warn('机台号或工单号为空,无法获取表单数据');
            }