diff --git a/apps/web-antd/src/views/crm/backlog/data.ts b/apps/web-antd/src/views/crm/backlog/data.ts index 7bf354c3b..ef6047d0e 100644 --- a/apps/web-antd/src/views/crm/backlog/data.ts +++ b/apps/web-antd/src/views/crm/backlog/data.ts @@ -2,7 +2,6 @@ import type { Ref } from 'vue'; import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; -import type { CrmContractApi } from '#/api/crm/contract'; import type { CrmReceivableApi } from '#/api/crm/receivable'; import { useAccess } from '@vben/access'; @@ -252,9 +251,7 @@ export function useContractRemindFormSchema(): VbenFormSchema[] { } /** 合同审核列表的字段 */ -export function useContractColumns( - onActionClick: OnActionClickFn, -): VxeTableGridOptions['columns'] { +export function useContractColumns(): VxeTableGridOptions['columns'] { return [ { field: 'no', @@ -355,25 +352,10 @@ export function useContractColumns( }, }, { - field: 'operation', title: '操作', - width: 130, - align: 'center', + width: 80, fixed: 'right', - cellRender: { - attrs: { - nameField: 'no', - nameTitle: '合同编号', - onClick: onActionClick, - }, - name: 'CellOperation', - options: [ - { - code: 'processDetail', - show: hasAccessByCodes(['crm:contract:update']), - }, - ], - }, + slots: { default: 'actions' }, }, ]; } diff --git a/apps/web-antd/src/views/crm/backlog/index.vue b/apps/web-antd/src/views/crm/backlog/index.vue index 971814f55..1f8b7a62a 100644 --- a/apps/web-antd/src/views/crm/backlog/index.vue +++ b/apps/web-antd/src/views/crm/backlog/index.vue @@ -13,8 +13,8 @@ import * as ReceivablePlanApi from '#/api/crm/receivable/plan'; import { DocAlert } from '#/components/doc-alert'; import { useLeftSides } from './data'; -import ClueFollowList from './modules/ClueFollowList.vue'; -import ContractAuditList from './modules/ContractAuditList.vue'; +import ClueFollowList from './modules/clue-follow-list.vue'; +import ContractAuditList from './modules/contract-audit-list.vue'; import ContractRemindList from './modules/ContractRemindList.vue'; import CustomerFollowList from './modules/CustomerFollowList.vue'; import CustomerPutPoolRemindList from './modules/CustomerPutPoolRemindList.vue'; diff --git a/apps/web-antd/src/views/crm/backlog/modules/ClueFollowList.vue b/apps/web-antd/src/views/crm/backlog/modules/clue-follow-list.vue similarity index 91% rename from apps/web-antd/src/views/crm/backlog/modules/ClueFollowList.vue rename to apps/web-antd/src/views/crm/backlog/modules/clue-follow-list.vue index 23d109c94..60ca44d9b 100644 --- a/apps/web-antd/src/views/crm/backlog/modules/ClueFollowList.vue +++ b/apps/web-antd/src/views/crm/backlog/modules/clue-follow-list.vue @@ -14,7 +14,7 @@ import { useClueFollowColumns, useClueFollowFormSchema } from '../data'; const { push } = useRouter(); /** 打开线索详情 */ -function onDetail(row: CrmClueApi.Clue) { +function handleDetail(row: CrmClueApi.Clue) { push({ name: 'CrmClueDetail', params: { id: row.id } }); } @@ -52,7 +52,7 @@ const [Grid] = useVbenVxeGrid({ diff --git a/apps/web-antd/src/views/crm/backlog/modules/ContractAuditList.vue b/apps/web-antd/src/views/crm/backlog/modules/contract-audit-list.vue similarity index 66% rename from apps/web-antd/src/views/crm/backlog/modules/ContractAuditList.vue rename to apps/web-antd/src/views/crm/backlog/modules/contract-audit-list.vue index a243bfe58..f9048a24c 100644 --- a/apps/web-antd/src/views/crm/backlog/modules/ContractAuditList.vue +++ b/apps/web-antd/src/views/crm/backlog/modules/contract-audit-list.vue @@ -1,13 +1,12 @@ diff --git a/apps/web-antd/src/views/crm/contract/modules/form.vue b/apps/web-antd/src/views/crm/contract/modules/form.vue new file mode 100644 index 000000000..5d2b0b78a --- /dev/null +++ b/apps/web-antd/src/views/crm/contract/modules/form.vue @@ -0,0 +1,85 @@ + + + diff --git a/apps/web-antd/src/views/crm/product/data.ts b/apps/web-antd/src/views/crm/product/data.ts index 592460a61..348afb372 100644 --- a/apps/web-antd/src/views/crm/product/data.ts +++ b/apps/web-antd/src/views/crm/product/data.ts @@ -1,7 +1,10 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import { handleTree } from '@vben/utils'; + import { z } from '#/adapter/form'; +import { getProductCategoryList } from '#/api/crm/product/category'; import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils'; /** 新增/修改的表单 */ @@ -28,17 +31,24 @@ export function useFormSchema(): VbenFormSchema[] { rules: 'required', }, { - component: 'Input', + component: 'ApiTreeSelect', fieldName: 'categoryName', label: '产品类型', rules: 'required', + componentProps: { + api: async () => { + const data = await getProductCategoryList(); + return handleTree(data); + }, + fieldNames: { label: 'name', value: 'id', children: 'children' }, + }, }, { fieldName: 'unit', label: '产品单位', component: 'Select', componentProps: { - options: getDictOptions(DICT_TYPE.CRM_PRODUCT_UNIT), + options: getDictOptions(DICT_TYPE.CRM_PRODUCT_UNIT, 'number'), }, rules: 'required', },