Commit f9f8d108 by cwq0219

预录客户bug修复

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