Commit eaf58892 by zhangxw

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

1 parent 615b09d9
...@@ -85,3 +85,9 @@ export function updateShopLabel(data) { ...@@ -85,3 +85,9 @@ export function updateShopLabel(data) {
data.method = `${path}serviceMerchant.updateShopLabel` data.method = `${path}serviceMerchant.updateShopLabel`
return request(data) return request(data)
} }
// 根据4s店或者园区店查询员工信息
export function getResidentStaffList(data) {
data.method = `${path}merchant.staff.list`
return request(data, 'post')
}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
class="shopSetFrom d2-container-content" class="shopSetFrom d2-container-content"
:model="form" :model="form"
:rules="formRules" :rules="formRules"
label-width="120px" label-width="130px"
v-loading="$store.state.d2admin.loading.value"> v-loading="$store.state.d2admin.loading.value">
<p class="edit-sub-title"> <p class="edit-sub-title">
店铺设置 店铺设置
...@@ -102,6 +102,36 @@ ...@@ -102,6 +102,36 @@
</el-select> </el-select>
<span class="item-tips">注:设置店面的驻店负责人,可配置驻店月份绩效</span> <span class="item-tips">注:设置店面的驻店负责人,可配置驻店月份绩效</span>
</el-form-item> </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业务负责人:" <el-form-item label="1.1业务负责人:"
prop="boutiqueDirectorUserId"> prop="boutiqueDirectorUserId">
<el-select v-model="form.shopMerchantConfig.boutiqueDirectorUserId" <el-select v-model="form.shopMerchantConfig.boutiqueDirectorUserId"
...@@ -262,12 +292,13 @@ ...@@ -262,12 +292,13 @@
<script> <script>
import { deepClone } from '@/common/util' 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 { serviceGetMerchantList } from '@api/merchant'
import { findMerchantStaffList } from '@api/index' import { findMerchantStaffList } from '@api/index'
import { businessNature, sceneForShop } from '@/common/constants.js' import { businessNature, sceneForShop } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { rangePickerOptions_year, limitPrice } from '@/common/format' import { rangePickerOptions_year, limitPrice } from '@/common/format'
import { baseConfig } from '@/main'
export default { export default {
name: 'ShopSet', name: 'ShopSet',
data() { data() {
...@@ -337,7 +368,8 @@ export default { ...@@ -337,7 +368,8 @@ export default {
boutiqueMarketInspiration: '', boutiqueMarketInspiration: '',
quotationMarketInspiration: '' quotationMarketInspiration: ''
}, },
sellerMerchantStaffList: [] sellerMerchantStaffList: [],
serviceBossList: []
} }
}, },
...@@ -378,7 +410,7 @@ export default { ...@@ -378,7 +410,7 @@ export default {
this.form.serviceMerchantServiceChargeConfig = { passageServiceCharge: 2, passageServiceChargeFlag: 'Y', gasCardServiceCharge: 2, gasCardServiceChargeFlag: 'Y' } this.form.serviceMerchantServiceChargeConfig = { passageServiceCharge: 2, passageServiceChargeFlag: 'Y', gasCardServiceCharge: 2, gasCardServiceChargeFlag: 'Y' }
} }
if (!this.form.shopMerchantConfig) { 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) console.log(this.form)
if (this.form.list && this.form.list.length > 0) { if (this.form.list && this.form.list.length > 0) {
...@@ -444,7 +476,8 @@ export default { ...@@ -444,7 +476,8 @@ export default {
}, },
findMerchantStaffList() { findMerchantStaffList() {
findMerchantStaffList({ merchantId: -1 }).then((result) => { findMerchantStaffList({ merchantId: -1 }).then((result) => {
this.supervisionOptionsList = result.map((item) => { let copyResult = deepClone(result)
this.supervisionOptionsList = copyResult.map((item) => {
return { return {
userType: 1, userType: 1,
userId: item.uuid, userId: item.uuid,
...@@ -452,15 +485,26 @@ export default { ...@@ -452,15 +485,26 @@ export default {
userNum: item.staffPhone 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) { getSelectList(info) {
const { merchantId } = info const { merchantId } = info
findMerchantStaffList({ merchantId }).then((result) => { // 取园区店下所有员工 0422版本 刘世权更改
getResidentStaffList({ merchantId }).then((result) => {
this.residentManagerOptionsList = result.map((item) => { this.residentManagerOptionsList = result.map((item) => {
return { return {
userType: 2, userType: 2,
userId: item.uuid, userId: item.staffUuid,
userName: item.staffName, userName: item.staffName,
userNum: item.staffPhone userNum: item.staffPhone
} }
...@@ -595,6 +639,16 @@ export default { ...@@ -595,6 +639,16 @@ export default {
if (shopMerchantConfig.quotationDirectorUserId) { if (shopMerchantConfig.quotationDirectorUserId) {
_params.quotationDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.quotationDirectorUserId)?.userName _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.boutiqueSunshineInspiration = shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration = shopMerchantConfig.quotationSunshineInspiration _params.quotationSunshineInspiration = shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration = shopMerchantConfig.boutiqueMarketInspiration _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!