|
@@ -39,8 +39,8 @@
|
|
|
:maxNums="1"
|
|
|
fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
|
|
|
uploadType="attach"
|
|
|
- :uploadParams="goodFlag==='0'?{discountType:rulesType,savePathType: 'ali'}:undefined"
|
|
|
- :action="goodFlag==='1'?attachAction:attachAction1"
|
|
|
+ :uploadParams="uploadData"
|
|
|
+ :action="goodFlag=='1'?attachAction:attachAction1"
|
|
|
upText="选择导入文件"
|
|
|
@remove="resetSearchForm"
|
|
|
@change="changeImport"></Upload>
|
|
@@ -100,7 +100,8 @@ export default {
|
|
|
attachAction: process.env.VUE_APP_API_BASE_URL + '/promotion/rule/importNormalProduct', // 导入门槛、正价、促销产品
|
|
|
attachAction1: process.env.VUE_APP_API_BASE_URL + '/promotion/rule/importSpecialProduct', // 导入特价产品
|
|
|
paramsData: null,
|
|
|
- filePath: ''
|
|
|
+ filePath: '',
|
|
|
+ uploadData: null
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -108,6 +109,7 @@ export default {
|
|
|
resetSearchForm () {
|
|
|
this.$refs.importUpload.setFileList() // 清空导入文件
|
|
|
this.paramsData = null // 清空上传数据
|
|
|
+ this.uploadData = null
|
|
|
},
|
|
|
// 下一步
|
|
|
handlerNextStep () {
|
|
@@ -152,9 +154,12 @@ export default {
|
|
|
} else {
|
|
|
if (this.goodFlag != '0') {
|
|
|
this.filePath = location.protocol + '//' + location.host + '/templ/促销规则导入产品.xlsx'
|
|
|
+ this.uploadData = { savePathType: 'ali' }
|
|
|
} else {
|
|
|
+ this.uploadData = { discountType: this.rulesType, savePathType: 'ali' }
|
|
|
this.filePath = location.protocol + '//' + location.host + (this.rulesType == '0' ? '/templ/促销规则导入特价产品.xlsx' : this.rulesType == '1' ? '/templ/促销规则导入特价产品(打折).xlsx' : '/templ/促销规则导入特价产品(直降).xlsx')
|
|
|
}
|
|
|
+ console.log('111111111111:', this.uploadData)
|
|
|
}
|
|
|
}
|
|
|
}
|