From f1ee5a9bc88eff3a75245569e091fe352a452922 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 03 六月 2023 09:11:29 +0800
Subject: [PATCH] 1.递交

---
 src/views/produceManager/productWarehouse.vue |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/views/produceManager/productWarehouse.vue b/src/views/produceManager/productWarehouse.vue
index 6b71dc1..6de1dca 100644
--- a/src/views/produceManager/productWarehouse.vue
+++ b/src/views/produceManager/productWarehouse.vue
@@ -694,8 +694,8 @@
         incbit: '', // 娴佹按鍙�
         documentType: 'Y', // 鍗曟嵁绫诲瀷
 
-        wkshopcode: 'CJ001', // 鐢熶骇杞﹂棿
-        erpordercode: 'MO-2023-05-0007', // 璁㈠崟缂栧彿
+        wkshopcode: '', // 鐢熶骇杞﹂棿
+        erpordercode: '', // 璁㈠崟缂栧彿
         mesordercode: '', // 宸ュ崟缂栧彿
         partcode: '', // 浜у搧缂栫爜
         partname: '', // 浜у搧鍚嶇О
@@ -742,7 +742,7 @@
 
     this.getProductInHouseOrderCodeSearch()
 
-    this.getProductInHouseOrderSearch()
+    // this.getProductInHouseOrderSearch()
   },
   methods: {
     async getProductInHouseOrderCodeSearch() {
@@ -924,13 +924,13 @@
               stinhouseqty,
               unitid: t.unitid,
               unitname: t.unitname,
-              sourceVoucherDetailId: t.sourceVoucherDetailId,
+              sourceVoucherDetailId: t.sbid,
               saleOrderDetailId: t.saleOrderDetailId,
-              ManufactureOrderDetailId: t.ManufactureOrderDetailId,
+              ManufactureOrderDetailId: t.sbid,
               stck_id: this.stockcodeArr.find(i => i.code === t.stockcode).id,
               SourceVoucherDetailIdByMergedFlow: t.sbid,
               materiel_code: t.partcode,
-              warehouse: t.warehouse,
+              warehouse: t.stockcode,
               materiel_id: t.materiel_id
             }
           )
@@ -974,20 +974,25 @@
     // 鍏ュ簱鎻愪氦
     async  submit() {
       await this.tabClick()
+      if (this.multipleSelection.find(i => !i.stockcode)) {
+        return this.$message('鏄庣粏閲岄潰鏈変骇鍝佹湭濉啓浠撳簱锛�')
+      }
       this.multipleSelection.forEach(i => {
         i.stockname = this.stockcodeArr.find(j => j.code === i.stockcode).name
         i.id = this.stockcodeArr.find(j => j.code === i.stockcode).id
       })
 
       const head = {
+        rightcode: '2064',
         hbillno: this.form.hbillno,
         incbit: this.form.incbit,
+        wkshpcode: this.form.wkshopcode,
         sourceVoucherId: this.form.documentType === 'Y' ? this.tableDataDetail[0].mpoid : '',
         sourceVoucherCode: this.form.documentType === 'Y' ? this.tableDataDetail[0].m_po : this.tableDataDetail[0].wo_code,
         saleOrderId: this.tableDataDetail[0].saleOrderid,
         saleOrderCode: this.tableDataDetail[0].saleOrderCode,
         rdDirectionFlag: 1,
-        makerid: this.userArr.find(i => i.name === getCookie('username').id),
+        makerid: this.userArr.find(i => i.name === getCookie('username')).id,
         maker: getCookie('username'),
         accountingyear: new Date().getFullYear(),
         VoucherYear: new Date().getFullYear(),
@@ -997,12 +1002,13 @@
         iddepartment: this.WorkShopArr.find(i => i.code === this.form.wkshopcode).id,
         idrdstyle: 21,
         idwarehouse: '',
-        voucherState: handleDatetime(new Date().getTime()),
+        voucherState: 181,
         idvouchertype: 15,
         voucherdate: handleDatetime(new Date().getTime()),
         madedate: handleDatetime(new Date().getTime()),
         createdtime: handleDatetime2(new Date().getTime()),
-        DataSource: '56133'
+        DataSource: '56133',
+        idsourcevouchertype: 69
       }
 
       const subsum = []
@@ -1027,6 +1033,7 @@
           idbusiTypeByMergedFlow: 3,
           idinventory: i.materiel_id,
           idbaseunit: i.unitid,
+          idunit: i.unitid,
           idwarehouse: i.stck_id,
           SourceVoucherIdByMergedFlow: this.tableDataDetail[0].mpoid,
           SourceVoucherCodeByMergedFlow: this.tableDataDetail[0].m_po,
@@ -1043,7 +1050,7 @@
         head, sub: this.multipleSelection, subsum
       }
 
-      console.log(JSON.stringify(data))
+      // console.log(JSON.stringify(data))
 
       const res = await ProductInHouseOrderSeave(data)
       if (res.code === '200') {

--
Gitblit v1.9.3