Bladeren bron

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

lilei 1 jaar geleden
bovenliggende
commit
7f39af1c70

+ 11 - 1
src/views/common/chooseBrandModal.vue

@@ -16,7 +16,7 @@
       <a-checkbox-group v-model="checkedList" @change="onChange" style="width: 100%;">
         <a-row style="height: 400px;overflow-y: scroll;">
           <a-col :span="6" v-for="item in brandList" :key="item.brandSn">
-            <a-checkbox :value="item.brandSn">
+            <a-checkbox :value="item.brandSn" :disabled="item.isDisabled">
               {{ item.brandName }}
             </a-checkbox>
           </a-col>
@@ -119,6 +119,16 @@ export default {
           this.brandList = []
         }
       })
+    },
+    // 禁用
+    handleDisabled (list) {
+      this.brandList.map(item => {
+        if (list.includes(item.brandSn)) {
+          item.isDisabled = true
+        } else {
+          item.isDisabled = false
+        }
+      })
     }
   },
   watch: {

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/addModal.vue

@@ -20,7 +20,7 @@
           <a-input id="promotionList-promotionName" v-model.trim="form.title" allowClear placeholder="请输入促销名称(最多30个字符)" :maxLength="30"></a-input>
         </a-form-model-item>
         <a-form-model-item label="促销简称" prop="description">
-          <a-input id="promotionList-description" v-model.trim="form.description" allowClear placeholder="请输入促销简称(最多10个字符)" :maxLength="10"></a-input>
+          <a-input 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="activeDate">
           <a-range-picker

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -4,7 +4,7 @@
       <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" style="padding:16px 24px;">
         <template slot="subTitle">
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
-          <span style="margin: 0 10px 0 20px;color: #666;font-size: 14px;font-weight: 600;">促销名称:{{ detailData&&detailData.salesReturnNo||'--' }}</span>
+          <span style="margin: 0 10px 0 20px;color: #666;font-size: 14px;font-weight: 600;">促销名称:{{ detailData&&detailData.title||'--' }}</span>
           <a-button type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo">
             <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/> {{ isShowBisiceInfo?'隐藏':'查看' }}信息
           </a-button>

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

@@ -22,8 +22,8 @@
             id="promotionList-description"
             v-model.trim="form.description"
             allowClear
-            placeholder="请输入促销简称(最多10个字符)"
-            :maxLength="10"></a-input>
+            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="changeGateFlag">

+ 2 - 2
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -22,8 +22,8 @@
             id="promotionList-description"
             v-model.trim="form.description"
             allowClear
-            placeholder="请输入促销简称(最多10个字符)"
-            :maxLength="10"></a-input>
+            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="changeGateFlag">

+ 14 - 3
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -22,8 +22,8 @@
             id="promotionList-description"
             v-model.trim="form.description"
             allowClear
-            placeholder="请输入促销简称(最多10个字符)"
-            :maxLength="10"></a-input>
+            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">
@@ -228,7 +228,15 @@ export default {
         if (valid) {
           // 验证必填
           if (_this.form.gateFlag == '1') {
-            if (!_this.form.gateAmount || !_this.form.quotaAmount) {
+            if (!_this.form.gateType) {
+              _this.$message.warning('请选择规则门槛设置类型!')
+              return
+            }
+            if (!_this.form.gateAmount) {
+              _this.$message.warning('规则门槛条件不能为空!')
+              return
+            }
+            if (_this.form.gateType === 'FIXED_AMOUNT' && !_this.form.quotaAmount) {
               _this.$message.warning('规则门槛条件不能为空!')
               return
             }
@@ -247,6 +255,9 @@ export default {
             form.gateProductList = _this.$refs.cillProduct.getResultVal()
           } else {
             form.gateProductList = []
+            form.gateAmount = ''
+            form.quotaAmount = ''
+            form.gateType = undefined
           }
           form.specialProductList = _this.$refs.specialProduct.getResultVal()
           form.promotionSn = _this.promotionSn

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

@@ -284,7 +284,6 @@ export default {
     addProductTag (pos, row) {
       this.productTagIndex = pos
       const dataList = this.setShowData('This')
-      debugger
       this.chooseProducts = dataList[1]
       this.openProductsModal = true
     },