add
This commit is contained in:
parent
3a29229098
commit
6b24521afe
BIN
build/admin.rar
BIN
build/admin.rar
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<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-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)">
|
<el-select v-model="queryParams[item.value]" v-if="item.select" :disabled="isDisabled(item.value)">
|
||||||
|
|
|
@ -310,6 +310,9 @@ const setFormData = async (data: Record<any, any>) => {
|
||||||
await getAreaList(formData.city_id, true)
|
await getAreaList(formData.city_id, true)
|
||||||
await getTownList(formData.area_id, true)
|
await getTownList(formData.area_id, true)
|
||||||
getVilllageList(formData.street_id)
|
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) => {
|
const getCityList = async (province_code: number | String, isAsync: Boolean) => {
|
||||||
|
|
||||||
|
if (!province_code) return;
|
||||||
let res = await apicityLists({ province_code })
|
let res = await apicityLists({ province_code })
|
||||||
address.cityList = res
|
address.cityList = res
|
||||||
if (isAsync) {
|
if (isAsync) {
|
||||||
|
@ -365,6 +370,7 @@ const getCityList = async (province_code: number | String, isAsync: Boolean) =>
|
||||||
|
|
||||||
|
|
||||||
const getAreaList = async (city_code: number | String, isAsync: Boolean) => {
|
const getAreaList = async (city_code: number | String, isAsync: Boolean) => {
|
||||||
|
if (!city_code) return;
|
||||||
let res = await apiAreaLists({ city_code })
|
let res = await apiAreaLists({ city_code })
|
||||||
address.areaList = res
|
address.areaList = res
|
||||||
if (isAsync) {
|
if (isAsync) {
|
||||||
|
@ -376,6 +382,7 @@ const getAreaList = async (city_code: number | String, isAsync: Boolean) => {
|
||||||
|
|
||||||
|
|
||||||
const getTownList = async (area_code: number | String, isAsync: Boolean) => {
|
const getTownList = async (area_code: number | String, isAsync: Boolean) => {
|
||||||
|
if (!area_code) return;
|
||||||
let res = await apiStreetLists({ area_code })
|
let res = await apiStreetLists({ area_code })
|
||||||
address.townList = res
|
address.townList = res
|
||||||
if (isAsync) {
|
if (isAsync) {
|
||||||
|
@ -386,6 +393,7 @@ const getTownList = async (area_code: number | String, isAsync: Boolean) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getVilllageList = async (street_code: number | String) => {
|
const getVilllageList = async (street_code: number | String) => {
|
||||||
|
if (!street_code) return;
|
||||||
let res = await apiVillageLists({ street_code })
|
let res = await apiVillageLists({ street_code })
|
||||||
address.villlageList = res
|
address.villlageList = res
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,6 +136,9 @@ const getDetail = async (row: Record<string, any>) => {
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
|
if (data.sex == '未知') {
|
||||||
|
data.sex = ''
|
||||||
|
}
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiUserEdit(data)
|
? await apiUserEdit(data)
|
||||||
: await apiUserAdd(data)
|
: await apiUserAdd(data)
|
||||||
|
|
Loading…
Reference in New Issue