功能修改

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

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

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

@ -3,7 +3,7 @@
<!-- <customer-list-search :loading="tableRef?.loading" @search="searchTable" /> -->
<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-row>
<a-col :span="6" class="text-center">
@ -201,7 +201,10 @@
</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"
>
<div class="bullshit">努力开发中敬请期待...</div>
@ -242,7 +245,8 @@ watch(
nval => {
console.log('🚀 ~ file: index.vue:154 ~ roleCodes:', nval)
roleCodes.value = nval || ([] as string[])
})
}
)
const iframeLoading = ref(true)
//

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

@ -8,7 +8,7 @@
<a-input v-model:value="formModel.taskName" placeholder="请输入" />
</a-form-item>
</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-input v-model:value="formModel.taskName" placeholder="请输入" />
</a-form-item>

@ -8,7 +8,7 @@
<!-- 批量操作更多操作 -->
<a-card :bordered="false" :body-style="{ paddingBottom: 0 }">
<div class="download">
<a-button v-if="salesmanType === 0" @click.stop="downloadTemplate"></a-button>
<a-button @click.stop="downloadTemplate">导出</a-button>
</div>
</a-card>
<!-- 底部表格 -->
@ -54,12 +54,12 @@
</a-tooltip>
<span v-else>--</span>
</template>
<template v-else-if="column.key === 'remark'">
<a-tooltip v-if="record.remark">
<template v-else-if="column.key === 'customInformation'">
<a-tooltip v-if="record.customInformation">
<template #title
><span>{{ record.remark }}</span></template
><span>{{ record.customInformation }}</span></template
>
<span>{{ record.remark }}</span>
<span>{{ record.customInformation }}</span>
</a-tooltip>
<span v-else>--</span>
</template>
@ -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<any[]>([
}
},
{
title: '备注',
dataIndex: 'remark',
title: '客户资料',
dataIndex: 'customInformation',
ellipsis: true,
align: 'center'
align: 'center',
width: 200
},
{
title: '线索日期',
@ -283,6 +284,13 @@ const columns = ref<any[]>([
}
}
},
{
title: '跟进业务员',
dataIndex: 'assignedName',
ellipsis: true,
align: 'center',
width: 200
},
{
title: '创建日期',
dataIndex: 'createTime',

@ -9,11 +9,31 @@
:width="650"
@cancel="handleClose"
>
<div v-if="formModel">
<a-form :model="formModel" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item v-for="(item, index) in formModel.extraData" :key="index" :label="item.key">
<a-form-item label="渠道名称">
{{ formModel.originName }}
</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>
<a-button key="submit" type="primary" @click="handleSubmit"></a-button>
</template>
@ -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<detailForm>({
extraData: []
})
const formModel = ref<CustomerListRecord>()
//
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<number>()
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
}
})

@ -7,16 +7,6 @@
<a-input v-model:value="formModel.clueLabelName" placeholder="请输入" />
</a-form-item>
</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-form-item label="标签"> -->
<dict-select
@ -38,6 +28,21 @@
<a-input v-model:value="formModel.nid" placeholder="请输入" />
</a-form-item>
</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-form-item label="创建时间">
<a-range-picker
@ -64,7 +69,11 @@ import { Form } from 'ant-design-vue'
import dayjs from 'dayjs'
import type { Dayjs } from 'dayjs'
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
// label
@ -80,12 +89,15 @@ const props = withDefaults(
const emits = defineEmits<{
(e: 'search', params: Record<string, any>): void
}>()
const salesmanType = ref<number | undefined>()
const searchTimeValue = ref<[Dayjs, Dayjs]>()
// list
const salesmanList: any = ref([])
const formModel = reactive<CustomerListSearch>({
clueLabelName: '',
//线
userId: undefined,
salesmanArray: [],
//
httpStatus: undefined,
//
@ -95,7 +107,10 @@ const formModel = reactive<CustomerListSearch>({
})
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()

@ -20,7 +20,11 @@
<template v-if="column.key === 'operate'">
<operation-group>
<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>
</template>
</template>

@ -403,6 +403,13 @@
<div v-if="title === '编辑'">
<a-button @click="storeResetForm"></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
>
@ -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('操作成功')
}
}

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

@ -12,11 +12,12 @@
<a-form-item label="用户名">
<a-input v-model:value="formModel.username" disabled placeholder="用户名" />
</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-input v-model:value="formModel.pass" type="password" placeholder="新密码" />
</a-form-item>
<a-form-item label="确认密码" has-feedback v-bind="validateInfos.confirmPass">
<a-input v-model:value="formModel.confirmPass" type="password" placeholder="确认密码" />
</a-form-item>
@ -79,11 +80,13 @@ const validateConfirmPass = async (_rule: Rule, value: string) => {
const formModel = reactive<ChangePasswordFormModel>({
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<ChangePasswordFormModel> = {
[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()
}
}

Loading…
Cancel
Save