快乐的昕的电脑
2025-10-22 96a7514a08ef3ca978533510ccde309ef9f3bdd8
components/mold.vue
@@ -263,7 +263,7 @@
                    workOrderNo: this.workOrderNo,
                    machineNo: this.machineNo,
                    toolNo: this.selectedToolNo,
                    type: '上刀',
                    type: '上机',
                    useLimit,
                    sdjs // 上刀计数(工单当前数采)
                };
@@ -274,30 +274,19 @@
                        data: JSON.stringify(payload),
                        headers: { 'Content-Type': 'application/json' }
                    });
                    if (res.data && res.data.outMsg) {
                        if (res.data.outMsg === '重复上下刀') {
                            uni.showToast({
                                title: res.data.outMsg,
                                icon: 'error'
                            });
                            return; // 报错时不再继续
                        } else {
                            uni.showToast({
                                title: res.data.outMsg,
                                icon: 'none'
                            });
                        }
                    } else if (res.status === 0) {
                    if (res.data && res.data.outSum === "0") {
                        uni.showToast({
                            title: '下刀提交成功',
                            icon: 'success'
                        });
                    } else {
                        uni.showToast({
                            title: res.message || '下刀提交失败',
                            title: res.data.outMsg || '',
                            icon: 'error'
                        });
                        return;
                    } else if (res.data && res.data.outMsg) {
                        uni.showToast({
                            title: res.data.outMsg,
                            icon: 'none'
                        });
                    }
                    // 后续逻辑继续执行
                    if (res.status === 0) {
                        await this.fetchFormData();
                    }
@@ -324,7 +313,7 @@
                    workOrderNo: this.workOrderNo,
                    machineNo: this.machineNo,
                    toolNo: this.selectedToolNo,
                    type: '下刀',
                    type: '下机',
                    useLimit,
                    xdjs // 下刀计数
                };
@@ -335,30 +324,19 @@
                        data: JSON.stringify(payload),
                        headers: { 'Content-Type': 'application/json' }
                    });
                    if (res.data && res.data.outMsg) {
                        if (res.data.outMsg === '重复上下刀') {
                            uni.showToast({
                                title: res.data.outMsg,
                                icon: 'error'
                            });
                            return; // 报错时不再继续
                        } else {
                            uni.showToast({
                                title: res.data.outMsg,
                                icon: 'none'
                            });
                        }
                    } else if (res.status === 0) {
                    if (res.data && res.data.outSum === "0") {
                        uni.showToast({
                            title: '下刀提交成功',
                            icon: 'success'
                        });
                    } else {
                        uni.showToast({
                            title: res.message || '下刀提交失败',
                            title: res.data.outMsg || '',
                            icon: 'error'
                        });
                        return;
                    } else if (res.data && res.data.outMsg) {
                        uni.showToast({
                            title: res.data.outMsg,
                            icon: 'none'
                        });
                    }
                    // 后续逻辑继续执行
                    if (res.status === 0) {
                        await this.fetchFormData();
                    }