Commit 012adecf by zhangxw

bug修复

1 parent c05d5353
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:model="form" :model="form"
:rules="formRules" :rules="formRules"
label-width="130px" label-width="130px"
v-loading="$store.state.d2admin.loading.value"> >
<p class="edit-sub-title"> <p class="edit-sub-title">
店铺设置 店铺设置
<span class="merchantName">{{ info.merchantName }} {{ info.merchantId }}</span> <span class="merchantName">{{ info.merchantName }} {{ info.merchantId }}</span>
...@@ -374,33 +374,6 @@ export default { ...@@ -374,33 +374,6 @@ export default {
} }
}, },
watch: {
sellerMerchantStaffList: {
handler() {
this.checkSelectOption()
},
deep: true
},
serviceBossList: {
handler() {
this.checkSelectOption()
},
deep: true
},
supervisionOptionsList: {
handler() {
this.checkSelectOption()
},
deep: true
},
residentManagerOptionsList: {
handler() {
this.checkSelectOption()
},
deep: true
},
},
components: {}, components: {},
computed: {}, computed: {},
...@@ -412,12 +385,12 @@ export default { ...@@ -412,12 +385,12 @@ export default {
this.nowMoth = nowDate.getMonth() + 1 this.nowMoth = nowDate.getMonth() + 1
this.nowDay = nowDate.getDate() this.nowDay = nowDate.getDate()
this.info = this.$route.params?.info this.info = this.$route.params?.info
await this.getShopSetting(this.info)
await this.findMerchantStaffList() await this.findMerchantStaffList()
await this.merchantStaffByRoleList() await this.merchantStaffByRoleList()
await this.getSelectList(this.info) await this.getSelectList(this.info)
await this.listByMerchantIdAndYear(this.year) await this.listByMerchantIdAndYear(this.year)
await this.findSellerMerchantStaffList() await this.findSellerMerchantStaffList()
await this.getShopSetting(this.info)
}, },
methods: { methods: {
...@@ -431,6 +404,7 @@ export default { ...@@ -431,6 +404,7 @@ export default {
// 获取店铺设置信息 // 获取店铺设置信息
async getShopSetting(info) { async getShopSetting(info) {
const { merchantId } = info const { merchantId } = info
return new Promise((resolve, reject) => {
getShopSetting({ merchantId }).then(res => { getShopSetting({ merchantId }).then(res => {
// this.setInfo = res // this.setInfo = res
this.form = deepClone(res) this.form = deepClone(res)
...@@ -442,7 +416,7 @@ export default { ...@@ -442,7 +416,7 @@ export default {
this.form.shopMerchantConfig = { boutiqueDirectorUserId: '', quotationDirectorUserId: '', boutiqueSunshineInspiration: '', quotationSunshineInspiration: '', boutiqueMarketInspiration: '', quotationMarketInspiration: '', boutiqueServiceDirectorUserId: '', quotationServiceDirectorUserId: '' } this.form.shopMerchantConfig = { boutiqueDirectorUserId: '', quotationDirectorUserId: '', boutiqueSunshineInspiration: '', quotationSunshineInspiration: '', boutiqueMarketInspiration: '', quotationMarketInspiration: '', boutiqueServiceDirectorUserId: '', quotationServiceDirectorUserId: '' }
} }
// 对比下拉框是否存在已选的选择项 不存在清空 // 对比下拉框是否存在已选的选择项 不存在清空
// this.checkSelectOption() this.checkSelectOption()
console.log(this.form) console.log(this.form)
if (this.form.list && this.form.list.length > 0) { if (this.form.list && this.form.list.length > 0) {
this.form.list = this.form.list.map(item => { this.form.list = this.form.list.map(item => {
...@@ -455,7 +429,10 @@ export default { ...@@ -455,7 +429,10 @@ export default {
return item_new return item_new
}) })
} }
resolve()
}) })
})
}, },
checkSelectOption() { checkSelectOption() {
...@@ -527,6 +504,7 @@ export default { ...@@ -527,6 +504,7 @@ export default {
} }
}, },
async merchantStaffByRoleList() { async merchantStaffByRoleList() {
return new Promise((resolve, reject) => {
merchantStaffByRoleList({ roleName: '区域督导' }).then((result) => { merchantStaffByRoleList({ roleName: '区域督导' }).then((result) => {
let copyResult = deepClone(result) let copyResult = deepClone(result)
this.supervisionOptionsList = copyResult.map((item) => { this.supervisionOptionsList = copyResult.map((item) => {
...@@ -537,10 +515,13 @@ export default { ...@@ -537,10 +515,13 @@ export default {
userNum: item.staffPhone userNum: item.staffPhone
} }
}) })
resolve()
})
}) })
}, },
// 获取全部员工 过滤出服务商负责人可选数据 // 获取全部员工 过滤出服务商负责人可选数据
async findMerchantStaffList() { async findMerchantStaffList() {
return new Promise((resolve, reject) => {
findMerchantStaffList({ merchantId: -1 }).then(res => { findMerchantStaffList({ merchantId: -1 }).then(res => {
// 服务商负责人(根据角色名过滤) // 服务商负责人(根据角色名过滤)
let arr = [] let arr = []
...@@ -551,12 +532,16 @@ export default { ...@@ -551,12 +532,16 @@ export default {
}) })
}) })
this.serviceBossList = arr this.serviceBossList = arr
resolve()
}) })
})
}, },
// 根据4s店或者园区店查询员工信息 // 根据4s店或者园区店查询员工信息
async getSelectList(info) { async getSelectList(info) {
const { merchantId } = info const { merchantId } = info
// 取园区店下所有员工 0422版本 刘世权更改 // 取园区店下所有员工 0422版本 刘世权更改
return new Promise((resolve, reject) => {
getResidentStaffList({ merchantId }).then((result) => { getResidentStaffList({ merchantId }).then((result) => {
this.residentManagerOptionsList = result.map((item) => { this.residentManagerOptionsList = result.map((item) => {
return { return {
...@@ -566,8 +551,10 @@ export default { ...@@ -566,8 +551,10 @@ export default {
userNum: item.staffPhone userNum: item.staffPhone
} }
}) })
console.log(this.residentManagerOptionsList, '======') resolve()
})
}) })
}, },
chooseYear() { chooseYear() {
this.listByMerchantIdAndYear(this.year) this.listByMerchantIdAndYear(this.year)
...@@ -575,6 +562,7 @@ export default { ...@@ -575,6 +562,7 @@ export default {
// 根据年份获取产值列表 // 根据年份获取产值列表
async listByMerchantIdAndYear(year) { async listByMerchantIdAndYear(year) {
const { merchantId } = this.info const { merchantId } = this.info
return new Promise((resolve, reject) => {
listByMerchantIdAndYear({ yearStr: year, merchantId: merchantId }).then((result) => { listByMerchantIdAndYear({ yearStr: year, merchantId: merchantId }).then((result) => {
this.outputValueListByYear = result || [] this.outputValueListByYear = result || []
if (this.outputValueListByYear && this.outputValueListByYear.length > 0) { if (this.outputValueListByYear && this.outputValueListByYear.length > 0) {
...@@ -584,6 +572,8 @@ export default { ...@@ -584,6 +572,8 @@ export default {
return item return item
}) })
} }
resolve()
})
}) })
}, },
// 产值输入框输入限制 // 产值输入框输入限制
...@@ -772,6 +762,7 @@ export default { ...@@ -772,6 +762,7 @@ export default {
}, },
async findSellerMerchantStaffList() { async findSellerMerchantStaffList() {
return new Promise((resolve, reject) => {
findSellerMerchantStaffList({}).then((result) => { findSellerMerchantStaffList({}).then((result) => {
this.sellerMerchantStaffList = result.map((item) => { this.sellerMerchantStaffList = result.map((item) => {
return { return {
...@@ -779,6 +770,8 @@ export default { ...@@ -779,6 +770,8 @@ export default {
userName: item.staffName userName: item.staffName
} }
}) })
resolve()
})
}) })
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!