This commit is contained in:
zmj 2024-05-15 11:23:35 +08:00
parent 3a29229098
commit 6b24521afe
4 changed files with 12 additions and 1 deletions

Binary file not shown.

View File

@ -1,7 +1,7 @@
<template>
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form class="mb-[-16px]" :model="queryParams" inline @submit.native.prevent>
<el-form-item :label="item.label" v-for="(item, index) in config.serchList" :key="index">
<el-select v-model="queryParams[item.value]" v-if="item.select" :disabled="isDisabled(item.value)">

View File

@ -310,6 +310,9 @@ const setFormData = async (data: Record<any, any>) => {
await getAreaList(formData.city_id, true)
await getTownList(formData.area_id, true)
getVilllageList(formData.street_id)
if (data.financial_type == 0) {
formData.financial_type = ''
}
}
@ -354,6 +357,8 @@ const address = reactive({
})
const getCityList = async (province_code: number | String, isAsync: Boolean) => {
if (!province_code) return;
let res = await apicityLists({ province_code })
address.cityList = res
if (isAsync) {
@ -365,6 +370,7 @@ const getCityList = async (province_code: number | String, isAsync: Boolean) =>
const getAreaList = async (city_code: number | String, isAsync: Boolean) => {
if (!city_code) return;
let res = await apiAreaLists({ city_code })
address.areaList = res
if (isAsync) {
@ -376,6 +382,7 @@ const getAreaList = async (city_code: number | String, isAsync: Boolean) => {
const getTownList = async (area_code: number | String, isAsync: Boolean) => {
if (!area_code) return;
let res = await apiStreetLists({ area_code })
address.townList = res
if (isAsync) {
@ -386,6 +393,7 @@ const getTownList = async (area_code: number | String, isAsync: Boolean) => {
}
const getVilllageList = async (street_code: number | String) => {
if (!street_code) return;
let res = await apiVillageLists({ street_code })
address.villlageList = res
}

View File

@ -136,6 +136,9 @@ const getDetail = async (row: Record<string, any>) => {
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
if (data.sex == '未知') {
data.sex = ''
}
mode.value == 'edit'
? await apiUserEdit(data)
: await apiUserAdd(data)