From fcfa50cf224f515baffb647d75f53797575be8df Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 18 六月 2025 11:00:01 +0800
Subject: [PATCH] pda报工单元测试

---
 pages/product/report/index.vue |   39 ++++++++++++---------------------------
 1 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/pages/product/report/index.vue b/pages/product/report/index.vue
index c327e83..d66fafe 100644
--- a/pages/product/report/index.vue
+++ b/pages/product/report/index.vue
@@ -74,13 +74,13 @@
           <u-radio name="鎶曟枡">鎶曟枡</u-radio>
         </u-radio-group>
       </u-form-item>
-      <u-form-item label="宸ュ簭" prop="value11">
+      <u-form-item label="宸ュ簭" prop="value1">
         <u-checkbox-group>
           <u-checkbox
             :name="item.name"
             v-for="(item, index) in checkboxList"
             :key="index"
-            v-model="item.value11"
+            v-model="item.value1"
             @change="changeCheckbox"
             :disabled="subdisabled || item.disabled"
           >
@@ -119,7 +119,7 @@
                   <view class="_label-name">鏁伴噺锛�</view>
                 </view>
                 <view class="_content">
-                  {{ item.value1 }}
+                  {{ item.netWeight }}
                 </view>
               </view>
               <view class="row-list">
@@ -147,7 +147,7 @@
     </modalBg>
     <saveForm
       ref="saveForm"
-      :operationTaskId="this.form"
+      :operationTaskList="this.form"
       @update="handleUpdate"
     />
     <scan></scan>
@@ -180,6 +180,7 @@
       ],
       InventoryReceiptList: [],
       form: {
+        workstationId: "",
         work: "",
         taskNo: "",
         name: "",
@@ -190,7 +191,7 @@
         Jianqtyfinished: "",
         proposedLocation: "",
         productType: "dep",
-        receive: "mo", // 澶嶉�夋缁勭殑鍊�
+        receive: "mo",
         materialcost: "",
         autoReport: false,
         simplifyMaterials: false,
@@ -247,27 +248,23 @@
   // 鐐瑰嚮鎻愪氦鎸夐挳鐨勪簨浠跺鐞嗗嚱鏁�
   onNavigationBarButtonTap() {
     this.$refs.uForm.validate((valid) => {
-		if (valid) {
-		uni.showLoading({
+      if (valid) {
+        uni.showLoading({
           mask: true,
           title: "鍔犺浇涓�",
         });
-        console.log("楠岃瘉閫氳繃");
         // 澶勭悊鎻愪氦閫昏緫
         this.$u.api.workReporting
           .operationTask({
             id: this.form.id,
           })
           .then((res) => {
-            console.log("res", res);
             this.$refs.saveForm.open(res);
             uni.hideLoading();
           });
       } else {
-        console.log("楠岃瘉澶辫触");
         // 鍙互鑾峰彇鍏蜂綋鐨勯敊璇俊鎭�
         const errors = this.$refs.uForm.getError();
-        console.log("閿欒淇℃伅:", errors);
       }
     });
   },
@@ -276,12 +273,9 @@
   },
   onShow() {
     let that = this;
-    console.log("1111111111111");
     uni.$off("scan"); // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
     uni.$on("scan", function (data) {
-      console.log("onscan");
       //鎵爜鎴愬姛鍚庣殑鍥炶皟锛屼綘鍙互鍐欒嚜宸辩殑閫昏緫浠g爜鍦ㄨ繖閲�
-      console.log("椤甸潰鎵爜缁撴灉锛�", data.code);
       if (data.code) {
         let codeInfo = JSON.parse(data.code);
         if (codeInfo.moOn) {
@@ -291,28 +285,21 @@
             .getProductMainV1({
               current: 1,
               size: -1,
-              operationTaskId: codeInfo.id,
+              id: codeInfo.id,
             })
             .then((res) => {
-              console.log("res", res);
-              let InventoryReceiptList = JSON.parse(res.data.records);
-              that.saveInventory(InventoryReceiptList);
+              that.InventoryReceiptList = res.data.productOutputList;
             });
-          console.log("this.InventoryReceiptList", that.InventoryReceiptList);
         }
       }
     });
   },
   watch: {
     "form.taskNo": function (newVal, oldVal) {
-      console.log("taskNo changed:", newVal, oldVal);
       this.subdisabled = false;
     },
   },
   methods: {
-    saveInventory(val) {
-      this.InventoryReceiptList = val;
-    },
     // 澶氶�夊鐞�
     changeCheckbox(val) {
       if (val.name === "宸ュ簭鐨勮嚜鍔ㄦ姤鍛�") {
@@ -330,9 +317,7 @@
       this.$refs.modalBg.open();
     },
     // 寮规淇濆瓨
-    confirm() {
-      console.log("淇濆瓨", this.form.taskNo);
-    },
+    confirm() {},
     // 閫夋嫨璁㈠崟鍙�
     openList() {
       if (this.form.taskNo === "") {
@@ -352,9 +337,9 @@
     },
     // 鍥炴樉鎵爜鐨勪俊鎭�-鎶ュ伐鍗�
     saveForm(val) {
-      console.log("鍥炴樉鐨勬暟鎹�", val);
       this.form = {
         id: val.id,
+        workstationId: val.workstationId,
         work: val.work,
         taskNo: val.taskNo,
         name: val.name,

--
Gitblit v1.9.3