From 9898911ef155c927a058f7bbb17660a7ce553900 Mon Sep 17 00:00:00 2001 From: doublekou <951513186@qq.com> Date: Thu, 21 Sep 2023 13:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/geopoliticalCustomers/types.ts | 4 + .../geopoliticalCustomersModal.vue | 121 ++++++++++++++---- types/components.d.ts | 1 + vite.config.ts | 4 +- 4 files changed, 105 insertions(+), 25 deletions(-) diff --git a/src/api/geopoliticalCustomers/types.ts b/src/api/geopoliticalCustomers/types.ts index cad42ef..7f816d1 100644 --- a/src/api/geopoliticalCustomers/types.ts +++ b/src/api/geopoliticalCustomers/types.ts @@ -155,9 +155,13 @@ interface customStoreEntitiesItem { // storeId: number // customId: number //门店id + customStoreId?: number + //预约id storeId: number //门店名称 storeName?: string + //预约日期 + reservationDate?: Dayjs | string //预约时间 reservationTime: string } diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue index 9f51427..f7dc121 100644 --- a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue +++ b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue @@ -14,14 +14,22 @@ :model="formModel" :rule="formRule" :label-col="{ sm: { span: 24 }, md: { span: 5 } }" - :wrapper-col="{ sm: { span: 24 }, md: { span: 19 } }" + :wrapper-col=" + title === '详情' || title === '审核' + ? { sm: { span: 24 }, md: { span: 16 } } + : { sm: { span: 24 }, md: { span: 19 } } + " > @@ -96,7 +109,7 @@ - + + + + + 联系方式:{{ formModel.customNid }}

- {{ `报名的门店${index + 1}为` }}: {{ item.storeName }} - {{ item.reservationTime }} + {{ `报名的门店${index + 1}为` }}: {{ item.storeName }} -- + {{ `${item.reservationDate?.toString().split(' ')[0]} ${item.reservationTime}` }}

@@ -324,6 +365,7 @@ import type { FormInstance } from 'ant-design-vue' //预约时间 import type { SelectValue } from 'ant-design-vue/es/select' import type { SelectProps } from 'ant-design-vue' +import type { Dayjs } from 'dayjs' import 'dayjs/locale/zh-cn' import { addCustomer, @@ -498,7 +540,8 @@ const pagingQuery = () => { lng: item.longitude, id: item.id, index: item.index, - tel: item.nid ? item.nid : '' + tel: item.nid ? item.nid : '', + reservationDate: item.reservationDate }) }) pois.push(...listData.value) @@ -609,7 +652,8 @@ const addStore = (item: any) => { formModel.customStoreEntities.push({ storeName: item.title, reservationTime: '', - storeId: item.id + storeId: item.id, + reservationDate: '' }) } //门店重置 @@ -651,6 +695,8 @@ interface customStoreEntitiesItem { storeId: number //门店名称 storeName?: string + //预约日期 + reservationDate?: Dayjs | string //预约时间 reservationTime: string } @@ -667,7 +713,8 @@ const submitOperate = (type: string, status?: number) => { (item: customStoreEntitiesItem) => { const obj: customStoreEntitiesItem = { storeId: item.storeId, - reservationTime: item.reservationTime + reservationTime: item.reservationTime, + reservationDate: item.reservationDate } if (title.value === '编辑预约') { if (item.customStoreId) { @@ -1099,7 +1146,7 @@ const storeItemClick = (item: any, index: number) => { } } -//动态只读/禁用 +//动态只读/禁用(请输入您的地址信息/请输入区域半径) .custom-disabled-style ::v-deep .ant-select-selector { /* 自定义禁用状态下的样式 */ background-color: #f5f5f5; @@ -1111,12 +1158,40 @@ const storeItemClick = (item: any, index: number) => { border-color: #ddd; background-color: #fff; pointer-events: none; - color: rgba(0, 0, 0, 0.25); + background: #fff; cursor: not-allowed; cursor: context-menu; color: black; + // color: rgba(0, 0, 0, 0.25); } +//动态只读/禁用(预约时间) +::v-deep .ant-picker.ant-picker-disabled { + background-color: #fff; + pointer-events: none; +} +::v-deep .ant-space-item { + cursor: pointer; +} +::v-deep .ant-picker-input > input[disabled] { + color: rgba(0, 0, 0, 0.85); +} +.custom-readonly-style ::v-deep .ant-picker { + /* 自定义只读状态下的样式 */ + border-color: #ddd; + background-color: #fff; + pointer-events: none; + background: #fff; + cursor: not-allowed; + cursor: context-menu; + color: rgba(0, 0, 0, 0.25); +} +//日期选择器 +::v-deep .ant-picker, +.ant-space { + width: 100%; +} + //地图 .drawStation { //地图 diff --git a/types/components.d.ts b/types/components.d.ts index b715ca7..b6e13ef 100644 --- a/types/components.d.ts +++ b/types/components.d.ts @@ -69,6 +69,7 @@ declare module '@vue/runtime-core' { ATag: typeof import('ant-design-vue/es')['Tag'] ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] + ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] ATransfer: typeof import('ant-design-vue/es')['Transfer'] ATree: typeof import('ant-design-vue/es')['Tree'] diff --git a/vite.config.ts b/vite.config.ts index c42433a..8d04afb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -22,13 +22,13 @@ import { antdvStyleDeps } from './src/utils/resolvers' //项目 // const serverAddress = 'http://admin.ballcat.cn' //xy -// const serverAddress = 'http://172.18.0.225:8000' +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://39.100.77.21:8000' //线上ip // const serverAddress = 'http://175.27.212.74:80'