|
|
|
@ -19,7 +19,8 @@ |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="t('sex')" prop="sex"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.sex" clearable :placeholder="t('sexPlaceholder')"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.sex" clearable |
|
|
|
:placeholder="t('sexPlaceholder')"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in sexList" |
|
|
|
@ -45,7 +46,8 @@ |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="t('sourceChannel')" prop="source_channel"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.source_channel" clearable :placeholder="t('sourceChannelPlaceholder')"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.source_channel" clearable |
|
|
|
:placeholder="t('sourceChannelPlaceholder')"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in source_channelList" |
|
|
|
@ -58,7 +60,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="t('customerSource')" prop="customer_source"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.customer_source" clearable :placeholder="t('customerSourcePlaceholder')"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.customer_source" clearable |
|
|
|
:placeholder="t('customerSourcePlaceholder')"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in customer_sourceList" |
|
|
|
@ -71,7 +74,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="t('addStaffId')" prop="add_staff_id"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.add_staff_id" clearable :placeholder="t('addStaffIdPlaceholder')"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.add_staff_id" clearable |
|
|
|
:placeholder="t('addStaffIdPlaceholder')"> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in addStaffIdList" |
|
|
|
:key="index" |
|
|
|
@ -83,7 +87,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="t('getStaffId')" prop="get_staff_id"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.get_staff_id" clearable :placeholder="t('getStaffIdPlaceholder')"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.get_staff_id" clearable |
|
|
|
:placeholder="t('getStaffIdPlaceholder')"> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in getStaffIdList" |
|
|
|
:key="index" |
|
|
|
@ -97,46 +102,25 @@ |
|
|
|
<el-input v-model="salesTable.searchParam.contact_name" :placeholder="t('contactNamePlaceholder')"/> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="t('provinceId')" prop="province_id"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.province_id" clearable :placeholder="t('provinceIdPlaceholder')"> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in provinceIdList" |
|
|
|
:key="index" |
|
|
|
:label="item['name']" |
|
|
|
:value="item['id']" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="t('cityId')" prop="city_id"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.city_id" clearable :placeholder="t('cityIdPlaceholder')"> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in cityIdList" |
|
|
|
:key="index" |
|
|
|
:label="item['name']" |
|
|
|
:value="item['id']" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="t('districtId')" prop="district_id"> |
|
|
|
<el-select class="w-[280px]" v-model="salesTable.searchParam.district_id" clearable :placeholder="t('districtIdPlaceholder')"> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in districtIdList" |
|
|
|
:key="index" |
|
|
|
:label="item['name']" |
|
|
|
:value="item['id']" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-form-item :label="t('所在地')" prop="province_id"> |
|
|
|
<el-cascader |
|
|
|
class="input-width" |
|
|
|
v-model="salesTable.searchParam.full_address_id" |
|
|
|
:options="options_area" |
|
|
|
:props="{ |
|
|
|
label: 'name', // 指定显示文本字段 |
|
|
|
value: 'id', // 指定值字段 |
|
|
|
children: 'children' // 指定子节点字段 |
|
|
|
}" |
|
|
|
@change="changeArea"></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="t('communityName')" prop="community_name"> |
|
|
|
<el-input v-model="salesTable.searchParam.community_name" :placeholder="t('communityNamePlaceholder')"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="t('createTime')" prop="create_time"> |
|
|
|
<el-date-picker v-model="salesTable.searchParam.create_time" type="datetimerange" format="YYYY-MM-DD hh:mm:ss" |
|
|
|
<el-date-picker v-model="salesTable.searchParam.create_time" type="datetimerange" |
|
|
|
format="YYYY-MM-DD hh:mm:ss" |
|
|
|
:start-placeholder="t('startDate')" :end-placeholder="t('endDate')"/> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
@ -155,7 +139,8 @@ |
|
|
|
</template> |
|
|
|
<el-table-column prop="id" :label="t('id')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="student_phone" :label="t('studentPhone')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
<el-table-column prop="student_phone" :label="t('studentPhone')" min-width="120" |
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="student_name" :label="t('studentName')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
@ -191,19 +176,24 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="add_staff_id_name" :label="t('addStaffId')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
<el-table-column prop="add_staff_id_name" :label="t('addStaffId')" min-width="120" |
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="get_staff_id_name" :label="t('getStaffId')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
<el-table-column prop="get_staff_id_name" :label="t('getStaffId')" min-width="120" |
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="contact_name" :label="t('contactName')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="province_id_name" :label="t('provinceId')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
<el-table-column prop="province_id_name" :label="t('provinceId')" min-width="120" |
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="city_id_name" :label="t('cityId')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="district_id_name" :label="t('districtId')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
<el-table-column prop="district_id_name" :label="t('districtId')" min-width="120" |
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column prop="community_name" :label="t('communityName')" min-width="120" :show-overflow-tooltip="true"/> |
|
|
|
<el-table-column prop="community_name" :label="t('communityName')" min-width="120" |
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
|
|
|
<el-table-column :label="t('customerTags')" min-width="180" align="center" :show-overflow-tooltip="true"> |
|
|
|
<template #default="{ row }"> |
|
|
|
@ -255,6 +245,8 @@ import { img } from '@/utils/common' |
|
|
|
import {ElMessageBox, FormInstance} from 'element-plus' |
|
|
|
import {useRouter} from 'vue-router' |
|
|
|
import {useRoute} from 'vue-router' |
|
|
|
import {getAreaTree} from "@/addon/zhjw/api/common"; |
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
const pageName = route.meta.title; |
|
|
|
|
|
|
|
@ -288,6 +280,30 @@ let salesTable = reactive({ |
|
|
|
|
|
|
|
const searchFormRef = ref<FormInstance>() |
|
|
|
|
|
|
|
//地址下拉三级联动 |
|
|
|
const options_area = ref([]);//地址选择树形结构 |
|
|
|
//获取地址树形结构 |
|
|
|
const getAreaTreeArr = async () => { |
|
|
|
options_area.value = await (await getAreaTree()).data |
|
|
|
} |
|
|
|
getAreaTreeArr() |
|
|
|
//监听地址选择 |
|
|
|
const changeArea = (selectedValues: any[]) => { |
|
|
|
console.log('用户选择的地址值:', selectedValues); |
|
|
|
|
|
|
|
// 将选中的地址信息存储到 formData 中 |
|
|
|
if (selectedValues.length >= 1) { |
|
|
|
|
|
|
|
salesTable.searchParam.province_id = selectedValues[0]; // 省级 ID |
|
|
|
} |
|
|
|
if (selectedValues.length >= 2) { |
|
|
|
salesTable.searchParam.city_id = selectedValues[1]; // 市级 ID |
|
|
|
} |
|
|
|
if (selectedValues.length >= 3) { |
|
|
|
salesTable.searchParam.district_id = selectedValues[2]; // 区级 ID |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
// 选中数据 |
|
|
|
const selectData = ref<any[]>([]) |
|
|
|
|
|
|
|
@ -372,30 +388,16 @@ const deleteEvent = (id: number) => { |
|
|
|
|
|
|
|
|
|
|
|
const addStaffIdList = ref([]) |
|
|
|
const setAddStaffIdList = async () => { |
|
|
|
addStaffIdList.value = await (await getWithStaffList({})).data |
|
|
|
} |
|
|
|
setAddStaffIdList() |
|
|
|
const getStaffIdList = ref([]) |
|
|
|
const setGetStaffIdList = async () => { |
|
|
|
getStaffIdList.value = await (await getWithStaffList({})).data |
|
|
|
} |
|
|
|
setGetStaffIdList() |
|
|
|
const provinceIdList = ref([]) |
|
|
|
const setProvinceIdList = async () => { |
|
|
|
provinceIdList.value = await (await getWithSysAreaList({})).data |
|
|
|
} |
|
|
|
setProvinceIdList() |
|
|
|
const cityIdList = ref([]) |
|
|
|
const setCityIdList = async () => { |
|
|
|
cityIdList.value = await (await getWithSysAreaList({})).data |
|
|
|
} |
|
|
|
setCityIdList() |
|
|
|
const districtIdList = ref([]) |
|
|
|
const setDistrictIdList = async () => { |
|
|
|
districtIdList.value = await (await getWithSysAreaList({})).data |
|
|
|
const getStaffIdListApi = async () => { |
|
|
|
let data = await (await getWithStaffList({})).data |
|
|
|
addStaffIdList.value = data |
|
|
|
|
|
|
|
getStaffIdList.value = data |
|
|
|
} |
|
|
|
setDistrictIdList() |
|
|
|
getStaffIdListApi() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const resetForm = (formEl: FormInstance | undefined) => { |
|
|
|
if (!formEl) return |
|
|
|
|