服务对象列表修复线下工单bug

This commit is contained in:
Leo_Ding 2025-11-13 16:04:55 +08:00
parent 8d7b5c4107
commit 156c8f176c
3 changed files with 28 additions and 4 deletions

View File

@ -12,8 +12,8 @@ VITE_ROUTER_BASE=/
VITE_ROUTER_HISTORY=hash
# api
VITE_API_BASIC='http://10.10.1.39:8040'
# VITE_API_BASIC='http://115.239.217.220:8021'
# VITE_API_BASIC='http://10.10.1.39:8040'
VITE_API_BASIC='http://115.239.217.220:8021'
VITE_API_UPLOAD='http://115.239.217.220:9458'
VITE_API_HTTP=/api/v1/
# storage

View File

@ -636,6 +636,7 @@ function handleOk() {
// params.stationId=storage.local.getItem('stationId')
//
if (params.identityType === '1' && !isValidIdCard(params.identityNo)) {
hideLoading()
return message.error('请输入正确的身份证号码')
}
let result = null

View File

@ -106,6 +106,9 @@
<template v-if="column.key === 'categoryType'">
<span>{{ dicsStore.getDictLabel('PROJECT_TYPE', record.categoryType) }}</span>
</template>
<template v-if="column.key === 'categoryId'">
<span>{{categoryList.find(item=>item.id==record.categoryId).name}}</span>
</template>
</template>
</a-table>
</a-modal>
@ -142,6 +145,7 @@ const mapVisible = ref(false)
const stationList = ref([])
const spining = ref(false)
const areaCascaderRef=ref()
const categoryList = ref([])
formRules.value = {
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
@ -169,7 +173,7 @@ const serviceList = ref([])
//
const columns = [
{ title: '类型', dataIndex: 'categoryType', key: 'categoryType', align: 'center', width: 100, },
{ title: '分类名称', dataIndex: 'name', key: 'name', align: 'center', width: 180, },
{ title: '分类名称', dataIndex: 'categoryId', key: 'categoryId', align: 'center', width: 180, },
{ title: '项目名称', dataIndex: 'name', key: 'name', align: 'center', },
{ title: '价格', dataIndex: 'price', key: 'price', align: 'center', },
{ title: '简介', dataIndex: 'remark', key: 'remark', align: 'center', },
@ -190,6 +194,7 @@ const rowSelection = computed(() => ({
}),
}))
getSeveicePeople()
getCategoriesAll()
async function getSeveicePeople() {
try {
const { success, data, total } = await apis.serviceStaffList
@ -208,6 +213,21 @@ async function getSeveicePeople() {
}
}
async function getCategoriesAll() {
try {
const { success, data, total } = await apis.projectType
.getProjectListAll({
pageSize: 100, current: 1,
})
.catch(() => {
throw new Error()
})
if (config('http.code.success') === success) {
categoryList.value = data.map(item => ({ id: item.id, name: item.name }))
}
} catch (error) {
}
}
function onAreaChange(value, labels) {
formData.value.areaLabels = [...labels]
}
@ -260,6 +280,7 @@ const handleRemove = (item) => {
//
const handleConfirm = () => {
modalVisible.value = false
}
//
@ -354,7 +375,8 @@ function handleOk() {
params.plannedServiceStartDate = formData.value.planeDate[0]
params.plannedEndDate = formData.value.planeDate[1]
}
params.projects = serviceList.value
params.projects =selectedServices.value
console.log(params)
let result = null
switch (modal.value.type) {
case 'create':
@ -391,6 +413,7 @@ function handleOk() {
*/
function handleCancel() {
selectedServices.value = []
formData.value={}
hideModal()
}