飘泊客 1 year ago
commit f3016391e1

@ -380,6 +380,7 @@ const ProTable = defineComponent({
const fetchData = () => { const fetchData = () => {
if (!props.request) return undefined if (!props.request) return undefined
return async (pageParams?: Record<string, any>) => { return async (pageParams?: Record<string, any>) => {
console.log(pageParams, 'pageParams')
const actionParams = { const actionParams = {
...(pageParams || {}), ...(pageParams || {}),
...formSearch, ...formSearch,

@ -171,6 +171,8 @@ export interface CustomerDTO {
customName?: string | undefined customName?: string | undefined
//客户联系方式 //客户联系方式
customNid?: string | undefined customNid?: string | undefined
//备注
remark?: string | undefined
address?: Array<any> address?: Array<any>
//省 //省
economize?: string economize?: string
@ -242,6 +244,7 @@ export type GeopoliticalCustomersRecord = {
* *
*/ */
export interface GeopoliticalCustomersSearch { export interface GeopoliticalCustomersSearch {
// salesmanType: number | undefined
customName?: string customName?: string
customNid?: string customNid?: string
enrollStatus?: string enrollStatus?: string
@ -254,6 +257,9 @@ export interface GeopoliticalCustomersSearch {
* *
*/ */
export interface FormReviewSearch { export interface FormReviewSearch {
//角色
// salesmanType: string | undefined
//编号
batchNo?: string batchNo?: string
// 访问时间区间的开始值 // 访问时间区间的开始值
startTime?: string startTime?: string

@ -54,7 +54,7 @@ export type SysUserDTO = {
// 组织机构ID // 组织机构ID
organizationId?: number organizationId?: number
// 角色标识列表 // 角色标识列表
roleCodes: string[] roleCodes: any
// desc: objectState // desc: objectState
// stage: objectState // stage: objectState
} }

@ -12,6 +12,17 @@ import 'ant-design-vue/es/modal/style/index.less'
import './styles/index.less' import './styles/index.less'
import App from './App.vue' import App from './App.vue'
import { enableI18n } from '@/config' import { enableI18n } from '@/config'
import { provincesAndCitiesAndAutonomousRegions } from '@/utils/geopolitical-customers'
// 声明一个全局变量,将数据赋值给它
declare global {
interface Window {
globalProvincesAndCitiesAndAutonomousRegions: any
}
}
// 将数据赋值给全局变量
window.globalProvincesAndCitiesAndAutonomousRegions = provincesAndCitiesAndAutonomousRegions
const app = createApp(App) const app = createApp(App)
app.use(createPinia()) app.use(createPinia())

@ -8,10 +8,11 @@ export type MergePageParamFunction = <U>(
keyword?: string keyword?: string
}, },
sorter: Record<string, SortOrder>, sorter: Record<string, SortOrder>,
filter: Record<string, VueKey[] | null> filter: Record<string, VueKey[] | null>,
salesmanType?: number | undefined
) => Record<string, any> ) => Record<string, any>
export const mergePageParam: MergePageParamFunction = (params, sorter, filter) => { export const mergePageParam: MergePageParamFunction = (params, sorter, filter, salesmanType?) => {
const sort = [] const sort = []
for (const key in sorter) { for (const key in sorter) {
sort.push(sorter[key] === 'ascend' ? `${key},asc` : `${key},desc`) sort.push(sorter[key] === 'ascend' ? `${key},asc` : `${key},desc`)
@ -24,6 +25,7 @@ export const mergePageParam: MergePageParamFunction = (params, sorter, filter) =
page: current, page: current,
...rest, ...rest,
...filter, ...filter,
sort sort,
salesmanType
} }
} }

@ -80,7 +80,7 @@
<!-- 批量操作更多操作 --> <!-- 批量操作更多操作 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="operationButtonArea"> <div class="operationButtonArea">
<a-button class="operationButton" @click="addPush"></a-button> <a-button @click="addPush"></a-button>
</div> </div>
</a-card> </a-card>
<!-- 底部表格 --> <!-- 底部表格 -->
@ -649,12 +649,6 @@ const resetForm = () => {
.operationButtonArea { .operationButtonArea {
padding-bottom: 20px; padding-bottom: 20px;
} }
.operationButton {
background-color: #f4f4f5;
border-radius: 5px;
color: #909399;
margin-right: 10px;
}
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -64,7 +64,7 @@
<!-- 批量操作更多操作 --> <!-- 批量操作更多操作 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="operationButtonArea"> <div class="operationButtonArea">
<a-button class="operationButton" @click="handleNew"></a-button> <a-button @click="handleNew"></a-button>
</div> </div>
</a-card> </a-card>
<!-- 底部表格 --> <!-- 底部表格 -->
@ -581,12 +581,6 @@ const distributionRulesChange = (data: any, selectedCompany: string[]) => {
.operationButtonArea { .operationButtonArea {
padding-bottom: 20px; padding-bottom: 20px;
} }
.operationButton {
background-color: #f4f4f5;
border-radius: 5px;
color: #909399;
margin-right: 10px;
}
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -8,7 +8,7 @@
<!-- 分发配置 --> <!-- 分发配置 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="operationButtonArea"> <div class="operationButtonArea">
<a-button class="operationButton" @click="handleNew('distribute')"></a-button> <a-button @click="handleNew('distribute')"></a-button>
<!-- 更多操作 --> <!-- 更多操作 -->
</div> </div>
</a-card> </a-card>
@ -239,12 +239,6 @@ const rowSelection = ref({
.operationButtonArea { .operationButtonArea {
padding-bottom: 20px; padding-bottom: 20px;
} }
.operationButton {
background-color: #f4f4f5;
border-radius: 5px;
color: #909399;
margin-right: 10px;
}
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -8,7 +8,7 @@
<!-- 批量操作更多操作 --> <!-- 批量操作更多操作 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="operationButtonArea"> <div class="operationButtonArea">
<a-button class="operationButton" @click="handleNew"></a-button> <a-button @click="handleNew"></a-button>
<!-- 更多操作 --> <!-- 更多操作 -->
</div> </div>
</a-card> </a-card>
@ -321,12 +321,6 @@ const cancel = (e: MouseEvent) => {
.operationButtonArea { .operationButtonArea {
padding-bottom: 20px; padding-bottom: 20px;
} }
.operationButton {
background-color: #f4f4f5;
border-radius: 5px;
color: #909399;
margin-right: 10px;
}
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -8,7 +8,7 @@
<!-- 批量操作更多操作 --> <!-- 批量操作更多操作 -->
<!-- <a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <!-- <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="operationButtonArea"> <div class="operationButtonArea">
<a-button class="operationButton" @click="newAppointment"></a-button> <a-button @click="newAppointment"></a-button>
</div> </div>
</a-card> --> </a-card> -->
<!-- 底部表格 --> <!-- 底部表格 -->
@ -54,6 +54,14 @@ import type {
defineOptions({ name: 'FormReview' }) defineOptions({ name: 'FormReview' })
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const salesmanType = ref<number | undefined>()
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
})
// //
// //
const tableRef = ref<ProTableInstanceExpose>() const tableRef = ref<ProTableInstanceExpose>()
@ -64,7 +72,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
// //
const tableRequest: TableRequest = (params, sorter, filter) => { const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter) const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams }) return pageAccessLogs({ ...pageParam, ...searchParams })
} }
@ -148,12 +156,6 @@ const columns: ProColumns[] = [
// .operationButtonArea { // .operationButtonArea {
// padding-bottom: 20px; // padding-bottom: 20px;
// } // }
// .operationButton {
// background-color: #f4f4f5;
// border-radius: 5px;
// color: #909399;
// margin-right: 10px;
// }
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -8,7 +8,7 @@
<!-- 批量操作更多操作 --> <!-- 批量操作更多操作 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="operationButtonArea"> <div class="operationButtonArea">
<a-button class="operationButton" @click="newAppointment"></a-button> <a-button type="primary" @click="newAppointment"></a-button>
<!-- 更多操作 --> <!-- 更多操作 -->
</div> </div>
</a-card> </a-card>
@ -55,6 +55,14 @@ import type {
defineOptions({ name: 'GeopoliticalCustomers' }) defineOptions({ name: 'GeopoliticalCustomers' })
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const salesmanType = ref<number | undefined>()
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
})
// //
// //
const tableRef = ref<ProTableInstanceExpose>() const tableRef = ref<ProTableInstanceExpose>()
@ -65,7 +73,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
// //
const tableRequest: TableRequest = (params, sorter, filter) => { const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter) const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams }) return pageAccessLogs({ ...pageParam, ...searchParams })
} }
@ -163,12 +171,6 @@ const columns: ProColumns[] = [
.operationButtonArea { .operationButtonArea {
padding-bottom: 20px; padding-bottom: 20px;
} }
.operationButton {
background-color: #f4f4f5;
border-radius: 5px;
color: #909399;
margin-right: 10px;
}
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -63,6 +63,23 @@
:readonly="title === '详情' || title === '审核'" :readonly="title === '详情' || title === '审核'"
/> />
</a-form-item> </a-form-item>
<a-form-item
label="备注"
name="remark"
:label-col="{ sm: { span: 24 }, md: { span: 5 } }"
:wrapper-col="
title === '详情' || title === '审核'
? { sm: { span: 24 }, md: { span: 9 } }
: { sm: { span: 24 }, md: { span: 11 } }
"
>
<a-input
v-model:value="formModel.remark"
placeholder="请输入备注"
style="width: 65%"
:readonly="title === '详情' || title === '审核'"
/>
</a-form-item>
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :xl="14" :md="14" :sm="14"> <a-col :xl="14" :md="14" :sm="14">
<a-form-item <a-form-item
@ -388,7 +405,8 @@ onMounted(() => {
appointmentTimeOptions.value?.push({ value: item, label: item }) appointmentTimeOptions.value?.push({ value: item, label: item })
}) })
// //
provincesAndCitiesAndAutonomousOptions.value = provincesAndCitiesAndAutonomousRegions // provincesAndCitiesAndAutonomousOptions.value = provincesAndCitiesAndAutonomousRegions
provincesAndCitiesAndAutonomousOptions.value = window.globalProvincesAndCitiesAndAutonomousRegions
}) })
/// ///
@ -528,6 +546,7 @@ const pagingQuery = () => {
message.info('当前位置附近暂无相关门店') message.info('当前位置附近暂无相关门店')
} else { } else {
const ids = formModel.customStoreEntities.map(item => item.storeId) const ids = formModel.customStoreEntities.map(item => item.storeId)
listData.value.length = 0
result.data && result.data &&
result.data.forEach((item: any) => { result.data.forEach((item: any) => {
const disabled = ids.includes(Number(item.id)) const disabled = ids.includes(Number(item.id))
@ -728,10 +747,11 @@ const submitOperate = (type: string, status?: number) => {
if (res.code === 200) { if (res.code === 200) {
isSubmit.value = true isSubmit.value = true
registerVisible.value = false registerVisible.value = false
handleSubmit()
message.success('操作成功') message.success('操作成功')
if (type === 'zc' || title.value === '审核') { // if (type === 'zc' || title.value === '') {
handleSubmit()
} // }
} }
} }
@ -795,12 +815,13 @@ const formModel = reactive<CustomerDTO>({
customId: undefined, customId: undefined,
customName: '', customName: '',
customNid: '', customNid: '',
remark: '',
address: [], address: [],
economize: '', economize: '',
market: '', market: '',
distinguish: '', distinguish: '',
detailAddress: '', detailAddress: '',
radius: '', radius: '5000',
enrollStatus: 1, enrollStatus: 1,
customStoreEntities: [] customStoreEntities: []
}) })
@ -876,6 +897,7 @@ defineExpose({
customId, customId,
customName, customName,
customNid, customNid,
remark,
economize, economize,
market, market,
distinguish, distinguish,
@ -887,6 +909,7 @@ defineExpose({
formModel.customId = customId formModel.customId = customId
formModel.customName = customName formModel.customName = customName
formModel.customNid = customNid formModel.customNid = customNid
formModel.remark = remark
formModel.address = [economize, market, distinguish] formModel.address = [economize, market, distinguish]
formModel.economize = economize formModel.economize = economize
formModel.market = market formModel.market = market
@ -931,7 +954,7 @@ defineExpose({
}) })
// //
import { provincesAndCitiesAndAutonomousRegions } from '@/utils/geopolitical-customers' // import { provincesAndCitiesAndAutonomousRegions } from '@/utils/geopolitical-customers'
import type { ShowSearchType } from 'ant-design-vue/es/cascader' import type { ShowSearchType } from 'ant-design-vue/es/cascader'
declare const AMap: any declare const AMap: any

@ -53,6 +53,14 @@ import type {
defineOptions({ name: 'GeopoliticalCustomers' }) defineOptions({ name: 'GeopoliticalCustomers' })
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const salesmanType = ref<number | undefined>()
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
})
// //
// //
const tableRef = ref<ProTableInstanceExpose>() const tableRef = ref<ProTableInstanceExpose>()
@ -63,7 +71,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
// //
const tableRequest: TableRequest = (params, sorter, filter) => { const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter) const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams }) return pageAccessLogs({ ...pageParam, ...searchParams })
} }

@ -28,7 +28,7 @@
<operation-group> <operation-group>
<a @click="changePass(record)"></a> <a @click="changePass(record)"></a>
<a @click="handleEdit(record)"></a> <a @click="handleEdit(record)"></a>
<delete-text-button @confirm="handleDelete(record)" /> <!-- <delete-text-button @confirm="handleDelete(record)" /> -->
</operation-group> </operation-group>
</template> </template>
</template> </template>

@ -116,6 +116,11 @@ const { submitLoading, validateAndSubmit, resetFields, validateInfos } = useAdmi
// //
const handleSubmit = () => { const handleSubmit = () => {
console.log(formModel, 'formModel') console.log(formModel, 'formModel')
console.log()
if (typeof formModel.roleCodes === 'string') {
formModel.roleCodes = [formModel.roleCodes]
}
validateAndSubmit( validateAndSubmit(
{ {
...formModel, ...formModel,

@ -196,10 +196,6 @@ const columns: ProColumns[] = [
.operationButtonArea { .operationButtonArea {
padding-bottom: 20px; padding-bottom: 20px;
} }
.operationButton {
border-radius: 5px;
margin-right: 10px;
}
.editable-row-operations a { .editable-row-operations a {
margin-right: 8px; margin-right: 8px;
} }

@ -72,9 +72,9 @@
<a-menu-item v-if="hasPermission('system:user:pass')"> <a-menu-item v-if="hasPermission('system:user:pass')">
<a @click="changePass(record)"></a> <a @click="changePass(record)"></a>
</a-menu-item> </a-menu-item>
<a-menu-item v-if="hasPermission('system:user:del')"> <!-- <a-menu-item v-if="hasPermission('system:user:del')">
<delete-text-button @confirm="handleDelete(record)" /> <delete-text-button @confirm="handleDelete(record)" />
</a-menu-item> </a-menu-item> -->
</a-menu> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown>

@ -22,13 +22,13 @@ import { antdvStyleDeps } from './src/utils/resolvers'
//项目 //项目
// const serverAddress = 'http://admin.ballcat.cn' // const serverAddress = 'http://admin.ballcat.cn'
//xy //xy
const serverAddress = 'http://172.18.0.225:8000' // const serverAddress = 'http://172.18.0.225:8000'
//jt //jt
// const serverAddress = 'http://172.18.1.8:8000' // const serverAddress = 'http://172.18.1.8:8000'
//ts //ts
// const serverAddress = 'http://172.18.0.228:8000' // 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 //线上ip
// const serverAddress = 'http://175.27.212.74:80' // const serverAddress = 'http://175.27.212.74:80'

Loading…
Cancel
Save