lilei 1 yıl önce
ebeveyn
işleme
1c7d252ac3

+ 6 - 1
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -232,7 +232,12 @@ export default {
         retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
       })
       console.log(retArr, '------------')
-      this.handlePrint(retArr, rows)
+      if(retArr.length){
+        this.handlePrint(retArr, rows)
+      }else{
+        this.$message.info("此收款单明细为空或没有相关数据权限")
+        this.spinning = false
+      }
     },
     // 收款打印
     handlePrint (row, list) {

+ 6 - 1
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -105,6 +105,7 @@
           showEmpty: false,
           showTableHead: true,
           colspanNums: 13,
+          hasOutStockOfActive: false,
           simpleImage: Empty.PRESENTED_IMAGE_SIMPLE
         }
       },
@@ -320,6 +321,7 @@
                 if(acTotal&&acTotal.totalQty){
                   // 获取活动产品列表
                   const aclist = await salesDetailAllList(activeParams).then(res => res.data)
+                  
                   const retList = aclist.length ? [{
                     id: 'promo-'+i,
                     promo: promo,
@@ -340,7 +342,7 @@
             }
             console.log(listData)
             this.dataSource = listData
-
+            
             // 格式化数据
             let f = 0
             this.outStockStr = ''
@@ -359,6 +361,9 @@
               item.epushedQty = Number(item.pushedQty) - Number(item.pushQty)
               if (item.unpushedQty && (Number(item.stockQty) < Number(item.unpushedQty))) {
                   str += item.productCode + '、'
+                  if(item.promotionFlag != 0){
+                    this.hasOutStockOfActive = true
+                  }
               }
             })
             if (str.length > 0) {

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

@@ -346,10 +346,10 @@ export default {
     // 打开审核/一键审核弹框
     handleAudit (isBatch) {
       if (isBatch) { // 一键审核
-        if (this.detailData && this.detailData.promoFlag == 1 && this.$refs.productList.outStockStr != '') {
+        if (this.$refs.productList.hasOutStockOfActive) {
           this.$info({
             title: '提示',
-            content: '参加促销活动的销售单,有缺货产品,不可一键审核!',
+            content: '参加促销活动的产品存在缺货,不可一键审核!',
             centered: true
           })
           return