更新了地缘获客、表单重审

master
doublekou 1 year ago
parent 2b75b549f4
commit 989c4a9c52

Binary file not shown.

@ -229,7 +229,7 @@
<!--引入高德地图JSAPI --> <!--引入高德地图JSAPI -->
<script <script
type="text/javascript" type="text/javascript"
src="https://webapi.amap.com/maps?v=2.0&key=df6e9416230b57f3c7f48be57dd2f813&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.SearchNearBy,AMap.Geocoder,AMap.Geolocation" src="https://webapi.amap.com/maps?v=2.0&key=df6e9416230b57f3c7f48be57dd2f813&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.SearchNearBy,AMap.Geocoder,AMap.Geolocation,AMap.Marker"
></script> ></script>
<!--引入UI组件库1.1版本) --> <!--引入UI组件库1.1版本) -->
<!-- <script src="https://webapi.amap.com/ui/1.1/main.js"></script> --> <!-- <script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->

@ -7,9 +7,13 @@ import type {
import type { import type {
GeopoliticalCustomersDTO, GeopoliticalCustomersDTO,
CustomerDTO, CustomerDTO,
customId customId,
auditDTO
} from '@/api/geopoliticalCustomers/types'
import type {
GeopoliticalCustomersPageParam,
storePageParam
} from '@/api/geopoliticalCustomers/types' } from '@/api/geopoliticalCustomers/types'
import type { GeopoliticalCustomersPageParam } from '@/api/geopoliticalCustomers/types'
/** /**
* *
@ -96,3 +100,24 @@ export function getDetail(customId: customId) {
params: customId params: customId
}) })
} }
/**
*
* @param customerDto
*/
export function auditCustomer(customerDto: auditDTO) {
return httpClient.post<ApiResult<void>>('/custom/audit', customerDto)
}
// export function auditCustomer(customerDto: CustomerDTO) {
// return httpClient.get<ApiResult>('/custom/audit', {
// params: customerDto
// })
// }
/**
*
* @param pageParams
*/
export function getStoreData(pageParams: storePageParam) {
return httpClient.get<ApiResult>('/store/queryRange', {
params: pageParams
})
}

@ -154,32 +154,40 @@ interface customStoreEntitiesItem {
// customStoreId: number // customStoreId: number
// storeId: number // storeId: number
// customId: number // customId: number
//门店id
storeId: number
//门店名称 //门店名称
storeName: string storeName?: string
//预约时间 //预约时间
reservationTime: string reservationTime: string
} }
export interface CustomerDTO { export interface CustomerDTO {
customId?: number | undefined customId?: number | undefined
//客户名称 //客户名称
customName: string | undefined customName?: string | undefined
//客户联系方式 //客户联系方式
customNid: string | undefined customNid?: string | undefined
address?: Array<any> address?: Array<any>
//省 //省
economize: string economize?: string
//市 //市
market: string market?: string
//区 //区
distinguish: string distinguish?: string
//详细地址 //详细地址
detailAddress: any detailAddress?: any
//半径 //半径
radius: any radius?: any
//报名状态 //报名状态
enrollStatus: number enrollStatus?: number
//门店信息 //门店信息
customStoreEntities: Array<customStoreEntitiesItem> customStoreEntities: Array<customStoreEntitiesItem>
description?: number | undefined
status?: number | undefined
}
export interface auditDTO {
customId?: number | undefined
status?: number | undefined
} }
/** /**
* ID() * ID()
@ -237,3 +245,32 @@ export interface GeopoliticalCustomersSearch {
// 访问时间区间的结束值 // 访问时间区间的结束值
endTime?: string endTime?: string
} }
/**
*
*/
export interface FormReviewSearch {
batchNo?: string
// 访问时间区间的开始值
startTime?: string
// 访问时间区间的结束值
endTime?: string
}
/**
*
*/
export type storePageParam = storeQO & PageParam
/**
*
*/
export type storeQO = {
//经度
longitude?: number
//市
latitude?: number
//纬度
distance?: number
// 开始时间
startTime?: string
// 结束时间
endTime?: string
}

@ -25,8 +25,8 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'operate'"> <template v-if="column.key === 'operate'">
<operation-group> <operation-group>
<!-- <a @click="handleView(record)"></a> --> <a v-if="record.enrollStatus !== 2" @click="handleAudit(record)"></a>
<a @click="handleEdit(record)"></a> <span v-else>-</span>
</operation-group> </operation-group>
</template> </template>
</template> </template>
@ -52,7 +52,7 @@ import type {
GeopoliticalCustomersPageParam GeopoliticalCustomersPageParam
} from '@/api/geopoliticalCustomers/types' } from '@/api/geopoliticalCustomers/types'
defineOptions({ name: 'GeopoliticalCustomers' }) defineOptions({ name: 'FormReview' })
// //
// //
@ -78,23 +78,9 @@ const searchTable = (params: GeopoliticalCustomersPageParam) => {
searchParams = params searchParams = params
reloadTable(true) // tableRequest reloadTable(true) // tableRequest
} }
//
const newAppointment = () => {
geopoliticalCustomersModalRef.value?.open({
newFormAction: FormAction.CREATE
})
}
//
const handleView = (record: GeopoliticalCustomersRecord) => {
geopoliticalCustomersModalRef.value?.open({
newFormAction: FormAction.UPDATE,
type: 'view',
record: record
})
}
// //
const handleEdit = (record: GeopoliticalCustomersRecord) => { const handleAudit = (record: GeopoliticalCustomersRecord) => {
geopoliticalCustomersModalRef.value?.open({ geopoliticalCustomersModalRef.value?.open({
newFormAction: FormAction.UPDATE, newFormAction: FormAction.UPDATE,
type: 'audit', type: 'audit',
@ -105,10 +91,8 @@ const handleEdit = (record: GeopoliticalCustomersRecord) => {
const columns: ProColumns[] = [ const columns: ProColumns[] = [
{ {
title: '编号', title: '编号',
width: 80, width: 160,
customRender: function ({ index }) { dataIndex: 'batchNo'
return `${index + 1}`
}
}, },
{ {
title: '客户名称', title: '客户名称',
@ -126,6 +110,8 @@ const columns: ProColumns[] = [
return h('div', '待提交') return h('div', '待提交')
} else if (record.enrollStatus === 1) { } else if (record.enrollStatus === 1) {
return h('div', '已报名') return h('div', '已报名')
} else if (record.enrollStatus === 2) {
return h('div', '审核通过')
} }
} }
}, },
@ -159,15 +145,15 @@ const columns: ProColumns[] = [
} }
// //
.operationButtonArea { // .operationButtonArea {
padding-bottom: 20px; // padding-bottom: 20px;
} // }
.operationButton { // .operationButton {
background-color: #f4f4f5; // background-color: #f4f4f5;
border-radius: 5px; // border-radius: 5px;
color: #909399; // color: #909399;
margin-right: 10px; // margin-right: 10px;
} // }
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -2,42 +2,11 @@
<a-card :bordered="false" style="margin-bottom: 16px" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" style="margin-bottom: 16px" :body-style="{ paddingBottom: 0 }">
<a-form :model="formModel" :label-col="labelCol"> <a-form :model="formModel" :label-col="labelCol">
<a-row :gutter="16"> <a-row :gutter="16">
<!-- v-if="userInfoCurrent === 'ROLE_ADMIN'" -->
<a-col :xl="8" :md="12" :sm="24"> <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="编号"> <a-form-item label="编号">
<a-input v-model:value="formModel.customName" placeholder="请输入" /> <a-input v-model:value="formModel.batchNo" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col v-if="userInfoCurrent === 'ROLE_SALES_EXECUTIVE'" :xl="8" :md="12" :sm="24">
<a-form-item label="坐席名称">
<a-input v-model:value="formModel.customName" placeholder="请输入" />
</a-form-item>
</a-col> -->
<!-- <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="坐席名称">
<dict-select
v-model:value="formModel.ip"
dict-code="user_status"
allow-clear
placeholder="请选择"
/>
</a-form-item>
</a-col> -->
<!-- <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="报名状态">
<dict-select
v-model:value="formModel.enrollStatus"
dict-code="registration_status"
allow-clear
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :xl="8" :md="12" :sm="24">
<a-form-item label="联系方式">
<a-input v-model:value="formModel.customNid" placeholder="请输入" />
</a-form-item>
</a-col> -->
<a-col :xl="8" :md="12" :sm="24"> <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="填写时间"> <a-form-item label="填写时间">
<a-range-picker <a-range-picker
@ -61,19 +30,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { Form } from 'ant-design-vue' import { Form } from 'ant-design-vue'
import type { GeopoliticalCustomersSearch } from '@/api/geopoliticalCustomers/types' import type { FormReviewSearch } from '@/api/geopoliticalCustomers/types'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import type { Dayjs } from 'dayjs' import type { Dayjs } from 'dayjs'
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const userInfoCurrent = ref<string | undefined>('')
onMounted(() => {
console.log(userInfo, 'userInfo?.permissions')
// userInfoCurrent = userInfo?.roleCodes
userInfoCurrent.value = userInfo?.roleCodes?.toLocaleString()
})
const useForm = Form.useForm const useForm = Form.useForm
@ -92,10 +51,8 @@ const emits = defineEmits<{
}>() }>()
const searchTimeValue = ref<[Dayjs, Dayjs]>() const searchTimeValue = ref<[Dayjs, Dayjs]>()
const formModel = reactive<GeopoliticalCustomersSearch>({ const formModel = reactive<FormReviewSearch>({
customName: '', batchNo: ''
customNid: '',
enrollStatus: undefined
}) })
const { resetFields } = useForm(formModel) const { resetFields } = useForm(formModel)

@ -27,7 +27,7 @@
<template v-if="column.key === 'operate'"> <template v-if="column.key === 'operate'">
<operation-group> <operation-group>
<a @click="handleView(record)"></a> <a @click="handleView(record)"></a>
<a @click="handleEdit(record)"></a> <a v-if="record.enrollStatus === 0" @click="handleEdit(record)"></a>
</operation-group> </operation-group>
</template> </template>
</template> </template>
@ -106,10 +106,8 @@ const handleEdit = (record: GeopoliticalCustomersRecord) => {
const columns: ProColumns[] = [ const columns: ProColumns[] = [
{ {
title: '编号', title: '编号',
width: 80, width: 160,
customRender: function ({ index }) { dataIndex: 'batchNo'
return `${index + 1}`
}
}, },
{ {
title: '客户名称', title: '客户名称',
@ -127,6 +125,8 @@ const columns: ProColumns[] = [
return h('div', '待提交') return h('div', '待提交')
} else if (record.enrollStatus === 1) { } else if (record.enrollStatus === 1) {
return h('div', '已报名') return h('div', '已报名')
} else if (record.enrollStatus === 2) {
return h('div', '审核通过')
} }
} }
}, },

@ -8,21 +8,6 @@
<a-input v-model:value="formModel.customName" placeholder="请输入" /> <a-input v-model:value="formModel.customName" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col v-if="userInfoCurrent === 'ROLE_SALES_EXECUTIVE'" :xl="8" :md="12" :sm="24">
<a-form-item label="坐席名称">
<a-input v-model:value="formModel.customName" placeholder="请输入" />
</a-form-item>
</a-col> -->
<!-- <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="坐席名称">
<dict-select
v-model:value="formModel.ip"
dict-code="user_status"
allow-clear
placeholder="请选择"
/>
</a-form-item>
</a-col> -->
<a-col :xl="8" :md="12" :sm="24"> <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="报名状态"> <a-form-item label="报名状态">
<dict-select <dict-select
@ -65,15 +50,15 @@ import type { GeopoliticalCustomersSearch } from '@/api/geopoliticalCustomers/ty
import dayjs from 'dayjs' import dayjs from 'dayjs'
import type { Dayjs } from 'dayjs' import type { Dayjs } from 'dayjs'
// //
import { useUserStore } from '@/stores/user-store' // import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore() // const { userInfo } = useUserStore()
const userInfoCurrent = ref<string | undefined>('') // const userInfoCurrent = ref<string | undefined>('')
onMounted(() => { // onMounted(() => {
console.log(userInfo, 'userInfo?.permissions') // console.log(userInfo, 'userInfo?.permissions')
// userInfoCurrent = userInfo?.roleCodes // // userInfoCurrent = userInfo?.roleCodes
userInfoCurrent.value = userInfo?.roleCodes?.toLocaleString() // userInfoCurrent.value = userInfo?.roleCodes?.toLocaleString()
}) // })
const useForm = Form.useForm const useForm = Form.useForm

@ -105,6 +105,9 @@ defineExpose<LoginFormInstance>({
uuid: modelRef.uuid, uuid: modelRef.uuid,
code: modelRef.code code: modelRef.code
}) })
},
getCode() {
getCode()
} }
}) })
</script> </script>

@ -79,6 +79,7 @@ import { useUserStore } from '@/stores/user-store'
import { projectTitle, projectDesc, enableLoginCaptcha } from '@/config' import { projectTitle, projectDesc, enableLoginCaptcha } from '@/config'
import { SliderCaptcha as LoginCaptcha } from '@/components/Captcha' import { SliderCaptcha as LoginCaptcha } from '@/components/Captcha'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { getCodeData } from '@/api/auth'
const { t } = useI18n() const { t } = useI18n()
@ -146,6 +147,16 @@ function handleLogin() {
// enableLoginCaptcha ? loginCaptchaRef.value?.show() : handleSubmit() // enableLoginCaptcha ? loginCaptchaRef.value?.show() : handleSubmit()
}) })
} }
// //
// const getCode = () => {
// doRequest(getCodeData(), {
// onSuccess: (res: any) => {
// console.log(res, 'res')
// codeUrl.value = res.data.img
// modelRef.uuid = res.data.uuid
// }
// })
// }
const router = useRouter() const router = useRouter()
@ -161,6 +172,8 @@ function handleSubmit(captchaId?: string) {
router.push(nextPath) router.push(nextPath)
}) })
.catch(err => { .catch(err => {
// console.log(accountLoginFormRef.value, 'accountLoginFormRef')
accountLoginFormRef.value?.getCode()
isLoginError.value = true isLoginError.value = true
loginErrorMessage.value = loginErrorMessage.value =
((err.response || {}).data || {}).message || ((err.response || {}).data || {}).message ||

@ -8,4 +8,5 @@ export type LoginType = 'account' | 'mobile'
export interface LoginFormInstance { export interface LoginFormInstance {
validate: <T = any>(names?: namesType, option?: validateOptions) => Promise<T> validate: <T = any>(names?: namesType, option?: validateOptions) => Promise<T>
doLogin: (captchaId?: string) => Promise<LoginResult> doLogin: (captchaId?: string) => Promise<LoginResult>
getCode: any
} }

@ -49,12 +49,7 @@
</a-form-item> </a-form-item>
<a-form-item v-if="isCreateForm" label="角色" v-bind="validateInfos.roleCodes"> <a-form-item v-if="isCreateForm" label="角色" v-bind="validateInfos.roleCodes">
<sys-role-select <sys-role-select v-model:value="formModel.roleCodes" allow-clear placeholder="请选择" />
v-model:value="formModel.roleCodes"
mode="multiple"
allow-clear
placeholder="请选择"
/>
</a-form-item> </a-form-item>
<a-form-item label="状态"> <a-form-item label="状态">
<dict-radio-group v-model:value="formModel.status" dict-code="user_status" /> <dict-radio-group v-model:value="formModel.status" dict-code="user_status" />
@ -102,7 +97,7 @@ const formRule = reactive({
username: [{ required: true, message: '请输入用户名!' }], username: [{ required: true, message: '请输入用户名!' }],
pass: [{ required: isCreateForm, message: '请输入密码!' }], pass: [{ required: isCreateForm, message: '请输入密码!' }],
nickname: [{ required: true, message: '请输入昵称!' }], nickname: [{ required: true, message: '请输入昵称!' }],
roleCodes: [{ type: 'array', required: true, message: '请选择角色', trigger: ['blur', 'change'] }] roleCodes: [{ required: true, message: '请选择角色', trigger: ['blur', 'change'] }]
}) })
// //

@ -58,7 +58,6 @@ declare module '@vue/runtime-core' {
ArrowUpOutlined: typeof import('@ant-design/icons-vue')['ArrowUpOutlined'] ArrowUpOutlined: typeof import('@ant-design/icons-vue')['ArrowUpOutlined']
ASelect: typeof import('ant-design-vue/es')['Select'] ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASkeleton: typeof import('ant-design-vue/es')['Skeleton']
ASpace: typeof import('ant-design-vue/es')['Space'] ASpace: typeof import('ant-design-vue/es')['Space']
ASpin: typeof import('ant-design-vue/es')['Spin'] ASpin: typeof import('ant-design-vue/es')['Spin']
AStep: typeof import('ant-design-vue/es')['Step'] AStep: typeof import('ant-design-vue/es')['Step']
@ -70,7 +69,6 @@ declare module '@vue/runtime-core' {
ATag: typeof import('ant-design-vue/es')['Tag'] ATag: typeof import('ant-design-vue/es')['Tag']
ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATextarea: typeof import('ant-design-vue/es')['Textarea']
ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker']
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
ATooltip: typeof import('ant-design-vue/es')['Tooltip'] ATooltip: typeof import('ant-design-vue/es')['Tooltip']
ATransfer: typeof import('ant-design-vue/es')['Transfer'] ATransfer: typeof import('ant-design-vue/es')['Transfer']
ATree: typeof import('ant-design-vue/es')['Tree'] ATree: typeof import('ant-design-vue/es')['Tree']

@ -19,17 +19,26 @@ import VueI18n from '@intlify/unplugin-vue-i18n/vite'
import { projectTitle } from './src/config' import { projectTitle } from './src/config'
import { antdvStyleDeps } from './src/utils/resolvers' import { antdvStyleDeps } from './src/utils/resolvers'
//项目
// const serverAddress = 'http://admin.ballcat.cn' // const serverAddress = 'http://admin.ballcat.cn'
// const serverAddress = 'http://172.18.0.225:8100' //xy
// const serverAddress = 'http://172.18.1.8:8100' // const serverAddress = 'http://172.18.0.225:8000'
//jt
// const serverAddress = 'http://172.18.1.8:8000'
//ts
// const serverAddress = 'http://172.18.0.228:8000'
//测试
const serverAddress = 'http://39.100.77.21:8000'
const serverAddress = 'http://8.130.96.163:8100' //线上ip
// const serverAddress = 'http://175.27.212.74:80'
//线上域名
// const serverAddress = 'https://baiyea.net' // const serverAddress = 'https://baiyea.net'
// const serverAddress = 'http://8.130.96.163:8100'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
server: { server: {
port: 8101, port: 8001,
proxy: { proxy: {
'^/api': { '^/api': {
target: serverAddress, target: serverAddress,

Loading…
Cancel
Save