Commit eaf58892 by zhangxw

店铺设置 服务商负责人 驻店负责人开发

1 parent 615b09d9
......@@ -85,3 +85,9 @@ export function updateShopLabel(data) {
data.method = `${path}serviceMerchant.updateShopLabel`
return request(data)
}
// 根据4s店或者园区店查询员工信息
export function getResidentStaffList(data) {
data.method = `${path}merchant.staff.list`
return request(data, 'post')
}
......@@ -5,7 +5,7 @@
class="shopSetFrom d2-container-content"
:model="form"
:rules="formRules"
label-width="120px"
label-width="130px"
v-loading="$store.state.d2admin.loading.value">
<p class="edit-sub-title">
店铺设置
......@@ -102,6 +102,36 @@
</el-select>
<span class="item-tips">注:设置店面的驻店负责人,可配置驻店月份绩效</span>
</el-form-item>
<el-form-item label="1.1服务商负责人:"
prop="boutiqueServiceDirectorUserId">
<el-select v-model="form.shopMerchantConfig.boutiqueServiceDirectorUserId"
clearable
filterable
value-key="userId"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in serviceBossList"
:key="item.userId"
:label="item.userName"
:value="item.userId" />
</el-select>
<span class="item-tips">注:获取账户中心创建在广联数科下的员工,角色类型选服务商老板</span>
</el-form-item>
<el-form-item label="2.1服务商负责人:"
prop="quotationServiceDirectorUserId">
<el-select v-model="form.shopMerchantConfig.quotationServiceDirectorUserId"
clearable
filterable
value-key="userId"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in serviceBossList"
:key="item.userId"
:label="item.userName"
:value="item.userId" />
</el-select>
<span class="item-tips">注:获取账户中心创建在广联数科下的员工,角色类型选服务商老板</span>
</el-form-item>
<el-form-item label="1.1业务负责人:"
prop="boutiqueDirectorUserId">
<el-select v-model="form.shopMerchantConfig.boutiqueDirectorUserId"
......@@ -262,12 +292,13 @@
<script>
import { deepClone } from '@/common/util'
import { getShopSetting, listByMerchantIdAndYear, shopSetting, findSellerMerchantStaffList } from '@/api/shopConfig.js'
import { getShopSetting, listByMerchantIdAndYear, shopSetting, findSellerMerchantStaffList, getResidentStaffList } from '@/api/shopConfig.js'
import { serviceGetMerchantList } from '@api/merchant'
import { findMerchantStaffList } from '@api/index'
import { businessNature, sceneForShop } from '@/common/constants.js'
import { mapActions } from 'vuex'
import { rangePickerOptions_year, limitPrice } from '@/common/format'
import { baseConfig } from '@/main'
export default {
name: 'ShopSet',
data() {
......@@ -337,7 +368,8 @@ export default {
boutiqueMarketInspiration: '',
quotationMarketInspiration: ''
},
sellerMerchantStaffList: []
sellerMerchantStaffList: [],
serviceBossList: []
}
},
......@@ -378,7 +410,7 @@ export default {
this.form.serviceMerchantServiceChargeConfig = { passageServiceCharge: 2, passageServiceChargeFlag: 'Y', gasCardServiceCharge: 2, gasCardServiceChargeFlag: 'Y' }
}
if (!this.form.shopMerchantConfig) {
this.form.shopMerchantConfig = { boutiqueDirectorUserId: '', quotationDirectorUserId: '', boutiqueSunshineInspiration: '', quotationSunshineInspiration: '', boutiqueMarketInspiration: '', quotationMarketInspiration: '' }
this.form.shopMerchantConfig = { boutiqueDirectorUserId: '', quotationDirectorUserId: '', boutiqueSunshineInspiration: '', quotationSunshineInspiration: '', boutiqueMarketInspiration: '', quotationMarketInspiration: '', boutiqueServiceDirectorUserId: '', quotationServiceDirectorUserId: '' }
}
console.log(this.form)
if (this.form.list && this.form.list.length > 0) {
......@@ -444,7 +476,8 @@ export default {
},
findMerchantStaffList() {
findMerchantStaffList({ merchantId: -1 }).then((result) => {
this.supervisionOptionsList = result.map((item) => {
let copyResult = deepClone(result)
this.supervisionOptionsList = copyResult.map((item) => {
return {
userType: 1,
userId: item.uuid,
......@@ -452,15 +485,26 @@ export default {
userNum: item.staffPhone
}
})
// 服务商负责人(根据角色名过滤)
let arr = []
copyResult.map(val => {
if (val.roleName == baseConfig.roleName) arr.push({
userId: val.uuid,
userName: val.staffName
})
})
this.serviceBossList = arr
})
},
// 根据4s店或者园区店查询员工信息
getSelectList(info) {
const { merchantId } = info
findMerchantStaffList({ merchantId }).then((result) => {
// 取园区店下所有员工 0422版本 刘世权更改
getResidentStaffList({ merchantId }).then((result) => {
this.residentManagerOptionsList = result.map((item) => {
return {
userType: 2,
userId: item.uuid,
userId: item.staffUuid,
userName: item.staffName,
userNum: item.staffPhone
}
......@@ -595,6 +639,16 @@ export default {
if (shopMerchantConfig.quotationDirectorUserId) {
_params.quotationDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.quotationDirectorUserId)?.userName
}
// 1.1服务商负责人
_params.boutiqueServiceDirectorUserId = shopMerchantConfig.boutiqueServiceDirectorUserId
if (shopMerchantConfig.boutiqueServiceDirectorUserId) {
_params.boutiqueServiceDirectorName = this.serviceBossList.find(item => item.userId === shopMerchantConfig.boutiqueServiceDirectorUserId)?.userName
}
// 2.1服务商负责人
_params.quotationServiceDirectorUserId = shopMerchantConfig.quotationServiceDirectorUserId
if (shopMerchantConfig.quotationServiceDirectorUserId) {
_params.quotationServiceDirectorName = this.serviceBossList.find(item => item.userId === shopMerchantConfig.quotationServiceDirectorUserId)?.userName
}
_params.boutiqueSunshineInspiration = shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration = shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration = shopMerchantConfig.boutiqueMarketInspiration
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!