飘泊客 1 year ago
commit f3016391e1

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

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

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

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

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

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

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

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

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

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

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

@ -63,6 +63,23 @@
:readonly="title === '详情' || title === '审核'"
/>
</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-col :xl="14" :md="14" :sm="14">
<a-form-item
@ -388,7 +405,8 @@ onMounted(() => {
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('当前位置附近暂无相关门店')
} else {
const ids = formModel.customStoreEntities.map(item => item.storeId)
listData.value.length = 0
result.data &&
result.data.forEach((item: any) => {
const disabled = ids.includes(Number(item.id))
@ -728,10 +747,11 @@ const submitOperate = (type: string, status?: number) => {
if (res.code === 200) {
isSubmit.value = true
registerVisible.value = false
message.success('操作成功')
if (type === 'zc' || title.value === '审核') {
handleSubmit()
}
message.success('操作成功')
// if (type === 'zc' || title.value === '') {
// }
}
}
@ -795,12 +815,13 @@ const formModel = reactive<CustomerDTO>({
customId: undefined,
customName: '',
customNid: '',
remark: '',
address: [],
economize: '',
market: '',
distinguish: '',
detailAddress: '',
radius: '',
radius: '5000',
enrollStatus: 1,
customStoreEntities: []
})
@ -876,6 +897,7 @@ defineExpose({
customId,
customName,
customNid,
remark,
economize,
market,
distinguish,
@ -887,6 +909,7 @@ defineExpose({
formModel.customId = customId
formModel.customName = customName
formModel.customNid = customNid
formModel.remark = remark
formModel.address = [economize, market, distinguish]
formModel.economize = economize
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'
declare const AMap: any

@ -53,6 +53,14 @@ import type {
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>()
@ -63,7 +71,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
//
const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter)
const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams })
}

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

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

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

@ -72,9 +72,9 @@
<a-menu-item v-if="hasPermission('system:user:pass')">
<a @click="changePass(record)"></a>
</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)" />
</a-menu-item>
</a-menu-item> -->
</a-menu>
</template>
</a-dropdown>

@ -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'

Loading…
Cancel
Save