|
|
@@ -507,6 +507,11 @@
|
|
|
<el-option v-for="tag in allTags" :key="tag.id" :label="tag.name" :value="tag.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="服务类型">
|
|
|
+ <el-select v-model="editDialog.serviceTypeIds" multiple placeholder="请选择服务类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in serviceOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="认证状态">
|
|
|
<el-checkbox v-model="editDialog.form.authId">身份证认证</el-checkbox>
|
|
|
<el-checkbox v-model="editDialog.form.authQual">专业资质认证</el-checkbox>
|
|
|
@@ -582,6 +587,11 @@
|
|
|
<el-option v-for="tag in allTags" :key="tag.id" :label="tag.name" :value="tag.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="服务类型">
|
|
|
+ <el-select v-model="createDialog.serviceTypeIds" multiple placeholder="请选择服务类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in serviceOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<el-button @click="createDialog.visible = false">取消</el-button>
|
|
|
@@ -885,7 +895,8 @@ const editDialog = reactive({
|
|
|
visible: false,
|
|
|
form: {} as FlfFulfillerForm,
|
|
|
cascaderValue: [] as any[],
|
|
|
- stationOptions: [] as SysAreaStationOnStoreVo[]
|
|
|
+ stationOptions: [] as SysAreaStationOnStoreVo[],
|
|
|
+ serviceTypeIds: [] as any[] // 服务类型多选辅助数组(提交时转为逗号字符串)
|
|
|
})
|
|
|
|
|
|
const createDialog = reactive({
|
|
|
@@ -894,7 +905,8 @@ const createDialog = reactive({
|
|
|
name: '', phone: '', password: '', cityCode: '', cityName: '', stationId: undefined as any, gender: '0', workType: 'full_time'
|
|
|
},
|
|
|
cascaderValue: [] as any[],
|
|
|
- stationOptions: [] as SysAreaStationOnStoreVo[]
|
|
|
+ stationOptions: [] as SysAreaStationOnStoreVo[],
|
|
|
+ serviceTypeIds: [] as any[] // 服务类型多选辅助数组(提交时转为逗号字符串)
|
|
|
})
|
|
|
|
|
|
const pointsDialog = reactive({
|
|
|
@@ -1010,6 +1022,8 @@ const handleEdit = (row: FlfFulfillerVO) => {
|
|
|
authQual: row.authQual,
|
|
|
tagIds: row.tags ? row.tags.map(t => t.id) : []
|
|
|
}
|
|
|
+ // 将后端逗号字符串 serviceTypes 解析为数组用于多选回显
|
|
|
+ editDialog.serviceTypeIds = row.serviceTypes ? row.serviceTypes.split(',').filter(Boolean) : []
|
|
|
if (row.stationId || row.cityCode) {
|
|
|
const targetId = row.stationId || Number(row.cityCode)
|
|
|
const path: any[] = []
|
|
|
@@ -1032,6 +1046,7 @@ const handleCreate = () => {
|
|
|
createDialog.form = {
|
|
|
name: '', phone: '', password: '', cityCode: '', cityName: '', stationId: undefined, gender: '0', workType: 'full_time', tagIds: []
|
|
|
}
|
|
|
+ createDialog.serviceTypeIds = [] // 重置服务类型辅助数组
|
|
|
createDialog.cascaderValue = []
|
|
|
createDialog.stationOptions = []
|
|
|
createDialog.visible = true
|
|
|
@@ -1042,6 +1057,8 @@ const submitCreate = async () => {
|
|
|
ElMessage.warning('请填写完整信息')
|
|
|
return
|
|
|
}
|
|
|
+ // 将选中的服务类型数组转为逗号拼接字符串后提交
|
|
|
+ ;(createDialog.form as any).serviceTypes = createDialog.serviceTypeIds.join(',')
|
|
|
try {
|
|
|
await addFulfiller(createDialog.form as FlfFulfillerForm)
|
|
|
createDialog.visible = false
|
|
|
@@ -1051,6 +1068,8 @@ const submitCreate = async () => {
|
|
|
}
|
|
|
|
|
|
const saveEdit = async () => {
|
|
|
+ // 将选中的服务类型数组转为逗号拼接字符串后提交
|
|
|
+ ;(editDialog.form as any).serviceTypes = editDialog.serviceTypeIds.join(',')
|
|
|
try {
|
|
|
await updateFulfiller(editDialog.form)
|
|
|
ElMessage.success('更新成功')
|