lilei 2 days ago
parent
commit
2f0efc7a28

+ 24 - 8
src/views/promotionRulesManagement/dealerPromotions/detailModal.vue

@@ -317,9 +317,10 @@ export default {
       var arr = []
       if (_this.form.discountType === '1') {
         arr = [
-          { title: '省价折扣', dataIndex: 'provinceValue', width: '33%', align: 'center', customRender: function (text) { return (text ? (text.toFixed(2) + '%') : '--') } },
-          { title: '市价折扣', dataIndex: 'cityValue', width: '33%', align: 'center', customRender: function (text) { return (text ? (text.toFixed(2) + '%') : '--') } },
-          { title: '特约折扣', dataIndex: 'specialValue', width: '33%', align: 'center', customRender: function (text) { return (text ? (text.toFixed(2) + '%') : '--') } }
+          { title: '特价产品原价金额', dataIndex: 'orginAmountValue', width: '25%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+          { title: '省价折扣', dataIndex: 'provinceValue', width: '25%', align: 'center', customRender: function (text) { return (text ? (text.toFixed(2) + '%') : '--') } },
+          { title: '市价折扣', dataIndex: 'cityValue', width: '25%', align: 'center', customRender: function (text) { return (text ? (text.toFixed(2) + '%') : '--') } },
+          { title: '特约折扣', dataIndex: 'specialValue', width: '25%', align: 'center', customRender: function (text) { return (text ? (text.toFixed(2) + '%') : '--') } }
         ]
       } else if (_this.form.discountType === '2') {
         arr = [
@@ -406,11 +407,26 @@ export default {
             }
           }
           this.form = { ...this.form, ...resultObj }
-          this.setTableData = [{
-            provinceValue: this.form.provinceValue,
-            cityValue: this.form.cityValue,
-            specialValue: this.form.specialValue
-          }]
+          // 阶梯
+          if (resultObj.discountType != '0') {
+            if (resultObj.discountType == '1' && resultObj.specialDiscountList) {
+              this.setTableData = resultObj.specialDiscountList.map(item => {
+                return {
+                  orginAmountValue: item.discountScopePrice,
+                  provinceValue: item.provinceDiscountRate,
+                  cityValue: item.cityDiscountRate,
+                  specialValue: item.specialDiscountRate,
+                  scopeLevel: item.scopeLevel
+                }
+              })
+            } else {
+              this.setTableData = [{
+                provinceValue: resultObj.provinceValue,
+                cityValue: resultObj.cityValue,
+                specialValue: resultObj.specialValue
+              }]
+            }
+          }
         }
       })
     },

+ 0 - 1
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -485,7 +485,6 @@ export default {
             }
           }
           // 验证特价规则条件必填
-          console.log(_this.setTableData)
           if (_this.form.discountType != '0' && _this.setTableData) {
             const hasTemp = _this.setTableData.some(item => {
               if (_this.form.discountType == '2') {