From fa527fc312706cdb9e2b39460820bbd98a3dad8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Thu, 5 Feb 2026 10:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E6=9F=A5=E8=AF=A2=E3=80=81?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContractFact/components/createForm.vue | 14 +++++- .../ContractPurInt/components/createForm.vue | 20 ++++++-- .../ContractPurPng/components/config.ts | 47 +++++++++++-------- .../ContractPurPng/components/createForm.vue | 22 +++++++-- src/views/contract/ContractPurPng/index.vue | 41 +++++++++++++--- .../ContractSales/components/config.ts | 34 ++++++++++++-- .../ContractSales/components/createForm.vue | 21 +++++++-- src/views/contract/ContractSales/index.vue | 41 +++++++++++++--- .../ContractSalesLng/components/config.ts | 43 ++++++++++++++++- .../components/createForm.vue | 21 +++++++-- src/views/contract/ContractSalesLng/index.vue | 41 +++++++++++++--- 11 files changed, 285 insertions(+), 60 deletions(-) diff --git a/src/views/contract/ContractFact/components/createForm.vue b/src/views/contract/ContractFact/components/createForm.vue index 0b90598..c4fd2b4 100644 --- a/src/views/contract/ContractFact/components/createForm.vue +++ b/src/views/contract/ContractFact/components/createForm.vue @@ -454,8 +454,18 @@ } const dateChange = (val, k) => { if (!val) { - k=='dateFrom' && (formState.dateFrom = null) - k=='dateTo' && (formState.dateTo = null) + if (k=='dateFrom') { + formState.dateFrom = dayjs(new Date()) + setTimeout(() => { + formState.dateFrom = null + }, ); + } + if (k=='dateTo') { + formState.dateTo = dayjs(new Date()) + setTimeout(() => { + formState.dateTo = null + }, ); + } } } const disabledDateStart = (startValue) => { diff --git a/src/views/contract/ContractPurInt/components/createForm.vue b/src/views/contract/ContractPurInt/components/createForm.vue index a1ff320..8753311 100644 --- a/src/views/contract/ContractPurInt/components/createForm.vue +++ b/src/views/contract/ContractPurInt/components/createForm.vue @@ -91,7 +91,7 @@ - @@ -334,9 +334,9 @@ const formState = reactive({ approCode: 'WTJ', - typeCode: 'SP', + typeCode: 'PI', onlineSign: 'N', - cpTableName: 'lng_customer', + cpTableName: 'lng_supplier', lngContractPurIntList: [{}] }); const [register, { openModal:openModal}] = useModal(); @@ -532,8 +532,18 @@ } const dateChange = (val, k) => { if (!val) { - k=='dateFrom' && (formState.dateFrom = null) - k=='dateTo' && (formState.dateTo = null) + if (k=='dateFrom') { + formState.dateFrom = dayjs(new Date()) + setTimeout(() => { + formState.dateFrom = null + }, ); + } + if (k=='dateTo') { + formState.dateTo = dayjs(new Date()) + setTimeout(() => { + formState.dateTo = null + }, ); + } } } const disabledDateStart = (startValue) => { diff --git a/src/views/contract/ContractPurPng/components/config.ts b/src/views/contract/ContractPurPng/components/config.ts index d9aeffa..ae22b72 100644 --- a/src/views/contract/ContractPurPng/components/config.ts +++ b/src/views/contract/ContractPurPng/components/config.ts @@ -6,7 +6,16 @@ export const formConfig = { }; export const searchFormSchema: FormSchema[] = [ - + { + field: 'dateFrom', + label: '有效期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, { field: 'kName', label: '合同号/名称', @@ -17,29 +26,29 @@ export const searchFormSchema: FormSchema[] = [ label: '供应商', component: 'Input', }, - { - field: 'comId', - label: '合同主体', - component: 'Input', - }, { field: 'pointUpName', label: '上载点', component: 'Input', - // componentProps: { - // showSearch: true, - // optionFilterProp: 'label', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; - // }, - // options: [ - // // { label: '全部', value: '' }, - // ], - // placeholder: '请选择', - // allowClear: true, + }, + { + 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, - // }, + getPopupContainer: () => document.body, + }, }, { field: 'approCode', diff --git a/src/views/contract/ContractPurPng/components/createForm.vue b/src/views/contract/ContractPurPng/components/createForm.vue index 53cc32a..6fcf2c8 100644 --- a/src/views/contract/ContractPurPng/components/createForm.vue +++ b/src/views/contract/ContractPurPng/components/createForm.vue @@ -25,12 +25,12 @@ - + - + @@ -243,7 +243,7 @@ onlineSign: 'N', cpTableName: 'lng_supplier', curCode: 'CNY', - lngContractPurPngList: [{}] + lngContractPurPngList: [{}], }); const [register, { openModal:openModal}] = useModal(); const [registerDept, { openModal:openModalDept}] = useModal(); @@ -390,6 +390,22 @@ const getApproContractFactList = (val) => { dataListContractFact.value = val } + const dateChange = (val, k) => { + if (!val) { + if (k=='dateFrom') { + formState.dateFrom = dayjs(new Date()) + setTimeout(() => { + formState.dateFrom = null + }, ); + } + if (k=='dateTo') { + formState.dateTo = dayjs(new Date()) + setTimeout(() => { + formState.dateTo = null + }, ); + } + } + } const disabledDateStart = (startValue) => { const endValue = formState?.dateTo; if (!startValue || !endValue) { diff --git a/src/views/contract/ContractPurPng/index.vue b/src/views/contract/ContractPurPng/index.vue index 746bc72..94dbca1 100644 --- a/src/views/contract/ContractPurPng/index.vue +++ b/src/views/contract/ContractPurPng/index.vue @@ -58,6 +58,7 @@ import useEventBus from '/@/hooks/event/useEventBus'; import { cloneDeep } from 'lodash-es'; import { useUserStore } from '/@/store/modules/user'; + import { getAllCom} from '/@/api/contract/ContractPurInt'; const userStore = useUserStore(); const userInfo = userStore.getUserInfo; @@ -76,7 +77,7 @@ const tableRef = ref(); //所有按钮 - const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]); + const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]); //展示在列表内的按钮 const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'approve', 'update']); const buttonConfigs = computed(()=>{ @@ -91,7 +92,7 @@ return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); }); - const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove} + const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove, datalog : handleDatalog} const { currentRoute } = useRouter(); const router = useRouter(); @@ -124,7 +125,7 @@ gutter: 16, }, schemas: customSearchFormSchema, - fieldMapToTime: [], + fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, beforeFetch: (params) => { @@ -322,8 +323,18 @@ dbClickRow(record); } - onMounted(() => { - + onMounted(async() => { + let res = await getAllCom() || [] + customSearchFormSchema.value.forEach(v => { + if (v.field == 'comId') { + v.componentProps.options = res.map(v=> { + return { + label: v.name, + value: v.id + } + }) + } + }); if (schemaIdComputedRef.value) { bus.on(FLOW_PROCESSED, handleRefresh); bus.on(CREATE_FLOW, handleRefresh); @@ -350,7 +361,7 @@ let approveBtn: ActionItem[] = []; let hasFlowRecord = false; actionButtonConfig.value?.map((button) => { - if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) { + if (['view', 'copyData', 'enable', 'disable','datalog'].includes(button.code)) { actionsList.push({ icon: button?.icon, tooltip: button?.name, @@ -504,4 +515,22 @@ .hide{ display: none !important; } + + :deep( .ant-col-8:nth-child(1)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(1) .ant-form-item-label) { + width: 80px !important; + } + :deep( .ant-col-8:nth-child(4)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(4) .ant-form-item-label) { + width: 80px !important; + } + :deep(.ant-col-8:nth-child(5) .ant-select-selector) { + width: 172px !important; + } \ No newline at end of file diff --git a/src/views/contract/ContractSales/components/config.ts b/src/views/contract/ContractSales/components/config.ts index cf5392c..54e0b3a 100644 --- a/src/views/contract/ContractSales/components/config.ts +++ b/src/views/contract/ContractSales/components/config.ts @@ -6,6 +6,16 @@ export const formConfig = { }; export const searchFormSchema: FormSchema[] = [ + { + field: 'dateFrom', + label: '有效期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, { field: 'kName', label: '合同号/名称', @@ -16,16 +26,30 @@ export const searchFormSchema: FormSchema[] = [ label: '客户', component: 'Input', }, - { - field: 'comId', - label: '合同主体', - component: 'Input', - }, { field: 'pointUpName', 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: '审批状态', diff --git a/src/views/contract/ContractSales/components/createForm.vue b/src/views/contract/ContractSales/components/createForm.vue index ff05373..e62eba8 100644 --- a/src/views/contract/ContractSales/components/createForm.vue +++ b/src/views/contract/ContractSales/components/createForm.vue @@ -25,12 +25,12 @@ - + - + @@ -419,9 +419,24 @@ dataListAppro.value = val } const getApproContractFactList = (val) => { - console.log(val, 'dataListContractFact') dataListContractFact.value = val } + const dateChange = (val, k) => { + if (!val) { + if (k=='dateFrom') { + formState.dateFrom = dayjs(new Date()) + setTimeout(() => { + formState.dateFrom = null + }, ); + } + if (k=='dateTo') { + formState.dateTo = dayjs(new Date()) + setTimeout(() => { + formState.dateTo = null + }, ); + } + } + } const disabledDateStart = (startValue) => { const endValue = formState?.dateTo; if (!startValue || !endValue) { diff --git a/src/views/contract/ContractSales/index.vue b/src/views/contract/ContractSales/index.vue index 1892097..f0c1ced 100644 --- a/src/views/contract/ContractSales/index.vue +++ b/src/views/contract/ContractSales/index.vue @@ -58,7 +58,7 @@ import useEventBus from '/@/hooks/event/useEventBus'; import { cloneDeep } from 'lodash-es'; import { useUserStore } from '/@/store/modules/user'; - + import { getAllCom} from '/@/api/contract/ContractPurInt'; const userStore = useUserStore(); const userInfo = userStore.getUserInfo; @@ -76,7 +76,7 @@ const tableRef = ref(); //所有按钮 - const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false},{"isUse":true,"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]); + const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":false},{"isUse":true,"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":false},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]); //展示在列表内的按钮 const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord', 'update', 'approve']); const buttonConfigs = computed(()=>{ @@ -91,7 +91,7 @@ return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); }); - const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove} + const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,delete : handleDelete, update:handleUpdate, approve:handleApprove,datalog : handleDatalog} const { currentRoute } = useRouter(); const router = useRouter(); @@ -124,7 +124,7 @@ gutter: 16, }, schemas: customSearchFormSchema, - fieldMapToTime: [], + fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, beforeFetch: (params) => { @@ -321,8 +321,18 @@ dbClickRow(record); } - onMounted(() => { - + onMounted(async() => { + let res = await getAllCom() || [] + customSearchFormSchema.value.forEach(v => { + if (v.field == 'comId') { + v.componentProps.options = res.map(v=> { + return { + label: v.name, + value: v.id + } + }) + } + }); if (schemaIdComputedRef.value) { bus.on(FLOW_PROCESSED, handleRefresh); bus.on(CREATE_FLOW, handleRefresh); @@ -349,7 +359,7 @@ let approveBtn: ActionItem[] = []; let hasFlowRecord = false; actionButtonConfig.value?.map((button) => { - if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) { + if (['view', 'copyData', 'enable', 'disable', 'datalog'].includes(button.code)) { actionsList.push({ icon: button?.icon, tooltip: button?.name, @@ -502,4 +512,21 @@ .hide{ display: none !important; } + :deep( .ant-col-8:nth-child(1)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(1) .ant-form-item-label) { + width: 80px !important; + } + :deep( .ant-col-8:nth-child(4)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(4) .ant-form-item-label) { + width: 80px !important; + } + :deep(.ant-col-8:nth-child(5) .ant-select-selector) { + width: 172px !important; + } \ No newline at end of file diff --git a/src/views/contract/ContractSalesLng/components/config.ts b/src/views/contract/ContractSalesLng/components/config.ts index 6aa8043..7860ba8 100644 --- a/src/views/contract/ContractSalesLng/components/config.ts +++ b/src/views/contract/ContractSalesLng/components/config.ts @@ -6,7 +6,16 @@ export const formConfig = { }; export const searchFormSchema: FormSchema[] = [ - + { + field: 'dateFrom', + label: '有效期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, { field: 'kName', label: '合同号/名称', @@ -17,6 +26,38 @@ export const searchFormSchema: FormSchema[] = [ 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[] = [ diff --git a/src/views/contract/ContractSalesLng/components/createForm.vue b/src/views/contract/ContractSalesLng/components/createForm.vue index 1b2c0df..1f9ccca 100644 --- a/src/views/contract/ContractSalesLng/components/createForm.vue +++ b/src/views/contract/ContractSalesLng/components/createForm.vue @@ -30,12 +30,12 @@ - + - + @@ -366,9 +366,24 @@ dataListAppro.value = val } const getApproContractFactList = (val) => { - console.log(val, 'dataListContractFact') dataListContractFact.value = val } + const dateChange = (val, k) => { + if (!val) { + if (k=='dateFrom') { + formState.dateFrom = dayjs(new Date()) + setTimeout(() => { + formState.dateFrom = null + }, ); + } + if (k=='dateTo') { + formState.dateTo = dayjs(new Date()) + setTimeout(() => { + formState.dateTo = null + }, ); + } + } + } const disabledDateStart = (startValue) => { const endValue = formState?.dateTo; if (!startValue || !endValue) { diff --git a/src/views/contract/ContractSalesLng/index.vue b/src/views/contract/ContractSalesLng/index.vue index a9dd86a..b84f5ef 100644 --- a/src/views/contract/ContractSalesLng/index.vue +++ b/src/views/contract/ContractSalesLng/index.vue @@ -59,6 +59,7 @@ import useEventBus from '/@/hooks/event/useEventBus'; import { cloneDeep } from 'lodash-es'; + import { getAllCom} from '/@/api/contract/ContractPurInt'; import { useUserStore } from '/@/store/modules/user'; const userStore = useUserStore(); const userInfo = userStore.getUserInfo; @@ -77,7 +78,7 @@ const tableRef = ref(); //所有按钮 - const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"提交","code":"submit","icon":"ant-design:send-outlined","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]); + const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true,"isUse":true},{"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true,"isUse":true},{"name":"提交","code":"submit","icon":"ant-design:send-outlined","isDefault":false,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]); //展示在列表内的按钮 const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','update', 'approve','submit']); const buttonConfigs = computed(()=>{ @@ -92,7 +93,7 @@ return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); }); - const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,update : handleUpdate,approve : handleApprove,delete : handleDelete,} + const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,update : handleUpdate,approve : handleApprove,delete : handleDelete,datalog : handleDatalog} const { currentRoute } = useRouter(); const router = useRouter(); @@ -124,7 +125,7 @@ gutter: 16, }, schemas: customSearchFormSchema, - fieldMapToTime: [], + fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, beforeFetch: (params) => { @@ -323,8 +324,18 @@ dbClickRow(record); } - onMounted(() => { - + onMounted(async() => { + let res = await getAllCom() || [] + customSearchFormSchema.value.forEach(v => { + if (v.field == 'comId') { + v.componentProps.options = res.map(v=> { + return { + label: v.name, + value: v.id + } + }) + } + }); if (schemaIdComputedRef.value) { bus.on(FLOW_PROCESSED, handleRefresh); bus.on(CREATE_FLOW, handleRefresh); @@ -351,7 +362,7 @@ let approveBtn: ActionItem[] = []; let hasFlowRecord = false; actionButtonConfig.value?.map((button) => { - if (['view', 'copyData'].includes(button.code)) { + if (['view', 'copyData','datalog'].includes(button.code)) { actionsList.push({ icon: button?.icon, tooltip: button?.name, @@ -503,4 +514,22 @@ .hide{ display: none !important; } + + :deep( .ant-col-8:nth-child(1)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(1) .ant-form-item-label) { + width: 80px !important; + } + :deep( .ant-col-8:nth-child(4)) { + width: 320px !important; + max-width: 320px !important;; + } + :deep(.ant-col-8:nth-child(4) .ant-form-item-label) { + width: 80px !important; + } + :deep(.ant-col-8:nth-child(4) .ant-select-selector) { + width: 232px !important; + } \ No newline at end of file