chenrui il y a 1 an
Parent
commit
09c93e892a

BIN
public/templ/促销规则导入特价产品(打折).xlsx


BIN
public/templ/促销规则导入特价产品(直降).xlsx


+ 7 - 3
src/api/promotion.js

@@ -129,19 +129,23 @@ export const promotionIsOver = (params) => {
 
 // 导出门槛产品错误项
 export const downNormalFail = (params) => {
+  const paramsNew = params.unLoadData
   return axios.request({
     url: '/promotion/rule/downNormalFail',
     method: 'post',
-    data: params,
+    data: paramsNew,
     responseType: 'blob'
   })
 }
 // 导出促销产品错误项
 export const downSpecialFail = (params) => {
+  const url = `/promotion/rule/downSpecialFail/${params.discountType}`
+  delete params.discountType
+  const paramsNew = params.unLoadData
   return axios.request({
-    url: '/promotion/rule/downSpecialFail',
+    url: url,
     method: 'post',
-    data: params,
+    data: paramsNew,
     responseType: 'blob'
   })
 }

+ 9 - 4
src/views/promotionRulesManagement/dealerPromotions/chooseImportModal.vue

@@ -43,7 +43,7 @@
         <template slot="unitTypeShow" slot-scope="text,record">
           {{ record.unitType==='SL'?'按数量设置':'按整箱设置' }}
         </template>
-       <!-- <template slot="errorMsg" slot-scope="text,record">
+        <!-- <template slot="errorMsg" slot-scope="text,record">
           <a-popover placement="topRight">
             <template slot="content">
               <p v-for="d in record.importErrorMsgSet">{{ d }}</p>
@@ -138,7 +138,7 @@ export default {
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '起订类型', scopedSlots: { customRender: 'unitTypeShow' }, dataIndex: 'unitType', width: '10%', align: 'center' },
         { title: '起订数量', dataIndex: 'unitQty', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-        { title: '错误说明',dataIndex: 'importErrorMsgSet', width: '30%', align: 'center', customRender: function (text) { return text || '--' },ellipsis: true }
+        { title: '错误说明', dataIndex: 'importErrorMsgSet', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
       if (_this.goodsFlag == '0' && _this.discountType == '0') {
         unColumnsArr.splice(3, 0, { title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
@@ -150,7 +150,7 @@ export default {
   },
   methods: {
     setFlag (val) {
-      this.goodsFlag = val.goodsFlag
+      this.goodsFlag = val.goodFlag
       this.discountType = val.discountType
     },
     getData () {
@@ -184,7 +184,12 @@ export default {
       }
       _this.spinning = true
       const ajaxName = _this.goodsFlag == '0' ? downSpecialFail : downNormalFail
-      hdExportExcel(ajaxName, _this.unLoadData, '导出产品错误项', function () {
+      var ajaxData = {}
+      ajaxData.unLoadData = _this.unLoadData
+      if (_this.goodsFlag == '0') {
+        ajaxData.discountType = _this.discountType
+      }
+      hdExportExcel(ajaxName, ajaxData, '导出产品错误项', function () {
         _this.spinning = false
       })
     }

+ 5 - 1
src/views/promotionRulesManagement/dealerPromotions/importGuideModal.vue

@@ -150,7 +150,11 @@ export default {
         this.$emit('close')
         this.resetSearchForm()
       } else {
-        this.filePath = location.protocol + '//' + location.host + ((this.goodFlag === '1' ||(this.goodFlag === '0'&&this.rulesType!=0)) ? '/templ/促销规则导入产品.xlsx' : '/templ/促销规则导入特价产品.xlsx')
+        if (this.goodFlag != '0') {
+          this.filePath = location.protocol + '//' + location.host + '/templ/促销规则导入产品.xlsx'
+        } else {
+          this.filePath = location.protocol + '//' + location.host + (this.rulesType == '0' ? '/templ/促销规则导入特价产品.xlsx' : this.rulesType == '1' ? '/templ/促销规则导入特价产品(打折).xlsx' : '/templ/促销规则导入特价产品(直降).xlsx')
+        }
       }
     }
   }

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

@@ -551,6 +551,7 @@ export default {
             resultObj.giftProductList = _this.newData(resultObj.giftProductList)
             this.$refs.offerProduct.setTabVal(resultObj.giftProductList)
           }
+          delete resultObj.giftProductMap
           this.form = { ...this.form, ...resultObj }
         }
       })

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

@@ -360,7 +360,7 @@ export default {
           }
           // 判断特价规则必填
           if (_this.form.discountType != '0' && _this.setTableData) {
-            if (!_this.setTableData[0].provinceValue || !_this.setTableData[0].cityValue || !_this.setTableData[0].specialValue) {
+            if (_this.setTableData[0].provinceValue==undefined || _this.setTableData[0].cityValue==undefined || _this.setTableData[0].specialValue==undefined) {
               _this.$message.warning('特价规则条件不能为空!')
               return
             }