更新了地缘获客、表单重审
commit
b83215164b
@ -0,0 +1,12 @@
|
||||
import httpClient from '@/utils/axios'
|
||||
import type { ApiResult } from '@/api/types'
|
||||
import type { shopPageParam } from './types'
|
||||
|
||||
export function pageQueryAll(pageParams: shopPageParam) {
|
||||
return httpClient.get<ApiResult>('/store/queryAll', {
|
||||
params: pageParams
|
||||
})
|
||||
}
|
||||
export function storeUserQueryAll() {
|
||||
return httpClient.get<ApiResult>('/storeUser/queryAll', {})
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
import type { PageParam } from '@/api/types'
|
||||
export type shopParam = {
|
||||
storeName?: string
|
||||
storeType?: number
|
||||
province?: string
|
||||
city?: string
|
||||
county?: string
|
||||
createStartTime?: string
|
||||
createEndTime?: string
|
||||
}
|
||||
|
||||
export type shopPageParam = shopParam & PageParam
|
||||
|
||||
export type shopDTO = shopParam & {
|
||||
id: number
|
||||
reservationNum?: number
|
||||
storeType: number
|
||||
storeStatus: number
|
||||
}
|
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<!-- 头部 -->
|
||||
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
|
||||
<div class="geopoliticalCustomers-title">质检分发</div>
|
||||
</a-card>
|
||||
<!-- 工具栏 -->
|
||||
<inspection-search :loading="tableRef?.loading" @search="searchTable" />
|
||||
<!-- 底部表格 -->
|
||||
<pro-table
|
||||
ref="tableRef"
|
||||
row-key="customId"
|
||||
:request="tableRequest"
|
||||
:columns="columns"
|
||||
:scroll="{ x: 1100 }"
|
||||
:tool-bar-render="false"
|
||||
class="protable"
|
||||
:pagination="{ showQuickJumper: true }"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'companyId'">
|
||||
<a>
|
||||
<!-- {{ record.companyId }} -->
|
||||
蘑菇
|
||||
</a>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'operate'">
|
||||
<operation-group>
|
||||
<a @click="handleView(record)">查看</a>
|
||||
</operation-group>
|
||||
</template>
|
||||
</template>
|
||||
</pro-table>
|
||||
<!-- 新建预约新建/编辑弹窗 -->
|
||||
<inspection-modal ref="inspectionModalRef" @submit-success="reloadTable" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
// import { message } from 'ant-design-vue'
|
||||
// import { doRequest } from '@/utils/axios/request'
|
||||
//底部表格
|
||||
import ProTable from '#/table'
|
||||
import type { ProTableInstanceExpose, TableRequest, ProColumns } from '#/table'
|
||||
import { mergePageParam } from '@/utils/page-utils'
|
||||
import { FormAction } from '@/hooks/form'
|
||||
import inspectionModal from './inspectionModal.vue'
|
||||
import inspectionSearch from './inspectionSearch.vue'
|
||||
import { pageAccessLogs } from '@/api/geopoliticalCustomers'
|
||||
import type {
|
||||
GeopoliticalCustomersRecord,
|
||||
GeopoliticalCustomersPageParam
|
||||
} from '@/api/geopoliticalCustomers/types'
|
||||
|
||||
defineOptions({ name: 'GeopoliticalCustomers' })
|
||||
|
||||
//底部表格
|
||||
// 表格组件引用
|
||||
const tableRef = ref<ProTableInstanceExpose>()
|
||||
//预约ref
|
||||
const inspectionModalRef = ref<InstanceType<typeof inspectionModal>>()
|
||||
// 查询参数
|
||||
let searchParams: GeopoliticalCustomersPageParam = {}
|
||||
|
||||
//远程加载表格数据
|
||||
const tableRequest: TableRequest = (params, sorter, filter) => {
|
||||
console.log('11111111111111111')
|
||||
const pageParam = mergePageParam(params, sorter, filter)
|
||||
return pageAccessLogs({ ...pageParam, ...searchParams })
|
||||
}
|
||||
|
||||
//刷新表格
|
||||
const reloadTable = (resetPageIndex?: boolean) => {
|
||||
tableRef.value?.actionRef?.reload(resetPageIndex)
|
||||
}
|
||||
|
||||
//查询表格
|
||||
const searchTable = (params: GeopoliticalCustomersPageParam) => {
|
||||
searchParams = params
|
||||
reloadTable(true) // 会调用 tableRequest
|
||||
}
|
||||
//查看
|
||||
const handleView = (record: GeopoliticalCustomersRecord) => {
|
||||
inspectionModalRef.value?.open(FormAction.OTHER, record)
|
||||
}
|
||||
|
||||
const columns: ProColumns[] = [
|
||||
{
|
||||
title: '编号',
|
||||
width: 80,
|
||||
customRender: function ({ index }) {
|
||||
return `${index + 1}`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '客户名称',
|
||||
dataIndex: 'customName'
|
||||
},
|
||||
{
|
||||
title: '联系方式',
|
||||
dataIndex: 'customNid'
|
||||
},
|
||||
{
|
||||
title: '分发状态',
|
||||
dataIndex: 'enrollStatus',
|
||||
customRender: function ({ record }: any) {
|
||||
if (record.enrollStatus === 0) {
|
||||
return h('div', '待分发')
|
||||
} else if (record.enrollStatus === 1) {
|
||||
return h('div', '已分发')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '录入日期',
|
||||
dataIndex: 'createTime',
|
||||
width: 230,
|
||||
align: 'center',
|
||||
customRender: function ({ record }: any) {
|
||||
if (record.createTime) {
|
||||
return record.createTime
|
||||
} else if (record.createTime === null) {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '录入员',
|
||||
dataIndex: 'companyId'
|
||||
},
|
||||
{
|
||||
key: 'operate',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.geopoliticalCustomers-title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
//批量操作、更多操作
|
||||
.operationButtonArea {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.operationButton {
|
||||
background-color: #f4f4f5;
|
||||
border-radius: 5px;
|
||||
color: #909399;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.editable-row-operations a {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,305 @@
|
||||
<!--
|
||||
* @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
|
||||
* @Date: 2023-09-12 13:56:02
|
||||
* @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
|
||||
* @LastEditTime: 2023-09-14 17:37:10
|
||||
* @FilePath: \byhl-zt\src\views\qualityInspectionDistribution\inspectionModal.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<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 { useUserStore } from '@/stores/user-store'
|
||||
//预约时间
|
||||
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'
|
||||
// }
|
||||
const { userInfo } = useUserStore()
|
||||
|
||||
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(formModel.customId as number, type, userInfo!.salesmanType).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>
|
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<a-card :bordered="false" style="margin-bottom: 16px" :body-style="{ paddingBottom: 0 }">
|
||||
<a-form :model="formModel" :label-col="labelCol">
|
||||
<a-row :gutter="16">
|
||||
<!-- v-if="userInfoCurrent === 'ROLE_ADMIN'" -->
|
||||
<a-col :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="填写时间">
|
||||
<a-range-picker
|
||||
v-model:value="searchTimeValue"
|
||||
show-time
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:ranges="{
|
||||
Today: [dayjs().startOf('date'), dayjs()]
|
||||
}"
|
||||
/>
|
||||
</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-form-item label="分发时间">
|
||||
<a-range-picker
|
||||
v-model:value="searchTimeValue"
|
||||
show-time
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:ranges="{
|
||||
Today: [dayjs().startOf('date'), dayjs()]
|
||||
}"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="24" :md="24" :sm="24">
|
||||
<search-actions :loading="props.loading" @search="search" @reset="reset" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Form } from 'ant-design-vue'
|
||||
import type { GeopoliticalCustomersSearch } from '@/api/geopoliticalCustomers/types'
|
||||
import 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
|
||||
|
||||
// 表单 label 全局配置
|
||||
const labelCol = { md: { span: 6 } }
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
loading?: boolean
|
||||
}>(),
|
||||
{ loading: false }
|
||||
)
|
||||
|
||||
const emits = defineEmits<{
|
||||
(e: 'search', params: Record<string, any>): void
|
||||
}>()
|
||||
|
||||
const searchTimeValue = ref<[Dayjs, Dayjs]>()
|
||||
const formModel = reactive<GeopoliticalCustomersSearch>({
|
||||
customName: '',
|
||||
customNid: '',
|
||||
enrollStatus: undefined
|
||||
})
|
||||
|
||||
const { resetFields } = useForm(formModel)
|
||||
|
||||
const search = () => {
|
||||
const param = toRaw(formModel)
|
||||
if (searchTimeValue.value && searchTimeValue.value.length == 2) {
|
||||
param.startTime = searchTimeValue.value[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
param.endTime = searchTimeValue.value[1].format('YYYY-MM-DD HH:mm:ss')
|
||||
} else {
|
||||
param.startTime = ''
|
||||
param.endTime = ''
|
||||
}
|
||||
emits('search', param)
|
||||
}
|
||||
|
||||
const reset = () => {
|
||||
// 清空表单其他元素
|
||||
resetFields()
|
||||
// 清空时间
|
||||
searchTimeValue.value = undefined
|
||||
search()
|
||||
}
|
||||
</script>
|
@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<!-- 头部 -->
|
||||
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
|
||||
<div class="geopoliticalCustomers-title">店铺管理</div>
|
||||
</a-card>
|
||||
<!-- 搜索 -->
|
||||
<shop-search :loading="tableRef?.loading" @search="searchTable" />
|
||||
<!-- 工具栏 -->
|
||||
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
|
||||
<div class="operationButtonArea">
|
||||
<a-button class="operationButton" @click="addShop">新建店铺</a-button>
|
||||
<a-button class="operationButton" @click="batchAddShop">批量新建</a-button>
|
||||
<!-- 更多操作 -->
|
||||
</div>
|
||||
</a-card>
|
||||
<!-- 底部表格 -->
|
||||
<pro-table
|
||||
ref="tableRef"
|
||||
row-key="customId"
|
||||
:request="tableRequest"
|
||||
:columns="columns"
|
||||
:scroll="{ x: 1100 }"
|
||||
:tool-bar-render="false"
|
||||
class="protable"
|
||||
:pagination="{ showQuickJumper: true }"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'id'">
|
||||
<a>{{ record.id }}</a>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'operate'">
|
||||
<operation-group>
|
||||
<!-- <a @click="handleView(record)">查看</a> -->
|
||||
</operation-group>
|
||||
</template>
|
||||
</template>
|
||||
</pro-table>
|
||||
<!-- 新建/编辑弹窗 -->
|
||||
<shop-modal ref="shopModalRef" @submit-success="reloadTable" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
// import { message } from 'ant-design-vue'
|
||||
// import { doRequest } from '@/utils/axios/request'
|
||||
//底部表格
|
||||
import ProTable from '#/table'
|
||||
import type { ProTableInstanceExpose, TableRequest, ProColumns } from '#/table'
|
||||
import { mergePageParam } from '@/utils/page-utils'
|
||||
import { FormAction } from '@/hooks/form'
|
||||
import shopModal from './shopModal.vue'
|
||||
import shopSearch from './shopSearch.vue'
|
||||
import { pageQueryAll } from '@/api/shopManage'
|
||||
import type {
|
||||
shopDTO,
|
||||
shopParam
|
||||
} from '@/api/shopManage/types'
|
||||
|
||||
defineOptions({ name: 'GeopoliticalCustomers' })
|
||||
|
||||
//底部表格
|
||||
// 表格组件引用
|
||||
const tableRef = ref<ProTableInstanceExpose>()
|
||||
// add ref
|
||||
const shopModalRef = ref<InstanceType<typeof shopModal>>()
|
||||
// 查询参数
|
||||
let searchParams: shopParam = {}
|
||||
|
||||
//远程加载表格数据
|
||||
const tableRequest: TableRequest = (params, sorter, filter) => {
|
||||
const pageParam = mergePageParam(params, sorter, filter)
|
||||
return pageQueryAll({ ...pageParam, ...searchParams })
|
||||
}
|
||||
|
||||
//刷新表格
|
||||
const reloadTable = (resetPageIndex?: boolean) => {
|
||||
tableRef.value?.actionRef?.reload(resetPageIndex)
|
||||
}
|
||||
|
||||
//查询表格
|
||||
const searchTable = (params: shopParam) => {
|
||||
searchParams = params
|
||||
reloadTable(true) // 会调用 tableRequest
|
||||
}
|
||||
// 新增
|
||||
const addShop = () => {
|
||||
console.log('00000', shopModalRef.value)
|
||||
shopModalRef.value?.open(FormAction.CREATE)
|
||||
}
|
||||
// 批量新增
|
||||
const batchAddShop = () => {}
|
||||
// //查看
|
||||
// const handleView = (record: shopDTO) => {
|
||||
// shopModalRef.value?.open(FormAction.OTHER, record)
|
||||
// }
|
||||
|
||||
const columns: ProColumns[] = [
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
dataIndex: 'id'
|
||||
},
|
||||
{
|
||||
title: '门店名称',
|
||||
dataIndex: 'storeName'
|
||||
},
|
||||
{
|
||||
title: '门店类型',
|
||||
dataIndex: 'storeType',
|
||||
customRender: ({ record }: any) => {
|
||||
if (record.storeType === 0) {
|
||||
return h('div', '直营店')
|
||||
} else if (record.storeType === 1) {
|
||||
return h('div', '加盟店')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '门店状态',
|
||||
dataIndex: 'storeStatus',
|
||||
customRender: function ({ record }: any) {
|
||||
if (record.storeStatus === 0) {
|
||||
return h('div', '正常')
|
||||
} else if (record.storeStatus === 1) {
|
||||
return h('div', '未营业')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '营业时间',
|
||||
dataIndex: 'tradeTime'
|
||||
},
|
||||
{
|
||||
title: '总预约人数',
|
||||
dataIndex: 'reservationNum',
|
||||
customRender: ({ record }: any) => {
|
||||
if (record.reservationNum == null) {
|
||||
return h('div', 0)
|
||||
} else {
|
||||
return record.reservationNum
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建日期',
|
||||
dataIndex: 'createTime',
|
||||
width: 230,
|
||||
align: 'center',
|
||||
customRender: function ({ record }: any) {
|
||||
if (record.createTime) {
|
||||
return record.createTime
|
||||
} else if (record.createTime == null) {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'operate',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.geopoliticalCustomers-title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
//批量操作、更多操作
|
||||
.operationButtonArea {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.operationButton {
|
||||
background-color: #f4f4f5;
|
||||
border-radius: 5px;
|
||||
color: #909399;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.editable-row-operations a {
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,294 @@
|
||||
<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>
|
@ -0,0 +1,294 @@
|
||||
<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>
|
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<a-card :bordered="false" style="margin-bottom: 16px" :body-style="{ paddingBottom: 0 }">
|
||||
<a-form :model="formModel" :label-col="labelCol">
|
||||
<a-row :gutter="16">
|
||||
<!-- v-if="userInfoCurrent === 'ROLE_ADMIN'" -->
|
||||
<a-col :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="填写时间">
|
||||
<a-range-picker
|
||||
v-model:value="searchTimeValue"
|
||||
show-time
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:ranges="{
|
||||
Today: [dayjs().startOf('date'), dayjs()]
|
||||
}"
|
||||
/>
|
||||
</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-form-item label="分发时间">
|
||||
<a-range-picker
|
||||
v-model:value="searchTimeValue"
|
||||
show-time
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:ranges="{
|
||||
Today: [dayjs().startOf('date'), dayjs()]
|
||||
}"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="24" :md="24" :sm="24">
|
||||
<search-actions :loading="props.loading" @search="search" @reset="reset" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Form } from 'ant-design-vue'
|
||||
import type { GeopoliticalCustomersSearch } from '@/api/geopoliticalCustomers/types'
|
||||
import 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
|
||||
|
||||
// 表单 label 全局配置
|
||||
const labelCol = { md: { span: 6 } }
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
loading?: boolean
|
||||
}>(),
|
||||
{ loading: false }
|
||||
)
|
||||
|
||||
const emits = defineEmits<{
|
||||
(e: 'search', params: Record<string, any>): void
|
||||
}>()
|
||||
|
||||
const searchTimeValue = ref<[Dayjs, Dayjs]>()
|
||||
const formModel = reactive<GeopoliticalCustomersSearch>({
|
||||
customName: '',
|
||||
customNid: '',
|
||||
enrollStatus: undefined
|
||||
})
|
||||
|
||||
const { resetFields } = useForm(formModel)
|
||||
|
||||
const search = () => {
|
||||
const param = toRaw(formModel)
|
||||
if (searchTimeValue.value && searchTimeValue.value.length == 2) {
|
||||
param.startTime = searchTimeValue.value[0].format('YYYY-MM-DD HH:mm:ss')
|
||||
param.endTime = searchTimeValue.value[1].format('YYYY-MM-DD HH:mm:ss')
|
||||
} else {
|
||||
param.startTime = ''
|
||||
param.endTime = ''
|
||||
}
|
||||
emits('search', param)
|
||||
}
|
||||
|
||||
const reset = () => {
|
||||
// 清空表单其他元素
|
||||
resetFields()
|
||||
// 清空时间
|
||||
searchTimeValue.value = undefined
|
||||
search()
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue