lilei 6 kuukautta sitten
vanhempi
commit
4778ecc5c3

+ 13 - 14
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -307,16 +307,17 @@ export default {
       this.showStockCol = true
     },
     // 当满足发货经销商显示条件时  查询
-    searchTableData (list) {
-      this.dataSource = list.filter(item => {
+    transferTableData (list) {
+      console.log(list, this.warehouseSn)
+      this.dataSource = list.filter(item => this.warehouseSn != '' ? item.warehouseSn == this.warehouseSn : true).filter(item => {
         if (this.transferQty == '0') { // 不满足
           return (!item.transferDealerStockQty || (item.transferDealerStockQty && item.transferDealerStockQty * 1 < item.qty * 1))
         } else if (this.transferQty == '1') { // 满足
           return (item.transferDealerStockQty && item.transferDealerStockQty * 1 >= item.qty * 1)
         } else {
-          return false
+          return true
         }
-      }).filter(item => item.warehouseSn == this.warehouseSn)
+      })
     },
     // 查询表格数据
     async searchTable () {
@@ -330,23 +331,21 @@ export default {
         warehouseSn: this.warehouseSn,
         promotionFlag: this.promoFlag == '' ? undefined : this.promoFlag
       }
-
-      // 查询正常产品明细列表
-      const normalList = this.type == 'normal' ? await salesDetailAllList(params).then(res => res.data) : []
-      this.countData = this.type == 'normal' ? await salesDetaiCount(params).then(res => res.data) : null
-      // 查询活动产品明细列表
-      const activeList = this.type == 'active' ? await salesDetailExtPromoList({ salesPromoSnSet: [], ...params }).then(res => res.data) : []
-      // 发货经销商时 查询
+      // 查询正常产品
       if (this.type == 'normal') {
+        // 转单时
         if (this.chooseList && this.chooseList.length) {
-          this.searchTableData(this.chooseList)
+          this.transferTableData(this.chooseList)
         } else {
+          // 查询正常产品明细列表
+          const normalList = await salesDetailAllList(params).then(res => res.data || [])
+          this.countData = await salesDetaiCount(params).then(res => res.data || null)
           // 赋值
           this.dataSource = normalList
         }
       } else {
-        // 查询活动产品
-        this.dataSource = activeList
+        // 查询活动产品明细列表
+        this.dataSource = await salesDetailExtPromoList({ salesPromoSnSet: [], ...params }).then(res => res.data || [])
       }
 
       // 没用数据,则不显示当前表格

+ 3 - 3
src/views/salesManagement/salesQueryNew/detail.vue

@@ -105,7 +105,7 @@
                     </a-form-item>
                   </a-col>
                   <a-col flex="300px" v-if="showTransferDealer">
-                    <a-form-item label="发货经销商库存">
+                    <a-form-item label="发货经销商库存" style="margin-bottom: 0!important;">
                       <v-select
                         code="STOCK_LABEL"
                         id="purchaseOrder-basicInfo-transferQty"
@@ -126,7 +126,7 @@
               <span v-if="selectedDealer">(发货经销商:{{ selectedDealer }})</span>
               <a-button
                 id="salesDetail-updateStock"
-                type="primary"
+                type="link"
                 v-if="showTransferDealer"
                 style="margin:0 10px;"
                 @click="openDealerModal"
@@ -455,7 +455,7 @@ export default {
     openDealerModal () {
       this.openDealerStock = true
     },
-    // 确定选择经销商库存
+    // 确定选择经销商库存转单
     openDealerStockOk (val, data) {
       this.selectedDealer = val.dealerName
       this.selectedDealerSn = val.dealerSn