lilei 8 miesięcy temu
rodzic
commit
8deea999c0

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

@@ -488,13 +488,13 @@ export default {
           })
           _this.spinning = false
         } else if (d.length) {
-          _this.tempData = d[0]
           // 售价是否低于参考成本价
           if (isBatch) { // 一键审核
-            const codeStr = _this.tempData.salesPromoDetailEntityList.map(item => item.productCode)
-            // 直接提示文字信息
-            _this.messageInfo(codeStr + '售价已低于成本价,不可一键审核!')
+            _this.tempData = { vaildPriceList: d[0].salesPromoDetailEntityList.map(item => item.productCode) }
+            this.verificationSuccess(isBatch)
           } else {
+            // 审核
+            _this.tempData = d[0]
             _this.openVaildPriceModal = true
           }
         } else {
@@ -527,6 +527,10 @@ export default {
           this.messageInfo('销售单内有品牌是【箭冠】,且三级分类是【轮胎】的产品,不可一键审核!')
           return
         }
+        if (this.tempData && this.tempData.vaildPriceList) {
+          this.messageInfo(this.tempData.vaildPriceList + '售价已低于成本价,不可一键审核!')
+          return
+        }
         // 一键审核成功
         this.showDsModal = true
         this.$refs.dsModal.setDetail(this.detailData)