Browse Source

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

lilei 1 year ago
parent
commit
f095e59407

+ 3 - 3
src/views/promotionRulesManagement/dealerPromotions/chooseImportModal.vue

@@ -130,9 +130,9 @@ export default {
         { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '20%', align: 'center' }
       ]
       if (_this.goodsFlag == '0') {
-        unColumnsArr.splice(3, 0, { title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-          { title: '市级特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-          { title: '特约特价', dataIndex: 'specialDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        unColumnsArr.splice(3, 0, { title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
+          { title: '市级特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
+          { title: '特约特价', dataIndex: 'specialDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } })
       }
       return unColumnsArr
     }

+ 15 - 20
src/views/promotionRulesManagement/dealerPromotions/detailModal.vue

@@ -36,22 +36,10 @@
         </a-form-model-item>
         <a-form-model-item label="数量叠加" prop="accrualFlag" v-if="form.promotionRuleType ==='BUY_PROD_GIVE_PROD'&&form.accrualFlag">{{ form.accrualFlag==='1'?'是':'否' }}</a-form-model-item>
         <a-form-model-item label="金额叠加" prop="accrualFlag" v-if="form.promotionRuleType ==='BUY_PROD_GIVE_MONEY'&&form.accrualFlag">{{ form.accrualFlag==='1'?'是':'否' }}</a-form-model-item>
-        <a-form-model-item prop="minOrderFlag">
-          <span slot="label">
-            <a-tooltip title="What do you want others to call you?">
-              <a-icon type="info-circle" />
-            </a-tooltip>
-            订单起订金额
-          </span>
+        <a-form-model-item prop="minOrderFlag" label="订单起订金额">
           {{ form.minOrderFlag === '1'?'限制':'不限制' }}{{ form.minOrderAmount?form.minOrderAmount+'元':'' }}
         </a-form-model-item>
-        <a-form-model-item prop="upperLimitFlag">
-          <span slot="label">
-            <a-tooltip title="What do you want others to call you?">
-              <a-icon type="info-circle" />
-            </a-tooltip>
-            活动经费上限
-          </span>
+        <a-form-model-item prop="upperLimitFlag" label="活动经费上限">
           {{ form.upperLimitFlag === '1'?'限制':'不限制' }}{{ form.upperLimitAmount?form.upperLimitAmount+'元' :'' }}
         </a-form-model-item>
         <a-form-model-item label="促销品是否与正品一致" v-if="form.regularPromotionSameFlag" prop="regularPromotionSameFlag">{{ form.regularPromotionSameFlag==='1'?'是':'否' }}</a-form-model-item>
@@ -88,19 +76,19 @@
           >
             <!-- 产品分类 -->
             <template slot="productType" slot-scope="text, record">
-              <div style="max-height:110px;overflow-y:scroll;" v-if="record.productTypeList && record.productTypeList.length>0">
+              <div class="tabBox" v-if="record.productTypeList && record.productTypeList.length>0">
                 <a-tag style="margin-bottom:5px;" v-for="item in record.productTypeList" :key="item.id">{{ item.productTypeName3? item.productTypeName2+'/'+item.productTypeName3:(item.productTypeName2&&!item.productTypeName3)?item.productTypeName2:item.productTypeName1 }}</a-tag>
               </div>
             </template>
             <!-- 品牌 -->
             <template slot="productBrand" slot-scope="text, record">
-              <div style="max-height:110px;overflow-y:scroll;" v-if="record.productBrandList && record.productBrandList.length>0">
+              <div class="tabBox" v-if="record.productBrandList && record.productBrandList.length>0">
                 <a-tag style="margin-bottom:5px;" v-for="item in record.productBrandList" :key="item.id">{{ item.productBrandName }}</a-tag>
               </div>
             </template>
             <!-- 产品 -->
             <template slot="product" slot-scope="text, record">
-              <div style="max-height:110px;overflow-y:scroll;" v-if="record.productThisList && record.productThisList.length>0">
+              <div class="tabBox" v-if="record.productThisList && record.productThisList.length>0">
                 <a-tag style="margin-bottom:5px;" v-for="item in record.productThisList" :key="item.id">{{ item.productCode }}</a-tag>
               </div>
             </template>
@@ -127,19 +115,19 @@
           >
             <!-- 产品分类 -->
             <template slot="productType" slot-scope="text, record">
-              <div style="max-height:100px;overflow-y:scroll;" v-if="record.productTypeList && record.productTypeList.length>0">
+              <div class="tabBox" v-if="record.productTypeList && record.productTypeList.length>0">
                 <a-tag style="margin-bottom:5px;" v-for="item in record.productTypeList" :key="item.id">{{ item.productTypeName3? item.productTypeName2+'/'+item.productTypeName3:(item.productTypeName2&&!item.productTypeName3)?item.productTypeName2:item.productTypeName1 }}</a-tag>
               </div>
             </template>
             <!-- 品牌 -->
             <template slot="productBrand" slot-scope="text, record">
-              <div style="max-height:100px;overflow-y:scroll;" v-if="record.productBrandList && record.productBrandList.length>0">
+              <div  class="tabBox" v-if="record.productBrandList && record.productBrandList.length>0">
                 <a-tag style="margin-bottom:5px;" v-for="item in record.productBrandList" :key="item.id">{{ item.productBrandName }}</a-tag>
               </div>
             </template>
             <!-- 产品 -->
             <template slot="product" slot-scope="text, record">
-              <div style="max-height:100px;overflow-y:scroll;" v-if="record.productThisList && record.productThisList.length>0">
+              <div class="tabBox" v-if="record.productThisList && record.productThisList.length>0">
                 <a-tag style="margin-bottom:5px;" v-for="item in record.productThisList" :key="item.id">{{ item.productCode }}</a-tag>
               </div>
               <span v-else>--</span>
@@ -316,6 +304,13 @@ export default {
       text-align: center;
       margin: 35px 0 10px;
     }
+    .tabBox{
+       max-height:100px;
+       overflow-y:scroll;
+    }
+   .tabBox::-webkit-scrollbar {
+       width: 0px;
+    }
   }
 
 </style>

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

@@ -21,7 +21,7 @@
                   v-model="queryParam.enabledFlag"
                   ref="enabledFlag"
                   id="promotionList-enabledFlag"
-                  code="NOTITY_SEND_STATUS"
+                  code="PUBLISH_STATE"
                   placeholder="请选择发布状态"
                   allowClear></v-select>
               </a-form-item>

+ 10 - 6
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -382,22 +382,23 @@ export default {
     },
     // 判断品牌,分类,产品其中一个必填
     isJudge (list) {
-      const flag = list.some(con => {
+      let flag = null
+      list.forEach(con => {
         if (con.productThisList) {
           if (con.productThisList.length > 0) {
-            return false
+            flag = false
           } else {
             if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-              return false
+              flag = false
             } else {
-              return true
+              flag = true
             }
           }
         } else {
           if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-            return false
+            flag = false
           } else {
-            return true
+            flag = true
           }
         }
       })
@@ -440,6 +441,9 @@ export default {
         if (res.status == 200) {
           this.chooseVal = res.data.gateFlag == '0' ? 'b' : 'a'
           const resultObj = res.data
+          if (resultObj.gateFlag === '1') {
+            resultObj.gateAmount = resultObj.gateType === 'RATIO_AMOUNT' ? resultObj.gateAmount * 100 : resultObj.gateAmount
+          }
           // 重新组成保存数据
           if (resultObj.gateProductList && resultObj.gateProductList.length > 0) {
             resultObj.gateProductList = _this.newData(resultObj.gateProductList)

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

@@ -355,7 +355,9 @@ export default {
           }
 
           const form = JSON.parse(JSON.stringify(_this.form))
-          let rowFlag1, rowFlag2, rowFlag3
+          let rowFlag1 = null
+          let rowFlag2 = null
+          let rowFlag3 = null
           if (form.gateFlag == '1') {
             form.gateProductList = this.$refs.cillProduct.getResultVal()
             form.gateAmount = form.gateType === 'RATIO_AMOUNT' ? form.gateAmount / 100 : form.gateAmount
@@ -413,22 +415,23 @@ export default {
     },
     // 判断品牌,分类,产品其中一个必填
     isJudge (list) {
-      const flag = list.forEach(con => {
+      let flag = null
+      list.forEach(con => {
         if (con.productThisList) {
           if (con.productThisList.length > 0) {
-            return false
+            flag = false
           } else {
             if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-              return false
+              flag = false
             } else {
-              return true
+              flag = true
             }
           }
         } else {
           if ((con.productTypeList && con.productTypeList.length > 0) || (con.productBrandList && con.productBrandList.length > 0)) {
-            return false
+            flag = false
           } else {
-            return true
+            flag = true
           }
         }
       })

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

@@ -346,6 +346,9 @@ export default {
         if (res.status == 200) {
           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
+          }
           // 重新组成保存数据
           if (resultObj.gateProductList && resultObj.gateProductList.length > 0) {
             resultObj.gateProductList = _this.newData(resultObj.gateProductList)

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

@@ -113,6 +113,7 @@
           ref="returnReason"
           code="SCOPE_UNIT_TYPE"
           placeholder="请选择"
+          style="width:100%;"
           allowClear></v-select>
         <a-input-number
           size="small"
@@ -258,7 +259,14 @@ export default {
       this.openTypeModal = true
       this.chooseType = this.handleRowData(row)
       const getArr = this.setTypeShowData()
-      this.$refs.typeBox.handleAllDisabled(getArr)
+      // 获取所选品牌
+      const dataList = this.setShowData('Brand')
+      if (dataList && dataList.length == 0) {
+        this.$refs.typeBox.handleAllDisabled(getArr)
+      } else {
+        this.chooseType = []
+        this.$refs.typeBox.handleAllDisabled([])
+      }
     },
     handleTypeOk (mainArr) {
       const classifyArr = []

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

@@ -182,6 +182,7 @@
           size="small"
           ref="returnReason"
           code="SCOPE_UNIT_TYPE"
+          style="width:100%;"
           placeholder="请选择"
           allowClear></v-select>
         <a-input-number