From e8db1b5b7c29c486949e998b1129b79eaba604b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Tue, 10 Mar 2026 15:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=ADlng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract/ContractPurLng/index.ts | 90 +++ .../model/ContractPurLngModel.ts | 50 ++ .../components/ContractPurLngModal.vue | 110 ++++ .../ContractPurLng/components/Form.vue | 224 ++++++++ .../ContractPurLng/components/config.ts | 486 ++++++++++++++++ .../ContractPurLng/components/createForm.vue | 508 +++++++++++++++++ .../components/workflowPermission.ts | 122 ++++ src/views/contract/ContractPurLng/index.vue | 530 ++++++++++++++++++ 8 files changed, 2120 insertions(+) create mode 100644 src/api/contract/ContractPurLng/index.ts create mode 100644 src/api/contract/ContractPurLng/model/ContractPurLngModel.ts create mode 100644 src/views/contract/ContractPurLng/components/ContractPurLngModal.vue create mode 100644 src/views/contract/ContractPurLng/components/Form.vue create mode 100644 src/views/contract/ContractPurLng/components/config.ts create mode 100644 src/views/contract/ContractPurLng/components/createForm.vue create mode 100644 src/views/contract/ContractPurLng/components/workflowPermission.ts create mode 100644 src/views/contract/ContractPurLng/index.vue diff --git a/src/api/contract/ContractPurLng/index.ts b/src/api/contract/ContractPurLng/index.ts new file mode 100644 index 0000000..14d8af1 --- /dev/null +++ b/src/api/contract/ContractPurLng/index.ts @@ -0,0 +1,90 @@ +import { LngContractPageModel, LngContractPageParams, LngContractPageResult } from './model/ContractPurLngModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/contract/contractPurLng/page', + List = '/contract/contractPurLng/list', + Info = '/contract/contractPurLng/info', + LngContract = '/contract/contractPurLng', + + + + + DataLog = '/contract/contractPurLng/datalog', +} + +/** + * @description: 查询LngContract分页列表 + */ +export async function getLngContractPage(params: LngContractPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngContract信息 + */ +export async function getLngContract(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngContract + */ +export async function addLngContract(lngContract: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngContract, + params: lngContract, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngContract + */ +export async function updateLngContract(lngContract: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngContract, + params: lngContract, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngContract(批量删除) + */ +export async function deleteLngContract(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngContract, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/contract/ContractPurLng/model/ContractPurLngModel.ts b/src/api/contract/ContractPurLng/model/ContractPurLngModel.ts new file mode 100644 index 0000000..1ec4aee --- /dev/null +++ b/src/api/contract/ContractPurLng/model/ContractPurLngModel.ts @@ -0,0 +1,50 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngContract分页参数 模型 + */ +export interface LngContractPageParams extends BasicPageParams { + id: string; + + kNo: string; + + kName: string; + + cpName: string; + + dateFrom: string; + + dateTo: string; + + comId: string; + + approCode: string; +} + +/** + * @description: LngContract分页返回值模型 + */ +export interface LngContractPageModel { + id: string; + + kNo: string; + + kName: string; + + cpName: string; + + dateFrom: string; + + dateTo: string; + + comId: string; + + approCode: string; +} + +0; + +/** + * @description: LngContract分页返回值结构 + */ +export type LngContractPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/ContractPurLngModal.vue b/src/views/contract/ContractPurLng/components/ContractPurLngModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/ContractPurLngModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/Form.vue b/src/views/contract/ContractPurLng/components/Form.vue new file mode 100644 index 0000000..6ccca44 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/Form.vue @@ -0,0 +1,224 @@ + + \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/config.ts b/src/views/contract/ContractPurLng/components/config.ts new file mode 100644 index 0000000..f74d087 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/config.ts @@ -0,0 +1,486 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'dateFrom', + label: '有效期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, + { + field: 'kName', + label: '合同号/名称', + component: 'Input', + }, + { + field: 'cpName', + label: '供应商', + component: 'Input', + }, + { + field: 'comId', + label: '合同主体', + component: 'Select', + componentProps: { + showSearch: true, + optionFilterProp: 'label', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }, + options: [ + // { label: '全部', value: '' }, + ], + placeholder: '请选择', + allowClear: true, + + getPopupContainer: () => document.body, + }, + }, + { + field: 'approCode', + label: '审批状态', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '1990669393069129729' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + }, +]; + +export const columns: BasicColumn[] = [ + { + dataIndex: 'kNo', + title: '合同号', + componentType: 'input', + align: 'left', + width: 200, + sorter: true, + }, + + { + dataIndex: 'kName', + title: '合同名称', + componentType: 'input', + align: 'left', + width: 250, + sorter: true, + }, + + { + dataIndex: 'cpName', + title: '供应商', + componentType: 'input', + align: 'left', + width: 150, + sorter: true, + }, + + { + dataIndex: 'dateFrom', + title: '有效期开始', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + + { + dataIndex: 'dateTo', + title: '有效期结束', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + + { + dataIndex: 'comId', + title: '合同主体', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + + { + dataIndex: 'approCode', + title: '状态', + componentType: 'select', + align: 'left', + width: 80, + sorter: true, + }, +]; +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; +export const formProps: FormProps = { + labelCol: { span: 3, offset: 0 }, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: '50402ed57f3d4638980b14dc48745da8', + field: 'id', + label: 'id', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入id', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '0690cd799b9a453f887c615e745ecec8', + field: 'kNo', + label: '合同号', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入合同号', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '5caa2a5cf9ae4c799e7059d1fe19a2c1', + field: 'kName', + label: '合同名称', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入合同名称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '46253e7e8c6e48fdb1a5b790551e68ac', + field: 'cpName', + label: '供应商', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入供应商', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'be6d87b093f24ef087067bcc8ba8ff3d', + field: 'dateFrom', + label: '有效期开始', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入有效期开始', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '5cdc1bbb995b413f88ad1758157770e8', + field: 'dateTo', + label: '有效期结束', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入有效期结束', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'dc2c739a59c348c1b5017af73c86cc88', + field: 'comId', + label: '合同主体', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入合同主体', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '97ffb13559eb4726bc2cc8436ee5eac5', + field: 'approCode', + label: '审批状态', + type: 'select', + component: 'XjrSelect', + colProps: { span: 24 }, + componentProps: { + width: '100%', + span: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请选择下拉选择审批状态', + sepTextField: '', + showLabel: true, + showSearch: false, + clearable: false, + disabled: true, + mode: '', + staticOptions: [ + { key: 1, label: 'Option 1', value: 'Option 1' }, + { key: 2, label: 'Option 2', value: 'Option 2' }, + { key: 3, label: 'Option 3', value: 'Option 3' }, + ], + defaultSelect: 'WTJ', + datasourceType: 'dic', + params: { itemId: '1990669393069129729' }, + labelField: 'name', + valueField: 'value', + apiConfig: { + path: 'CodeGeneration/selection', + method: 'GET', + apiId: '93d735dcb7364a0f8102188ec4d77ac7', + }, + dicOptions: [], + required: false, + rules: [], + events: {}, + isShow: true, + itemId: '1990669393069129729', + style: { width: '100%' }, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/createForm.vue b/src/views/contract/ContractPurLng/components/createForm.vue new file mode 100644 index 0000000..1e63c35 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/createForm.vue @@ -0,0 +1,508 @@ + + + + + diff --git a/src/views/contract/ContractPurLng/components/workflowPermission.ts b/src/views/contract/ContractPurLng/components/workflowPermission.ts new file mode 100644 index 0000000..d936a92 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/workflowPermission.ts @@ -0,0 +1,122 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: 'id', + fieldId: 'id', + isSubTable: false, + showChildren: true, + type: 'input', + key: '50402ed57f3d4638980b14dc48745da8', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '合同号', + fieldId: 'kNo', + isSubTable: false, + showChildren: true, + type: 'input', + key: '0690cd799b9a453f887c615e745ecec8', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '合同名称', + fieldId: 'kName', + isSubTable: false, + showChildren: true, + type: 'input', + key: '5caa2a5cf9ae4c799e7059d1fe19a2c1', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '供应商', + fieldId: 'cpName', + isSubTable: false, + showChildren: true, + type: 'input', + key: '46253e7e8c6e48fdb1a5b790551e68ac', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '有效期开始', + fieldId: 'dateFrom', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'be6d87b093f24ef087067bcc8ba8ff3d', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '有效期结束', + fieldId: 'dateTo', + isSubTable: false, + showChildren: true, + type: 'input', + key: '5cdc1bbb995b413f88ad1758157770e8', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '合同主体', + fieldId: 'comId', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'dc2c739a59c348c1b5017af73c86cc88', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '审批状态', + fieldId: 'approCode', + isSubTable: false, + showChildren: true, + type: 'select', + key: '97ffb13559eb4726bc2cc8436ee5eac5', + children: [], + }, +]; \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/index.vue b/src/views/contract/ContractPurLng/index.vue new file mode 100644 index 0000000..0febf19 --- /dev/null +++ b/src/views/contract/ContractPurLng/index.vue @@ -0,0 +1,530 @@ + + + \ No newline at end of file