Browse Source

【修改】bug

莫绍宝 3 năm trước cách đây
mục cha
commit
4e5a0866ac

+ 7 - 1
src/views/supply/engin/components/engin_form.vue

@@ -415,6 +415,12 @@ export default {
             }
           }
 
+          let goodsList = JSON.parse(JSON.stringify(this.goodsList));
+
+          goodsList.forEach(item => {
+            delete item.productList;
+          })
+
           let params = {
             // orderDate: this.mainForm.orderDate + ' 00:00:00',
             // mainId: this.mainForm.mainId,
@@ -430,7 +436,7 @@ export default {
             tel: this.mainForm.tel,
             remark: this.mainForm.remark,
             contractExpireDate: this.mainForm.contractDate,
-            items: this.goodsList
+            items: goodsList
           }
           if(type === 1) {
             if(this.listItem) {

+ 4 - 3
src/views/supply/engin/components/home_form.vue

@@ -289,7 +289,7 @@
           max-height="270">
           <el-table-column align="center" label="" width="100">
             <template slot-scope="scope">
-              <el-button type="primary" size="small" @click="chooseItem(scope.row.recordNo)">选择</el-button>
+              <el-button type="primary" size="small" @click="chooseItem(scope.row.recordNo, scope.row.userid)">选择</el-button>
             </template>
           </el-table-column>
           <el-table-column align="center" prop="checkTime" label="工程登录日期" show-overflow-tooltip></el-table-column>
@@ -564,10 +564,11 @@ export default {
     },
 
     // 选择工程登录
-    chooseItem(id) {
+    chooseItem(id, uid) {
       getHomeLoginDetail({
         recordNo: id,
         saleTypeId: this.mainForm.saleType,
+        userId: uid
       }).then(res => {
         this.isShowDialog = false;
         let data = res.data;
@@ -625,7 +626,7 @@ export default {
     // 选择销售类型
     changeSaleType() {
       if(this.mainForm.loginNum) {
-        this.chooseItem(this.mainForm.loginNum);
+        this.chooseItem(this.mainForm.loginNum, this.mainForm.loginUserId);
       }
     },
 

+ 4 - 2
src/views/supply/retail/components/retail_form.vue

@@ -620,7 +620,9 @@ export default {
             }
           }
 
-          this.goodsList.forEach(item => {
+          let goodsList = JSON.parse(JSON.stringify(this.goodsList));
+
+          goodsList.forEach(item => {
             delete item.rebateWallets;
             delete item.wallets;
           })
@@ -632,7 +634,7 @@ export default {
             // mainName,
             remark: this.mainForm.remark,
             type: 1, // 1:普通零售单,2:政策零售单
-            retailOrderItemList: this.goodsList
+            retailOrderItemList: goodsList
           }
           if(this.listItem) {
             params.id = this.listItem.id;