From bb62147842f31b3db143e7f687c439a2dd7723ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Thu, 5 Feb 2026 08:59:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=B5=81=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=8B=92=E7=BB=9D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/bpmn/config/propertyConfig.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/workflow/design/bpmn/config/propertyConfig.ts b/src/views/workflow/design/bpmn/config/propertyConfig.ts index b663a8b..5d87d4b 100644 --- a/src/views/workflow/design/bpmn/config/propertyConfig.ts +++ b/src/views/workflow/design/bpmn/config/propertyConfig.ts @@ -197,14 +197,14 @@ const UserProperties = { index: 2 }, // 现在没有拒绝选项 - { - buttonType: ButtonType.DEFAULT, //按钮类型 - buttonName: t('拒绝'), //按钮名称 - buttonCode: ApproveCode.DISAGREE, //按钮编码 - approveType: ApproveType.DISAGREE, // - checked: true, //选中 - index: 3 - }, + // { + // buttonType: ButtonType.DEFAULT, //按钮类型 + // buttonName: t('拒绝'), //按钮名称 + // buttonCode: ApproveCode.DISAGREE, //按钮编码 + // approveType: ApproveType.DISAGREE, // + // checked: true, //选中 + // index: 3 + // }, { buttonType: ButtonType.DEFAULT, //按钮类型 buttonName: t('驳回'), //按钮名称 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 2/5] =?UTF-8?q?=E5=90=88=E5=90=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=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 From 1431ceaec8791bb738a2b540375a1a608bdd2d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Thu, 5 Feb 2026 14:18:05 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=9B=BD=E9=99=85=E9=94=80=E5=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract/ContractFact/index.ts | 14 +- src/api/contract/ContractSalesInt/index.ts | 3 +- src/components/SecondDev/OpinionDialog.vue | 2 +- .../common/contractFactListModal.vue | 6 +- .../ContractSalesInt/components/config.ts | 73 +- .../components/createForm.vue | 729 ++++++++++++++++++ src/views/contract/ContractSalesInt/index.vue | 192 ++++- src/views/secondDev/customFormConfig.ts | 3 +- 8 files changed, 968 insertions(+), 54 deletions(-) create mode 100644 src/views/contract/ContractSalesInt/components/createForm.vue diff --git a/src/api/contract/ContractFact/index.ts b/src/api/contract/ContractFact/index.ts index 88b39c0..6386b63 100644 --- a/src/api/contract/ContractFact/index.ts +++ b/src/api/contract/ContractFact/index.ts @@ -11,9 +11,21 @@ enum Api { queryAllCurrency ='/magic-api/mdm/queryAllCurrency', queryAllUser ='/magic-api/mdm/queryAllUser', - queryBankByCode ='/magic-api/sales/queryBankByCode' + queryBankByCode ='/magic-api/sales/queryBankByCode', + PageModal ='/magic-api/contract/lngContractFact/page/modal' } +export async function getLngContractFactPageModal(params: LngContractFactPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.PageModal, + params, + }, + { + errorMessageMode: mode, + }, + ); +} export async function getBankBList(code:String, type:String, mode: ErrorMessageMode = 'modal') { return defHttp.get( { diff --git a/src/api/contract/ContractSalesInt/index.ts b/src/api/contract/ContractSalesInt/index.ts index 3e5cd72..83d6b87 100644 --- a/src/api/contract/ContractSalesInt/index.ts +++ b/src/api/contract/ContractSalesInt/index.ts @@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/contract/contractSalesInt/page', + // Page = '/contract/contractSalesInt/page', + Page = '/magic-api/contract/contractSalesInt/page', List = '/contract/contractSalesInt/list', Info = '/contract/contractSalesInt/info', LngContract = '/contract/contractSalesInt', diff --git a/src/components/SecondDev/OpinionDialog.vue b/src/components/SecondDev/OpinionDialog.vue index b99a88d..1037910 100644 --- a/src/components/SecondDev/OpinionDialog.vue +++ b/src/components/SecondDev/OpinionDialog.vue @@ -208,7 +208,7 @@ let res = await getRejectNodeList(_processId, _taskId); if (res && Array.isArray(res) && res.length > 0) { rejectNodeList.value = res; - dialogTitle.value = `退回`; + dialogTitle.value = `驳回`; if (res?.length) { res.forEach((nNode) => { if (!nNode.userList?.length) { diff --git a/src/components/common/contractFactListModal.vue b/src/components/common/contractFactListModal.vue index 166897a..198b602 100644 --- a/src/components/common/contractFactListModal.vue +++ b/src/components/common/contractFactListModal.vue @@ -13,7 +13,7 @@ import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table'; import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; - import { getLngContractFactPage,} from '/@/api/contract/ContractFact'; + import { getLngContractFactPageModal,} from '/@/api/contract/ContractFact'; const { t } = useI18n(); const codeFormSchema: FormSchema[] = [ @@ -62,7 +62,7 @@ const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({ title: t('合同列表'), - api: getLngContractFactPage, + api: getLngContractFactPageModal, columns, bordered: true, @@ -76,7 +76,7 @@ }, immediate: false, // 设置为不立即调用 beforeFetch: (params) => { - return { ...params, valid: 'Y',approCode: 'YSP'}; + return { ...params, valid: 'Y',approCode: 'YSP',page:params.limit}; }, rowSelection: { type: props.selectType, diff --git a/src/views/contract/ContractSalesInt/components/config.ts b/src/views/contract/ContractSalesInt/components/config.ts index ca59ab5..a30a36e 100644 --- a/src/views/contract/ContractSalesInt/components/config.ts +++ b/src/views/contract/ContractSalesInt/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,6 +26,51 @@ export const searchFormSchema: FormSchema[] = [ label: '客户', component: 'Input', }, + { + field: 'longSpotCode', + label: '长协现货', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '2018871666841546754' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + }, + { + 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[] = [ @@ -25,7 +80,7 @@ export const columns: BasicColumn[] = [ title: '合同号', componentType: 'input', align: 'left', - + width:150, sorter: true, }, @@ -39,7 +94,7 @@ export const columns: BasicColumn[] = [ }, { - dataIndex: 'cpCode', + dataIndex: 'cpName', title: '客户', componentType: 'input', align: 'left', @@ -52,7 +107,7 @@ export const columns: BasicColumn[] = [ title: '有效期开始', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, @@ -61,30 +116,30 @@ export const columns: BasicColumn[] = [ title: '有效期结束', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, { - dataIndex: 'approCode', + dataIndex: 'approName', title: '状态', componentType: 'input', align: 'left', - + width: 100, sorter: true, }, { - dataIndex: 'onlineSign', + dataIndex: 'longSpotName', title: ' 长协/现货', componentType: 'input', align: 'left', - + width: 100, sorter: true, }, { - dataIndex: 'comId', + dataIndex: 'comName', title: '合同主体', componentType: 'input', align: 'left', diff --git a/src/views/contract/ContractSalesInt/components/createForm.vue b/src/views/contract/ContractSalesInt/components/createForm.vue new file mode 100644 index 0000000..345998a --- /dev/null +++ b/src/views/contract/ContractSalesInt/components/createForm.vue @@ -0,0 +1,729 @@ + + + + + diff --git a/src/views/contract/ContractSalesInt/index.vue b/src/views/contract/ContractSalesInt/index.vue index 576847a..12d9abc 100644 --- a/src/views/contract/ContractSalesInt/index.vue +++ b/src/views/contract/ContractSalesInt/index.vue @@ -57,6 +57,10 @@ 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; const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus(); @@ -72,7 +76,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":"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":"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']); const buttonConfigs = computed(()=>{ @@ -87,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,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(); @@ -119,7 +123,7 @@ gutter: 16, }, schemas: customSearchFormSchema, - fieldMapToTime: [], + fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, beforeFetch: (params) => { @@ -157,7 +161,9 @@ query: { taskId: taskIds[0], formName: formName, - formId:currentRoute.value.meta.formId + formId:currentRoute.value.meta.formId, + id: record.id, + readonly: 1, } }); } else if (schemaId && !taskIds && processId) { @@ -167,18 +173,32 @@ readonly: 1, taskId: '', formName: formName, - formId:currentRoute.value.meta.formId + formId:currentRoute.value.meta.formId, + id: record.id, } }); } else { - router.push({ - path: '/form/ContractSalesInt/' + record.id + '/viewForm', - query: { - formPath: 'contract/ContractSalesInt', - formName: formName, - formId:currentRoute.value.meta.formId - } - }); + if (schemaIdComputedRef.value) { + router.push({ + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'contract/ContractSalesInt', + formName: "查看"+formName, + formId:currentRoute.value.meta.formId, + type:'edit', + id: record.id, + disabled: 1, + } + }); + } + // router.push({ + // path: '/form/ContractSalesInt/' + record.id + '/viewForm', + // query: { + // formPath: 'contract/ContractSalesInt', + // formName: formName, + // formId:currentRoute.value.meta.formId + // } + // }); } } @@ -213,21 +233,57 @@ } function handleEdit(record: Recordable) { - - router.push({ - path: '/form/ContractSalesInt/' + record.id + '/updateForm', - query: { + if (schemaIdComputedRef.value) { + router.push({ + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { formPath: 'contract/ContractSalesInt', - formName: formName, - formId:currentRoute.value.meta.formId - } - }); + formName: "编辑"+formName, + formId:currentRoute.value.meta.formId, + type:'edit', + id: record.id + } + }); + } else { + router.push({ + path: '/form/ContractSalesInt/' + record.id + '/updateForm', + query: { + formPath: 'contract/ContractSalesInt', + formName: formName, + formId:currentRoute.value.meta.formId + } + }); + } } function handleUpdate(record: Recordable) { - + const { processId, taskIds, schemaId } = record.workflowData || {}; + if (schemaIdComputedRef.value) { + router.push({ + path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow', + query: { + formPath: 'contract/ContractSalesInt', + formName: "变更"+formName, + formId:currentRoute.value.meta.formId, + type:'update', + id: record.id, + processId: processId + } + }); + } } function handleApprove(record: Recordable) { - + const { processId, taskIds, schemaId } = record.workflowData || {}; + if (taskIds && taskIds.length) { + router.push({ + path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow', + query: { + taskId: taskIds[0], + formName: "审批"+formName, + formId:currentRoute.value.meta.formId, + id: record.id + } + }); + } } function handleDelete(record: Recordable) { deleteList([record.id]); @@ -264,8 +320,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); @@ -288,9 +354,11 @@ let actionsList: ActionItem[] = []; let editAndDelBtn: ActionItem[] = []; - let hasFlowRecord = false; + let updateBtn: ActionItem[] = []; + 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, @@ -304,22 +372,53 @@ color: button.code === 'delete' ? 'error' : undefined, onClick: btnEvent[button.code].bind(null, record), }); + } + if (['update'].includes(button.code)) { + updateBtn.push({ + icon: button?.icon, + tooltip: button?.name, + onClick: btnEvent[button.code].bind(null, record), + }); + } + if (['approve'].includes(button.code)) { + approveBtn.push({ + icon: button?.icon, + tooltip: button?.name, + onClick: btnEvent[button.code].bind(null, record), + }); } if (button.code === 'flowRecord') hasFlowRecord = true; }); - if (record.workflowData?.enabled) { - //与工作流有关联的表单 - if (record.workflowData.status) { - actionsList.unshift(setIndexFlowStatus(record.workflowData)) - } else { - actionsList = actionsList.concat(editAndDelBtn); - } - } else { - if (!record.workflowData?.processId) { - //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上 - actionsList = actionsList.concat(editAndDelBtn); + // 未提交或已驳回 + if (record.approCode == 'WTJ' || record.approCode == 'YBH' ) { + actionsList = actionsList.concat(editAndDelBtn); + + if (record.createUserId !== userInfo.id) { + let idx = actionsList.findIndex(v =>v.tooltip == '删除') + idx > -1 && actionsList.splice(idx, 1) } } + // 审批中SPZ + if (record.workflowData?.editable) { + actionsList = actionsList.concat(approveBtn); + } + // 已审批 + if (record.approCode == 'YSP') { + actionsList = actionsList.concat(updateBtn); + } + // if (record.workflowData?.enabled) { + // //与工作流有关联的表单 + // if (record.workflowData.status) { + // actionsList.unshift(setIndexFlowStatus(record.workflowData)) + // } else { + // actionsList = actionsList.concat(editAndDelBtn); + // } + // } else { + // if (!record.workflowData?.processId) { + // //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上 + // actionsList = actionsList.concat(editAndDelBtn); + // } + // } return actionsList; } function handleStartwork(record: Recordable) { @@ -410,4 +509,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/secondDev/customFormConfig.ts b/src/views/secondDev/customFormConfig.ts index d4e18f4..6a130b8 100644 --- a/src/views/secondDev/customFormConfig.ts +++ b/src/views/secondDev/customFormConfig.ts @@ -9,6 +9,7 @@ export const customFormConfig = { 'addContractPurPng', 'addContractSales', 'addContractSalesLng', - 'ContractPurInt' + 'ContractPurInt', + 'ContractSalesInt' ], }; \ No newline at end of file From 9944eb8c3a93f7f406cce3dc1a8b400a1303b68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Thu, 5 Feb 2026 17:44:35 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E9=94=80=E5=94=AE=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dayPlan/PngSettleHdr/index.ts | 89 +++ .../PngSettleHdr/model/PngSettleHdrModel.ts | 232 ++++++ .../Form/src/components/UploadList.vue | 8 +- .../dayPlan/PngSettleHdr/components/Form.vue | 224 ++++++ .../components/PngSettleHdrModal.vue | 110 +++ .../dayPlan/PngSettleHdr/components/config.ts | 729 ++++++++++++++++++ .../PngSettleHdr/components/createForm.vue | 350 +++++++++ .../components/workflowPermission.ts | 240 ++++++ src/views/dayPlan/PngSettleHdr/index.vue | 437 +++++++++++ src/views/secondDev/customFormConfig.ts | 3 +- 10 files changed, 2417 insertions(+), 5 deletions(-) create mode 100644 src/api/dayPlan/PngSettleHdr/index.ts create mode 100644 src/api/dayPlan/PngSettleHdr/model/PngSettleHdrModel.ts create mode 100644 src/views/dayPlan/PngSettleHdr/components/Form.vue create mode 100644 src/views/dayPlan/PngSettleHdr/components/PngSettleHdrModal.vue create mode 100644 src/views/dayPlan/PngSettleHdr/components/config.ts create mode 100644 src/views/dayPlan/PngSettleHdr/components/createForm.vue create mode 100644 src/views/dayPlan/PngSettleHdr/components/workflowPermission.ts create mode 100644 src/views/dayPlan/PngSettleHdr/index.vue diff --git a/src/api/dayPlan/PngSettleHdr/index.ts b/src/api/dayPlan/PngSettleHdr/index.ts new file mode 100644 index 0000000..cdc4245 --- /dev/null +++ b/src/api/dayPlan/PngSettleHdr/index.ts @@ -0,0 +1,89 @@ +import { LngPngSettleHdrPageModel, LngPngSettleHdrPageParams, LngPngSettleHdrPageResult } from './model/PngSettleHdrModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/dayPlan/pngSettleHdr/page', + List = '/dayPlan/pngSettleHdr/list', + Info = '/dayPlan/pngSettleHdr/info', + LngPngSettleHdr = '/dayPlan/pngSettleHdr', + + + + +} + +/** + * @description: 查询LngPngSettleHdr分页列表 + */ +export async function getLngPngSettleHdrPage(params: LngPngSettleHdrPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngPngSettleHdr信息 + */ +export async function getLngPngSettleHdr(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngPngSettleHdr + */ +export async function addLngPngSettleHdr(lngPngSettleHdr: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngPngSettleHdr, + params: lngPngSettleHdr, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngPngSettleHdr + */ +export async function updateLngPngSettleHdr(lngPngSettleHdr: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngPngSettleHdr, + params: lngPngSettleHdr, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngPngSettleHdr(批量删除) + */ +export async function deleteLngPngSettleHdr(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngPngSettleHdr, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/dayPlan/PngSettleHdr/model/PngSettleHdrModel.ts b/src/api/dayPlan/PngSettleHdr/model/PngSettleHdrModel.ts new file mode 100644 index 0000000..88f7de0 --- /dev/null +++ b/src/api/dayPlan/PngSettleHdr/model/PngSettleHdrModel.ts @@ -0,0 +1,232 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngPngSettleHdr分页参数 模型 + */ +export interface LngPngSettleHdrPageParams extends BasicPageParams { + id: string; + + settleMonthStart: string; + settleMonthEnd: string; + + dateFromStart: string; + dateFromEnd: string; + + dateToStart: string; + dateToEnd: string; + + cpCode: string; + + qtySettleGj: string; + + qtySettleM3: string; + + amount: string; + + comId: string; + + settleDesc: string; + + deptId: string; + + approCode: string; +} + +/** + * @description: LngPngSettleHdr分页返回值模型 + */ +export interface LngPngSettleHdrPageModel { + id: string; + + settleMonth: string; + + dateFrom: string; + + dateTo: string; + + cpCode: string; + + qtySettleGj: string; + + qtySettleM3: string; + + amount: string; + + comId: string; + + settleDesc: string; + + deptId: string; + + approCode: string; +} + +/** + * @description: LngPngSettleHdr表类型 + */ +export interface LngPngSettleHdrModel { + id: number; + + settleMonth: string; + + dateFrom: string; + + dateTo: string; + + settleTypeCode: string; + + cpCode: string; + + comId: number; + + qtySettleGj: number; + + qtySettleM3: number; + + amount: number; + + rpSign: string; + + billAccount: string; + + approCode: string; + + settleDesc: string; + + note: string; + + createUserId: number; + + createDate: string; + + modifyUserId: number; + + modifyDate: string; + + tenantId: number; + + deptId: number; + + ruleUserId: number; + + lngPngSettleSalesList?: LngPngSettleSalesModel; + + lngPngSettleSalesDtlList?: LngPngSettleSalesDtlModel; +} + +/** + * @description: LngPngSettleSales表类型 + */ +export interface LngPngSettleSalesModel { + id: number; + + settleHdrId: number; + + salesId: number; + + settleMonth: string; + + settleTypeCode: string; + + datePlan: string; + + dateMea: string; + + cuCode: string; + + ksId: number; + + ksppId: number; + + pointDelyCode: string; + + uomCode: string; + + rateM3Gj: number; + + qtyMeaGj: number; + + qtyMeaM3: number; + + qtySettleGj: number; + + qtySettleM3: number; + + priceGj: number; + + priceM3: number; + + amount: number; + + priceDesc: string; + + settleTimes: number; + + note: string; + + createUserId: number; + + createDate: string; + + modifyUserId: number; + + modifyDate: string; + + tenantId: number; + + deptId: number; + + ruleUserId: number; +} + +/** + * @description: LngPngSettleSalesDtl表类型 + */ +export interface LngPngSettleSalesDtlModel { + id: number; + + settleId: number; + + priceCode: string; + + sort: number; + + uomCode: string; + + rateQtyGj: number; + + rateQtyM3: number; + + rateM3Gj: number; + + qtySettleGj: number; + + qtySettleM3: number; + + priceGj: number; + + priceM3: number; + + amount: number; + + note: string; + + createUserId: number; + + createDate: string; + + modifyUserId: number; + + modifyDate: string; + + tenantId: number; + + deptId: number; + + ruleUserId: number; +} + +/** + * @description: LngPngSettleHdr分页返回值结构 + */ +export type LngPngSettleHdrPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/components/Form/src/components/UploadList.vue b/src/components/Form/src/components/UploadList.vue index 945730e..8b20c2c 100644 --- a/src/components/Form/src/components/UploadList.vue +++ b/src/components/Form/src/components/UploadList.vue @@ -32,10 +32,10 @@ const dataFile = ref([]); const { t } = useI18n(); const columns = ref([ - { title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`}, - { title: t('附件名称'), dataIndex: 'fileOrg', sorter: true}, - { title: t('附件说明'), dataIndex: 'remark', sorter: true}, - { title: t('操作'), dataIndex: 'operation', sorter: true}, + { title: t('序号'), dataIndex: 'index', customRender: (column) => `${column.index + 1}`}, + { title: t('附件名称'), dataIndex: 'fileOrg'}, + { title: t('附件说明'), dataIndex: 'remark'}, + { title: t('操作'), dataIndex: 'operation', width: 140}, ]); const tableId = ref(); const tableName = ref(); diff --git a/src/views/dayPlan/PngSettleHdr/components/Form.vue b/src/views/dayPlan/PngSettleHdr/components/Form.vue new file mode 100644 index 0000000..b9b2f7a --- /dev/null +++ b/src/views/dayPlan/PngSettleHdr/components/Form.vue @@ -0,0 +1,224 @@ + + \ No newline at end of file diff --git a/src/views/dayPlan/PngSettleHdr/components/PngSettleHdrModal.vue b/src/views/dayPlan/PngSettleHdr/components/PngSettleHdrModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/dayPlan/PngSettleHdr/components/PngSettleHdrModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/dayPlan/PngSettleHdr/components/config.ts b/src/views/dayPlan/PngSettleHdr/components/config.ts new file mode 100644 index 0000000..1c51eba --- /dev/null +++ b/src/views/dayPlan/PngSettleHdr/components/config.ts @@ -0,0 +1,729 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'datePlan', + label: '结算日期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, + { + field: 'cpName', + label: '客户名称', + component: 'Input', + }, +]; + +export const columns: BasicColumn[] = [ + + { + dataIndex: 'settleMonth', + title: '结算月', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'dateFrom', + title: '结算月开始日期', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'dateTo', + title: '结算月结束日期', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'cpCode', + title: '客户简称', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtySettleGj', + title: '结算总数量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtySettleM3', + title: '结算总数量 (方)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'amount', + title: '结算总金额 (元)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'comId', + title: '交易主体', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'settleDesc', + title: '结算说明', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'deptId', + title: '附件', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'approCode', + title: '审批状态', + componentType: 'input', + align: 'left', + + 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: '0e5177531b9440538e5db1d02a4afa95', + 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: 'd5345f2f5c10465c8e8f071c5fcda584', + field: 'settleMonth', + 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: '79b1cdf4156a4477a19edcec99d81d56', + 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: 'b95db041a20a486cbfec71480fb8aa8b', + 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: '23202591851543e6952e6a1c8b7a906a', + field: 'cpCode', + 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: '8085c8a6f656473eb050a094b5edc506', + field: 'qtySettleGj', + 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: '4ea1df548ccd4277ac271319f90f98c3', + field: 'qtySettleM3', + 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: '7278b21860fa4ae4a37824424919d58f', + field: 'amount', + 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: '874e0a0e29ae40ed94e6b5e04597a739', + 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: '3fff1f671839416091a04863bf9fc03a', + field: 'settleDesc', + 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: '5597f98607194b2badd2b7469b56deab', + field: 'deptId', + 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: 'ce05d6adcf1a4e8bbd107db8b21a6b04', + field: 'approCode', + 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: 'a15631219b3e4f87bdc6dd027c088aaf', + label: '表格组件', + field: 'lngPngSettleSalesList', + type: 'form', + component: 'SubForm', + required: true, + colProps: { span: 24 }, + componentProps: { + mainKey: 'lngPngSettleSalesList', + columns: [ + { + key: '0e65269b143b4a539075fc0645c0754f', + title: '单行文本', + dataIndex: 'settleMonth', + componentType: 'Input', + 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, + }, + }, + { title: '操作', key: 'action', fixed: 'right', width: '50px' }, + ], + span: '24', + preloadType: 'api', + apiConfig: {}, + itemId: '', + dicOptions: [], + useSelectButton: false, + buttonName: '选择数据', + showLabel: true, + showComponentBorder: true, + showFormBorder: true, + showIndex: false, + isShow: true, + multipleHeads: [], + }, + }, + { + key: 'cd4b0b5719ff4c5fb8bdb179b49fd545', + label: '表格组件', + field: 'lngPngSettleSalesDtlList', + type: 'form', + component: 'SubForm', + required: true, + colProps: { span: 24 }, + componentProps: { + mainKey: 'lngPngSettleSalesDtlList', + columns: [ + { + key: 'f3c19f1b49f94470b9ebe7e28be90c62', + title: '单行文本', + dataIndex: 'priceCode', + componentType: 'Input', + 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, + }, + }, + { title: '操作', key: 'action', fixed: 'right', width: '50px' }, + ], + span: '24', + preloadType: 'api', + apiConfig: {}, + itemId: '', + dicOptions: [], + useSelectButton: false, + buttonName: '选择数据', + showLabel: true, + showComponentBorder: true, + showFormBorder: true, + showIndex: false, + isShow: true, + multipleHeads: [], + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/dayPlan/PngSettleHdr/components/createForm.vue b/src/views/dayPlan/PngSettleHdr/components/createForm.vue new file mode 100644 index 0000000..929d26a --- /dev/null +++ b/src/views/dayPlan/PngSettleHdr/components/createForm.vue @@ -0,0 +1,350 @@ + + + + + diff --git a/src/views/dayPlan/PngSettleHdr/components/workflowPermission.ts b/src/views/dayPlan/PngSettleHdr/components/workflowPermission.ts new file mode 100644 index 0000000..bd7bc47 --- /dev/null +++ b/src/views/dayPlan/PngSettleHdr/components/workflowPermission.ts @@ -0,0 +1,240 @@ +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: '0e5177531b9440538e5db1d02a4afa95', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算月', + fieldId: 'settleMonth', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'd5345f2f5c10465c8e8f071c5fcda584', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算月开始日期', + fieldId: 'dateFrom', + isSubTable: false, + showChildren: true, + type: 'input', + key: '79b1cdf4156a4477a19edcec99d81d56', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算月结束日期', + fieldId: 'dateTo', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'b95db041a20a486cbfec71480fb8aa8b', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '客户简称', + fieldId: 'cpCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: '23202591851543e6952e6a1c8b7a906a', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算总数量(吉焦)', + fieldId: 'qtySettleGj', + isSubTable: false, + showChildren: true, + type: 'input', + key: '8085c8a6f656473eb050a094b5edc506', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算总数量 (方)', + fieldId: 'qtySettleM3', + isSubTable: false, + showChildren: true, + type: 'input', + key: '4ea1df548ccd4277ac271319f90f98c3', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算总金额 (元)', + fieldId: 'amount', + isSubTable: false, + showChildren: true, + type: 'input', + key: '7278b21860fa4ae4a37824424919d58f', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '交易主体', + fieldId: 'comId', + isSubTable: false, + showChildren: true, + type: 'input', + key: '874e0a0e29ae40ed94e6b5e04597a739', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '结算说明', + fieldId: 'settleDesc', + isSubTable: false, + showChildren: true, + type: 'input', + key: '3fff1f671839416091a04863bf9fc03a', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '附件', + fieldId: 'deptId', + isSubTable: false, + showChildren: true, + type: 'input', + key: '5597f98607194b2badd2b7469b56deab', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '审批状态', + fieldId: 'approCode', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'ce05d6adcf1a4e8bbd107db8b21a6b04', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSubTable: true, + showChildren: false, + tableName: 'lngPngSettleSalesList', + fieldName: '表格组件', + fieldId: 'lngPngSettleSalesList', + type: 'form', + key: 'a15631219b3e4f87bdc6dd027c088aaf', + children: [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSubTable: true, + isSaveTable: false, + showChildren: false, + tableName: 'lngPngSettleSalesList', + fieldName: '单行文本', + fieldId: 'settleMonth', + key: '0e65269b143b4a539075fc0645c0754f', + children: [], + }, + ], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSubTable: true, + showChildren: false, + tableName: 'lngPngSettleSalesDtlList', + fieldName: '表格组件', + fieldId: 'lngPngSettleSalesDtlList', + type: 'form', + key: 'cd4b0b5719ff4c5fb8bdb179b49fd545', + children: [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSubTable: true, + isSaveTable: false, + showChildren: false, + tableName: 'lngPngSettleSalesDtlList', + fieldName: '单行文本', + fieldId: 'priceCode', + key: 'f3c19f1b49f94470b9ebe7e28be90c62', + children: [], + }, + ], + }, +]; \ No newline at end of file diff --git a/src/views/dayPlan/PngSettleHdr/index.vue b/src/views/dayPlan/PngSettleHdr/index.vue new file mode 100644 index 0000000..64e38d8 --- /dev/null +++ b/src/views/dayPlan/PngSettleHdr/index.vue @@ -0,0 +1,437 @@ + + + \ No newline at end of file diff --git a/src/views/secondDev/customFormConfig.ts b/src/views/secondDev/customFormConfig.ts index 6a130b8..354d8ad 100644 --- a/src/views/secondDev/customFormConfig.ts +++ b/src/views/secondDev/customFormConfig.ts @@ -10,6 +10,7 @@ export const customFormConfig = { 'addContractSales', 'addContractSalesLng', 'ContractPurInt', - 'ContractSalesInt' + 'ContractSalesInt', + 'addDayPlanPngSettleSales' ], }; \ No newline at end of file From b3b2e701b4bb5b0615035149518607927ba24366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Fri, 6 Feb 2026 17:33:38 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=94=80=E5=94=AE=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dayPlan/PngSettleHdr/index.ts | 28 ++- src/components/common/measureListModal.vue | 193 ++++++++++++++++++ .../common/priceComposeListModal.vue | 92 +++++++++ .../dayPlan/PngSettleHdr/components/config.ts | 19 +- .../PngSettleHdr/components/createForm.vue | 157 +++++++++++--- src/views/dayPlan/PngSettleHdr/index.vue | 2 +- 6 files changed, 452 insertions(+), 39 deletions(-) create mode 100644 src/components/common/measureListModal.vue create mode 100644 src/components/common/priceComposeListModal.vue diff --git a/src/api/dayPlan/PngSettleHdr/index.ts b/src/api/dayPlan/PngSettleHdr/index.ts index cdc4245..af3da97 100644 --- a/src/api/dayPlan/PngSettleHdr/index.ts +++ b/src/api/dayPlan/PngSettleHdr/index.ts @@ -3,14 +3,38 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/dayPlan/pngSettleHdr/page', + // Page = '/dayPlan/pngSettleHdr/page', + Page = '/magic-api/dayPlan/pngSettleSalesHdrPage', List = '/dayPlan/pngSettleHdr/list', Info = '/dayPlan/pngSettleHdr/info', LngPngSettleHdr = '/dayPlan/pngSettleHdr', + PageAdd = '/magic-api/dayPlan/pngSettleSalesHdrSelectPage', + date = '/magic-api/dayPlan/pngSettleSalesHdrSelectDateTo', - +} +export async function getLngPngSettleHdrDate(params, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.date, + params, + }, + { + errorMessageMode: mode, + }, + ); +} +export async function getLngPngSettleHdrPageAdd(params: LngPngSettleHdrPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.PageAdd, + params, + }, + { + errorMessageMode: mode, + }, + ); } /** diff --git a/src/components/common/measureListModal.vue b/src/components/common/measureListModal.vue new file mode 100644 index 0000000..ae7b464 --- /dev/null +++ b/src/components/common/measureListModal.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/components/common/priceComposeListModal.vue b/src/components/common/priceComposeListModal.vue new file mode 100644 index 0000000..7e1fd3a --- /dev/null +++ b/src/components/common/priceComposeListModal.vue @@ -0,0 +1,92 @@ + + + + diff --git a/src/views/dayPlan/PngSettleHdr/components/config.ts b/src/views/dayPlan/PngSettleHdr/components/config.ts index 1c51eba..4556bd2 100644 --- a/src/views/dayPlan/PngSettleHdr/components/config.ts +++ b/src/views/dayPlan/PngSettleHdr/components/config.ts @@ -8,10 +8,11 @@ export const formConfig = { export const searchFormSchema: FormSchema[] = [ { field: 'datePlan', - label: '结算日期', + label: '结算月', component: 'RangePicker', componentProps: { - format: 'YYYY-MM-DD', + format: 'YYYY-MM', + picker: 'month', style: { width: '100%' }, getPopupContainer: () => document.body, }, @@ -30,7 +31,7 @@ export const columns: BasicColumn[] = [ title: '结算月', componentType: 'input', align: 'left', - + width: 100, sorter: true, }, @@ -39,7 +40,7 @@ export const columns: BasicColumn[] = [ title: '结算月开始日期', componentType: 'input', align: 'left', - + width: 140, sorter: true, }, @@ -48,12 +49,12 @@ export const columns: BasicColumn[] = [ title: '结算月结束日期', componentType: 'input', align: 'left', - + width: 140, sorter: true, }, { - dataIndex: 'cpCode', + dataIndex: 'cpName', title: '客户简称', componentType: 'input', align: 'left', @@ -89,7 +90,7 @@ export const columns: BasicColumn[] = [ }, { - dataIndex: 'comId', + dataIndex: 'comName', title: '交易主体', componentType: 'input', align: 'left', @@ -116,11 +117,11 @@ export const columns: BasicColumn[] = [ }, { - dataIndex: 'approCode', + dataIndex: 'approName', title: '审批状态', componentType: 'input', align: 'left', - + width: 100, sorter: true, }, ]; diff --git a/src/views/dayPlan/PngSettleHdr/components/createForm.vue b/src/views/dayPlan/PngSettleHdr/components/createForm.vue index 929d26a..273aea6 100644 --- a/src/views/dayPlan/PngSettleHdr/components/createForm.vue +++ b/src/views/dayPlan/PngSettleHdr/components/createForm.vue @@ -21,12 +21,12 @@ - + - + {{ item.name }} @@ -44,17 +44,17 @@ - + - + - + @@ -83,16 +83,19 @@ 新增 删除 - + - + @@ -100,6 +103,8 @@ + + @@ -115,12 +120,14 @@ import type { Rule } from 'ant-design-vue/es/form'; import { getDictionary } from '/@/api/sales/Customer'; import { useModal } from '/@/components/Modal'; - import { addLngContract,updateLngContract, getLngContract} from '/@/api/contract/ContractSalesInt'; + import { addLngPngSettleHdr,updateLngPngSettleHdr, getLngPngSettleHdr, getLngPngSettleHdrDate} from '/@/api/dayPlan/PngSettleHdr'; import dayjs from 'dayjs'; import { getAppEnvConfig } from '/@/utils/env'; import { message } from 'ant-design-vue'; import UploadList from '/@/components/Form/src/components/UploadList.vue'; import customerListModal from '/@/components/common/customerListModal.vue'; + import measureListModal from '/@/components/common/measureListModal.vue'; + import priceComposeListModal from '/@/components/common/priceComposeListModal.vue'; import { getAllCom} from '/@/api/contract/ContractPurInt'; const tableName = 'ContractSalesInt'; @@ -147,32 +154,33 @@ const pageType = ref(currentRoute.value.query?.type); const pageId = ref(currentRoute.value.query?.id) - const contractQty = ref() const spinning = ref(false); - const curIdx = ref(null) const { notification } = useMessage(); const { t } = useI18n(); - const isExpend=ref(false) const formState = reactive({ approCode: 'WTJ', - typeCode: 'SI', - onlineSign: 'N', - cpTableName: 'lng_customer', - lngContractSalesIntList: [{}] + settleMonth: dayjs(new Date()), + settleTypeCode: 'I', + rpSign: 'Y' }); - const [register, { openModal:openModal}] = useModal(); + const [registerMeasure, { openModal:openModalMeasure}] = useModal(); const [registerCustomer, { openModal:openModalCustomer}] = useModal(); + const [registerPrice, { openModal:openModalPrice}] = useModal(); const rules= reactive({ - kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }], - kName: [{ required: true, message: "该项为必填项", trigger: 'change' }], + settleMonth: [{ required: true, message: "该项为必填项", trigger: 'change' }], + dateFrom: [{ required: true, message: "该项为必填项", trigger: 'change' }], + dateTo: [{ required: true, message: "该项为必填项", trigger: 'change' }], cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }], + rpSign: [{ required: true, message: "该项为必填项", trigger: 'change' }], + comId: [{ required: true, message: "该项为必填项", trigger: 'change' }], }); const layout = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, } const dataFile = ref([]); + const dataFileAccount = ref([]) const dataList = ref([]) let optionSelect= reactive({ approCodeList: [], @@ -227,13 +235,16 @@ const onSelectChange = (rowKeys) => { selectedKeys.value = rowKeys; } + const uploadChange = (val) => { + dataFileAccount.value = val + } const uploadListChange = (val) => { dataFile.value = val } async function getInfo(id) { spinning.value = true try { - let data = await getLngContract(id) + let data = await getLngPngSettleHdr(id) spinning.value = false Object.assign(formState, {...data}) Object.assign(dataFile.value, formState.lngFileUploadList || []) @@ -245,9 +256,25 @@ spinning.value = false } } + const comIdChange = (val) => { + if (!val)return + getDate() + } + const getDate=(async () => { + let obj = { + cpCode: formState.cpCode, + comId: formState.comId + } + if (!pageId.value && formState.cpCode && formState.comId && !formState.dateFrom) { + let data = await getLngPngSettleHdrDate(obj) || [] + if (data.length) { + formState.dateFrom = data[0] + formState.dateTo = null + } + } + }) async function getOption() { optionSelect.approCodeList = await getDictionary('LNG_APPRO') - optionSelect.comIdList = await getAllCom() || [] optionSelect.signList = await getDictionary('LNG_YN') @@ -266,11 +293,81 @@ } return endValue.valueOf() <= startValue.valueOf(); } - const handleBtn = () => { - + const handleBtn = (type) => { + if (type === 'add') { + openModalMeasure(true,{isUpdate: false}) + } else { + if (!selectedKeys.value.length) { + message.warn('请选择删除数据') + return + } + selectedKeys.value.forEach(i => { + let idx = dataList.value.findIndex(v=>v.salesId == i) + idx>-1&&dataList.value.splice(idx, 1) + }); + setTimeout(() => { + selectedKeys.value = [] + }, 8000); + } } - const btnCheck = () => { - + const handleSuccessMeasure = (val) => { + if (!dataList.value.length) { + dataList.value = val + return + } + val.forEach(v=> { + dataList.value.forEach(k=> { + if (v.salesId!==k.salesId) { + dataList.value.push(v) + } + }) + }) + } + const btnCheck = (record, index, type) => { + if (type == 'delete') { + dataList.value.splice(index, 1) + } else { + openModalPrice(true,{isUpdate: false, record}) + } + } + const handleSuccessPrice = (arr, curRecord) => { + let qtySettleGj = 0 + let qtySettleM3 = 0 + let amount = 0 + arr.forEach(v=> { + qtySettleGj+=Number(v.qtySettleGj) || 0 + qtySettleM3+=Number(v.qtySettleM3) || 0 + amount+=Number(v.amount) || 0 + }) + // price_gj=amount/qty_settle_gj,保留4位小数 + // price_m3=amount/qty_settle_m3,保留4位小数 + let priceGj = qtySettleGj ? Number(amount) / Number(qtySettleGj) : '0' + let priceM3 = qtySettleM3 ? Number(amount) / Number(qtySettleM3) : '0' + let idx = dataList.value.findIndex(v =>v.salesId == curRecord.salesId) + if (idx > -1) { + dataList.value[idx].qtySettleGj = qtySettleGj.toFixed(3) + dataList.value[idx].qtySettleM3 = qtySettleM3.toFixed(3) + dataList.value[idx].amount = amount.toFixed(2) + dataList.value[idx].priceGj = priceGj.toFixed(4) + dataList.value[idx].priceM3 = priceM3.toFixed(4) + dataList.value[idx].lngPngSettleSalesDtlList = arr + tableCount() + } + } + const tableCount = () => { + let qtySettleGj = 0 + let qtySettleM3 = 0 + let amount = 0 + dataList.value.forEach(v => { + if (Number(v.settleTimes) == 1){ + qtySettleGj+=Number(v.qtySettleGj) || 0 + qtySettleM3+=Number(v.qtySettleM3) || 0 + } + amount+=Number(v.amount) || 0 + }) + formState.qtySettleGj = qtySettleGj.toFixed(3) + formState.qtySettleM3 = qtySettleM3.toFixed(3) + formState.amount = amount.toFixed(2) } const onSearchCustomer = () => { openModalCustomer(true,{isUpdate: false}) @@ -278,6 +375,7 @@ const handleSuccessCustomer = (val) => { formState.cpCode = val[0].cuCode formState.cpName = val[0].cuName + getDate() } function close() { tabStore.closeTab(currentRoute.value, router); @@ -288,13 +386,18 @@ async function handleSubmit(type) { try { await formRef.value.validateFields(); + dataList.value.forEach(v => { + v.settleTypeCode = 'I' + }) let obj = { ...formState, lngFileUploadList: dataFile.value, + billList: dataFileAccount.value, + lngPngSettleSalesList: dataList.value, } spinning.value = true; - let request = !formState.id ? addLngContract :updateLngContract + let request = !formState.id ? addLngPngSettleHdr :updateLngPngSettleHdr try { const data = await request(obj); @@ -319,7 +422,7 @@ console.log(errorInfo, 'errorInfo') spinning.value = false; errorInfo?.errorFields?.length && notification.warning({ - message: 'Tip', + message: '提示', description: '请完善信息' }); return false diff --git a/src/views/dayPlan/PngSettleHdr/index.vue b/src/views/dayPlan/PngSettleHdr/index.vue index 64e38d8..eb6f2f6 100644 --- a/src/views/dayPlan/PngSettleHdr/index.vue +++ b/src/views/dayPlan/PngSettleHdr/index.vue @@ -120,7 +120,7 @@ gutter: 16, }, schemas: customSearchFormSchema, - fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']], + fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM']], showResetButton: true, }, beforeFetch: (params) => {