master
飘泊客 10 months ago
parent 01dd268a2e
commit beceb5b1d5

@ -130,7 +130,7 @@ export function updateCustomerAudit(
customId: number,
status: number,
salesmanType: number,
reviewUserId: undefined | number
reviewUserId?: undefined | number
) {
return httpClient.post<ApiResult>('/custom/audit', {
customId,
@ -155,3 +155,10 @@ export function getCustomDetails(id: number) {
export function selectedReviewerList() {
return httpClient.get<ApiResult>('/system/user/review/list')
}
/**
*
* @param customerDto
*/
// export function updatedistribute(customerDto: CustomerDTO) {
// return httpClient.post<ApiResult<void>>('/custom/auditDistribute', customerDto)
// }

@ -20,12 +20,14 @@
<template v-if="column.key === 'operate'">
<operation-group>
<a @click="handleView(record.customId)"></a>
<a v-if="record.enrollStatus == 1" @click="handleEditView(record)"></a>
</operation-group>
</template>
</template>
</pro-table>
<!-- 新建预约新建/编辑弹窗 -->
<inspection-modal ref="inspectionModalRef" @submit-success="reloadTable" />
<inspection-select-modal ref="inspectionSelectModalRef" />
</template>
<script setup lang="ts">
@ -39,10 +41,11 @@ import { mergePageParam } from '@/utils/page-utils'
import { FormAction } from '@/hooks/form'
import inspectionModal from './inspectionModal.vue'
import inspectionSearch from './inspectionSearch.vue'
import inspectionSelectModal from './inspectionSelectModal.vue'
import { pageAccessLogs } from '@/api/geopoliticalCustomers'
import type {
GeopoliticalCustomersRecord,
GeopoliticalCustomersPageParam
DistributeTaskManagementPageParam,
DistributeTaskManagementRecord
} from '@/api/geopoliticalCustomers/types'
defineOptions({ name: 'GeopoliticalCustomers' })
@ -60,8 +63,9 @@ onMounted(() => {
const tableRef = ref<ProTableInstanceExpose>()
//ref
const inspectionModalRef = ref<InstanceType<typeof inspectionModal>>()
const inspectionSelectModalRef = ref<InstanceType<typeof inspectionSelectModal>>()
//
let searchParams: GeopoliticalCustomersPageParam = {}
let searchParams: DistributeTaskManagementPageParam = {}
//
const tableRequest: TableRequest = (params, sorter, filter) => {
@ -75,13 +79,21 @@ const reloadTable = (resetPageIndex?: boolean) => {
}
//
const searchTable = (params: GeopoliticalCustomersPageParam) => {
const searchTable = (params: DistributeTaskManagementPageParam) => {
searchParams = params
reloadTable(true) // tableRequest
}
//
//
const handleView = (id: number) => {
inspectionModalRef.value?.open(FormAction.OTHER, id)
inspectionSelectModalRef.value?.open(FormAction.OTHER, id)
}
//
const handleEditView = (record: DistributeTaskManagementRecord) => {
inspectionModalRef.value?.open({
newFormAction: FormAction.UPDATE,
type: 'audit',
record: record
})
}
const columns: ProColumns[] = [
@ -166,7 +178,7 @@ const columns: ProColumns[] = [
key: 'operate',
title: '操作',
align: 'center',
width: 70,
width: 100,
fixed: 'right'
}
]

File diff suppressed because it is too large Load Diff

@ -31,6 +31,16 @@
/>
</a-form-item>
</a-col>
<a-col :xl="8" :md="12" :sm="24">
<a-form-item label="分发状态" name="enrollStatus">
<a-select
v-model:value="formModel.enrollStatus"
:field-names="{ label: 'name', value: 'value' }"
:options="enrollStatusList"
placeholder="请选择分发状态"
/>
</a-form-item>
</a-col>
<a-col :xl="8" :md="12" :sm="24">
<a-form-item label="分发时间">
<a-range-picker
@ -96,7 +106,16 @@ const formModel = reactive<GeopoliticalCustomersSearch>({
})
const { resetFields } = useForm(formModel)
const enrollStatusList = [
{
name: '待分发',
value: 1
},
{
name: '已通过',
value: 2
}
]
const initShopList = () => {
doRequest(getShopQueryAll(2), {
onSuccess: res => {

@ -0,0 +1,412 @@
<template>
<div ref="refModel">
<a-modal
:title="title"
:visible="visible"
:mask-closable="false"
:centered="true"
:body-style="{ paddingBottom: '8px', paddingTop: '0px' }"
:confirm-loading="submitLoading"
:width="650"
:get-container="() => $refs.refModel"
@cancel="handleClose"
>
<a-tabs centered>
<a-tab-pane v-if="formModel.customType === 0" key="1" tab="A类型客户" />
<a-tab-pane v-if="formModel.customType === 1" key="2" tab="B类型客户" force-render />
</a-tabs>
<a-form
ref="formRef"
:model="formModel"
:label-col="{ sm: { span: 24 }, md: { span: 8 } }"
:wrapper-col="wrapperCol"
>
<a-row justify="start">
<a-col :span="12">
<a-form-item label="客户称呼">
<a-input v-model:value="formModel.customName" placeholder="请输入" readonly />
</a-form-item>
</a-col>
</a-row>
<a-row justify="start">
<a-col :span="12">
<a-form-item label="客户联系方式">
<a-input v-model:value="formModel.customNid" placeholder="请输入" readonly />
</a-form-item>
</a-col>
</a-row>
<a-row justify="start">
<a-col :span="24">
<a-form-item
label="客户地址信息"
:label-col="{ sm: { span: 24 }, md: { span: 4 } }"
:wrapper-col="{ sm: { span: 24 }, md: { span: 20 } }"
>
<a-input
v-model:value="formModel.comprehensiveAddress"
placeholder="请输入"
readonly
/>
</a-form-item>
</a-col>
</a-row>
<a-row justify="start">
<a-col :span="24">
<a-form-item
label="备注"
:label-col="{ sm: { span: 24 }, md: { span: 4 } }"
:wrapper-col="{ sm: { span: 24 }, md: { span: 20 } }"
>
<a-input v-model:value="formModel.remark" readonly />
</a-form-item>
</a-col>
</a-row>
<template v-for="item in formModel.customStoreVOList" :key="item.storeId">
<a-row justify="start">
<a-col xs="24" :sm="24" :md="12">
<a-form-item label="预约门店">
<a-input v-model:value="item.storeName" placeholder="请输入" readonly />
</a-form-item>
</a-col>
<a-col xs="24" :sm="24" :md="12">
<a-form-item label="预约时间">
<a-input v-model:value="item.reservationTime" placeholder="未选择" readonly />
</a-form-item>
</a-col>
</a-row>
</template>
<a-row v-if="formModel.enrollStatus == 1 && formModel.customType == 1" justify="start">
<a-col :span="12">
<a-form-item
label="复审员选择"
:rules="[{ required: true, message: '请选择人员' }]"
name="reviewUserId"
>
<a-select ref="select" v-model:value="formModel.reviewUserId">
<a-select-option
v-for="(item, index) in selectedReviewerOptions"
:key="index"
:value="item.value"
>{{ item.label }}</a-select-option
>
</a-select>
</a-form-item>
</a-col>
</a-row>
</a-form>
<template #footer>
<div v-if="title !== '详情'">
<a-button v-if="title !== '审核'" @click="visible = false"></a-button>
<a-button
v-if="formModel.enrollStatus == 1 && formModel.customType == 1"
type="primary"
html-type="submit"
style="margin-left: 10px"
@click="toExamine(0)"
>重审</a-button
>
<a-button
v-if="formModel.enrollStatus == 1 && formModel.customType == 0"
type="primary"
html-type="submit"
style="margin-left: 10px"
@click="toExamine(1)"
>分发</a-button
>
</div>
</template>
</a-modal>
</div>
</template>
<script setup lang="ts">
import { reactive, ref, onMounted, toRefs } from 'vue'
import { useModal } from '@/hooks/modal'
import type { FormRequestMapping } from '@/hooks/form'
import { overrideProperties } from '@/utils/bean-utils'
import { message } from 'ant-design-vue'
import { updateCustomerAudit, selectedReviewerList } from '@/api/geopoliticalCustomers/index'
import { useAdminForm, useFormAction, FormAction, wrapperCol } from '@/hooks/form'
import { useUserStore } from '@/stores/user-store'
import { doRequest } from '@/utils/axios/request'
import { getCustomDetails } from '@/api/geopoliticalCustomers'
import type { SelectProps } from 'ant-design-vue'
//
import 'dayjs/locale/zh-cn'
import { $ref } from 'vue/macros'
// import dayjs from 'dayjs'
const emits = defineEmits<{
(e: 'submit-success'): void
}>()
//dom:rules = 'rulesData'
// const rulesData = {
// required: true,
// trigger: 'change'
// }
const { userInfo } = useUserStore()
interface ReservationShop {
customStoreId?: number
storeName: string
reservationTime: string
}
interface SysUserPageVO {
customId: number | undefined
customName: string
customNid: string
comprehensiveAddress?: string
enrollStatus?: number
remark?: string
customType: number
customStoreVOList: ReservationShop[]
reviewUserId: number | undefined
}
const formModel = reactive<SysUserPageVO>({
customId: undefined,
customName: '',
customNid: '',
customType: 0,
comprehensiveAddress: '',
remark: '',
customStoreVOList: [],
enrollStatus: undefined,
reviewUserId: undefined
})
//
const formRule = ref({
reviewUserId: [{ required: true, message: '请选择人员' }]
})
//
const formRequestMapping: FormRequestMapping<SysUserPageVO> = {}
const { title, visible, openModal, closeModal } = useModal()
const { formAction } = useFormAction()
const { submitLoading, resetFields, validateInfos } = useAdminForm(
formAction,
formRequestMapping,
formModel,
formRule
)
// onMounted(() => {})
const handleClose = () => {
closeModal()
submitLoading.value = false
}
const formRef = ref()
const toExamine = (type: number) => {
formRef.value
.validate()
.then(() => {
updateCustomerAudit(
formModel.customId as number,
type,
userInfo!.salesmanType,
formModel.reviewUserId
).then(res => {
message.info({
content: h('span', { style: 'white-space: pre-wrap;' }, res.message)
})
if (res.code == 200) {
closeModal()
emits('submit-success')
}
})
})
.catch((error: any) => {
console.log('error', error)
})
// }
}
//
const selectedReviewerOptions = ref<SelectProps['options']>([])
defineExpose({
open(newFormAction: FormAction, id: number) {
selectedReviewerOptions.value = []
doRequest(selectedReviewerList(), {
onSuccess: (res: any) => {
const a = res.data.map((item: any) => {
return { label: item.name, value: item.value }
})
a.forEach((item: any) => {
selectedReviewerOptions.value?.push({
label: item.label,
value: item.value
})
})
}
})
openModal()
resetFields()
let record: any = null
if (newFormAction === FormAction.OTHER) {
title.value = '预约详情'
doRequest(getCustomDetails(id), {
onSuccess: (res: any) => {
record = res.data
record.comprehensiveAddress = `${record?.economize}${record?.market}${record?.distinguish}${record?.detailAddress}`
overrideProperties(formModel, record)
record.customStoreVOList.forEach((item: any) => {
const targetObj = formModel.customStoreVOList.find(
(i: any) => i.storeId === item.storeId
)
if (targetObj && item.reservationDate) {
targetObj.reservationTime =
item.reservationDate.split(' ')[0] + ' ' + item.reservationTime
}
})
formAction.value = newFormAction
}
})
}
}
})
</script>
<style lang="less" scoped>
//
.weightAllocation {
.ant-form {
display: grid;
// grid-auto-flow: column;
grid-template-columns: 50% 50%;
// grid-template-rows: 50% 50%;
}
}
//
::v-deep .ant-input-number-out-of-range input {
color: #000000;
}
////////////////////////////////////////////////////////////////
.ant-list-item {
width: 330px;
}
.ant-list-item-meta-title {
font-size: 13x !important;
}
::v-deep .ant-list-item-meta-description {
font-size: 12px !important;
}
::v-deep .ant-space-item {
width: 100% !important;
}
.storeForm {
margin-top: 20px;
overflow-y: auto;
height: 100px;
}
.ant-list-item {
// align-items: unset;
width: 225px;
padding-right: 3px;
}
.ant-list-item-action > li {
// position: relative;
display: unset;
}
::v-deep .ant-list-item-action {
margin-left: 5px;
}
::v-deep .ant-list-item-meta-title {
font-size: 12px;
}
::v-deep .ant-list-item-action > li {
padding: 0 5px;
}
.ant-btn-sm {
font-size: 12px;
height: 20px;
padding: 0px 3px;
}
::v-deep .amap-overlay-text-container {
z-index: 999;
white-space: unset;
overflow: unset;
text-overflow: unset;
font-size: 15px !important;
color: rgba(0, 0, 0, 0.85) !important;
}
////
#mapContainer {
width: 100%;
height: 500px;
}
::v-deep .bubble-card {
z-index: 999999999;
position: relative;
// top: -62px;
padding: 15px 10px;
background-color: white;
border-radius: 6px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
font-size: 13px;
width: 180px;
filter: drop-shadow(0px 0px 1px gray);
// height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.medium-card {
height: 50px;
}
.large-card {
height: 100px;
}
::v-deep .bubble-card::before {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
border-width: 5px;
border-style: solid;
border-color: white transparent transparent;
// transform: rotate(180deg);
// font-family: 'anticon'; /* */
// content: '\e66a'; /* Unicode close-outlined */
// color: red;
// font-size: 16px;
}
::v-deep .spanDom {
position: absolute;
top: 3px;
color: #d9d2d2;
right: 3px;
font-size: 15px;
}
//modal
::v-deep .ant-modal-header {
padding: 16px 24px 0px !important;
border-bottom: unset !important;
}
//a-tabs
::v-deep .ant-tabs-top > .ant-tabs-nav {
margin: 0 0 25px 0;
line-height: 0.5715;
}
</style>

@ -28,12 +28,12 @@ import { antdvStyleDeps } from './src/utils/resolvers'
//ts
// export const serverAddress = 'http://172.18.0.228:8000'
//测试
export const serverAddress = 'http://39.100.77.21:8000'
// export const serverAddress = 'http://39.100.77.21:8000'
//线上ip
// export const serverAddress = 'http://175.27.212.74:80'
//线上域名,现在用这个
// export const serverAddress = 'https://byffp.top'
export const serverAddress = 'https://byffp.top'
// export const serverAddress = 'http://8.130.96.163:8100'
// https://vitejs.dev/config/
// export const serverAddress = process.env.VUE_APP_BASE_API

Loading…
Cancel
Save