From 4a5c4e0e5c1f7a330b3675fae1a98cc91054e674 Mon Sep 17 00:00:00 2001 From: z9130 <984661593@qq.com> Date: Thu, 10 Oct 2024 10:08:55 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=AE=8C=E5=96=84=EF=BC=8C=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E8=BF=87=E6=BB=A4radio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-contract/src/api/index.ts | 127 +++++++++++++++--- .../src/components/flow-record-table/curd.tsx | 13 ++ .../flow-record-table/flow-record-table.vue | 0 .../views/contract/approval/list/index.vue | 9 ++ .../views/contract/business/edit/index.vue | 2 +- .../views/contract/business/list/index.vue | 11 +- .../views/contract/business/result/index.vue | 24 +++- .../components/todo-page/todo-page.vue | 10 +- .../components/info-approval/curd.tsx | 54 +++----- .../info-approval/info-approval.vue | 18 ++- .../src/views/contract/iframe-info/index.vue | 8 +- .../web-contract/src/views/contract/schema.ts | 33 +---- apps/web-contract/src/views/contract/utils.ts | 36 +++-- apps/web-contract/vite.config.mts | 28 ++++ .../flow-record-table/flow-record-table.vue | 0 apps/web-office/src/utils/workflow.ts | 37 +++++ .../src/views/bussiness-trip/todo/index.vue | 76 +++++++---- .../src/views/duty/list/duty-edit-modal.vue | 1 + .../src/views/meeting/start/index.vue | 10 +- resource/apiDefinitions.ts | 82 ++++++++++- 20 files changed, 440 insertions(+), 139 deletions(-) create mode 100644 apps/web-contract/src/components/flow-record-table/curd.tsx create mode 100644 apps/web-contract/src/components/flow-record-table/flow-record-table.vue create mode 100644 apps/web-office/src/components/flow-record-table/flow-record-table.vue create mode 100644 apps/web-office/src/utils/workflow.ts diff --git a/apps/web-contract/src/api/index.ts b/apps/web-contract/src/api/index.ts index 4ec32928..0a908e0d 100644 --- a/apps/web-contract/src/api/index.ts +++ b/apps/web-contract/src/api/index.ts @@ -535,7 +535,7 @@ export default { /** 合同系统/选商废除 退回 */ post_abolishRollback: (data?: BodyOptions) => http.post('/app/selectMerchantsBasicInfo/abolishRollback', data), - // /contractBaseInfo/applyFlowStart + /** 合同系统/选商 流程启动(非待办提交) */ post_flowStart: (data?: BodyOptions) => http.post('/app/selectMerchantsBasicInfo/flowStart', data), }, @@ -613,7 +613,7 @@ export default { /** 合同系统/归档/合同归档 保存合同归档 */ post_save: (data?: BodyOptions) => http.post('/app/contractFilingFormal/save', data), - /** 合同系统/归档/合同回档 分页查询 */ + /** 合同系统/归档/合同回档 分页查询-已归档 */ get_pageArchivedContract: (data?: QueryOptions) => http.get('/app/contractFilingFormal/pageArchivedContract', data), /** 合同系统/归档/合同回档 回档 */ @@ -654,52 +654,52 @@ export default { flowCenter: { /** 流程中心 启动流程 */ post_start: (data?: BodyOptions) => - http.post('/app/flowCenter/start', data), + http.post('/flowCenter/start', data), /** 流程中心 审核通过 */ post_agree: (data?: BodyOptions) => - http.post('/app/flowCenter/agree', data), + http.post('/flowCenter/agree', data), /** 流程中心 审核退回 */ post_rollback: (data?: BodyOptions) => - http.post('/app/flowCenter/rollback', data), + http.post('/flowCenter/rollback', data), /** 流程中心 获取待办 */ post_getTodoList: (data?: BodyOptions) => - http.post('/app/flowCenter/getTodoList', data), + http.post('/flowCenter/getTodoList', data), /** 流程中心 获取已办 */ post_doneList: (data?: BodyOptions) => - http.post('/app/flowCenter/doneList', data), + http.post('/flowCenter/doneList', data), /** 流程中心 审核撤回 */ get_revoke: (data?: QueryOptions) => - http.get('/app/flowCenter/revoke', data), + http.get('/flowCenter/revoke', data), /** 流程中心 审核记录 */ get_history: (data?: QueryOptions) => - http.get('/app/flowCenter/history', data), + http.get('/flowCenter/history', data), /** 流程中心 查看流程图 */ get_getFlowImg: (data?: QueryOptions) => - http.get('/app/flowCenter/getFlowImg', data), + http.get('/flowCenter/getFlowImg', data), /** 流程中心 获取可退回节点 */ get_getReturnNode: (data?: QueryOptions) => - http.get('/app/flowCenter/getReturnNode', data), + http.get('/flowCenter/getReturnNode', data), /** 流程中心 获取流程节点人员配置信息 */ get_getNextNodeUserConfig: (data?: QueryOptions) => - http.get('/app/flowCenter/getNextNodeUserConfig', data), + http.get('/flowCenter/getNextNodeUserConfig', data), /** 流程中心 获取待办数量 */ get_getTodoListSize: (data?: QueryOptions) => - http.get('/app/flowCenter/getTodoListSize', data), + http.get('/flowCenter/getTodoListSize', data), /** 流程中心 获取当前审核节点配置信息 */ get_getNodeConfigInfo: (data?: QueryOptions) => - http.get('/app/flowCenter/getNodeConfigInfo', data), + http.get('/flowCenter/getNodeConfigInfo', data), /** 流程中心 获取下一节点配置信息 */ get_getNextNodeConfig: (data?: QueryOptions) => - http.get('/app/flowCenter/getNextNodeConfig', data), + http.get('/flowCenter/getNextNodeConfig', data), /** 流程中心 获取流程节点人员配置信息 */ post_getFlowNodeUserConfig: (data?: BodyOptions) => - http.post('/app/flowCenter/getFlowNodeUserConfig', data), + http.post('/flowCenter/getFlowNodeUserConfig', data), /** 流程中心 获取流程变量配置 */ get_getFlowVariablesConfig: (data?: QueryOptions) => - http.get('/app/flowCenter/getFlowVariablesConfig', data), + http.get('/flowCenter/getFlowVariablesConfig', data), /** 流程中心 获取流程所有人员配置信息 */ get_getFlowUserConfig: (data?: QueryOptions) => - http.get('/app/flowCenter/getFlowUserConfig', data), + http.get('/flowCenter/getFlowUserConfig', data), }, rl: { moduleParameter: { @@ -782,6 +782,9 @@ export default { /** 合同系统 流程已办 */ get_getDoneTaskByUserID: (data?: QueryOptions) => http.get('/app/workFlow/getDoneTaskByUserID', data), + /** 合同系统 获取流程图 */ + get_getFlowImg: (data?: QueryOptions) => + http.get('/app/workFlow/getFlowImg', data), }, biddingResult: { /** 合同系统/选商/选商结果 分页查询 */ @@ -822,8 +825,94 @@ export default { /** 合同系统/签约授权 查询单条签约授权数据 */ get_getOne: (data?: QueryOptions) => http.get('/app/sqConsignPt/getOne', data), - /** 合同系统/签约授权 签约授权提交 */ + /** 合同系统/签约授权 签约授权提交(非待办提交) */ post_flowStart: (data?: BodyOptions) => http.post('/app/sqConsignPt/flowStart', data), + /** 合同系统/签约授权 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/sqConsignPt/deletes', data), + /** 合同系统/签约授权 签约授权提交 */ + post_submit: (data?: BodyOptions) => + http.post('/app/sqConsignPt/submit', data), + }, + addressorsort: { + /** 协同办公/会议管理/发言人顺序配置 发言人顺序查询 */ + get_page: (data?: QueryOptions) => + http.get('/app/addressorsort/page', data), + /** 协同办公/会议管理/发言人顺序配置 发言人排序保存 */ + post_save: (data?: BodyOptions) => + http.post('/app/addressorsort/save', data), + /** 协同办公/会议管理/发言人顺序配置 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/addressorsort/deletes', data), + }, + equInfo: { + /** 设备管理/设备静态库管理/ 设备信息维护 设备信息保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equInfo/save', data), + /** 设备管理/设备静态库管理/ 设备信息维护 设备信息(获取/查询) */ + get_page: (data?: QueryOptions) => http.get('/app/equInfo/page', data), + /** 设备管理/设备静态库管理/ 设备信息维护 设备信息删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equInfo/deletes', data), + }, + equAllot: { + /** 设备管理/查询管理/设备调拨查询 保存 */ + get_page: (data?: QueryOptions) => http.get('/app/equAllot/page', data), + /** 设备管理/查询管理/设备调拨查询 保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equAllot/save', data), + /** 设备管理/设备静态库管理/设备调拨 调拨信息删除 */ + post_delete: (data?: BodyOptions) => + http.post('/app/equAllot/delete', data), + /** 设备管理/查询管理/设备调拨查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equAllot/deletes', data), + }, + bidding: { + /** 合同系统/标段信息 标段查询 */ + get_list: (data?: QueryOptions) => http.get('/app/bidding/list', data), + /** 合同系统/标段信息 标段信息保存(弃用,在选商中报错) */ + post_save: (data?: BodyOptions) => http.post('/app/bidding/save', data), + /** 合同系统/标段信息 标段信息删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/bidding/deletes', data), + }, + equAccident: { + /** 设备管理/查询管理/事故处理查询 事故处理(查询/获取) */ + get_page: (data?: QueryOptions) => http.get('/app/equAccident/page', data), + /** 设备管理/查询管理/事故处理查询 保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equAccident/save', data), + /** 设备管理/查询管理/事故处理查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equAccident/deletes', data), + }, + equStopRepair: { + /** 设备管理/查询管理/停炉检修处理查询 查询 */ + get_page: (data?: QueryOptions) => + http.get('/app/equStopRepair/page', data), + /** 设备管理/查询管理/停炉检修处理查询 保存 */ + post_save: (data?: BodyOptions) => + http.post('/app/equStopRepair/save', data), + /** 设备管理/查询管理/停炉检修处理查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equStopRepair/deletes', data), + }, + equDanger: { + /** 设备管理/查询管理/隐患排查处理查询 查询 */ + get_page: (data?: QueryOptions) => http.get('/app/equDanger/page', data), + /** 设备管理/查询管理/隐患排查处理查询 保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equDanger/save', data), + /** 设备管理/查询管理/隐患排查处理查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equDanger/deletes', data), + }, + equDayRepair: { + /** 设备管理/查询管理/日常维修查询 查询 */ + get_page: (data?: QueryOptions) => http.get('/app/equDayRepair/page', data), + /** 设备管理/查询管理/日常维修查询 保存 */ + post_save: (data?: BodyOptions) => + http.post('/app/equDayRepair/save', data), + /** 设备管理/查询管理/日常维修查询 删除 */ + get_deletes: (data?: QueryOptions) => + http.get('/app/equDayRepair/deletes', data), }, }; diff --git a/apps/web-contract/src/components/flow-record-table/curd.tsx b/apps/web-contract/src/components/flow-record-table/curd.tsx new file mode 100644 index 00000000..9b355511 --- /dev/null +++ b/apps/web-contract/src/components/flow-record-table/curd.tsx @@ -0,0 +1,13 @@ +import type { VxeGridPropTypes } from 'vxe-table'; + +import dayjs from 'dayjs'; + +import { useRender } from '#/hooks/useRender'; + +export const PrimaryKey = 'guid'; + +export function getColumns(_params: any = {}): VxeGridPropTypes.Columns { + return [ + + ]; +} diff --git a/apps/web-contract/src/components/flow-record-table/flow-record-table.vue b/apps/web-contract/src/components/flow-record-table/flow-record-table.vue new file mode 100644 index 00000000..e69de29b diff --git a/apps/web-contract/src/views/contract/approval/list/index.vue b/apps/web-contract/src/views/contract/approval/list/index.vue index d5a9227a..52c180a8 100644 --- a/apps/web-contract/src/views/contract/approval/list/index.vue +++ b/apps/web-contract/src/views/contract/approval/list/index.vue @@ -88,6 +88,15 @@ function handleExport() { if ($grid) { $grid.exportData({ type: 'xlsx', + columnFilterMethod: ({ column }) => { + if (['operate', 'step'].includes(column.field)) { + return false; + } + if (column.type === 'radio') { + return false; + } + return true; + }, }); message.success('导出成功'); } diff --git a/apps/web-contract/src/views/contract/business/edit/index.vue b/apps/web-contract/src/views/contract/business/edit/index.vue index de8066f1..063412c8 100644 --- a/apps/web-contract/src/views/contract/business/edit/index.vue +++ b/apps/web-contract/src/views/contract/business/edit/index.vue @@ -446,7 +446,7 @@ onMounted(async () => { // 先查合同基本信息 const contract: any = await Apis.contractBaseInfo.get_getOne({ - params: { guid: id.value }, + params: { contractId: id.value }, }); if (contract && contract.contractId) { diff --git a/apps/web-contract/src/views/contract/business/list/index.vue b/apps/web-contract/src/views/contract/business/list/index.vue index 1f80e758..e511fc33 100644 --- a/apps/web-contract/src/views/contract/business/list/index.vue +++ b/apps/web-contract/src/views/contract/business/list/index.vue @@ -61,6 +61,15 @@ function handleExport() { if ($grid) { $grid.exportData({ type: 'xlsx', + columnFilterMethod: ({ column }) => { + if (['operate', 'step'].includes(column.field)) { + return false; + } + if (column.type === 'radio') { + return false; + } + return true; + }, }); message.success('导出成功'); } @@ -160,7 +169,7 @@ const searchForm = ref({ 查看 diff --git a/apps/web-contract/src/views/contract/business/result/index.vue b/apps/web-contract/src/views/contract/business/result/index.vue index 9596f3b1..8a34179b 100644 --- a/apps/web-contract/src/views/contract/business/result/index.vue +++ b/apps/web-contract/src/views/contract/business/result/index.vue @@ -113,7 +113,7 @@ function handleDelete() { }); } -const collapses = ['1', '2', '3', '4']; +const collapses = ['4', '5', '6']; const collapseActiveKey = ref(collapses); function areArraysEqualUnordered(arr1, arr2) { if (arr1.length !== arr2.length) return false; @@ -429,7 +429,7 @@ onMounted(async () => {
- + { - + + + + + - - + + + + - + + + + + + + {}); size="small" type="text" @click=" - toDetailPage('approval', '', { contractId: row.contractId }) + toDetailPage('approval', '', { + contractId: row.contractId, + flowInstanceId: row.flowInstanceId, + }) " > 查看 @@ -137,7 +140,10 @@ onMounted(() => {}); size="small" type="text" @click=" - toDetailPage('approval', '', { contractId: row.contractId }) + toDetailPage('approval', '', { + contractId: row.contractId, + flowInstanceId: row.flowInstanceId, + }) " > 查看 diff --git a/apps/web-contract/src/views/contract/iframe-info/components/info-approval/curd.tsx b/apps/web-contract/src/views/contract/iframe-info/components/info-approval/curd.tsx index bdacd0e5..1d416bc1 100644 --- a/apps/web-contract/src/views/contract/iframe-info/components/info-approval/curd.tsx +++ b/apps/web-contract/src/views/contract/iframe-info/components/info-approval/curd.tsx @@ -36,6 +36,12 @@ export function getFormSchema(params: any = {}): any { title: '合同名称', key: 'contractName', col: { span: 24 }, + component: { + name: 'a-input', + vModel: 'value', + allowClear: false, + disabled: readOnly, + }, conditionalRender: { match(_context) { return true; @@ -44,12 +50,11 @@ export function getFormSchema(params: any = {}): any { return {form.contractName}; }, }, - rules: [{ required: true }], }, ctrType: { title: '合同类别', key: 'ctrType', - col: { span: 12 }, + col: { span: 6 }, conditionalRender: { match(_context) { return true; @@ -64,12 +69,11 @@ export function getFormSchema(params: any = {}): any { return ; }, }, - rules: [{ required: true }], }, ctrTwoType: { title: '二级类别', key: 'ctrTwoType', - col: { span: 12 }, + col: { span: 6 }, conditionalRender: { match(_context) { return true; @@ -84,12 +88,11 @@ export function getFormSchema(params: any = {}): any { return ; }, }, - rules: [{ required: true }], }, frameProtocol: { title: '框架协议', key: 'frameProtocol', - col: { span: 8 }, + col: { span: 6 }, component: { name: 'fs-dict-radio', vModel: 'value', @@ -116,7 +119,7 @@ export function getFormSchema(params: any = {}): any { frameProtocolCtr: { title: '框架协议下的合同', key: 'frameProtocolCtr', - col: { span: 12 }, + col: { span: 6 }, labelCol: { style: { width: '200px' } }, component: { name: 'fs-dict-radio', @@ -144,7 +147,7 @@ export function getFormSchema(params: any = {}): any { fundAllocation: { title: '资金流向', key: 'fundAllocation', - col: { span: 12 }, + col: { span: 6 }, component: { name: 'fs-dict-select', vModel: 'value', @@ -179,12 +182,11 @@ export function getFormSchema(params: any = {}): any { ); }, }, - rules: [{ required: true, message: '请选择资金流向' }], }, fundDitch: { title: '资金渠道', key: 'fundDitch', - col: { span: 12 }, + col: { span: 6 }, component: { name: 'fs-dict-select', vModel: 'value', @@ -209,12 +211,11 @@ export function getFormSchema(params: any = {}): any { ); }, }, - rules: [{ required: true, message: '请选择资金渠道' }], }, budgetSum: { title: '预算金额', key: 'budgetSum', - col: { span: 8 }, + col: { span: 6 }, colon: false, component: { name: 'a-input-number', @@ -222,36 +223,14 @@ export function getFormSchema(params: any = {}): any { class: 'w-full', min: 0, }, - conditionalRender: { - match({ form }) { - return readOnly; - }, - render({ form }) { - return {form.budgetSum}; - }, - }, - }, - priceType: { - title: '', - key: 'priceType', - col: { span: 6 }, - labelCol: { style: { width: '12px' } }, - colon: false, - component: { - name: 'fs-dict-select', - vModel: 'value', - dict: dict({ - data: getDictOptions(DICT_TYPE.contract_currency_unit), - }), - }, conditionalRender: { match({ form }) { return readOnly; }, render({ form }) { return ( - - {getDictObj(DICT_TYPE.contract_currency_unit, form.priceType)} + + {form.budgetSum} {form.priceTypeName} ); }, @@ -260,7 +239,7 @@ export function getFormSchema(params: any = {}): any { organiza: { title: '组织形式', key: 'organiza', - col: { span: 24 }, + col: { span: 6 }, component: { name: 'fs-dict-radio', vModel: 'value', @@ -285,7 +264,6 @@ export function getFormSchema(params: any = {}): any { ); }, }, - rules: [{ required: true, message: '请选择组织形式' }], }, fileList: { title: '相关附件', diff --git a/apps/web-contract/src/views/contract/iframe-info/components/info-approval/info-approval.vue b/apps/web-contract/src/views/contract/iframe-info/components/info-approval/info-approval.vue index 6f088f87..322b39ec 100644 --- a/apps/web-contract/src/views/contract/iframe-info/components/info-approval/info-approval.vue +++ b/apps/web-contract/src/views/contract/iframe-info/components/info-approval/info-approval.vue @@ -13,10 +13,13 @@ import { getColumns, getFormSchema } from './curd'; const props = withDefaults( defineProps<{ + // flowInstanceId + flowInstanceId: string; contractId?: string; id?: string; }>(), { + flowInstanceId: '', id: '', contractId: '', }, @@ -72,7 +75,20 @@ const gridOptionsByAuditInfo = reactive( gridProps({ height: '200px', columns: getAuditInfoColumns({ readOnly: true }), - data: [], + proxyConfig: { + autoLoad: true, + ajax: { + query: async ({ page }) => { + let data = await Apis.flowCenter.get_history({ + params: { + appId: '66a8c15b79c96d4e77639404', + flowInstanceId: props.flowInstanceId, + }, + }); + return data; + }, + }, + }, toolbarConfig: { enabled: false, }, diff --git a/apps/web-contract/src/views/contract/iframe-info/index.vue b/apps/web-contract/src/views/contract/iframe-info/index.vue index 9bd0aaa4..a90cbc8c 100644 --- a/apps/web-contract/src/views/contract/iframe-info/index.vue +++ b/apps/web-contract/src/views/contract/iframe-info/index.vue @@ -29,6 +29,7 @@ const Track = defineAsyncComponent( const route = useRoute(); const type = route.query.type as string; const id = route.query.id as string; +const flowInstanceId = route.query.f as string; const contractId = route.query.contractId as string; const tabKey = ref('approval'); @@ -85,7 +86,12 @@ onMounted(() => { - + diff --git a/apps/web-contract/src/views/contract/schema.ts b/apps/web-contract/src/views/contract/schema.ts index 47434a1b..1eb484c7 100644 --- a/apps/web-contract/src/views/contract/schema.ts +++ b/apps/web-contract/src/views/contract/schema.ts @@ -90,36 +90,17 @@ export function getAuditInfoColumns( ): VxeGridPropTypes.Columns { return [ { type: 'seq', width: 50, align: 'center', fixed: 'left' }, - { field: 'contractId', title: '编号', width: 100 }, + // { field: 'contractId', title: '编号', width: 100 }, { - field: 'title', + field: 'taskName', title: '任务名称', minWidth: 200, - slots: { - default: ({ row }) => { - const text = row.title; - if (text) { - const classArr: string[] = ['line-clamp-3']; - return h( - Tooltip, - { trigger: 'hover' }, - { - trigger: () => h('span', { class: classArr.join(' ') }, text), - default: () => text, - }, - ); - } - return ''; - }, - }, }, - { field: 'contractAmount', title: '送审方式', width: 150 }, - { field: 'contractSubject', title: '审批级别', width: 200 }, - { field: 'contractCounterparty', title: '审批人', width: 150 }, - { field: 'cumulativeSettlementAmount', title: '送审时间', width: 150 }, - { field: 'changeCount', title: '审批时间', width: 100 }, - { field: 'contractStatus', title: '审批状态', width: 100 }, - { field: 'contractStatus', title: '审批意见', width: 100 }, + { field: 'assigneeId', title: '审批人', width: 150 }, + { field: 'startTime', title: '送审时间', width: 150 }, + { field: 'endTime', title: '审批时间', width: 150 }, + { field: 'type', title: '审批状态', width: 100 }, + { field: 'message', title: '审批意见', width: 100 }, ]; } diff --git a/apps/web-contract/src/views/contract/utils.ts b/apps/web-contract/src/views/contract/utils.ts index b3d46bc8..ca7f6a13 100644 --- a/apps/web-contract/src/views/contract/utils.ts +++ b/apps/web-contract/src/views/contract/utils.ts @@ -6,14 +6,14 @@ import { router } from '#/router'; * @param type * @param id */ -export function toDetail(type: string, id: string, params?: any) { +export function toDetail(type: string, id: string, row?: any) { switch (type) { case 'contractSetup': { router.push(`/contract/approval/edit/${id}`); break; } case 'selectMerchant': { - router.push(`/contract/business/edit/${id}`); + router.push(`/contract/business/edit/${row.contractId}`); break; } default: { @@ -28,7 +28,7 @@ export function toDetail(type: string, id: string, params?: any) { * @param id */ export function toDetailPage(type: string, id: string, params?: any) { - const { contractId } = params || {}; + const { contractId, flowInstanceId } = params || {}; const name = '合同详情'; // 网页名称,可为空; const iWidth = 1200; // 弹出窗口的宽度; const iHeight = 800; // 弹出窗口的高度; @@ -38,16 +38,36 @@ export function toDetailPage(type: string, id: string, params?: any) { const queryParams = new URLSearchParams(); if (type !== undefined) queryParams.append('type', type); + if (flowInstanceId !== undefined) queryParams.append('f', flowInstanceId); if (id !== undefined) queryParams.append('id', id); if (contractId !== undefined) queryParams.append('contractId', contractId); const url = `/iframe/contract/info?${queryParams.toString()}`; - window.open( - url, - name, - `height=${iHeight},innerHeight=${iHeight},width=${iWidth},innerWidth=${iWidth},top=${iTop},left=${iLeft},toolbar=no,menubar=no,scrollbars=auto,resizable=no,location=no,status=no`, - ); + // 5. 创建一个新的 标签 + const a = document.createElement('a'); + + // 6. 设置 标签的属性 + a.href = url; // 目标 URL + a.target = '_blank'; // 在新标签页中打开 + a.rel = 'noopener noreferrer'; // 增加安全性,防止新页面获取原页面的 window 对象 + + // 7. 隐藏 标签 + a.style.display = 'none'; // 设置为不可见 + + // 8. 将 标签添加到页面中 + document.body.appendChild(a); + + // 9. 模拟点击 标签 + a.click(); + + // 10. 点击完成后,移除 标签 + document.body.removeChild(a); + // window.open( + // url, + // name, + // `height=${iHeight},innerHeight=${iHeight},width=${iWidth},innerWidth=${iWidth},top=${iTop},left=${iLeft},toolbar=no,menubar=no,scrollbars=auto,resizable=no,location=no,status=no`, + // ); } /** diff --git a/apps/web-contract/vite.config.mts b/apps/web-contract/vite.config.mts index 8d532ae1..f74951c5 100644 --- a/apps/web-contract/vite.config.mts +++ b/apps/web-contract/vite.config.mts @@ -33,6 +33,34 @@ export default defineConfig(async () => { target: `http://192.168.147.164:8083/rl`, ws: true, }, + '/api/flowCenter': { + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), + // target: `http://10.71.220.24:8083/rl`, + target: `http://192.168.147.164:19007`, + ws: true, + }, + '/api/czg/flowCenter': { + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), + // target: `http://10.71.220.24:8083/rl`, + target: `http://192.168.147.164:19007`, + ws: true, + }, + '/api/zp/flowCenter': { + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), + // target: `http://10.71.220.24:8083/rl`, + target: `http://192.168.147.164:19007`, + ws: true, + }, + '/api/zzz/flowCenter': { + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api\/flowCenter/, '/flowCenter'), + // target: `http://10.71.220.24:8083/rl`, + target: `http://192.168.147.164:19007`, + ws: true, + }, '/api/czg/app': { changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/czg\/app/, '/'), diff --git a/apps/web-office/src/components/flow-record-table/flow-record-table.vue b/apps/web-office/src/components/flow-record-table/flow-record-table.vue new file mode 100644 index 00000000..e69de29b diff --git a/apps/web-office/src/utils/workflow.ts b/apps/web-office/src/utils/workflow.ts new file mode 100644 index 00000000..5f484b63 --- /dev/null +++ b/apps/web-office/src/utils/workflow.ts @@ -0,0 +1,37 @@ +import type { VxeGridPropTypes } from 'vxe-table'; + +import dayjs from 'dayjs'; + +import { useRender } from '#/hooks/useRender'; + +export const PrimaryKey = 'guid'; + +export function getFlowRecordColumns(_params: any = {}): VxeGridPropTypes.Columns { + return [ + { + field: 'flowNodeId', + title: '节点名称', + width: 200, + }, + { + field: 'taskName', + title: '操作', + width: 200, + }, + { + field: 'assigneeId', + title: '处理人', + width: 200, + }, + { + field: 'startTime', + title: '处理时间', + width: 200, + }, + { + field: 'type', + title: '处理意见', + width: 200, + }, + ]; +} diff --git a/apps/web-office/src/views/bussiness-trip/todo/index.vue b/apps/web-office/src/views/bussiness-trip/todo/index.vue index feb325a7..2b924091 100644 --- a/apps/web-office/src/views/bussiness-trip/todo/index.vue +++ b/apps/web-office/src/views/bussiness-trip/todo/index.vue @@ -116,6 +116,8 @@ const [TemporaryModal, temporaryModalApi] = useVbenModal({ }); async function handleAudit(row, type) { + const hideLoading = message.loading('加载中', 0); + selectRow.value = row; // 先查询相关节点信息 @@ -123,28 +125,38 @@ async function handleAudit(row, type) { params: { taskId: row.taskId }, }); nodeInfo.value = tempNodeInfo = tempNodeInfo.rows[0]; + hideLoading(); - chooseUserModalApi.setData({ - title: `选择${tempNodeInfo.name}(${tempNodeInfo.selectMode})`, - limitMultipleNum: tempNodeInfo.selectMode === '多选' ? 10 : 1, - userIds: chooseUserIds.value || [], - }); - - if (type === 'access') { - chooseUserModalApi.open(); - return; + if (nodeInfo.value && nodeInfo.value.name) { + chooseUserModalApi.setData({ + title: `选择${tempNodeInfo.name}(${tempNodeInfo.selectMode})`, + limitMultipleNum: tempNodeInfo.selectMode === '多选' ? 10 : 1, + userIds: chooseUserIds.value || [], + }); + if (type === 'access') { + chooseUserModalApi.open(); + return; + } + } else { + if (type === 'access') { + type = 'accessConfirm'; + } } if (type === 'accessConfirm') { try { + let form = { + guid: selectRow.value.guid, + variables: {}, + comment: '通过', + }; + if (tempNodeInfo && tempNodeInfo.tempNodeInfo) { + form.variables = { + [nodeInfo.value.variableName]: assigneeList.value, + }; + } await Apis.ccsq.post_submit({ - data: { - guid: selectRow.value.guid, - variables: { - [nodeInfo.value.variableName]: assigneeList.value, - }, - comment: '通过', - }, + data: form, }); message.success('提交成功'); triggerProxy('reload'); @@ -183,21 +195,29 @@ async function handleAudit(row, type) { }; temporaryModalApi.open(); - isConfirmLoading.value = true; + isConfirmLoading.value = false; } if (type === 'rejectConfirm') { - await Apis.ccsq.post_rollback({ - params: { - ...form2Ref.value.form, - guid: selectRow.value.guid, - backNodeId: 'userTask_first_node', - }, - }); - temporaryModalApi.close(); - isConfirmLoading.value = false; - triggerProxy('reload'); - triggerProxy2('reload'); + isConfirmLoading.value = true; + + try { + await Apis.ccsq.post_rollback({ + params: { + ...form2Ref.value.form, + guid: selectRow.value.guid, + backNodeId: 'userTask_first_node', + }, + }); + temporaryModalApi.close(); + isConfirmLoading.value = false; + triggerProxy('reload'); + triggerProxy2('reload'); + } catch (error) { + logger.error('出差审批退回出错', error); + } finally { + isConfirmLoading.value = false; + } } } diff --git a/apps/web-office/src/views/duty/list/duty-edit-modal.vue b/apps/web-office/src/views/duty/list/duty-edit-modal.vue index 63489270..da629683 100644 --- a/apps/web-office/src/views/duty/list/duty-edit-modal.vue +++ b/apps/web-office/src/views/duty/list/duty-edit-modal.vue @@ -243,6 +243,7 @@ function handleUserRowClick(row) { formRef.value?.setFormData({ [`${selectField.value}People`]: row.label, [`${selectField.value}Telphone`]: row.mobile, + [`${selectField.value}Phone`]: '', }); console.log(peoples); console.log(formRef.value?.form); diff --git a/apps/web-office/src/views/meeting/start/index.vue b/apps/web-office/src/views/meeting/start/index.vue index 7db3cc37..d7aa19a6 100644 --- a/apps/web-office/src/views/meeting/start/index.vue +++ b/apps/web-office/src/views/meeting/start/index.vue @@ -251,23 +251,23 @@ function checkOverflow() { {{ currData.meetingType }}
-
职工代表:
+
职工代表:
{{ currData.isEmployeeRepresentatives == 1 ? '是' : '否' }}
-
-
会议内容:
+
+
会议内容:
{{ currData.meetingContent }}
-
-
会议附件:
+
+
会议附件:
diff --git a/resource/apiDefinitions.ts b/resource/apiDefinitions.ts index db8b6490..3167cadc 100644 --- a/resource/apiDefinitions.ts +++ b/resource/apiDefinitions.ts @@ -1,6 +1,5 @@ -import type { BodyOptions, QueryOptions } from './global.d'; - import { http } from './request/index'; +import type { QueryOptions, BodyOptions } from './global.d'; export default { meeting: { @@ -173,6 +172,11 @@ export default { /** 协同办公/出差申请 下一审核节点 */ post_getNextNodeUserConfig: (data?: BodyOptions) => http.post('/app/ccsq/getNextNodeUserConfig', data), + /** 协同办公/出差申请 查看出差信息 */ + get_getBusinessTripInfo: (data?: QueryOptions) => + http.get('/app/ccsq/getBusinessTripInfo', data), + /** 协同办公/出差申请 查看审核过程 */ + get_history: (data?: QueryOptions) => http.get('/app/ccsq/history', data), }, orderfood: { /** 协同办公/订餐管理/订餐 订餐加载接口 */ @@ -828,12 +832,15 @@ export default { /** 合同系统/签约授权 查询单条签约授权数据 */ get_getOne: (data?: QueryOptions) => http.get('/app/sqConsignPt/getOne', data), - /** 合同系统/签约授权 签约授权提交 */ + /** 合同系统/签约授权 签约授权提交(非待办提交) */ post_flowStart: (data?: BodyOptions) => http.post('/app/sqConsignPt/flowStart', data), /** 合同系统/签约授权 删除 */ post_deletes: (data?: BodyOptions) => http.post('/app/sqConsignPt/deletes', data), + /** 合同系统/签约授权 签约授权提交 */ + post_submit: (data?: BodyOptions) => + http.post('/app/sqConsignPt/submit', data), }, addressorsort: { /** 协同办公/会议管理/发言人顺序配置 发言人顺序查询 */ @@ -846,4 +853,73 @@ export default { post_deletes: (data?: BodyOptions) => http.post('/app/addressorsort/deletes', data), }, + equInfo: { + /** 设备管理/设备静态库管理/ 设备信息维护 设备信息保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equInfo/save', data), + /** 设备管理/设备静态库管理/ 设备信息维护 设备信息(获取/查询) */ + get_page: (data?: QueryOptions) => http.get('/app/equInfo/page', data), + /** 设备管理/设备静态库管理/ 设备信息维护 设备信息删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equInfo/deletes', data), + }, + equAllot: { + /** 设备管理/查询管理/设备调拨查询 保存 */ + get_page: (data?: QueryOptions) => http.get('/app/equAllot/page', data), + /** 设备管理/查询管理/设备调拨查询 保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equAllot/save', data), + /** 设备管理/设备静态库管理/设备调拨 调拨信息删除 */ + post_delete: (data?: BodyOptions) => + http.post('/app/equAllot/delete', data), + /** 设备管理/查询管理/设备调拨查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equAllot/deletes', data), + }, + bidding: { + /** 合同系统/标段信息 标段查询 */ + get_list: (data?: QueryOptions) => http.get('/app/bidding/list', data), + /** 合同系统/标段信息 标段信息保存(弃用,在选商中报错) */ + post_save: (data?: BodyOptions) => http.post('/app/bidding/save', data), + /** 合同系统/标段信息 标段信息删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/bidding/deletes', data), + }, + equAccident: { + /** 设备管理/查询管理/事故处理查询 事故处理(查询/获取) */ + get_page: (data?: QueryOptions) => http.get('/app/equAccident/page', data), + /** 设备管理/查询管理/事故处理查询 保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equAccident/save', data), + /** 设备管理/查询管理/事故处理查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equAccident/deletes', data), + }, + equStopRepair: { + /** 设备管理/查询管理/停炉检修处理查询 查询 */ + get_page: (data?: QueryOptions) => + http.get('/app/equStopRepair/page', data), + /** 设备管理/查询管理/停炉检修处理查询 保存 */ + post_save: (data?: BodyOptions) => + http.post('/app/equStopRepair/save', data), + /** 设备管理/查询管理/停炉检修处理查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equStopRepair/deletes', data), + }, + equDanger: { + /** 设备管理/查询管理/隐患排查处理查询 查询 */ + get_page: (data?: QueryOptions) => http.get('/app/equDanger/page', data), + /** 设备管理/查询管理/隐患排查处理查询 保存 */ + post_save: (data?: BodyOptions) => http.post('/app/equDanger/save', data), + /** 设备管理/查询管理/隐患排查处理查询 删除 */ + post_deletes: (data?: BodyOptions) => + http.post('/app/equDanger/deletes', data), + }, + equDayRepair: { + /** 设备管理/查询管理/日常维修查询 查询 */ + get_page: (data?: QueryOptions) => http.get('/app/equDayRepair/page', data), + /** 设备管理/查询管理/日常维修查询 保存 */ + post_save: (data?: BodyOptions) => + http.post('/app/equDayRepair/save', data), + /** 设备管理/查询管理/日常维修查询 删除 */ + get_deletes: (data?: QueryOptions) => + http.get('/app/equDayRepair/deletes', data), + }, }; From dc87bbca614a301466a777066a1b966af48f4cd4 Mon Sep 17 00:00:00 2001 From: z9130 <984661593@qq.com> Date: Thu, 10 Oct 2024 17:24:57 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=90=88=E5=90=8C=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E5=B7=B2=E5=8A=9E=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../src/router/routes/modules/contract.ts | 6 - .../src/utils/dict/static.data.js | 4 - .../contract/business/edit/bid-columns.tsx | 26 +- .../src/views/contract/business/edit/curd.tsx | 91 +- .../views/contract/business/edit/index.vue | 98 +- .../views/contract/business/result/index.vue | 42 +- .../src/views/contract/company/list/crud.tsx | 18 +- .../components/todo-page/todo-page.vue | 18 +- .../web-contract/src/views/contract/schema.ts | 8 +- apps/web-contract/src/views/contract/utils.ts | 22 - .../src/views/user-center/todo/index.vue | 26 +- apps/web-contract/vite.config.mts | 26 +- .../src/views/duty/list/duty-edit-modal.vue | 2 +- .../views/system/user/choose-user-modal.vue | 1 + resource/apiDefinitions.ts | 1608 +++++++---------- 16 files changed, 972 insertions(+), 1026 deletions(-) diff --git a/README.md b/README.md index f31db442..a86a97fc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ ```shell -generate-api --swagger_url=http://127.0.0.1:4523/export/openapi/2?version=3.0 --template ./resource/apiDefinitions.ejs --output_dir ./resource --type path --prefix_to_filter / +generate-api --swagger_url="http://127.0.0.1:4523/export/openapi?projectId=4582192&specialPurpose=openapi-generator" --template ./resource/apiDefinitions.ejs --output_dir ./resource --type path --prefix_to_filter / ``` diff --git a/apps/web-contract/src/router/routes/modules/contract.ts b/apps/web-contract/src/router/routes/modules/contract.ts index 681464bf..ece413c5 100644 --- a/apps/web-contract/src/router/routes/modules/contract.ts +++ b/apps/web-contract/src/router/routes/modules/contract.ts @@ -92,12 +92,6 @@ const routes: RouteRecordRaw[] = [ { name: 'ContractBusinessEdit', path: '/contract/business/edit/:id?', - beforeEnter: (e) => { - if (e.params.id && e.params.id === ':id') { - e.params.id = ''; - e.fullPath = '/contract/business/edit'; - } - }, component: () => import('#/views/contract/business/edit/index.vue'), meta: { hideInMenu: true, diff --git a/apps/web-contract/src/utils/dict/static.data.js b/apps/web-contract/src/utils/dict/static.data.js index da33261d..f726742c 100644 --- a/apps/web-contract/src/utils/dict/static.data.js +++ b/apps/web-contract/src/utils/dict/static.data.js @@ -99,11 +99,7 @@ export default { // 合同待办类型 contract_todo_type: createEntry('合同待办类型', [ { label: '合同立项', value: 'contractSetup' }, - { label: '合同立项废除', value: 'contractSetupAbolish' }, { label: '合同选商', value: 'selectMerchant' }, - { label: '合同选商废除', value: 'selectMerchantAbolish' }, - { label: '合同选商结果', value: 'selectMerchantResult' }, - { label: '合同选商结果废除', value: 'selectMerchantResultAbolish' }, { label: '合同申报', value: 'contractDeclare' }, { label: '合同签订', value: 'contractSign' }, { label: '合同履行', value: 'contractPerform' }, diff --git a/apps/web-contract/src/views/contract/business/edit/bid-columns.tsx b/apps/web-contract/src/views/contract/business/edit/bid-columns.tsx index e9cb3523..7ff8403d 100644 --- a/apps/web-contract/src/views/contract/business/edit/bid-columns.tsx +++ b/apps/web-contract/src/views/contract/business/edit/bid-columns.tsx @@ -2,6 +2,12 @@ import type { VxeGridPropTypes } from 'vxe-table'; export function getBidColumns(_params?: any): VxeGridPropTypes.Columns { const columns: VxeGridPropTypes.Columns = [ + { + field: 'operate', + title: '操作', + width: 120, + slots: { default: 'operate-slot' }, + }, { type: 'seq', width: 50, @@ -29,13 +35,6 @@ export function getBidColumns(_params?: any): VxeGridPropTypes.Columns { minWidth: 300, slots: { default: 'phasedesc-slot' }, }, - { - field: 'operate', - title: '操作', - width: 120, - slots: { default: 'operate-slot' }, - fixed: 'right', - }, ]; return columns; @@ -43,31 +42,42 @@ export function getBidColumns(_params?: any): VxeGridPropTypes.Columns { export function getProviderColumns(_params?: any): VxeGridPropTypes.Columns { const columns: VxeGridPropTypes.Columns = [ + { + field: 'operate', + title: '操作', + width: 120, + slots: { default: 'operate-slot' }, + }, { field: 'providerName', title: '供应商名称', - width: 200, + width: 250, }, { field: 'qualification', title: '资质情况', width: 200, + slots: { default: 'qualification-slot' }, }, { field: 'contactPerson', title: '联系人', width: 150, + slots: { default: 'contactPerson-slot' }, }, { field: 'contactPhone', title: '联系电话', width: 150, + slots: { default: 'contactPhone-slot' }, }, { field: 'remarks', title: '备注', minWidth: 200, + slots: { default: 'remarks-slot' }, }, + ]; return columns; diff --git a/apps/web-contract/src/views/contract/business/edit/curd.tsx b/apps/web-contract/src/views/contract/business/edit/curd.tsx index 4fdf6954..b7f7f2b8 100644 --- a/apps/web-contract/src/views/contract/business/edit/curd.tsx +++ b/apps/web-contract/src/views/contract/business/edit/curd.tsx @@ -14,13 +14,36 @@ const [ChooseCompanyModal, chooseCompanyModalApi] = useVbenModal({ connectedComponent: chooseCompanyModal, }); -export function getFormSchema(params: any = {}) { - const { formRef, dictMap = {} } = params; +const xGridRefs = ref>(new Map()); - const xGridRef = ref(); +const gridRefs = ref>(new Map()); + +export function getExtraData() { + // let tempBiddingList = xGridRef.value.getTableData().fullData; + // console.log(gridRefs.value); + + for (const [key, value] of xGridRefs.value) { + console.log(`Key: ${key}, Value: ${value}`); + let xRef = value; + console.log(xRef.getTableData().fullData); + } + + for (const [key, value] of gridRefs.value) { + console.log(`Key: ${key}, Value: ${value}`); + let xRef = value; + console.log(xRef.getTableData().fullData); + } + + return { + biddingList: [], + }; +} +export function getFormSchema(params: any = {}) { + let { formRef, dictMap = {}, bidList = [] } = params; /** Hooks - 表格 */ const gridOptions = { + showOverflow: true, columns: getBidColumns({ readOnly: false }), data: [], toolbarConfig: { @@ -55,15 +78,13 @@ export function getFormSchema(params: any = {}) { }, }; - const gridRefs = ref>(new Map()); - return { col: { span: 24 }, initialForm: { contractName: '', priceType: 'CNY', isBid: '0', - budgetSum2: 0, + bidNum: 2, }, labelCol: { style: { width: '120px' } }, columns: { @@ -209,29 +230,30 @@ export function getFormSchema(params: any = {}) { class="min-w-[180px]" onChange={(value) => { // 获取当前表格的全部数据 - const { fullData } = xGridRef.value.getTableData(); + let fullData = bidList; const currentLength = fullData.length; if (value < currentLength) { // 删除多余的行(从 value 开始的行) - const rowsToRemove = fullData.slice(value); - xGridRef.value.remove(rowsToRemove); + fullData = fullData.slice(0, value); } else if (value > currentLength) { // 插入新的行数据 const rowsToAdd = Array.from({ length: value - currentLength, }).map((_, i) => ({ - id: currentLength + i + 1, - bidName: `第${currentLength + i + 1}标段`, + phaseSeq: currentLength + i + 1, + phaseName: `第${currentLength + i + 1}标段`, + phaseMoney: null, + phaseDesc: '', providerList: [], })); - xGridRef.value.insertAt(rowsToAdd, -1); + fullData = [...fullData, ...rowsToAdd]; } - xGridRef.value.setAllRowExpand(true); + bidList = fullData; }} options={options2} - v-model:value={form.budgetSum2} + v-model:value={form.bidNum} />
@@ -242,16 +264,17 @@ export function getFormSchema(params: any = {}) { class="mt-2" style={{ display: - form.isBid === '1' && form.budgetSum2 > 0 - ? 'block' - : 'none', + form.isBid === '1' && form.bidNum > 0 ? 'block' : 'none', }} > - + el && xGridRefs.value.set(row.id, el)} + {...gridOptions} + > {{ 'bidname-slot': ({ row }: any) => ( - + ), 'phasemoney-slot': ({ row }: any) => ( el && gridRefs.value.set(row.id, el)} {...gridOptionsByProvider} - /> + > + {{ + 'qualification-slot': ({ row }: any) => ( + + ), + 'contactPerson-slot': ({ row }: any) => ( + + ), + 'contactPhone-slot': ({ row }: any) => ( + + ), + 'remarks-slot': ({ row }: any) => ( + + ), + 'operate-slot': ({ row }: any) => ( + { + const xGridRef = gridRefs.value.get(id); + xGridRef && xGridRef.remove(row); + }} + > + 移除 + + ), + }} + ), 'operate-slot': ({ row }: any) => ( (null); /** Hooks - 表格 */ const gridOptions = reactive( @@ -118,7 +118,8 @@ function handleDelete() { }); } -const collapses = ['1', '2', '3', '4']; +// const collapses = ['1', '2', '3', '4']; +const collapses = ['3', '4']; const collapseActiveKey = ref(collapses); function areArraysEqualUnordered(arr1, arr2) { if (arr1.length !== arr2.length) return false; @@ -154,24 +155,23 @@ async function handleAudit( title: '提示', content: '是否确认审核通过?', onOk: async () => { - try { - await Apis.selectMerchantsBasicInfo.post_submit({ - params: { - guid: selectMerchantsBasicInfoId.value, - }, - data: { - appId: id.value, - taskId: currData.value.taskId, - nodeId: '', - comment: '通过', - }, - }); - message.success('审核通过'); - back(); - } catch (error) { + const [error, _] = await Apis.selectMerchantsBasicInfo.post_submit({ + params: { + guid: selectMerchantsBasicInfoId.value, + }, + data: { + appId: id.value, + taskId: currData.value.taskId, + nodeId: '', + comment: '通过', + }, + }); + if (error) { logger.error('审核通过失败', error); message.error('审核通过失败,请稍候再试'); + return; } + message.success('审核通过'); }, }); } @@ -231,6 +231,12 @@ async function handleAudit( } async function handleSave() { + console.log(formRefByBaseInfo.value.form); + + console.log(formRef.value.form); + + console.log(getExtraData()); + return; isLoading.value = true; try { @@ -416,13 +422,14 @@ const contractData = ref({}); const businessData = ref({}); const auditId = ref(); +const dictMap = ref({}); onMounted(async () => { isLoading.value = true; try { if (id.value) { - const dictMap = await getDictDatasAsync([ + dictMap.value = await getDictDatasAsync([ DICT_TYPE.contract_authorization_period, DICT_TYPE.comprehensive_project_name, DICT_TYPE.contract_price_style, @@ -432,13 +439,12 @@ onMounted(async () => { DICT_TYPE.section_num, DICT_TYPE.contract_price_style, ]); - console.log(dictMap); const contractReferTypeData: any = await Apis.contractReferType.get_list({ params: {}, }); contractTypeData.value = contractReferTypeData.rows || []; - formBinding.value = getFormSchema({ formRef, dictMap }); + formBinding.value = getFormSchema({ formRef, dictMap: dictMap.value }); formBindingByBaseInfo.value.columns = getFormSchemaByBaseInfo({ contractTypeData: contractTypeData.value, @@ -470,6 +476,9 @@ onMounted(async () => { const files = await fileUploader.select(business.fileUuid); business.fileList = files; } + + business.isBid = '1'; + business.bidNum = 2; businessData.value = business; nextTick(() => { @@ -560,7 +569,12 @@ onMounted(async () => {
- + { - + - - + + + + - + {
- + { - + - + - + - + - + { + return useRender.renderDate(row.applyTime, 'YYYY-MM-DD'); + }, + }, + }, + { field: 'inputDepartName', title: '备注', width: 150 }, ]; } return [ diff --git a/apps/web-contract/src/views/contract/components/todo-page/todo-page.vue b/apps/web-contract/src/views/contract/components/todo-page/todo-page.vue index 33127732..af48ab8d 100644 --- a/apps/web-contract/src/views/contract/components/todo-page/todo-page.vue +++ b/apps/web-contract/src/views/contract/components/todo-page/todo-page.vue @@ -7,7 +7,7 @@ import { Page } from '@vben/common-ui'; import Apis from '#/api'; import { useVxeTable } from '#/hooks/vxeTable'; import { getTodoColumns } from '#/views/contract/schema'; -import { toDetail, toDetailPage } from '#/views/contract/utils'; +import { toDetailPage } from '#/views/contract/utils'; const props = withDefaults( defineProps<{ @@ -80,6 +80,22 @@ const grid2Options = reactive( }), ); +function toDetail(type: string, id: string, row?: any) { + switch (type) { + case 'contractSetup': { + router.push(`/contract/approval/edit/${id}`); + break; + } + case 'selectMerchant': { + router.push(`/contract/business/edit/${row.contractId}`); + break; + } + default: { + break; + } + } +} + onMounted(() => {}); // 页面打开后获取列表数据 diff --git a/apps/web-contract/src/views/contract/schema.ts b/apps/web-contract/src/views/contract/schema.ts index 1eb484c7..4c87a402 100644 --- a/apps/web-contract/src/views/contract/schema.ts +++ b/apps/web-contract/src/views/contract/schema.ts @@ -16,13 +16,13 @@ export function getTodoColumns(_params: any = {}): VxeGridPropTypes.Columns { { field: 'contractName', title: '名称', - minWidth: 200, + minWidth: 250, slots: { default: 'title_slot' }, }, { field: 'module', title: '模块', - width: 150, + width: 120, slots: { default: ({ row }) => { return ( @@ -52,11 +52,11 @@ export function getApprovalColumns( ): VxeGridPropTypes.Columns { return [ { type: 'seq', width: 50, align: 'center', fixed: 'left' }, - { field: 'contractId', title: '编号', width: 100 }, + { field: 'contractId', title: '编号', width: 150 }, { field: 'title', title: '任务名称', - minWidth: 200, + minWidth: 250, slots: { default: ({ row }) => { const text = row.title; diff --git a/apps/web-contract/src/views/contract/utils.ts b/apps/web-contract/src/views/contract/utils.ts index ca7f6a13..ec1a9e24 100644 --- a/apps/web-contract/src/views/contract/utils.ts +++ b/apps/web-contract/src/views/contract/utils.ts @@ -1,26 +1,4 @@ import Apis from '#/api'; -import { router } from '#/router'; - -/** - * 前往详情页 - * @param type - * @param id - */ -export function toDetail(type: string, id: string, row?: any) { - switch (type) { - case 'contractSetup': { - router.push(`/contract/approval/edit/${id}`); - break; - } - case 'selectMerchant': { - router.push(`/contract/business/edit/${row.contractId}`); - break; - } - default: { - break; - } - } -} /** * 前往详情页 diff --git a/apps/web-contract/src/views/user-center/todo/index.vue b/apps/web-contract/src/views/user-center/todo/index.vue index 760043c9..ffafd402 100644 --- a/apps/web-contract/src/views/user-center/todo/index.vue +++ b/apps/web-contract/src/views/user-center/todo/index.vue @@ -7,7 +7,10 @@ import Apis from '#/api'; import { useVxeTable } from '#/hooks/vxeTable'; import { DICT_TYPE, getDictOptions } from '#/utils/dict'; import { getTodoColumns } from '#/views/contract/schema'; -import { toDetail, toDetailPage } from '#/views/contract/utils'; +import { toDetailPage } from '#/views/contract/utils'; +import { useRouter } from 'vue-router'; + +const router = useRouter(); const { xGridRef, triggerProxy, gridProps } = useVxeTable({ ref: 'xGridRef' }); const { xGridRef: xGrid2Ref, triggerProxy: triggerProxy2 } = useVxeTable({ @@ -89,6 +92,22 @@ async function loadDataByDictType() { treeData.value = [{ title: '全部', key: 'all', children: data }]; } +function toDetail(type: string, id: string, row?: any) { + switch (type) { + case 'contractSetup': { + router.push(`/contract/approval/edit/${id}`); + break; + } + case 'selectMerchant': { + router.push(`/contract/business/edit/${row.contractId}`); + break; + } + default: { + break; + } + } +} + onMounted(() => { loadDataByDictType(); }); @@ -150,6 +169,11 @@ onMounted(() => { > +