1
hao
2025-05-20 28997825e47018a0d9b3b8e4c003b232f62d241f
ÏÄÃÉ×¢Ëܱ¨¹¤/pages/scbg/scbg.vue
@@ -66,9 +66,13 @@
               <text>需求单据:</text>
               <text>{{ orderDetails.requirementDoc }}</text>
            </view>
            <view class="order-details-column">
            <!-- <view class="order-details-column">
               <text>推荐包装数:</text>
               <text>{{ orderDetails.bzsl }}</text>
            </view> -->
            <view class="order-details-column">
               <text>工单状态:</text>
               <text>{{ orderDetails.gdzt }}</text>
            </view>
         </view>
         <view class="order-details-row">
@@ -189,7 +193,7 @@
                        <view class="header-item" id="tm">打印条码</view>
                        <view class="header-item" id="sl">打印数量</view>
                        <view class="header-item" id="sj">打印时间</view>
                        <view class="header-item" id="ry">打印人</view>
                        <view class="header-item" id="ry">报工人</view>
                     </view>
                     <!-- è¡¨æ ¼å†…容 -->
@@ -284,6 +288,7 @@
               orderQuantity: '', // è®¢å•数量
               producedQuantity: '', // å·²ç”Ÿäº§æ•°
               bzsl: '', // æŽ¨èåŒ…装数
               gdzt:'',
               itemId: '', // ç‰©æ–™ID
               itemNo: '', // ç‰©æ–™ç¼–码
               itemname: '', // ç‰©æ–™åç§°
@@ -753,7 +758,7 @@
                        itemBarcode: record.itemBarcode || '未知条码', // ç¡®ä¿è§£æžå­—段
                        quantity: record.quantity || '未知数量', // æ‰“印数量字段
                        printDate: record.printDate || '未知时间', // æ‰“印时间
                        printedBy: record.printedBy || '未知用户' // æ‰“印人
                        printedBy: record.printedBy || '' // æŠ¥å·¥äºº
                     }));
                     console.log('History records loaded:', this.historyList);
                  } else {
@@ -913,6 +918,7 @@
               productionOrder: '', // ç”Ÿäº§è®¢å•
               orderQuantity: '', // è®¢å•数量
               bzsl: '', // æŽ¨èåŒ…装数
               gdzt:'',
               producedQuantity: '', // å·²ç”Ÿäº§æ•°
               itemId: '', // ç‰©æ–™ID
               itemNo: '', // ç‰©æ–™ç¼–码
@@ -941,6 +947,7 @@
                        productionOrder: res.data.productionOrder, // ç”Ÿäº§è®¢å•
                        orderQuantity: res.data.orderQuantity, // è®¢å•数量
                        bzsl: res.data.bzsl, // æŽ¨èåŒ…装数
                        gdzt: res.data.gdzt, // å·¥å•状态
                        producedQuantity: res.data.producedQuantity, // å·²ç”Ÿäº§æ•°
                        itemId: res.data.itemId, // ç‰©æ–™ID
                        itemNo: res.data.itemNO, // ç‰©æ–™ç¼–码
@@ -1043,6 +1050,61 @@
                  });
               }
            });
         // è°ƒç”¨ API èŽ·å–å·¥å•è¯¦æƒ…
         uni.request({
            url: `http://192.168.0.107:44380/api/orderDetails?orderNo=${encodeURIComponent(this.orderNo)}`, // ä½¿ç”¨å­˜å‚¨çš„orderNo
            method: 'GET',
            header: {
               'Content-Type': 'application/json'
            },
            success: (res) => {
               console.log('gongdanxinx', res.data);
               if (res.statusCode === 200) {
                  this.orderDetails = {
                     requirementDoc: res.data.requirementDoc, // éœ€æ±‚单据
                     productionOrder: res.data.productionOrder, // ç”Ÿäº§è®¢å•
                     orderQuantity: res.data.orderQuantity, // è®¢å•数量
                     bzsl: res.data.bzsl, // æŽ¨èåŒ…装数
                     gdzt: res.data.gdzt, // å·¥å•状态
                     producedQuantity: res.data.producedQuantity, // å·²ç”Ÿäº§æ•°
                     itemId: res.data.itemId, // ç‰©æ–™ID
                     itemNo: res.data.itemNO, // ç‰©æ–™ç¼–码
                     itemname: res.data.itemname, // ç‰©æ–™åç§°
                     itemmodel: res.data.itemmodel, // è§„格型号
                  };
                  // æ ¹æ® sj å’Œ xj çš„值来设置首检和巡检状态
                  // æ ¹æ® sj å’Œ xj çš„值来设置首检和巡检状态
                  if (res.data.sj === 1) {
                     this.checkFirstPass = true; // é¦–检合格
                  } else if (res.data.sj === 2) {
                     this.checkFirstPass = false; // é¦–检不合格
                  } else {
                     this.checkFirstPass = null; // é¦–检未做
                  }
                  if (res.data.xj === 1) {
                     this.checkXJ = true; // å·¡æ£€åˆæ ¼
                  } else if (res.data.xj === 2) {
                     this.checkXJ = false; // å·¡æ£€ä¸åˆæ ¼
                  } else {
                     this.checkXJ = null; // å·¡æ£€æœªåš
                  }
                  console.log('Order details loaded:', this.orderDetails);
               } else {
                  console.error('Failed to fetch order details:', res);
               }
            },
            fail: (err) => {
               console.error('Error fetching order details:', err);
            }
         });
         },
         mapStatus(status) {
            if (status === 3) {
@@ -1358,7 +1420,7 @@
                     // ç¬¬å››éƒ¨åˆ†ï¼šæ•°é‡ä¸Žéœ€æ±‚单据号
                     command.setText(20, 340, "TSS24.BF2", 1, 1, "数量: ");
                     command.setText(120, 340, "TSS24.BF2", 1, 1, this.reportedQuantity);
                     command.setText(200, 340, "TSS24.BF2", 1, 1, "打印人: ");
                     command.setText(200, 340, "TSS24.BF2", 1, 1, "报工人: ");
                     command.setText(290, 340, "TSS24.BF2", 1, 1, this.selectedPerson);
@@ -1397,6 +1459,7 @@
               }
                           this.oldbgs =  this.reportedQuantity;
                           this.bgr=
                     //从新刷新工单信息
                     loadOrderDetails();
                     //从新刷新历史记录
@@ -1467,7 +1530,7 @@
                  });
               }
            });
         this.selectedPerson = this.lastRequestData.printedBy;
            // è¡¥æ‰“上一张记录
            this.fetchHistoryRecords(this.orderNo);
            if (!this.lastRequestData) {
@@ -1478,6 +1541,8 @@
               });
               return;
            }
               //20250507 æ–°åŠ èµ‹å€¼åŽ†å²æ¡ç æŠ¥å·¥äºº
               this.selectedPerson = this.lastRequestData.printedBy;
            console.log("老条码", this.oldbgs);
            // é‡æ–°æ‰“印上一张记录
            // async reprintLast() {