快乐的昕的电脑
2025-10-11 140474608ab84925bf10c51eec13f7a36dbc1d2b
components/mold.vue
@@ -260,10 +260,6 @@
            this.toolName = '';
            this.toolModel = '';
         },
         setUseLimit() {
            // 保存使用上限逻辑,实际应调用后端接口
            this.$showMessage('使用上限已保存(示例)');
         },
         async fetchFormData() {
                const res = await this.$post({
                    url: '/MesCutterLedger/GetFormData',
@@ -281,11 +277,12 @@
            }
      },
      mounted() {
         // 页面加载时拉取全部刀具
         this.fetchTools('');            
            this.machineNo = uni.getStorageSync('machineNo') || '';// 读取本地缓存的机台编号
         this.workOrderNo = uni.getStorageSync('daa001') || ''; // 读取本地缓存的工单编号
            this.fetchFormData(); // 页面加载时获取表单数据
            this.machineNo = uni.getStorageSync('machineNo') || '';
            this.workOrderNo = uni.getStorageSync('daa001') || '';
            if (this.machineNo && this.workOrderNo) {
                this.fetchFormData();
            }
      }
   };
</script>