lilei 6 days ago
parent
commit
b71cae4160

+ 5 - 0
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -399,6 +399,11 @@ export default {
         // 查询活动产品明细列表
         // 查询活动产品明细列表
         if (this.promoProductClz !== '0') {
         if (this.promoProductClz !== '0') {
           this.dataSource = await salesDetailExtPromoList({ salesPromoSnSet: this.salesPromoSnSet, promoProductClz: this.promoProductClz == '' ? undefined : this.promoProductClz, ...params }).then(res => res.data || [])
           this.dataSource = await salesDetailExtPromoList({ salesPromoSnSet: this.salesPromoSnSet, promoProductClz: this.promoProductClz == '' ? undefined : this.promoProductClz, ...params }).then(res => res.data || [])
+          // 是否只有累计产品
+          if (this.borrowFlag == '') {
+            const onlyBorrow = this.dataSource.filter(item => item.borrowFlag == 1)
+            this.$emit('onlyBorrow', onlyBorrow.length > 0 && onlyBorrow.length == this.dataSource.length)
+          }
         }
         }
       }
       }
       this.$emit('hideTable', this.type, this.dataSource.length)
       this.$emit('hideTable', this.type, this.dataSource.length)

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

@@ -281,7 +281,8 @@
           :authCode="authCode"
           :authCode="authCode"
           :showCityPrice="isCityPrice"
           :showCityPrice="isCityPrice"
           :showAveragePrice="isAveragePrice"
           :showAveragePrice="isAveragePrice"
-          @hideTable="hideTable">
+          @hideTable="hideTable"
+          @onlyBorrow="v=>onlyBorrowFlag=v">
         </detailProductList>
         </detailProductList>
       </a-card>
       </a-card>
     </a-spin>
     </a-spin>
@@ -473,7 +474,8 @@ export default {
       salesPromoSnSet: [], // 当前勾选的活动sn
       salesPromoSnSet: [], // 当前勾选的活动sn
       chooseDealerList: [], // 发货经销商数据
       chooseDealerList: [], // 发货经销商数据
       colsOptions: [],
       colsOptions: [],
-      colsValue: []
+      colsValue: [],
+      onlyBorrowFlag: false
     }
     }
   },
   },
   computed: {
   computed: {
@@ -1000,6 +1002,10 @@ export default {
     // 打印导出弹框
     // 打印导出弹框
     handlePrint (type, authCode) {
     handlePrint (type, authCode) {
       const _this = this
       const _this = this
+      if (this.onlyBorrowFlag) {
+        _this.$message.warning('单据均是累计产品无需打印或导出!')
+        return
+      }
       _this.$store.state.app.curActionPermission = authCode
       _this.$store.state.app.curActionPermission = authCode
       // 销售分类导出
       // 销售分类导出
       if (type == 'typeExport') {
       if (type == 'typeExport') {