快乐的昕的电脑
2025-10-18 b30ec2cba02e796b4a407545ddb718d65370892f
components/WorkOrder.vue
@@ -6,6 +6,7 @@
               flex-wrap: nowrap;
               align-content: flex-start;
               justify-content: flex-start;">
         <!--主界面-->
         <!-- 上部:工单选择和机台信息 -->
         <view class="top-order" style=" display:inline-block;">
            <view class="form-row4">
@@ -20,15 +21,15 @@
                  </view>
                  <view class="form-item">
                     <label>刀具名称:</label>
                     <input class="inp" type="text" v-model="order.moldId" disabled="true" />
                     <input class="inp" type="text" v-model="order.cutterName" disabled="true" />
                  </view>
                  <view class="form-item">
                     <label>工单数量:</label>
                     <input class="inp" type="text" v-model="order.daa008" disabled="true" />
                  </view>
                  <view class="form-item">
                     <label>开工数采:</label><!--开工数采:开工时的累计生产数???-->
                     <input class="inp" type="text" v-model="order.daa004" disabled="true" />
                     <label>开工数采:</label><!--开工数采-->
                     <input class="inp" type="text" v-model="order.startCjNum" disabled="true" /><!-- 修改为 startCjNum -->
                  </view>
               </view>
               <view class="form-row3">
@@ -40,15 +41,15 @@
                  </view>
                  <view class="form-item">
                     <label>刀具编号:</label><!--刀具编号???-->
                     <input class="inp" type="text" v-model="order.moldId" disabled="true" />
                     <input class="inp" type="text" v-model="order.cutterId" disabled="true" />
                  </view>
                  <view class="form-item">
                     <label>刀具规格:</label><!--刀具规格???-->
                     <input class="inp" type="text" v-model="order.moldId" disabled="true" />
                     <input class="inp" type="text" v-model="order.cutterModel" disabled="true" />
                  </view>
                  <view class="form-item">
                     <label>当前数采:</label><!--当前数采:当前时间的累计生产数???-->
                     <input class="inp" type="text" v-model="order.daa004" disabled="true" />
                     <label>当前数采:</label><!--当前数采-->
                     <input class="inp" type="text" v-model="order.currentCjNum" disabled="true" /><!-- 修改为 currentCjNum -->
                  </view>
               </view>
               <view class="form-row3">
@@ -58,7 +59,7 @@
                  </view>
                  <view class="form-item">
                     <label>产品规格:</label>
                     <input class="inp" type="text" v-model="order.daa005" disabled="true" />
                     <input class="inp" type="text" v-model="order.daa004" disabled="true" /><!-- 保留原绑定与注释,未改 -->
                  </view>
                  <view class="form-item">
                     <label>报工数量:</label>
@@ -81,7 +82,7 @@
         </view>
      </view>
      <!-- 中部:品质检验 -->
      <!-- 中部:运行状态 -->
      <view class="section card">
         <view class="form-row">
            <view class="form-item">
@@ -99,11 +100,11 @@
         </view>
         <view class="form-row">
            <view class="form-item">
               <label>生产时间开始:</label>
               <label>生产开始时间:</label>
               <input class="inp" type="text" v-model="startTime" disabled="true" />
            </view>
            <view class="form-item">
               <label>生产时间结束:</label>
               <label>生产结束时间:</label>
               <input class="inp" type="text" v-model="endTime" disabled="true" />
            </view>
            <view class="form-item">
@@ -113,7 +114,7 @@
         </view>
      </view>
      <!-- 下部:运行状态 -->
      <!-- 下部:品质检验 -->
      <view class="section card">
         <view class="form-row">
            <view class="form-item">
@@ -265,7 +266,6 @@
                  this.productionDuration = (differenceInMilliseconds / 60000).toFixed(2);
               }
               // this.$post({
               //    url: "/MesOrderSta/Binding",
               //    data: {
@@ -307,7 +307,6 @@
            //       this.machineNo = uni.getStorageSync('machineNo');
            //    }
            // }
            if (!this.orderId && !this.orderNo) {
               return;
@@ -359,11 +358,20 @@
                     todayOutput: 0,
                     todayRunTime: '',
                     todayFaultNum: 0,
                     cutterId,    //刀具代码
                     cutterName,  //刀具名称
                     cutterModel, //刀具规格
                     jdl: '',
                     startCjNum: 0, // 新增兜底字段 保留其它注释
                     currentCjNum: 0 // 新增兜底字段
                  };
                  return;
               }
               this.order = res.data.tbBillList;
               // 兼容后端大小写(如果后端返回 StartCjNum/CurrentCjNum)
               this.order.startCjNum = this.order.startCjNum ?? this.order.StartCjNum ?? 0; // 不删除原有注释行
               this.order.currentCjNum = this.order.currentCjNum ?? this.order.CurrentCjNum ?? 0; // 不删除原有注释行
               uni.setStorageSync('engineeringNo', this.order.engineeringNo);
               this.orderStatus = this.order.daa018;
               this.collectedAmount = this.order.todayOutput;
@@ -379,7 +387,7 @@
               this.utilizationRate = this.order.jdl + '%';
               // this.startTime = this.order.workStartDate;
               // this.endTime = this.order.workEndDate;
               let title = this.machineNo + '号机台 工单号' + this.order.daa001 + ',已采集' + this.collectedAmount;
               let title = this.machineNo + '号机台 工单号' + this.order.daa001 + ',当前数采' + this.order.currentCjNum; // 标题中使用 currentCjNum
               this.setTitle(title);
            })
         },