浏览代码

Merge branch 'develop_yh50' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh50

lilei 6 月之前
父节点
当前提交
18f0d0864a

+ 4 - 3
src/views/salesManagement/salesQueryNew/edit.vue

@@ -421,7 +421,6 @@ export default {
       const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.salesBillSn }).then(res => res.data)
       const a = vaildActive.filter(item => item.type == 1) // 不可提交
       const b = vaildActive.filter(item => item.type == 0) // 可跳过继续提交
-      const d = vaildActive.filter(item => item.type == 'audit') // 售价是否低于参考成本价
       // 弹出不符合规则弹框,不可提交
       if (a.length) {
         this.$info({
@@ -461,9 +460,11 @@ export default {
             }
           })
           _this.spinning = false
-        } else if (d.length) {
+          // 售价是否低于参考成本价
+        } else if (vaildActive && vaildActive.length) {
           _this.spinning = false
-          _this.tempData = d
+          _this.tempData.salesPromoDetailEntityList = vaildActive
+          _this.tempData.message = '共' + vaildActive.length + '款产品售价小于等于0'
           _this.openVaildPriceModal = true
         } else {
           _this.submitOrder(data)

+ 19 - 13
src/views/salesManagement/salesQueryNew/vaildPriceModal.vue

@@ -59,21 +59,9 @@ export default {
     }
   },
   data () {
-    const _this = this
     return {
       isShow: this.openModal,
-      spinning: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
-        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '参考成本价小计', dataIndex: 'totalCostAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
-      ]
+      spinning: false
     }
   },
   computed: {
@@ -85,6 +73,24 @@ export default {
         item.totalKsAmount = item.totalAmount - item.totalCostAmount
       })
       return list
+    },
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center', customRender: function (text, row, index) { return index + 1 } },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'promotionPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价小计', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+
+      ]
+      if (_this.modalType == 0) {
+        arr.splice(2, 0, { title: '参考成本价', dataIndex: 'showCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '参考成本价小计', dataIndex: 'totalCostAmount', width: '15%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '亏损金额', dataIndex: 'totalKsAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
+      return arr
     }
   },
   methods: {