Ver código fonte

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

lilei 1 ano atrás
pai
commit
5e63f7c803

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

@@ -403,6 +403,7 @@ export default {
           }
           if (rowFlag1 || rowFlag2 || rowFlag3) {
             _this.$message.warning('请选择产品分类、品牌或产品!')
+            return
           }
           form.promotionSn = _this.promotionSn
           _this.spinning = true

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

@@ -282,7 +282,7 @@ export default {
             return
           } else {
             // 为空判断
-            const isTypeEmpty = form.specialProductList.some(item => (item.productTypeList && item.productTypeList.length == 0) && (item.productTypeList && item.productTypeList.length == 0))
+            const isTypeEmpty = form.specialProductList.some(item => (item.productTypeList && item.productTypeList.length == 0) && (item.productBrandList && item.productBrandList.length == 0))
             if (isTypeEmpty) {
               _this.$message.warning('产品分类或品牌不能为空!')
               return

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

@@ -380,7 +380,6 @@ export default {
           })
         }
       })
-
       const reBrandArr = c_brandArr.map(list => {
         return list.productBrandSn
       })

+ 21 - 24
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -100,16 +100,14 @@
       <!-- 省价折扣 -->
       <template slot="provinceDiscount" slot-scope="text, record">
         <div v-if="record.dataSourceOrigin=='0'">
-          <a-input-number
-            style="width:80%;"
-            size="small"
+          <a-input
             v-model="record.provinceDiscountRate"
+            style="width:80%;"
+            type="number"
+            @input="record.provinceDiscountRate=record.provinceDiscountRate.length>6?record.provinceDiscountRate.slice(0,6):record.provinceDiscountRate"
             :min="0"
-            :step="1"
-            :max="999999"
-            :precision="2"
             placeholder="请输入"
-          />%
+            size="small"/>%
         </div>
         <span v-else>{{ (record.provinceDiscountRate||record.provinceDiscountRate==0)?record.provinceDiscountRate+'%':'--' }}</span>
       </template>
@@ -132,15 +130,14 @@
       <!-- 市价折扣 -->
       <template slot="cityDiscount" slot-scope="text, record">
         <div v-if="record.dataSourceOrigin=='0'">
-          <a-input-number
-            size="small"
-            style="width:80%;"
+          <a-input
             v-model="record.cityDiscountRate"
+            style="width:80%;"
+            type="number"
+            placeholder="请输入"
+            @input="record.cityDiscountRate=record.cityDiscountRate.length>6?record.cityDiscountRate.slice(0,6):record.cityDiscountRate"
             :min="0"
-            :step="1"
-            :max="999999"
-            :precision="2"
-            placeholder="请输入"/>%
+            size="small"/>%
         </div>
         <span v-else>{{ (record.cityDiscountRate||record.cityDiscountRate==0)?record.cityDiscountRate+'%':'--' }}</span>
       </template>
@@ -163,15 +160,14 @@
       <!-- 特约折扣 -->
       <template slot="specialDiscount" slot-scope="text, record">
         <div v-if="record.dataSourceOrigin=='0'">
-          <a-input-number
-            size="small"
-            style="width:80%;"
+          <a-input
             v-model="record.specialDiscountRate"
+            style="width:80%;"
+            type="number"
+            @input="record.specialDiscountRate=record.specialDiscountRate.length>6?record.specialDiscountRate.slice(0,6):record.specialDiscountRate"
             :min="0"
-            :step="1"
-            :precision="2"
-            :max="999999"
-            placeholder="请输入"/>%
+            placeholder="请输入"
+            size="small"/>%
         </div>
         <span v-else>{{ (record.specialDiscountRate||record.specialDiscountRate==0) ? record.specialDiscountRate+'%':'--' }}</span>
       </template>
@@ -374,6 +370,7 @@ export default {
             newClassifyArr.push(objType1)
             const obj = JSON.parse(JSON.stringify(objType1))
             obj.title = item.title
+            obj.id = item.snPaths
             classifyArr.push(obj)
           }
         }
@@ -388,6 +385,7 @@ export default {
             const obj = JSON.parse(JSON.stringify(objType2))
             const newName = item.namePaths.split(',')
             obj.title = newName[1]
+            obj.id = typeArr1[1]
             classifyArr.push(obj)
           }
         }
@@ -402,6 +400,7 @@ export default {
           const obj = JSON.parse(JSON.stringify(objType3))
           const newName = item.namePaths.split(',')
           obj.title = newName[1] + '/' + newName[2]
+          obj.id = typeArr2[2]
           classifyArr.push(obj)
         }
       })
@@ -412,8 +411,6 @@ export default {
     addBrandTag (pos, row) {
       const _this = this
       _this.brandTagIndex = pos
-      // 选中的所有品牌
-      const dataList = _this.setShowData('Brand')
       _this.openBrandModal = true
       // 回显当前行选中
       const echoData = _this.handleEchoData('Brand', row.productBrandList)
@@ -423,6 +420,7 @@ export default {
       // 同行中分类是否与所选分类相同   已选分类
       var flag = false
       var c_brandArr = []
+      console.log('111111111111:', this.dataSource)
       this.dataSource.forEach(item => {
         if ((item.productTypeArr && item.productTypeArr.length > 0) && (item.productBrandList && item.productBrandList.length > 0)) {
           item.productTypeArr.forEach((con) => {
@@ -435,7 +433,6 @@ export default {
           })
         }
       })
-
       const reBrandArr = c_brandArr.map(list => {
         return list.productBrandSn
       })