Browse Source

修改bug

chenrui 6 tháng trước cách đây
mục cha
commit
f93577664c

+ 15 - 7
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -340,6 +340,16 @@ export default {
     showThreeStock () {
       this.showStockCol = true
     },
+    // 当满足发货经销商显示条件时  查询
+    searchTableData (list) {
+      this.dataSource = list.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)
+        }
+      })
+    },
     // 查询表格数据
     async searchTable () {
       this.dataSource = []
@@ -413,18 +423,16 @@ export default {
       // 发货经销商时 查询
       if (this.chooseList && this.chooseList.length) {
         this.dataSource = this.chooseList
+        console.log('111111111:', this.transferQty)
         if (this.transferQty) {
-          this.dataSource = listData.filter(item => {
-            if (this.transferQty == '0') { // 不满足
-              return (item.transferDealerStockQty < item.qty || item.transferDealerStockQty == '--')
-            } else if (this.transferQty == '1') { // 满足
-              return item.transferDealerStockQty >= item.qty
-            }
-          })
+          this.searchTableData(this.chooseList)
         }
       } else {
         // 赋值
         this.dataSource = listData
+        if (this.transferQty) {
+          this.searchTableData(listData)
+        }
       }
       // 格式化数据
       let f = 0

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

@@ -126,7 +126,7 @@
                       </a-select>
                     </a-form-item>
                   </a-col>
-                  <a-col flex="260px" v-if="$route.params.pageType!='salesNewDetailAudit'&&detailData&&detailData.salesBillSource==='PURCHASE'&&detailData.orderType==='TIRE'">
+                  <a-col flex="260px" v-if="$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')">
                     <a-form-item label="发货经销商库存">
                       <v-select
                         code="STOCK_LABEL"
@@ -149,7 +149,7 @@
               <a-button
                 id="salesDetail-updateStock"
                 type="primary"
-                v-if="$route.params.pageType!='salesNewDetailAudit'&&detailData&&detailData.salesBillSource==='PURCHASE'&&detailData.orderType==='TIRE'"
+                v-if="$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
                 style="margin:0 10px;"
                 @click="openDealerModal"
                 class="button-dealerStock">选择发货经销商</a-button>
@@ -183,7 +183,7 @@
         type="primary"
         class="button-info"
         id="salesDetail-audit-btn"
-        v-if="$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&detailData.billStatus == 'WAIT_AUDIT'&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
+        v-if="$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
         @click="handleOrder()"
       >
         转单
@@ -194,7 +194,7 @@
         type="primary"
         class="button-info"
         id="salesDetail-audit-btn"
-        v-if="detailData&&detailData.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
+        v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
         @click="handleAudit()"
       >
         审核
@@ -226,7 +226,7 @@
         :disabled="spinning"
         type="primary"
         id="salesDetail-edit1-btn"
-        v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')"
+        v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
         @click="handleChangeOrder()"
       >
         改单
@@ -237,7 +237,7 @@
         type="primary"
         class="button-success"
         id="salesDetail-batchAudit-btn"
-        v-if="detailData&&detailData.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
+        v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
         @click="handleAudit('batch')"
       >
         一键审核

+ 4 - 4
src/views/salesManagement/salesQueryNew/list.vue

@@ -222,7 +222,7 @@
                 size="small"
                 type="link"
                 class="button-warning"
-                v-if="record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
+                v-if="(record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_AUDIT_REJECT' || record.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')"
                 @click="handleDetail(record,'salesNewDetailAudit')"
               >审核</a-button>
               <a-button
@@ -245,7 +245,7 @@
                 size="small"
                 type="link"
                 class="button-info"
-                v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesEdit')"
+                v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE' || record.billStatus == 'SUPERIOR_AUDIT_REJECT' || record.billStatus == 'TRANSFER_AUDIT_REJECT') && $hasPermissions('B_salesEdit')"
                 @click="handleChangeOrder(record)"
               >
                 改单
@@ -255,7 +255,7 @@
                 size="small"
                 type="link"
                 class="button-success"
-                v-if="record.promoFlag!=1&&record.billStatus == 'WAIT_AUDIT'&&record.salesBillSource==='PURCHASE'&&record.orderType==='TIRE'"
+                v-if="record.promoFlag!=1&&(record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'SUPERIOR_AUDIT_REJECT' || record.billStatus == 'TRANSFER_AUDIT_REJECT')&&record.salesBillSource=='PURCHASE'&&record.orderType==='TIRE'"
                 @click="handleDetail(record,'salesNewDetailTransfer')"
               >
                 转单
@@ -283,7 +283,7 @@
                 size="small"
                 type="link"
                 class="button-error"
-                v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesDel')"
+                v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE'||record.billStatus == 'SUPERIOR_AUDIT_REJECT' || record.billStatus == 'TRANSFER_AUDIT_REJECT') && $hasPermissions('B_salesDel')"
                 @click="handleDel(record)"
               >
                 取消