diff --git a/src/api/crm/clue/index.ts b/src/api/crm/clue/index.ts new file mode 100644 index 00000000..39da03d3 --- /dev/null +++ b/src/api/crm/clue/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +export interface ClueVO { + id: number + transformStatus: boolean + followUpStatus: boolean + name: string + customerId: number + contactNextTime: Date + telephone: string + mobile: string + address: string + ownerUserId: number + contactLastTime: Date + remark: string +} + +// 查询线索列表 +export const getCluePage = async (params) => { + return await request.get({ url: `/crm/clue/page`, params }) +} + +// 查询线索详情 +export const getClue = async (id: number) => { + return await request.get({ url: `/crm/clue/get?id=` + id }) +} + +// 新增线索 +export const createClue = async (data: ClueVO) => { + return await request.post({ url: `/crm/clue/create`, data }) +} + +// 修改线索 +export const updateClue = async (data: ClueVO) => { + return await request.put({ url: `/crm/clue/update`, data }) +} + +// 删除线索 +export const deleteClue = async (id: number) => { + return await request.delete({ url: `/crm/clue/delete?id=` + id }) +} + +// 导出线索 Excel +export const exportClue = async (params) => { + return await request.download({ url: `/crm/clue/export-excel`, params }) +} diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts new file mode 100644 index 00000000..bf438323 --- /dev/null +++ b/src/api/crm/contract/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface ContractVO { + id: number + name: string + customerId: number + businessId: number + processInstanceId: number + orderDate: Date + ownerUserId: number + no: string + startTime: Date + endTime: Date + price: number + discountPercent: number + productPrice: number + roUserIds: string + rwUserIds: string + contactId: number + signUserId: number + contactLastTime: Date + remark: string +} + +// 查询合同列表 +export const getContractPage = async (params) => { + return await request.get({ url: `/crm/contract/page`, params }) +} + +// 查询合同详情 +export const getContract = async (id: number) => { + return await request.get({ url: `/crm/contract/get?id=` + id }) +} + +// 新增合同 +export const createContract = async (data: ContractVO) => { + return await request.post({ url: `/crm/contract/create`, data }) +} + +// 修改合同 +export const updateContract = async (data: ContractVO) => { + return await request.put({ url: `/crm/contract/update`, data }) +} + +// 删除合同 +export const deleteContract = async (id: number) => { + return await request.delete({ url: `/crm/contract/delete?id=` + id }) +} + +// 导出合同 Excel +export const exportContract = async (params) => { + return await request.download({ url: `/crm/contract/export-excel`, params }) +} diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue index f162d1fb..363874cf 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue @@ -1,13 +1,20 @@ @@ -53,12 +59,11 @@ import { DICT_TYPE } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import TaskSubSignDialogForm from './TaskSubSignDialogForm.vue' -const message = useMessage() // 消息弹窗 -defineOptions({ name: 'ProcessInstancechildrenList' }) +defineOptions({ name: 'ProcessInstanceChildrenTaskList' }) +const message = useMessage() // 消息弹窗 const drawerVisible = ref(false) // 抽屉的是否展示 -const tableData = ref([]) //表格数据 const baseTask = ref({}) /** 打开弹窗 */ const open = async (task: any) => { @@ -67,30 +72,22 @@ const open = async (task: any) => { return } baseTask.value = task - //设置表格数据 - tableData.value = task.children - //展开抽屉 + // 展开抽屉 drawerVisible.value = true } defineExpose({ open }) // 提供 openModal 方法,用于打开弹窗 -const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 - -/** - * 减签 - */ +/** 发起减签 */ const taskSubSignDialogForm = ref() const handleSubSign = (item) => { taskSubSignDialogForm.value.open(item.id) + // TODO @海洋:减签后,需要刷新下界面哈 } -/** - * 显示减签按钮 - * @param task - */ -const showSubSignButton = (task:any) => { - if(!isEmpty(task.children)){ - //有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮 +/** 是否显示减签按钮 */ +const isSubSignButtonVisible = (task: any) => { + if (task && task.children && !isEmpty(task.children)) { + // 有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮 const subTask = task.children.find((item) => item.result === 1 || item.result === 9) return !isEmpty(subTask) } diff --git a/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue b/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue index 4b91c9b9..40cd200e 100644 --- a/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue +++ b/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue @@ -22,12 +22,12 @@ diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index f9c5452b..ba6c1298 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -114,7 +114,7 @@ import TaskUpdateAssigneeForm from './TaskUpdateAssigneeForm.vue' import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue' import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue' import TaskReturnDialog from './TaskReturnDialogForm.vue' -import TaskDelegateForm from './taskDelegateForm.vue' +import TaskDelegateForm from './TaskDelegateForm.vue' import TaskAddSignDialogForm from './TaskAddSignDialogForm.vue' import { registerComponent } from '@/utils/routerHelper' import { isEmpty } from '@/utils/is' diff --git a/src/views/crm/clue/ClueForm.vue b/src/views/crm/clue/ClueForm.vue new file mode 100644 index 00000000..e72e4228 --- /dev/null +++ b/src/views/crm/clue/ClueForm.vue @@ -0,0 +1,165 @@ + + diff --git a/src/views/crm/clue/index.vue b/src/views/crm/clue/index.vue new file mode 100644 index 00000000..42f20545 --- /dev/null +++ b/src/views/crm/clue/index.vue @@ -0,0 +1,318 @@ + + + diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue new file mode 100644 index 00000000..5d5578f9 --- /dev/null +++ b/src/views/crm/contract/ContractForm.vue @@ -0,0 +1,228 @@ + + diff --git a/src/views/crm/contract/contract.data.ts b/src/views/crm/contract/contract.data.ts new file mode 100644 index 00000000..07458c24 --- /dev/null +++ b/src/views/crm/contract/contract.data.ts @@ -0,0 +1,228 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const rules = reactive({ + name: [required] +}) + +// TODO @dbh52:不使用 crud 模式哈,使用标准的 ep 代码哈;主要后续 crud schema 可能会改 +// CrudSchema https://doc.iocoder.cn/vue3/crud-schema/ +const crudSchemas = reactive([ + { + label: '合同编号', + field: 'id', + isForm: false + }, + { + label: '合同名称', + field: 'name', + isSearch: true + }, + { + label: '客户编号', + field: 'customerId', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '商机编号', + field: 'businessId', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '工作流编号', + field: 'processInstanceId', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '下单日期', + field: 'orderDate', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '负责人的用户编号', + field: 'ownerUserId', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + { + label: '合同编号', + field: 'no', + isSearch: true + }, + { + label: '开始时间', + field: 'startTime', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '结束时间', + field: 'endTime', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '合同金额', + field: 'price', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '整单折扣', + field: 'discountPercent', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '产品总金额', + field: 'productPrice', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '只读权限的用户编号数组', + field: 'roUserIds', + isSearch: true + }, + { + label: '读写权限的用户编号数组', + field: 'rwUserIds', + isSearch: true + }, + { + label: '联系人编号', + field: 'contactId', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '备注', + field: 'remark', + isSearch: true + }, + { + label: '公司签约人', + field: 'signUserId', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '最后跟进时间', + field: 'contactLastTime', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '操作', + field: 'action', + isForm: false + } +]) +export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/src/views/crm/contract/index.vue b/src/views/crm/contract/index.vue new file mode 100644 index 00000000..7a8211be --- /dev/null +++ b/src/views/crm/contract/index.vue @@ -0,0 +1,253 @@ + + + diff --git a/src/views/pay/app/index.vue b/src/views/pay/app/index.vue index c949637b..3531633f 100644 --- a/src/views/pay/app/index.vue +++ b/src/views/pay/app/index.vue @@ -47,12 +47,7 @@ 搜索 重置 - + 新增 @@ -266,7 +261,7 @@ link type="primary" @click="openForm('update', scope.row.id)" - v-hasPermi="['system:tenant:update']" + v-hasPermi="['pay:app:update']" > 编辑 @@ -274,7 +269,7 @@ link type="danger" @click="handleDelete(scope.row.id)" - v-hasPermi="['system:tenant:delete']" + v-hasPermi="['pay:app:delete']" > 删除