需求管理页面优化

This commit is contained in:
BianLzhaoMin 2024-12-04 18:31:12 +08:00
parent 8715f7e45c
commit 547b648140
3 changed files with 28 additions and 11 deletions

1
components.d.ts vendored
View File

@ -10,6 +10,7 @@ declare module 'vue' {
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']

View File

@ -18,8 +18,8 @@ export const getBookCarDetailsApi = (data: any = {}) => {
export const getLeaseInfoByIdApi = (data: any = {}) => {
return get('/material-mall/ma-lease/getById', data)
}
export const getAreaApi = (data: any = {}) => {
return get('/material-mall/maType/getArea', data)
export const getAreaApi = (areaCode: any) => {
return get(`/material-mall/maType/getArea?areaCode=${areaCode}`,)
}
// 立即接单
export const setAcceptByIdApi = (data: any = {}) => {

View File

@ -249,10 +249,11 @@
style="width: 95%"
placeholder="请选择项目所在省"
v-model="addOrEditForm.areaId"
@change="onProvinceChange($event)"
>
<el-option
:key="item.areaId"
:value="item.areaId"
:value="item.areaCode"
:label="item.areaName"
v-for="item in areaList"
/>
@ -265,13 +266,14 @@
clearable
style="width: 95%"
placeholder="请选择项目所在市"
v-model="addOrEditForm.areaId"
v-model="addOrEditForm.areaId2"
@change="onCityChange($event)"
>
<el-option
:key="item.areaId"
:value="item.areaId"
:value="item.areaCode"
:label="item.areaName"
v-for="item in areaList"
v-for="item in areaCityList"
/>
</el-select>
</el-form-item>
@ -282,13 +284,14 @@
clearable
style="width: 95%"
placeholder="请选择项所在县"
v-model="addOrEditForm.areaId"
v-model="addOrEditForm.areaId1"
@change="onCountyChange($event)"
>
<el-option
:key="item.areaId"
:value="item.areaId"
:value="item.areaCode"
:label="item.areaName"
v-for="item in areaList"
v-for="item in areaCountyList"
/>
</el-select>
</el-form-item>
@ -299,7 +302,7 @@
style="width: 100%"
clearable
placeholder="请输入详细地址"
v-model="addOrEditForm.areaId"
v-model="addOrEditForm.areaId3"
/>
</el-form-item>
</el-col>
@ -608,6 +611,9 @@ const addOrEditFormRef = ref<any>(null)
const addOrEditDialogVisible = ref(false)
const addOrEditDemandFormList = ref<any>([])
const addOrEditDemandFormRefList = ref<any>([])
const areaProvinceList = ref([])
const areaCityList = ref<any>([])
const areaCountyList = ref<any>([])
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
const searchParams = reactive({
@ -705,7 +711,7 @@ const getLeaseListData = async () => {
}
const getAreaData = async () => {
const res: any = await getAreaApi()
const res: any = await getAreaApi(0)
areaList.value = res.data
}
@ -874,6 +880,16 @@ const onDeleteDemand = (index: any) => {
})
}
const onProvinceChange = async (id: any) => {
const res: any = await getAreaApi(id)
areaCityList.value = res.data
}
const onCityChange = async (id: any) => {
const res: any = await getAreaApi(id)
areaCountyList.value = res.data
}
const onCountyChange = async (id: any) => {}
onMounted(() => {
getClassAndCompanyData()
getLeaseListData()