功能修改

master
飘泊客 9 months ago
parent 23a8f7eade
commit 5c979bfbe3

@ -43,6 +43,9 @@ export type CustomerListRecord = {
originName?: string originName?: string
otherClue?: string otherClue?: string
remark?: string remark?: string
extraData?: Array<detailFormItem>
channelType?: number
channelIdentifying?: Array<string>
} }
/** /**
* *
@ -78,6 +81,7 @@ export interface CustomerListSearch {
startTime?: string startTime?: string
// 访问时间区间的结束值 // 访问时间区间的结束值
endTime?: string endTime?: string
salesmanArray?: number[]
clueLabelName?: string clueLabelName?: string
} }
//修改资源(编辑接口用到) //修改资源(编辑接口用到)

@ -213,6 +213,7 @@ export type SysUserScope = {
export type SysUserPassDTO = { export type SysUserPassDTO = {
pass: string pass: string
confirmPass: string confirmPass: string
oldPass: string
} }
interface clueStageState { interface clueStageState {
// tags: tagsItem[] // tags: tagsItem[]

@ -3,7 +3,7 @@
<!-- <customer-list-search :loading="tableRef?.loading" @search="searchTable" /> --> <!-- <customer-list-search :loading="tableRef?.loading" @search="searchTable" /> -->
<div> <div>
<!-- 业务主管 --> <!-- 业务主管 -->
<div v-if="roleCodes.length != 0 && roleCodes.includes('ROLE_SALES_EXECUTIVE')"> <div v-if="roleCodes.length != 0 && roleCodes.includes('ROLE_STORE_EXECUTIVE')">
<a-card :bordered="false" style="margin-bottom: 16px"> <a-card :bordered="false" style="margin-bottom: 16px">
<a-row> <a-row>
<a-col :span="6" class="text-center"> <a-col :span="6" class="text-center">
@ -201,7 +201,10 @@
</div> </div>
</div> </div>
<div <div
v-if="roleCodes.length != 0 && roleCodes.includes('ROLE_REVIEWER') || roleCodes.includes('ROLE_ENTRY_CLERK')" v-if="
(roleCodes.length != 0 && roleCodes.includes('ROLE_REVIEWER')) ||
roleCodes.includes('ROLE_ENTRY_CLERK')
"
class="homeContent" class="homeContent"
> >
<div class="bullshit">努力开发中敬请期待...</div> <div class="bullshit">努力开发中敬请期待...</div>
@ -242,7 +245,8 @@ watch(
nval => { nval => {
console.log('🚀 ~ file: index.vue:154 ~ roleCodes:', nval) console.log('🚀 ~ file: index.vue:154 ~ roleCodes:', nval)
roleCodes.value = nval || ([] as string[]) roleCodes.value = nval || ([] as string[])
}) }
)
const iframeLoading = ref(true) const iframeLoading = ref(true)
// //

@ -195,11 +195,7 @@
show-time show-time
/> />
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="API推送链接" v-bind="validateInfos.fileRulePrefix">
v-if="userInfoCurrent !== 'ROLE_SALES_EXECUTIVE'"
label="API推送链接"
v-bind="validateInfos.fileRulePrefix"
>
<a-input <a-input
v-model:value="formModel.fileRulePrefix" v-model:value="formModel.fileRulePrefix"
placeholder="prezzz" placeholder="prezzz"

@ -8,7 +8,7 @@
<a-input v-model:value="formModel.taskName" placeholder="请输入" /> <a-input v-model:value="formModel.taskName" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col v-if="userInfoCurrent === 'ROLE_SALES_EXECUTIVE'" :xl="8" :md="12" :sm="24"> <!-- <a-col v-if="userInfoCurrent === 'ROLE_STORE_EXECUTIVE'" :xl="8" :md="12" :sm="24">
<a-form-item label="坐席名称"> <a-form-item label="坐席名称">
<a-input v-model:value="formModel.taskName" placeholder="请输入" /> <a-input v-model:value="formModel.taskName" placeholder="请输入" />
</a-form-item> </a-form-item>

@ -8,7 +8,7 @@
<!-- 批量操作更多操作 --> <!-- 批量操作更多操作 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }"> <a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="download"> <div class="download">
<a-button v-if="salesmanType === 0" @click.stop="downloadTemplate"></a-button> <a-button @click.stop="downloadTemplate">导出</a-button>
</div> </div>
</a-card> </a-card>
<!-- 底部表格 --> <!-- 底部表格 -->
@ -54,12 +54,12 @@
</a-tooltip> </a-tooltip>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<template v-else-if="column.key === 'remark'"> <template v-else-if="column.key === 'customInformation'">
<a-tooltip v-if="record.remark"> <a-tooltip v-if="record.customInformation">
<template #title <template #title
><span>{{ record.remark }}</span></template ><span>{{ record.customInformation }}</span></template
> >
<span>{{ record.remark }}</span> <span>{{ record.customInformation }}</span>
</a-tooltip> </a-tooltip>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
@ -118,14 +118,15 @@ onMounted(() => {
searchTable({ clueId: savedUserData }) searchTable({ clueId: savedUserData })
localStorage.setItem('clueId', '') localStorage.setItem('clueId', '')
} }
if (salesmanType.value === 4) { // if (salesmanType.value === 4) {
columns.value.splice(4, 0, { // columns.value.splice(4, 0, {
title: '有效开关', // title: '',
dataIndex: 'isEffective', // dataIndex: 'isEffective',
ellipsis: true, // ellipsis: true,
align: 'center' // align: 'center',
}) // width: 150
} // })
// }
// const customerId = route.query.clueId as string // 使 // const customerId = route.query.clueId as string // 使
// if (customerId) { // if (customerId) {
// searchTable({ clueId: customerId }) // searchTable({ clueId: customerId })
@ -177,7 +178,6 @@ const handleView = (record: CustomerListRecord, tabIndex: string) => {
// //
const handleEdit = (record: CustomerListRecord, tabIndex: string) => { const handleEdit = (record: CustomerListRecord, tabIndex: string) => {
console.log('222')
customerListEditModalRef.value?.open(FormAction.UPDATE, record, tabIndex) customerListEditModalRef.value?.open(FormAction.UPDATE, record, tabIndex)
} }
// //
@ -264,10 +264,11 @@ const columns = ref<any[]>([
} }
}, },
{ {
title: '备注', title: '客户资料',
dataIndex: 'remark', dataIndex: 'customInformation',
ellipsis: true, ellipsis: true,
align: 'center' align: 'center',
width: 200
}, },
{ {
title: '线索日期', title: '线索日期',
@ -283,6 +284,13 @@ const columns = ref<any[]>([
} }
} }
}, },
{
title: '跟进业务员',
dataIndex: 'assignedName',
ellipsis: true,
align: 'center',
width: 200
},
{ {
title: '创建日期', title: '创建日期',
dataIndex: 'createTime', dataIndex: 'createTime',

@ -9,11 +9,31 @@
:width="650" :width="650"
@cancel="handleClose" @cancel="handleClose"
> >
<a-form :model="formModel" :label-col="labelCol" :wrapper-col="wrapperCol"> <div v-if="formModel">
<a-form-item v-for="(item, index) in formModel.extraData" :key="index" :label="item.key"> <a-form :model="formModel" :label-col="labelCol" :wrapper-col="wrapperCol">
{{ item.value }} <a-form-item label="渠道名称">
</a-form-item> {{ formModel.originName }}
</a-form> </a-form-item>
<a-form-item label="渠道类型">
{{ statusComparison('channelType', formModel.channelType) }}
</a-form-item>
<a-form-item v-if="formModel.channelIdentifying!.length" label="渠道标识">
<a-tag
v-for="(item, index) in formModel.channelIdentifying"
:key="index"
color="blue"
style="margin-right: 5px"
>{{ item }}</a-tag
>
</a-form-item>
<a-form-item label="跟进员">
{{ formModel.assignedName }}
</a-form-item>
<a-form-item v-for="(item, index) in formModel!.extraData" :key="index" :label="item.key">
{{ item.value }}
</a-form-item>
</a-form>
</div>
<template #footer> <template #footer>
<a-button key="submit" type="primary" @click="handleSubmit"></a-button> <a-button key="submit" type="primary" @click="handleSubmit"></a-button>
</template> </template>
@ -25,7 +45,7 @@ import { reactive, ref } from 'vue'
import { useModal } from '@/hooks/modal' import { useModal } from '@/hooks/modal'
import { useFormAction, FormAction } from '@/hooks/form' import { useFormAction, FormAction } from '@/hooks/form'
import type { ColProps } from 'ant-design-vue' import type { ColProps } from 'ant-design-vue'
import type { CustomerListRecord, detailForm } from '@/api/customermanagement/customerList/types' import type { CustomerListRecord } from '@/api/customermanagement/customerList/types'
// import { pageAccessLogs } from '@/api/salesmanagement/labelRule' // import { pageAccessLogs } from '@/api/salesmanagement/labelRule'
// const activeKey = ref('1') // const activeKey = ref('1')
@ -41,9 +61,7 @@ const { formAction } = useFormAction()
const submitLoading = ref(false) const submitLoading = ref(false)
// //
const formModel = reactive<detailForm>({ const formModel = ref<CustomerListRecord>()
extraData: []
})
// //
const handleSubmit = () => { const handleSubmit = () => {
@ -64,9 +82,46 @@ interface clueStageItem {
// const labelGroupReloadTable = () => { // const labelGroupReloadTable = () => {
// pageAccessLogs({ size: 10, page: 1 }) // pageAccessLogs({ size: 10, page: 1 })
// } // }
const stateGroup = {
channelType: [
{
label: '手动创建',
value: 1
},
{
label: '文件上传',
value: 2
},
{
label: '飞鱼回传',
value: 3
},
{
label: '外呼接入',
value: 4
},
{
label: 'API回传',
value: 5
}
],
sex: [
{
label: '男',
value: 0
},
{
label: '女',
value: 1
}
]
}
//id //id
const resourcesId = ref<number>() const resourcesId = ref<number>()
const statusComparison = (name: string, val: any) => {
return (stateGroup as any)[name].filter((item: any) => item.value == val)[0]?.label
}
defineExpose({ defineExpose({
open(newFormAction: FormAction, record: CustomerListRecord, tabIndex: string) { open(newFormAction: FormAction, record: CustomerListRecord, tabIndex: string) {
// activeKey.value = tabIndex // activeKey.value = tabIndex
@ -75,14 +130,14 @@ defineExpose({
title.value = '详情' title.value = '详情'
resourcesId.value = record.clueId resourcesId.value = record.clueId
// labelGroupReloadTable() // labelGroupReloadTable()
const data = JSON.parse(JSON.stringify(record))
if (record.otherClue) { if (record.otherClue) {
JSON.parse(record.otherClue) data.extraData = []
formModel.extraData = [] for (const key in JSON.parse(data.otherClue)) {
for (const key in JSON.parse(record.otherClue)) { data.extraData.push({ key: key, value: JSON.parse(record.otherClue)[key] })
formModel.extraData.push({ key: key, value: JSON.parse(record.otherClue)[key] })
} }
} }
formModel.value = data
formAction.value = newFormAction formAction.value = newFormAction
} }
}) })

@ -7,16 +7,6 @@
<a-input v-model:value="formModel.clueLabelName" placeholder="请输入" /> <a-input v-model:value="formModel.clueLabelName" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="线索阶段">
<dict-select
v-model:value="formModel.userId"
dict-code="clue_stage"
allow-clear
placeholder="请选择"
/>
</a-form-item>
</a-col> -->
<!-- <a-col :xl="8" :md="12" :sm="24" > --> <!-- <a-col :xl="8" :md="12" :sm="24" > -->
<!-- <a-form-item label="标签"> --> <!-- <a-form-item label="标签"> -->
<dict-select <dict-select
@ -38,6 +28,21 @@
<a-input v-model:value="formModel.nid" placeholder="请输入" /> <a-input v-model:value="formModel.nid" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col v-if="salesmanType === 0" :xl="8" :md="12" :sm="24">
<a-form-item label="业务员">
<a-select
v-model:value="formModel.salesmanArray"
style="min-width: 180px"
allow-clear
mode="multiple"
placeholder="选择业务员"
:field-names="{ label: 'userName', value: 'userId' }"
:max-tag-count="1"
:options="salesmanList"
class="ml-5"
></a-select>
</a-form-item>
</a-col>
<a-col :xl="8" :md="12" :sm="24"> <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="创建时间"> <a-form-item label="创建时间">
<a-range-picker <a-range-picker
@ -64,7 +69,11 @@ import { Form } from 'ant-design-vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import type { Dayjs } from 'dayjs' import type { Dayjs } from 'dayjs'
import type { CustomerListSearch } from '@/api/customermanagement/customerList/types' import type { CustomerListSearch } from '@/api/customermanagement/customerList/types'
import { onMounted } from 'vue'
import { useUserStore } from '@/stores/user-store'
import { doRequest } from '@/utils/axios/request'
import { getFindRoleSonUser } from '@/api/system/user/index'
const { userInfo } = useUserStore()
const useForm = Form.useForm const useForm = Form.useForm
// label // label
@ -80,12 +89,15 @@ const props = withDefaults(
const emits = defineEmits<{ const emits = defineEmits<{
(e: 'search', params: Record<string, any>): void (e: 'search', params: Record<string, any>): void
}>() }>()
const salesmanType = ref<number | undefined>()
const searchTimeValue = ref<[Dayjs, Dayjs]>() const searchTimeValue = ref<[Dayjs, Dayjs]>()
// list
const salesmanList: any = ref([])
const formModel = reactive<CustomerListSearch>({ const formModel = reactive<CustomerListSearch>({
clueLabelName: '', clueLabelName: '',
//线 //线
userId: undefined, userId: undefined,
salesmanArray: [],
// //
httpStatus: undefined, httpStatus: undefined,
// //
@ -95,7 +107,10 @@ const formModel = reactive<CustomerListSearch>({
}) })
const { resetFields } = useForm(formModel) const { resetFields } = useForm(formModel)
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
initSalesman()
})
const search = () => { const search = () => {
const param = toRaw(formModel) const param = toRaw(formModel)
if (searchTimeValue.value && searchTimeValue.value.length == 2) { if (searchTimeValue.value && searchTimeValue.value.length == 2) {
@ -107,7 +122,13 @@ const search = () => {
} }
emits('search', param) emits('search', param)
} }
const initSalesman = () => {
doRequest(getFindRoleSonUser(23), {
onSuccess: (res: any) => {
salesmanList.value = res.data
}
})
}
const reset = () => { const reset = () => {
// //
resetFields() resetFields()

@ -20,7 +20,11 @@
<template v-if="column.key === 'operate'"> <template v-if="column.key === 'operate'">
<operation-group> <operation-group>
<a @click="handleView(record.customId)"></a> <a @click="handleView(record.customId)"></a>
<a v-if="record.enrollStatus == 1" @click="handleEditView(record)"></a> <a
v-if="record.enrollStatus == 0 || record.enrollStatus == 1"
@click="handleEditView(record)"
>审核</a
>
</operation-group> </operation-group>
</template> </template>
</template> </template>

@ -403,6 +403,13 @@
<div v-if="title === '编辑'"> <div v-if="title === '编辑'">
<a-button @click="storeResetForm"></a-button> <a-button @click="storeResetForm"></a-button>
<a-button @click="handleClose"></a-button> <a-button @click="handleClose"></a-button>
<a-button
type="primary"
html-type="submit"
style="margin-left: 10px"
@click="temporaryStorage"
>暂存
</a-button>
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="showModal" <a-button type="primary" html-type="submit" style="margin-left: 10px" @click="showModal"
>分发</a-button >分发</a-button
> >
@ -1312,7 +1319,8 @@ const submitOperate = () => {
) )
const handleSuccess = (res: any) => { const handleSuccess = (res: any) => {
// //
if (res.code === 200) { console.log("🚀 ~ file: inspectionModal.vue:1323 ~ handleSuccess ~ formModel.enrollStatus:", formModel.enrollStatus)
if (res.code === 200 && formModel.enrollStatus != 0) {
message.success('保存成功') message.success('保存成功')
isSubmit.value = true isSubmit.value = true
updateCustomerAudit({ updateCustomerAudit({
@ -1331,6 +1339,9 @@ const submitOperate = () => {
}) })
} }
}) })
} else {
handleSubmit()
message.success('操作成功')
} }
} }

@ -152,7 +152,7 @@ defineExpose({
title.value = '编辑用户' title.value = '编辑用户'
overrideProperties(formModel, record) overrideProperties(formModel, record)
// //
formModel.roleCodes = ['ROLE_SALES_EXECUTIVE'] formModel.roleCodes = ['ROLE_STORE_EXECUTIVE']
} }
formAction.value = newFormAction formAction.value = newFormAction
} }

@ -12,11 +12,12 @@
<a-form-item label="用户名"> <a-form-item label="用户名">
<a-input v-model:value="formModel.username" disabled placeholder="用户名" /> <a-input v-model:value="formModel.username" disabled placeholder="用户名" />
</a-form-item> </a-form-item>
<a-form-item label="原密码" has-feedback v-bind="validateInfos.oldPass">
<a-input v-model:value="formModel.oldPass" type="password" placeholder="原密码" />
</a-form-item>
<a-form-item label="新密码" has-feedback v-bind="validateInfos.pass"> <a-form-item label="新密码" has-feedback v-bind="validateInfos.pass">
<a-input v-model:value="formModel.pass" type="password" placeholder="新密码" /> <a-input v-model:value="formModel.pass" type="password" placeholder="新密码" />
</a-form-item> </a-form-item>
<a-form-item label="确认密码" has-feedback v-bind="validateInfos.confirmPass"> <a-form-item label="确认密码" has-feedback v-bind="validateInfos.confirmPass">
<a-input v-model:value="formModel.confirmPass" type="password" placeholder="确认密码" /> <a-input v-model:value="formModel.confirmPass" type="password" placeholder="确认密码" />
</a-form-item> </a-form-item>
@ -79,11 +80,13 @@ const validateConfirmPass = async (_rule: Rule, value: string) => {
const formModel = reactive<ChangePasswordFormModel>({ const formModel = reactive<ChangePasswordFormModel>({
username: '', username: '',
pass: '', pass: '',
oldPass: '',
confirmPass: '' confirmPass: ''
}) })
// //
const formRule = reactive({ const formRule = reactive({
oldPass: [{ required: true, message: '请输入原密码', trigger: 'change' }],
pass: [{ required: true, validator: validatePass, trigger: 'change' }], pass: [{ required: true, validator: validatePass, trigger: 'change' }],
confirmPass: [{ required: true, validator: validateConfirmPass, trigger: 'change' }] confirmPass: [{ required: true, validator: validateConfirmPass, trigger: 'change' }]
}) })
@ -92,6 +95,7 @@ const formRule = reactive({
const formRequestMapping: FormRequestMapping<ChangePasswordFormModel> = { const formRequestMapping: FormRequestMapping<ChangePasswordFormModel> = {
[FormAction.OTHER]: () => { [FormAction.OTHER]: () => {
return updateUserPassword(formModel.userId!, { return updateUserPassword(formModel.userId!, {
oldPass: passEncrypt(formModel.oldPass),
pass: passEncrypt(formModel.pass), pass: passEncrypt(formModel.pass),
confirmPass: passEncrypt(formModel.confirmPass) confirmPass: passEncrypt(formModel.confirmPass)
}) })
@ -109,10 +113,12 @@ const { submitLoading, validateAndSubmit, resetFields, validate, validateInfos }
/** 表单提交方法 */ /** 表单提交方法 */
const handleSubmit = () => { const handleSubmit = () => {
console.log('111111111')
validateAndSubmit( validateAndSubmit(
{ ...formModel }, { ...formModel },
{ {
onSuccess: () => { onSuccess: () => {
console.log('111111111')
closeModal() closeModal()
} }
} }

Loading…
Cancel
Save