Ver código fonte

特价产品

chenrui 1 ano atrás
pai
commit
bf12f84783

+ 1 - 1
src/views/productManagement/productSourcePath/chooseImportModal.vue

@@ -13,7 +13,7 @@
       <div class="chooseImport-head">
         <p class="text-overflow">可导入数据{{ loadData.length }}条</p>
         <p>
-          <a-tooltip placement="right">
+          <a-tooltip placement="rightTop">
             <template slot="title">
               <div v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }})<span v-for="(item,j) in con.info" :key="j">{{ item.productCode }}(<span class="red">{{ item.productNum }}</span>/{{ item.bizProductNum }});</span></div>
             </template>

+ 4 - 4
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -34,7 +34,7 @@
               v-model="form.gateType"
               id="promotionList-gateType"
               code="PROMOTION_GATE_TYPE"
-              placeholder="请选择"
+              placeholder="请选择门槛与配额设置要求"
               @change="changeGateTypeFlag"
               allowClear></v-select>
             <div v-if="form.gateType==='RATIO_AMOUNT'">
@@ -65,7 +65,7 @@
             :maxLength="20"></a-input>
         </a-form-model-item>
         <a-form-model-item label="满赠规则" prop="giveRuleType">
-          <a-select default-value="SUM_MONEY" v-model="form.giveRuleType" style="width: 160px" size="small">
+          <a-select default-value="SUM_MONEY" v-model="form.giveRuleType" style="width: 160px" size="small" allowClear>
             <a-select-option value="SUM_MONEY">
               金额叠加
             </a-select-option>
@@ -86,7 +86,7 @@
               :precision="2"
               :min="0"
               size="small"/>
-            <a-select default-value="YUAN" v-model="form.regularUnit" style="width: 50px;margin-left:5px;" size="small">
+            <a-select default-value="YUAN" v-model="form.regularUnit" style="width: 50px;margin-left:5px;" size="small" allowClear>
               <a-select-option value="YUAN">
               </a-select-option>
@@ -116,7 +116,7 @@
                 :max="999999"
                 :precision="0"
                 size="small"/>
-              <a-select default-value="YUAN" v-model="con.regularUnit" style="width: 50px;margin-left:5px;" size="small">
+              <a-select default-value="YUAN" v-model="con.regularUnit" style="width: 50px;margin-left:5px;" size="small" allowClear>
                 <a-select-option value="YUAN">
                 </a-select-option>

+ 10 - 3
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -34,7 +34,7 @@
               v-model="form.gateType"
               id="promotionList-gateType"
               code="PROMOTION_GATE_TYPE"
-              placeholder="请选择"
+              placeholder="请选择门槛与配额设置要求"
               @change="changeGateTypeFlag"
               allowClear></v-select>
             <div v-if="form.gateType==='RATIO_AMOUNT'">
@@ -74,7 +74,8 @@
                 v-model="form.regularSameFlag"
                 style="width: 100px"
                 size="small"
-                @change="handleFullGift">
+                @change="handleFullGift"
+                allowClear>
                 <a-select-option value="1">
                   同款
                 </a-select-option>
@@ -90,7 +91,13 @@
                 :max="999999"
                 :precision="0"
                 size="small"/>
-              <a-select default-value="YUAN" :disabled="i!=0" v-model="form.regularUnit" style="width: 50px;margin-left:5px;" size="small">
+              <a-select
+                default-value="YUAN"
+                :disabled="i!=0"
+                v-model="form.regularUnit"
+                style="width: 50px;margin-left:5px;"
+                size="small"
+                allowClear>
                 <a-select-option value="YUAN">
                 </a-select-option>

+ 76 - 64
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -16,23 +16,14 @@
         :rules="rules"
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol" >
-        <a-form-model-item label="规则简称" prop="description">
-          <a-input
-            size="small"
-            id="promotionList-description"
-            v-model.trim="form.description"
-            allowClear
-            placeholder="请输入规则简称(最多20个字符)"
-            :maxLength="20"></a-input>
-        </a-form-model-item>
         <a-form-model-item label="规则门槛" prop="gateFlag">
           <a-radio-group v-model="form.gateFlag" button-style="solid" size="small" @change="handleChange">
-            <a-radio value="1">
+            <a-radio-button value="1">
-            </a-radio>
-            <a-radio value="0">
+            </a-radio-button>
+            <a-radio-button value="0">
-            </a-radio>
+            </a-radio-button>
           </a-radio-group>
           <div v-if="form.gateFlag && form.gateFlag === '1'">
             <v-select
@@ -41,26 +32,26 @@
               v-model="form.gateType"
               id="promotionList-gateType"
               code="PROMOTION_GATE_TYPE"
-              placeholder="请选择"
+              placeholder="请选择门槛与配额设置要求"
               @change="changeGateTypeFlag"
               allowClear></v-select>
             <div v-if="form.gateType==='RATIO_AMOUNT'">
-              购买门槛产品金额 <a-input-number v-model="form.gateAmount" :min="0" :max="999999" :precision="2" size="small"/> %作为配额
+              购买门槛产品金额 <a-input-number v-model="form.gateValue" :min="0" :max="999999" :precision="2" size="small"/> %作为配额
               <a-tooltip title="如:填写100%,则购买10000元门槛产品,可享受10000配额购买特价产品,根据门槛金额动态调整配额">
                 <a-icon type="question-circle" theme="filled" :style="{ fontSize: '14px', color: 'gray' }"/>
               </a-tooltip>
             </div>
             <div v-if="form.gateType==='MIN_AMOUNT'">
-              购买门槛产品满最低金额 <a-input-number v-model="form.gateAmount" :min="0" :max="999999" :precision="2" size="small"/>元,不限制配额。
+              购买门槛产品满最低金额 <a-input-number v-model="form.gateValue" :min="0" :max="999999" :precision="2" size="small"/>元,不限制配额。
             </div>
             <div class="ruleDescList" v-if="form.gateType==='FIXED_AMOUNT'">
               购买每满
-              <a-input-number v-model="form.gateAmount" :max="999999" :min="0" :precision="2" size="small"/>
-              <a-select default-value="1" v-model="form.regularSameFlag" style="width: 50px;margin-left:5px;" size="small">
-                <a-select-option value="1">
+              <a-input-number v-model="form.gateValue" :max="999999" :min="0" :precision="2" size="small"/>
+              <a-select default-value="YUAN" v-model="form.regularUnit" style="width: 50px;margin-left:5px;" size="small" allowClear>
+                <a-select-option value="YUAN">
                 </a-select-option>
-                <a-select-option value="0">
+                <a-select-option value="GE">
                 </a-select-option>
               </a-select>
@@ -70,16 +61,35 @@
             </div>
           </div>
         </a-form-model-item>
-        <a-form-model-item label="特价规则" prop="description">
-          <a-select default-value="1" v-model="form.regularSameFlag" style="width:60%;" size="small">
+        <a-form-model-item label="规则简称" prop="description">
+          <a-input
+            size="small"
+            id="promotionList-description"
+            v-model.trim="form.description"
+            allowClear
+            placeholder="请输入规则简称(最多20个字符)"
+            :maxLength="20"></a-input>
+        </a-form-model-item>
+        <a-form-model-item label="特价规则" prop="discountType">
+          <a-select
+            default-value="0"
+            v-model="form.discountType"
+            placeholder="请选择"
+            style="width:60%;"
+            size="small"
+            allowClear>
+            <a-select-option value="0">
+              手动输入特价
+            </a-select-option>
             <a-select-option value="1">
               各级别价打折
             </a-select-option>
-            <a-select-option value="0">
+            <a-select-option value="2">
               各级别价直降
             </a-select-option>
           </a-select>
           <a-table
+            v-if="form.discountType!=0"
             class="sTable"
             ref="setTable"
             size="small"
@@ -91,30 +101,30 @@
             bordered>
             <template slot="provinceDiscount" slot-scope="text, record">
               <a-input
-                v-model="record.provinceDiscountRate"
+                v-model="record.provinceValue"
                 style="width:80%;"
                 type="number"
-                @input="record.provinceDiscountRate=record.provinceDiscountRate.match(/^\d{1,4}(\.?\d{0,2})/g) ? record.provinceDiscountRate.match(/^\d{1,4}(\.?\d{0,2})/g)[0] : ''"
+                @input="record.provinceValue=record.provinceValue.match(/^\d{1,4}(\.?\d{0,2})/g) ? record.provinceValue.match(/^\d{1,4}(\.?\d{0,2})/g)[0] : ''"
                 :min="0"
                 placeholder="请输入"
                 size="small"/>%
             </template>
             <template slot="cityDiscount" slot-scope="text, record">
               <a-input
-                v-model="record.provinceDiscountRate"
+                v-model="record.cityValue"
                 style="width:80%;"
                 type="number"
-                @input="record.provinceDiscountRate=record.provinceDiscountRate.match(/^\d{1,4}(\.?\d{0,2})/g) ? record.provinceDiscountRate.match(/^\d{1,4}(\.?\d{0,2})/g)[0] : ''"
+                @input="record.cityValue=record.cityValue.match(/^\d{1,4}(\.?\d{0,2})/g) ? record.cityValue.match(/^\d{1,4}(\.?\d{0,2})/g)[0] : ''"
                 :min="0"
                 placeholder="请输入"
                 size="small"/>%
             </template>
             <template slot="specialDiscount" slot-scope="text, record">
               <a-input
-                v-model="record.provinceDiscountRate"
+                v-model="record.specialValue"
                 style="width:80%;"
                 type="number"
-                @input="record.provinceDiscountRate=record.provinceDiscountRate.match(/^\d{1,4}(\.?\d{0,2})/g) ? record.provinceDiscountRate.match(/^\d{1,4}(\.?\d{0,2})/g)[0] : ''"
+                @input="record.specialValue=record.specialValue.match(/^\d{1,4}(\.?\d{0,2})/g) ? record.specialValue.match(/^\d{1,4}(\.?\d{0,2})/g)[0] : ''"
                 :min="0"
                 placeholder="请输入"
                 size="small"/>%
@@ -122,30 +132,30 @@
             <template slot="provincePrice" slot-scope="text, record">
               <a-input-number
                 size="small"
-                v-model="record.unitQty"
+                v-model="record.provinceSubtract"
                 :min="0"
                 :step="1"
-                :precision="0"
+                :precision="2"
                 :max="999999"
                 placeholder="请输入"/>
             </template>
             <template slot="cityPrice" slot-scope="text, record">
               <a-input-number
                 size="small"
-                v-model="record.unitQty"
+                v-model="record.citySubtract"
                 :min="0"
                 :step="1"
-                :precision="0"
+                :precision="2"
                 :max="999999"
                 placeholder="请输入"/>
             </template>
             <template slot="specialPrice" slot-scope="text, record">
               <a-input-number
                 size="small"
-                v-model="record.unitQty"
+                v-model="record.specialSubtract"
                 :min="0"
                 :step="1"
-                :precision="0"
+                :precision="2"
                 :max="999999"
                 placeholder="请输入"/>
             </template>
@@ -181,7 +191,7 @@
           </div>
         </div>
         <div v-show="chooseVal=='a'"><tableType1 ref="cillProduct"></tableType1></div>
-        <div v-show="chooseVal=='d'"><tableType3 ref="specialProduct"></tableType3></div>
+        <div v-show="chooseVal=='d'"><tableType3 :setData="setTableData" :rulesType="form.discountType" ref="specialProduct"></tableType3></div>
       </a-card>
       <div class="btn-cont">
         <a-button id="promotionList-basicInfo-modal-back" @click="isShow = false">取消</a-button>
@@ -229,7 +239,6 @@ export default {
   },
   data () {
     return {
-      setTableData: [],
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
       formItemLayout: {
@@ -238,46 +247,52 @@ export default {
       },
       form: {
         promotionRuleType: 'PROMO_PROD', // 特价产品
-        description: '',
+        description: '', // 规则简称
         gateFlag: '0', // 门槛
         gateType: undefined,
-        gateAmount: undefined,
+        gateValue: undefined,
         quotaAmount: undefined,
-        minOrderFlag: '0', // 起订金额
-        minOrderAmount: undefined,
-        upperLimitFlag: '0', // 活动经费上限
-        upperLimitAmount: undefined
+        discountType: '0'// 特价规则
       },
       rules: {
         description: [ { required: true, message: '请输入规则简称', trigger: 'blur' } ],
         gateFlag: [ { required: true, message: '请选择规则门槛', trigger: 'change' } ],
-        minOrderFlag: [{ required: true, message: '请选择订单起订金额', trigger: 'change' }],
-        upperLimitFlag: [{ required: true, message: '请选择活动经费上限', trigger: 'change' }]
+        discountType: [{ required: true, message: '请选择特价规则', trigger: 'change' }]
       },
+      setTableData: [],
       chooseVal: 'a',
       openProductsModal: false,
       chooseProducts: [],
-      openGuideModal: false, // 导入弹窗
-      setFlag: false
+      openGuideModal: false // 导入弹窗
     }
   },
   computed: {
     setColumns () {
+      const _this = this
       var arr = []
-      if (this.setFlag) {
+      if (_this.form.discountType === '1') {
         arr = [
-          { title: '省价折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '33%', align: 'right' },
+          { title: '省价折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '33%', align: 'center' },
           { title: '市价折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '33%', align: 'center' },
           { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '33%', align: 'center' }
         ]
-      } else {
+        _this.setTableData = [{
+          provinceValue: '',
+          cityValue: '',
+          specialValue: ''
+        }]
+      } else if (_this.form.discountType === '2') {
         arr = [
-          { title: '省价直降', scopedSlots: { customRender: 'provincePrice' }, width: '33%', align: 'right' },
+          { title: '省价直降', scopedSlots: { customRender: 'provincePrice' }, width: '33%', align: 'center' },
           { title: '市价直降', scopedSlots: { customRender: 'cityPrice' }, width: '33%', align: 'center' },
           { title: '特约直降', scopedSlots: { customRender: 'specialPrice' }, width: '33%', align: 'center' }
         ]
+        _this.specialProductList = [{
+          provinceSubtract: '',
+          citySubtract: '',
+          specialSubtract: ''
+        }]
       }
-
       return arr
     }
   },
@@ -293,13 +308,13 @@ export default {
       } else {
         this.chooseVal = 'd'
         this.form.gateType = undefined
-        this.form.gateAmount = undefined
+        this.form.gateValue = undefined
         this.form.quotaAmount = undefined
       }
     },
     changeGateTypeFlag (val) {
       this.form.gateType = val
-      this.form.gateAmount = undefined
+      this.form.gateValue = undefined
       this.form.quotaAmount = undefined
     },
     //  保存
@@ -313,7 +328,7 @@ export default {
               _this.$message.warning('请选择规则门槛设置类型!')
               return
             }
-            if (!_this.form.gateAmount) {
+            if (!_this.form.gateValue) {
               _this.$message.warning('规则门槛条件不能为空!')
               return
             }
@@ -339,7 +354,7 @@ export default {
           const form = JSON.parse(JSON.stringify(_this.form))
           if (form.gateFlag == '1') {
             form.gateProductList = _this.$refs.cillProduct.getResultVal()
-            form.gateAmount = form.gateType === 'RATIO_AMOUNT' ? form.gateAmount / 100 : form.gateAmount
+            form.gateValue = form.gateType === 'RATIO_AMOUNT' ? form.gateValue / 100 : form.gateValue
             if (form.gateProductList.length == 0) {
               _this.$message.warning('请添加门槛产品!')
               return
@@ -357,7 +372,7 @@ export default {
             }
           } else {
             form.gateProductList = []
-            form.gateAmount = ''
+            form.gateValue = ''
             form.quotaAmount = ''
             form.gateType = undefined
           }
@@ -450,15 +465,12 @@ export default {
     resetSearchForm () {
       this.form = {
         promotionRuleType: 'PROMO_PROD', // 特价产品
-        description: '',
+        description: '', // 规则简称
         gateFlag: '0', // 门槛
         gateType: undefined,
-        gateAmount: undefined,
+        gateValue: undefined,
         quotaAmount: undefined,
-        minOrderFlag: '1', // 起订金额
-        minOrderAmount: undefined,
-        upperLimitFlag: '1', // 活动经费上限
-        upperLimitAmount: undefined,
+        discountType: '0', // 特价规则
         gateProductList: undefined,
         specialProductList: undefined
       }
@@ -476,7 +488,7 @@ export default {
           this.chooseVal = res.data.gateFlag == '0' ? 'd' : 'a'
           const resultObj = res.data
           if (resultObj.gateFlag === '1') {
-            resultObj.gateAmount = resultObj.gateType === 'RATIO_AMOUNT' ? resultObj.gateAmount * 100 : resultObj.gateAmount
+            resultObj.gateValue = resultObj.gateType === 'RATIO_AMOUNT' ? resultObj.gateValue * 100 : resultObj.gateValue
           }
           // 重新组成保存数据
           if (resultObj.gateProductList && resultObj.gateProductList.length > 0) {

+ 85 - 32
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -83,23 +83,30 @@
       </template>
       <!-- 省价特价 -->
       <template slot="provincePrice" slot-scope="text, record">
-        <div v-if="record.dataSourceOrigin=='1'">
-          <a-input-number
-            size="small"
-            style="width:90%;"
-            v-model="record.provinceDiscountPrice"
-            :min="0"
-            :step="1"
-            :precision="2"
-            placeholder="请输入"
-            :max="999999"
-            @blur="e=>calculatePrice(e.target.value,record.productScopeSn,'province')"/>
+        <div v-if="rulesType==='0'">
+          <div v-if="record.dataSourceOrigin=='1'">
+            <a-input-number
+              size="small"
+              style="width:90%;"
+              v-model="record.provinceDiscountPrice"
+              :min="0"
+              :step="1"
+              :precision="2"
+              placeholder="请输入"
+              :max="999999"
+              @blur="e=>calculatePrice(e.target.value,record.productScopeSn,'province')"/>
+          </div>
+          <span v-else>--</span>
+        </div>
+        <div v-else style="width:90%;background:#ccc;border-radius: 10px;text-align:center;">
+          <span v-if="rulesType=='1'">{{}}</span>
+          <span v-else>{{}}</span>
         </div>
-        <span v-else>--</span>
       </template>
       <!-- 省价折扣 -->
       <template slot="provinceDiscount" slot-scope="text, record">
-        <div v-if="record.dataSourceOrigin=='0'">
+        <div v-if="rulesType=='0'">
+          <div v-if="record.dataSourceOrigin=='0'">
             <a-input-number
               size="small"
               style="width:80%;"
@@ -109,8 +116,13 @@
               :precision="2"
               placeholder="请输入"
               :max="999999"/>%
+          </div>
+          <span v-else>{{ (record.provinceDiscountRate||record.provinceDiscountRate==0)?record.provinceDiscountRate+'%':'--' }}</span>
+        </div>
+        <div v-else>
+          <span v-if="rulesType=='1'">{{(setData[0].provinceValue||setData[0].provinceValue==0)?setData[0].provinceValue+'%':'--'}}</span>
+          <span v-else>{{(setData[0].provinceSubtract || setData[0].provinceSubtract==0)?'-'+setData[0].provinceSubtract:'--'}}</span>
         </div>
-        <span v-else>{{ (record.provinceDiscountRate||record.provinceDiscountRate==0)?record.provinceDiscountRate+'%':'--' }}</span>
       </template>
       <!-- 市价特价 -->
       <template slot="cityPrice" slot-scope="text, record">
@@ -124,13 +136,15 @@
             :precision="2"
             placeholder="请输入"
             :max="999999"
+            :disabled="rulesType!='0'"
             @blur="e=>calculatePrice(e.target.value,record.productScopeSn,'city')"/>
         </div>
         <span v-else>--</span>
       </template>
       <!-- 市价折扣 -->
       <template slot="cityDiscount" slot-scope="text, record">
-        <div v-if="record.dataSourceOrigin=='0'">
+        <div v-if="rulesType=='0'">
+          <div v-if="record.dataSourceOrigin=='0'">
             <a-input-number
               size="small"
               style="width:80%;"
@@ -140,8 +154,13 @@
               :precision="2"
               placeholder="请输入"
               :max="999999"/>%
+          </div>
+          <span v-else>{{ (record.cityDiscountRate||record.cityDiscountRate==0)?record.cityDiscountRate+'%':'--' }}</span>
+        </div>
+        <div v-else>
+          <span v-if="rulesType=='1'">{{(setData[0].cityValue||setData[0].cityValue==0)?setData[0].cityValue+'%':'--'}}</span>
+          <span v-else>{{(setData[0].citySubtract || setData[0].citySubtract==0)?'-'+setData[0].citySubtract:'--'}}</span>
         </div>
-        <span v-else>{{ (record.cityDiscountRate||record.cityDiscountRate==0)?record.cityDiscountRate+'%':'--' }}</span>
       </template>
       <!-- 特约特价 -->
       <template slot="specialPrice" slot-scope="text, record">
@@ -155,13 +174,15 @@
             :precision="2"
             placeholder="请输入"
             :max="999999"
+            :disabled="rulesType!='0'"
             @blur="e=>calculatePrice(e.target.value,record.productScopeSn,'special')"/>
         </div>
         <span v-else>--</span>
       </template>
       <!-- 特约折扣 -->
       <template slot="specialDiscount" slot-scope="text, record">
-        <div v-if="record.dataSourceOrigin=='0'">
+        <div v-if="rulesType=='0'">
+          <div v-if="record.dataSourceOrigin=='0'">
             <a-input-number
               size="small"
               style="width:80%;"
@@ -171,8 +192,13 @@
               :precision="2"
               placeholder="请输入"
               :max="999999"/>%
+          </div>
+          <span v-else>{{ (record.specialDiscountRate||record.specialDiscountRate==0) ? record.specialDiscountRate+'%':'--' }}</span>
+        </div>
+        <div v-else>
+          <span v-if="rulesType=='1'">{{(setData[0].specialValue||setData[0].specialValue==0)?setData[0].specialValue+'%':'--'}}</span>
+          <span v-else>{{(setData[0].specialSubtract || setData[0].specialSubtract==0)?'-'+setData[0].specialSubtract:'--'}}</span>
         </div>
-        <span v-else>{{ (record.specialDiscountRate||record.specialDiscountRate==0) ? record.specialDiscountRate+'%':'--' }}</span>
       </template>
       <!-- 设置起订量 -->
       <template slot="setNum" slot-scope="text, record">
@@ -241,37 +267,64 @@ export default {
     itemSn: {
       type: [Number, String],
       default: ''
+    },
+    rulesType:{
+      type: [Number, String],
+      default: ''
+    },
+    setData:{
+      type:Array,
+      default:()=>[]
     }
   },
   data () {
     const _this = this
     return {
       spinning: false,
-      columns: [
+      dataSource: [],
+      openBrandModal: false,
+      openTypeModal: false,
+      chooseBrand: [],
+      chooseType: [],
+      val: '',
+      brandTagIndex: null, // 所选品牌位置
+      classifyTagIndex: null, // 所选分类位置
+      dataSourceOrigin: 0 // 数据来源  1  选择产品  0 新增一行品类
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      var arr = [
         { title: '产品分类', width: '16%', scopedSlots: { customRender: 'productType' }, align: 'center' },
         { title: '品牌', width: '16%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
         { title: '产品', scopedSlots: { customRender: 'product' }, width: '10%', align: 'center' },
         { title: '省级原价', dataIndex: 'provincePrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '省级特价', scopedSlots: { customRender: 'provincePrice' }, width: '5%', align: 'center' },
-        { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' },
+        // { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' },
         { title: '市级原价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '市级特价', scopedSlots: { customRender: 'cityPrice' }, width: '5%', align: 'center' },
-        { title: '市级折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '5%', align: 'center' },
+        // { title: '市级折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '5%', align: 'center' },
         { title: '特约原价', dataIndex: 'specialPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '特约特价', scopedSlots: { customRender: 'specialPrice' }, width: '5%', align: 'center' },
-        { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' },
+        // { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' },
         { title: '设置起订量', width: '7%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
-      dataSource: [],
-      openBrandModal: false,
-      openTypeModal: false,
-      chooseBrand: [],
-      chooseType: [],
-      val: '',
-      brandTagIndex: null, // 所选品牌位置
-      classifyTagIndex: null, // 所选分类位置
-      dataSourceOrigin: 0 // 数据来源  1  选择产品  0 新增一行品类
+      ]
+      if (_this.rulesType === '0') {
+        arr.splice(5, 0, { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' })
+        arr.splice(8, 0, { title: '市级折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '5%', align: 'center' })
+        arr.splice(11, 0, { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' })
+      } else if (_this.rulesType === '1') {
+        arr.splice(5, 0, { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' })
+        arr.splice(8, 0, { title: '市级折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '5%', align: 'center' })
+        arr.splice(11, 0, { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' })
+      }else{
+        arr.splice(5,0, { title: '省价直降金额', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' })
+        arr.splice(8,0, { title: '市价直降金额', scopedSlots: { customRender: 'cityDiscount' }, width: '5%', align: 'center' })
+        arr.splice(11,0, { title: '特约直降金额', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' })
+      }
+      return arr
     }
   },
   methods: {