Commit f9f8d108 by cwq0219

预录客户bug修复

1 parent 53bbdbe6
......@@ -169,12 +169,11 @@ export default {
tableSearchForm: {},
searchForm: {
userId: '',
baseGoodsId: '',
yqMerchantId: this.$store.state.d2admin.user.info.detail.merchantId
baseGoodsId: ''
},
showFormData: [{
label: '服务门店',
name: 'sellerMerchantId',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
......@@ -331,7 +330,7 @@ export default {
this.getOptionsList()
})
if (!this.userInfo.beSuper) {
this.showFormData = this.showFormData.filter(item => item.name !== 'sellerMerchantId')
this.showFormData = this.showFormData.filter(item => item.name !== 'yqMerchantId')
this.getServiceStore(this.userInfo.detail.merchantId)
}
},
......@@ -343,7 +342,7 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = _.cloneDeep(this.searchForm)
this.userInfo.beSuper && delete this.tableSearchForm.yqMerchantId
!this.userInfo.beSuper && (this.tableSearchForm.yqMerchantId = this.userInfo.detail.merchantId)
if (this.tableSearchForm.entryTime) {
this.tableSearchForm.startDate = new Date(this.tableSearchForm.entryTime[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
this.tableSearchForm.endDate = new Date(this.tableSearchForm.entryTime[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
......@@ -355,8 +354,7 @@ export default {
handleReset() {
this.searchForm = {
userId: '',
baseGoodsId: '',
yqMerchantId: this.$store.state.d2admin.user.info.detail.merchantId
baseGoodsId: ''
}
this.userInfo.beSuper && (this.baseData.storeIdList = [])
this.baseData.adviserList = []
......@@ -436,12 +434,12 @@ export default {
var params = {
advanceUserId: this.userInfo.detail.userId,
advanceUserName: this.userInfo.userType === 1 ? this.userInfo.detail.name : this.userInfo.detail.merchantName,
sellerMerchantId: this.userInfo.beSuper ? this.fileForm.yqMerchantId : this.userInfo.detail.merchantId,
yqMerchantId: this.fileForm.yqMerchantId,
yqMerchantId: this.userInfo.beSuper ? this.fileForm.yqMerchantId : this.userInfo.detail.merchantId,
file: this.fileInfo
}
recordUpload(params).then(res => {
this.showNum = !!res.failNum
res.succNum && this.$refs.recordTable.refreshTable()
if (res.failNum) {
this.importNum = {
succNum: res.succNum,
......@@ -451,7 +449,6 @@ export default {
return true
}
this.notice.okTips('导入成功')
this.$refs.recordTable.refreshTable()
})
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!