diff --git a/src/api/customermanagement/customerList/types.ts b/src/api/customermanagement/customerList/types.ts index f11960d..7a5378c 100644 --- a/src/api/customermanagement/customerList/types.ts +++ b/src/api/customermanagement/customerList/types.ts @@ -43,6 +43,9 @@ export type CustomerListRecord = { originName?: string otherClue?: string remark?: string + extraData?: Array + channelType?: number + channelIdentifying?: Array } /** * 编辑表单 @@ -78,6 +81,7 @@ export interface CustomerListSearch { startTime?: string // 访问时间区间的结束值 endTime?: string + salesmanArray?: number[] clueLabelName?: string } //修改资源(编辑接口用到) diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 568708a..dfb781c 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -213,6 +213,7 @@ export type SysUserScope = { export type SysUserPassDTO = { pass: string confirmPass: string + oldPass: string } interface clueStageState { // tags: tagsItem[] diff --git a/src/views/basic/iframe/index.vue b/src/views/basic/iframe/index.vue index 325274d..be2e259 100644 --- a/src/views/basic/iframe/index.vue +++ b/src/views/basic/iframe/index.vue @@ -3,7 +3,7 @@
-
+
@@ -201,7 +201,10 @@
努力开发中,敬请期待...
@@ -242,7 +245,8 @@ watch( nval => { console.log('🚀 ~ file: index.vue:154 ~ roleCodes:', nval) roleCodes.value = nval || ([] as string[]) -}) + } +) const iframeLoading = ref(true) // 顶部统计 diff --git a/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagementModal.vue b/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagementModal.vue index ff6526c..e242192 100644 --- a/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagementModal.vue +++ b/src/views/controlcenterstation/distributionTaskManagement/distributionTaskManagementModal.vue @@ -195,11 +195,7 @@ show-time /> - + -
- 导出 + 导出
@@ -54,12 +54,12 @@ -- - @@ -118,14 +118,15 @@ onMounted(() => { searchTable({ clueId: savedUserData }) localStorage.setItem('clueId', '') } - if (salesmanType.value === 4) { - columns.value.splice(4, 0, { - title: '有效开关', - dataIndex: 'isEffective', - ellipsis: true, - align: 'center' - }) - } + // if (salesmanType.value === 4) { + // columns.value.splice(4, 0, { + // title: '有效开关', + // dataIndex: 'isEffective', + // ellipsis: true, + // align: 'center', + // width: 150 + // }) + // } // const customerId = route.query.clueId as string // 使用类型断言将参数转换为字符串 // if (customerId) { // searchTable({ clueId: customerId }) @@ -177,7 +178,6 @@ const handleView = (record: CustomerListRecord, tabIndex: string) => { //编辑 const handleEdit = (record: CustomerListRecord, tabIndex: string) => { - console.log('222') customerListEditModalRef.value?.open(FormAction.UPDATE, record, tabIndex) } //删除用户 @@ -264,10 +264,11 @@ const columns = ref([ } }, { - title: '备注', - dataIndex: 'remark', + title: '客户资料', + dataIndex: 'customInformation', ellipsis: true, - align: 'center' + align: 'center', + width: 200 }, { title: '线索日期', @@ -283,6 +284,13 @@ const columns = ref([ } } }, + { + title: '跟进业务员', + dataIndex: 'assignedName', + ellipsis: true, + align: 'center', + width: 200 + }, { title: '创建日期', dataIndex: 'createTime', diff --git a/src/views/customermanagement/customerList/customerListModal.vue b/src/views/customermanagement/customerList/customerListModal.vue index 74f4ffe..fed2052 100644 --- a/src/views/customermanagement/customerList/customerListModal.vue +++ b/src/views/customermanagement/customerList/customerListModal.vue @@ -9,11 +9,31 @@ :width="650" @cancel="handleClose" > - - - {{ item.value }} - - +
+ + + {{ formModel.originName }} + + + {{ statusComparison('channelType', formModel.channelType) }} + + + {{ item }} + + + {{ formModel.assignedName }} + + + {{ item.value }} + + +
@@ -25,7 +45,7 @@ import { reactive, ref } from 'vue' import { useModal } from '@/hooks/modal' import { useFormAction, FormAction } from '@/hooks/form' 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' // const activeKey = ref('1') @@ -41,9 +61,7 @@ const { formAction } = useFormAction() const submitLoading = ref(false) // 表单模型 -const formModel = reactive({ - extraData: [] -}) +const formModel = ref() //表单提交处理 const handleSubmit = () => { @@ -64,9 +82,46 @@ interface clueStageItem { // const labelGroupReloadTable = () => { // 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 const resourcesId = ref() + +const statusComparison = (name: string, val: any) => { + return (stateGroup as any)[name].filter((item: any) => item.value == val)[0]?.label +} defineExpose({ open(newFormAction: FormAction, record: CustomerListRecord, tabIndex: string) { // activeKey.value = tabIndex @@ -75,14 +130,14 @@ defineExpose({ title.value = '详情' resourcesId.value = record.clueId // labelGroupReloadTable() + const data = JSON.parse(JSON.stringify(record)) if (record.otherClue) { - JSON.parse(record.otherClue) - formModel.extraData = [] - for (const key in JSON.parse(record.otherClue)) { - formModel.extraData.push({ key: key, value: JSON.parse(record.otherClue)[key] }) + data.extraData = [] + for (const key in JSON.parse(data.otherClue)) { + data.extraData.push({ key: key, value: JSON.parse(record.otherClue)[key] }) } } - + formModel.value = data formAction.value = newFormAction } }) diff --git a/src/views/customermanagement/customerList/customerListSearch.vue b/src/views/customermanagement/customerList/customerListSearch.vue index ca03ce8..c833616 100644 --- a/src/views/customermanagement/customerList/customerListSearch.vue +++ b/src/views/customermanagement/customerList/customerListSearch.vue @@ -7,16 +7,6 @@
- + + + + + ): void }>() - +const salesmanType = ref() const searchTimeValue = ref<[Dayjs, Dayjs]>() +// 业务员list +const salesmanList: any = ref([]) const formModel = reactive({ clueLabelName: '', //线索阶段 userId: undefined, + salesmanArray: [], //标签 httpStatus: undefined, //模糊查询 @@ -95,7 +107,10 @@ const formModel = reactive({ }) const { resetFields } = useForm(formModel) - +onMounted(() => { + salesmanType.value = userInfo?.salesmanType + initSalesman() +}) const search = () => { const param = toRaw(formModel) if (searchTimeValue.value && searchTimeValue.value.length == 2) { @@ -107,7 +122,13 @@ const search = () => { } emits('search', param) } - +const initSalesman = () => { + doRequest(getFindRoleSonUser(23), { + onSuccess: (res: any) => { + salesmanList.value = res.data + } + }) +} const reset = () => { // 清空表单其他元素 resetFields() diff --git a/src/views/qualityInspectionDistribution/inspectionIndex.vue b/src/views/qualityInspectionDistribution/inspectionIndex.vue index ae0fcb1..87e2c9c 100644 --- a/src/views/qualityInspectionDistribution/inspectionIndex.vue +++ b/src/views/qualityInspectionDistribution/inspectionIndex.vue @@ -20,7 +20,11 @@ diff --git a/src/views/qualityInspectionDistribution/inspectionModal.vue b/src/views/qualityInspectionDistribution/inspectionModal.vue index 70aba99..2023a0c 100644 --- a/src/views/qualityInspectionDistribution/inspectionModal.vue +++ b/src/views/qualityInspectionDistribution/inspectionModal.vue @@ -403,6 +403,13 @@
重置 取消 + 暂存 + 分发 @@ -1312,7 +1319,8 @@ const submitOperate = () => { ) 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('保存成功') isSubmit.value = true updateCustomerAudit({ @@ -1331,6 +1339,9 @@ const submitOperate = () => { }) } }) + } else { + handleSubmit() + message.success('操作成功') } } diff --git a/src/views/salesmanagement/salespersonList/salespersonListModal.vue b/src/views/salesmanagement/salespersonList/salespersonListModal.vue index c891129..cc4abc5 100644 --- a/src/views/salesmanagement/salespersonList/salespersonListModal.vue +++ b/src/views/salesmanagement/salespersonList/salespersonListModal.vue @@ -152,7 +152,7 @@ defineExpose({ title.value = '编辑用户' overrideProperties(formModel, record) //为了过销售员管理的编辑弹出框的角色下拉框必填校验 - formModel.roleCodes = ['ROLE_SALES_EXECUTIVE'] + formModel.roleCodes = ['ROLE_STORE_EXECUTIVE'] } formAction.value = newFormAction } diff --git a/src/views/system/user/ChangePasswordModal.vue b/src/views/system/user/ChangePasswordModal.vue index a6a6040..b837453 100644 --- a/src/views/system/user/ChangePasswordModal.vue +++ b/src/views/system/user/ChangePasswordModal.vue @@ -12,11 +12,12 @@ - + + + - @@ -79,11 +80,13 @@ const validateConfirmPass = async (_rule: Rule, value: string) => { const formModel = reactive({ username: '', pass: '', + oldPass: '', confirmPass: '' }) // 表单校验规则 const formRule = reactive({ + oldPass: [{ required: true, message: '请输入原密码', trigger: 'change' }], pass: [{ required: true, validator: validatePass, trigger: 'change' }], confirmPass: [{ required: true, validator: validateConfirmPass, trigger: 'change' }] }) @@ -92,6 +95,7 @@ const formRule = reactive({ const formRequestMapping: FormRequestMapping = { [FormAction.OTHER]: () => { return updateUserPassword(formModel.userId!, { + oldPass: passEncrypt(formModel.oldPass), pass: passEncrypt(formModel.pass), confirmPass: passEncrypt(formModel.confirmPass) }) @@ -109,10 +113,12 @@ const { submitLoading, validateAndSubmit, resetFields, validate, validateInfos } /** 表单提交方法 */ const handleSubmit = () => { + console.log('111111111') validateAndSubmit( { ...formModel }, { onSuccess: () => { + console.log('111111111') closeModal() } }