快乐的昕的电脑
2025-10-22 2a994d156f01072d865af6e8ff36d40c0a752796
components/machine.vue
@@ -114,33 +114,15 @@
            this.maEndTime = this.$getDate('yyyy-mm-dd hh24:mi:ss');
         },
         // 刷新工单数据
            refresh() {
                this.findByOrderId();
            },
            findByOrderId() {
                this.$post({
                    url: "/MesOrderSta/FindByOrderNo",
                    data: {
                        orderId: this.orderId,
                        orderNo: this.orderNo
                    }
                }).then(res => {
                    this.statusForm = res.data.tbBillList;
                    this.maShoutTime = res.data.tbBillList.maShoutTime;
                    this.maStartTime = res.data.tbBillList.maStartTime;
                    this.maEndTime = res.data.tbBillList.maEndTime;
                });
            },
         refresh() {
            this.findByOrderId();
         },
         // 保存并生效,将时间等信息提交到后端
         save() {
            if (!this.statusForm.id) {
               this.$showMessage("id为空,不允许推送");
               return;
            }
                // 只要送检呼叫有值,flag强制为-1
                if (this.maShoutTime) {
                    this.flag = -1;
                }
            this.$post({
               url: "/MesOrderSta/ChangeMachineTime",
               data: {
@@ -155,7 +137,7 @@
            }).then(res => {
               if (res.data.tbBillList) {
                  this.$showMessage("呼叫成功");
                        this.refresh(); // 保存后刷新
                  this.findByOrderId();
               } else {
                  this.$showMessage("呼叫失败");
                  this.cancel();
@@ -180,6 +162,7 @@
               case 2:
                  break;
            }
            this.flag = item;
         },
         // 根据工单号/ID获取工单状态数据
         findByOrderId() {