快乐的昕的电脑
2025-10-23 ade347e7d681f55bd42a6bde416467bf79a8a388
components/mold.vue
@@ -252,9 +252,10 @@
                if (!this.workOrderNo) { this.$showMessage('工单号不能为空'); return; }
                if (!this.machineNo) { this.$showMessage('机台号不能为空'); return; }
                if (!this.selectedToolNo) { this.$showMessage('刀具编号不能为空'); return; }
                if (!this.useLimitInput) { this.$showMessage('使用上限不能为空'); return; }
                const useLimit = Number(this.useLimitInput);
                if (isNaN(useLimit) || useLimit <= 0) { this.$showMessage('请输入有效的使用上限'); return; }
                //上刀不强制录入使用上限
                //if (!this.useLimitInput) { this.$showMessage('使用上限不能为空'); return; }
                //const useLimit = Number(this.useLimitInput);
                //if (isNaN(useLimit) || useLimit <= 0) { this.$showMessage('请输入有效的使用上限'); return; }
                // sdjs 使用工单 currentCjNum
                const sdjs = this.workOrderCurrentCjNum != null ? Number(this.workOrderCurrentCjNum) : null;
@@ -280,8 +281,13 @@
                            icon: 'error'
                        });
                        return;
                    } else if (res.data && res.data.outMsg) {
                        uni.showToast({
                            title: res.data.outMsg,
                            icon: 'none'
                        });
                    }
                    else uni.showToast({ title: res.data.outMsg || '' });
                    // 后续逻辑继续执行
                    if (res.status === 0) {
                        await this.fetchFormData();
                    }
@@ -325,8 +331,13 @@
                            icon: 'error'
                        });
                        return;
                    } else if (res.data && res.data.outMsg) {
                        uni.showToast({
                            title: res.data.outMsg,
                            icon: 'none'
                        });
                    }
                    else uni.showToast({ title: res.data.outMsg || '' });
                    // 后续逻辑继续执行
                    if (res.status === 0) {
                        await this.fetchFormData();
                    }