更新 店铺管理等
parent
490de4ea67
commit
c8787894fc
@ -1,12 +1,33 @@
|
||||
import httpClient from '@/utils/axios'
|
||||
import type { ApiResult } from '@/api/types'
|
||||
import type { shopPageParam } from './types'
|
||||
import type { shopPageParam, shopDetailVO, queryReservation } from './types'
|
||||
|
||||
export function pageQueryAll(pageParams: shopPageParam) {
|
||||
return httpClient.get<ApiResult>('/store/queryAll', {
|
||||
export function pageQueryPage(pageParams: shopPageParam) {
|
||||
return httpClient.get<ApiResult>('/store/queryPage', {
|
||||
params: pageParams
|
||||
})
|
||||
}
|
||||
|
||||
export function storeUserQueryAll() {
|
||||
return httpClient.get<ApiResult>('/storeUser/queryAll', {})
|
||||
}
|
||||
|
||||
export function createUser(data: shopDetailVO) {
|
||||
return httpClient.post<ApiResult<void>>('/store/add', data)
|
||||
}
|
||||
|
||||
export function updateUser(data: shopDetailVO) {
|
||||
return httpClient.post<ApiResult<void>>('/store/update', data)
|
||||
}
|
||||
// 查询预约详情
|
||||
export function getReservation(pageParams: queryReservation) {
|
||||
return httpClient.get<ApiResult>('/store/reservation', {
|
||||
params: pageParams
|
||||
})
|
||||
}
|
||||
export function deleteShop(id: number) {
|
||||
return httpClient.delete<ApiResult<void>>(`/store/${id}`)
|
||||
}
|
||||
export function exportI18nDataExcel(params: queryReservation) {
|
||||
return httpClient.get('/store/export', { params, responseType: 'blob' })
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
.mb-5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.ml-5 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.u-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
// 滚动条
|
||||
.sim-cont{
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.sim-cont::-webkit-scrollbar { /*滚动条整体样式*/
|
||||
width: 7px;
|
||||
height: 3px;
|
||||
}
|
||||
.sim-cont::-webkit-scrollbar-thumb { /*滚动条里面小方块样式*/
|
||||
border-radius: 100px;
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(151, 151, 151, 0.2);
|
||||
background:rgba(0,0,0,0.1);;
|
||||
}
|
||||
.sim-cont::-webkit-scrollbar-track { /*滚动条里面轨道样式*/
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(223, 223, 223, 0.2);
|
||||
border-radius: 100px;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:visible="visible"
|
||||
:mask-closable="false"
|
||||
:centered="true"
|
||||
:body-style="{ paddingBottom: '8px' }"
|
||||
:confirm-loading="submitLoading"
|
||||
:width="650"
|
||||
@cancel="handleClose"
|
||||
>
|
||||
<a-row>
|
||||
<a-col :span="3">
|
||||
<label class="label">查询时间</label>
|
||||
</a-col>
|
||||
<a-col ::span="21">
|
||||
<div class="u-flex">
|
||||
<a-range-picker v-model:value="reservationDate" format="YYYY-MM-DD" style="width: 100%" />
|
||||
<a-button type="primary" class="ml-5" @click="search">搜索</a-button>
|
||||
<a-button class="ml-5" @click="reset">重置</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="body sim-cont">
|
||||
<div class="reservation">
|
||||
<h4>查询结果展示</h4>
|
||||
<div v-if="reservation.time.length > 0" class="u-flex">
|
||||
<ul class="flex-1">
|
||||
<li>时间</li>
|
||||
<li v-for="(item, index) in reservation.time" :key="index">{{ item }}</li>
|
||||
</ul>
|
||||
<ul class="flex-1">
|
||||
<li>预约人次</li>
|
||||
<li v-for="(item, index) in reservation.num" :key="index">{{ item }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a-empty v-else />
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div>
|
||||
<a-button type="primary" @click="toExcel">当前结果导出Excel</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue'
|
||||
import { useModal } from '@/hooks/modal'
|
||||
import { message } from 'ant-design-vue'
|
||||
import type { queryReservation, shopDetailVO } from '@/api/shopManage/types'
|
||||
import { getReservation, exportI18nDataExcel } from '@/api/shopManage/index'
|
||||
import { doRequest } from '@/utils/axios/request'
|
||||
import { useFormAction, FormAction } from '@/hooks/form'
|
||||
import { remoteFileDownload } from '@/utils/file-utils'
|
||||
//预约时间
|
||||
import 'dayjs/locale/zh-cn'
|
||||
import dayjs from 'dayjs'
|
||||
import type { Dayjs } from 'dayjs'
|
||||
// 表单校验规则
|
||||
const reservationDate = ref<[Dayjs, Dayjs]>()
|
||||
const id = ref()
|
||||
const reservation: any = reactive({
|
||||
time: [],
|
||||
num: []
|
||||
})
|
||||
const submitLoading = ref(false)
|
||||
|
||||
const { title, visible, openModal, closeModal } = useModal()
|
||||
|
||||
const { formAction } = useFormAction()
|
||||
|
||||
// onMounted(() => {})
|
||||
|
||||
const handleClose = () => {
|
||||
closeModal()
|
||||
}
|
||||
const toExcel = () => {
|
||||
exportI18nDataExcel({
|
||||
storeId: id.value,
|
||||
startTime: dayjs(reservationDate.value[0]).format('YYYY-MM-DD'),
|
||||
endTime: dayjs(reservationDate.value[1]).format('YYYY-MM-DD')
|
||||
}).then(res => {
|
||||
remoteFileDownload(res)
|
||||
})
|
||||
}
|
||||
const getReservationFun = (data?: queryReservation) => {
|
||||
submitLoading.value = true
|
||||
doRequest(getReservation(data!), {
|
||||
onSuccess: (res: any) => {
|
||||
reservation.time = []
|
||||
reservation.num = []
|
||||
submitLoading.value = false
|
||||
if (res.data.length > 0) {
|
||||
reservation.time = res.data.map((item: { time: any }) => item.time)
|
||||
reservation.num = res.data.map((item: { num: any }) => item.num)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const search = () => {
|
||||
getReservationFun({
|
||||
storeId: id.value,
|
||||
startTime: dayjs(reservationDate.value[0]).format('YYYY-MM-DD'),
|
||||
endTime: dayjs(reservationDate.value[1]).format('YYYY-MM-DD')
|
||||
})
|
||||
}
|
||||
const reset = () => {
|
||||
reservationDate.value = [dayjs(), dayjs().add(7, 'day')]
|
||||
getReservationFun({
|
||||
storeId: id.value,
|
||||
startTime: dayjs().format('YYYY-MM-DD'),
|
||||
endTime: dayjs().add(7, 'day').format('YYYY-MM-DD')
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open(newFormAction: FormAction, record?: shopDetailVO) {
|
||||
openModal()
|
||||
id.value = record?.id
|
||||
title.value = `${record?.storeName}的预约详情`
|
||||
reservationDate.value = [dayjs(), dayjs().add(7, 'day')]
|
||||
getReservationFun({
|
||||
storeId: record?.id as number,
|
||||
startTime: dayjs(reservationDate.value[0]).format('YYYY-MM-DD'),
|
||||
endTime: dayjs(reservationDate.value[1]).format('YYYY-MM-DD')
|
||||
})
|
||||
formAction.value = newFormAction
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
//权重配置两列
|
||||
.label {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
height: 32px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
}
|
||||
.body {
|
||||
padding: 15px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
margin-top: 15px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
h4 {
|
||||
font-weight: 600;
|
||||
}
|
||||
ul {
|
||||
line-height: 25px;
|
||||
}
|
||||
ul li:nth-child(1) {
|
||||
margin-bottom: 3px;
|
||||
color: #d9d9d9;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,294 +0,0 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:visible="visible"
|
||||
:mask-closable="false"
|
||||
:centered="true"
|
||||
:body-style="{ paddingBottom: '8px' }"
|
||||
:confirm-loading="submitLoading"
|
||||
:width="650"
|
||||
@cancel="handleClose"
|
||||
>
|
||||
<a-form
|
||||
: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>
|
||||
<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-form>
|
||||
<template #footer>
|
||||
<div v-if="title !== '详情'">
|
||||
<a-button v-if="title !== '审核'" @click="visible = false">取消</a-button>
|
||||
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="toExamine(0)"
|
||||
>重审</a-button
|
||||
>
|
||||
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="toExamine(1)"
|
||||
>分发</a-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</a-modal>
|
||||
</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 type { CustomerDTO, GeopoliticalCustomersRecord } from '@/api/geopoliticalCustomers/types'
|
||||
import { updateCustomerAudit } from '@/api/geopoliticalCustomers/index'
|
||||
import { doRequest } from '@/utils/axios/request'
|
||||
import { useAdminForm, useFormAction, FormAction, labelCol, wrapperCol } from '@/hooks/form'
|
||||
//预约时间
|
||||
import 'dayjs/locale/zh-cn'
|
||||
// import dayjs from 'dayjs'
|
||||
const emits = defineEmits<{
|
||||
(e: 'submit-success'): void
|
||||
}>()
|
||||
//dom中可以写成:rules = 'rulesData'
|
||||
// const rulesData = {
|
||||
// required: true,
|
||||
// trigger: 'change'
|
||||
// }
|
||||
interface ReservationShop {
|
||||
customStoreId?: number
|
||||
storeName: string
|
||||
reservationTime: string
|
||||
}
|
||||
interface SysUserPageVO {
|
||||
customId: number | undefined
|
||||
customName: string
|
||||
customNid: string
|
||||
comprehensiveAddress?: string
|
||||
customStoreVOList: ReservationShop[]
|
||||
}
|
||||
|
||||
const formModel = reactive<SysUserPageVO>({
|
||||
customId: undefined,
|
||||
customName: '',
|
||||
customNid: '',
|
||||
comprehensiveAddress: '',
|
||||
customStoreVOList: []
|
||||
})
|
||||
|
||||
// 表单校验规则
|
||||
const formRule = ref({})
|
||||
|
||||
// 表单的提交请求
|
||||
const formRequestMapping: FormRequestMapping<SysUserPageVO> = {}
|
||||
|
||||
const { title, visible, openModal, closeModal } = useModal()
|
||||
|
||||
const { formAction } = useFormAction()
|
||||
|
||||
const { submitLoading, resetFields } = useAdminForm(
|
||||
formAction,
|
||||
formRequestMapping,
|
||||
formModel,
|
||||
formRule
|
||||
)
|
||||
|
||||
// onMounted(() => {})
|
||||
|
||||
const handleClose = () => {
|
||||
submitLoading.value = false
|
||||
}
|
||||
const toExamine = (type: number) => {
|
||||
updateCustomerAudit(type).then(res => {
|
||||
message.info(res.message)
|
||||
if (res.code == 200) {
|
||||
closeModal()
|
||||
emits('submit-success')
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open(newFormAction: FormAction, record?: GeopoliticalCustomersRecord) {
|
||||
console.log(record, 'record')
|
||||
openModal()
|
||||
resetFields()
|
||||
if (newFormAction === FormAction.OTHER) {
|
||||
title.value = '预约详情'
|
||||
record!.comprehensiveAddress = `${record?.economize}${record?.market}${record?.distinguish}${record?.detailAddress}`
|
||||
record!.customStoreVOList = [
|
||||
{
|
||||
storeName: '测试',
|
||||
reservationTime: '2023-9-14 10:12:15'
|
||||
}
|
||||
]
|
||||
overrideProperties(formModel, record)
|
||||
}
|
||||
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;
|
||||
}
|
||||
</style>
|
@ -1,294 +0,0 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:visible="visible"
|
||||
:mask-closable="false"
|
||||
:centered="true"
|
||||
:body-style="{ paddingBottom: '8px' }"
|
||||
:confirm-loading="submitLoading"
|
||||
:width="650"
|
||||
@cancel="handleClose"
|
||||
>
|
||||
<a-form
|
||||
: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>
|
||||
<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-form>
|
||||
<template #footer>
|
||||
<div v-if="title !== '详情'">
|
||||
<a-button v-if="title !== '审核'" @click="visible = false">取消</a-button>
|
||||
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="toExamine(0)"
|
||||
>重审</a-button
|
||||
>
|
||||
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="toExamine(1)"
|
||||
>分发</a-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</a-modal>
|
||||
</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 type { CustomerDTO, GeopoliticalCustomersRecord } from '@/api/geopoliticalCustomers/types'
|
||||
import { updateCustomerAudit } from '@/api/geopoliticalCustomers/index'
|
||||
import { doRequest } from '@/utils/axios/request'
|
||||
import { useAdminForm, useFormAction, FormAction, labelCol, wrapperCol } from '@/hooks/form'
|
||||
//预约时间
|
||||
import 'dayjs/locale/zh-cn'
|
||||
// import dayjs from 'dayjs'
|
||||
const emits = defineEmits<{
|
||||
(e: 'submit-success'): void
|
||||
}>()
|
||||
//dom中可以写成:rules = 'rulesData'
|
||||
// const rulesData = {
|
||||
// required: true,
|
||||
// trigger: 'change'
|
||||
// }
|
||||
interface ReservationShop {
|
||||
customStoreId?: number
|
||||
storeName: string
|
||||
reservationTime: string
|
||||
}
|
||||
interface SysUserPageVO {
|
||||
customId: number | undefined
|
||||
customName: string
|
||||
customNid: string
|
||||
comprehensiveAddress?: string
|
||||
customStoreVOList: ReservationShop[]
|
||||
}
|
||||
|
||||
const formModel = reactive<SysUserPageVO>({
|
||||
customId: undefined,
|
||||
customName: '',
|
||||
customNid: '',
|
||||
comprehensiveAddress: '',
|
||||
customStoreVOList: []
|
||||
})
|
||||
|
||||
// 表单校验规则
|
||||
const formRule = ref({})
|
||||
|
||||
// 表单的提交请求
|
||||
const formRequestMapping: FormRequestMapping<SysUserPageVO> = {}
|
||||
|
||||
const { title, visible, openModal, closeModal } = useModal()
|
||||
|
||||
const { formAction } = useFormAction()
|
||||
|
||||
const { submitLoading, resetFields } = useAdminForm(
|
||||
formAction,
|
||||
formRequestMapping,
|
||||
formModel,
|
||||
formRule
|
||||
)
|
||||
|
||||
// onMounted(() => {})
|
||||
|
||||
const handleClose = () => {
|
||||
submitLoading.value = false
|
||||
}
|
||||
const toExamine = (type: number) => {
|
||||
updateCustomerAudit(type).then(res => {
|
||||
message.info(res.message)
|
||||
if (res.code == 200) {
|
||||
closeModal()
|
||||
emits('submit-success')
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
open(newFormAction: FormAction, record?: GeopoliticalCustomersRecord) {
|
||||
console.log(record, 'record')
|
||||
openModal()
|
||||
resetFields()
|
||||
if (newFormAction === FormAction.OTHER) {
|
||||
title.value = '预约详情'
|
||||
record!.comprehensiveAddress = `${record?.economize}${record?.market}${record?.distinguish}${record?.detailAddress}`
|
||||
record!.customStoreVOList = [
|
||||
{
|
||||
storeName: '测试',
|
||||
reservationTime: '2023-9-14 10:12:15'
|
||||
}
|
||||
]
|
||||
overrideProperties(formModel, record)
|
||||
}
|
||||
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;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue