From aa421c34b7c4294bb446c24162fa61372a1a6e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Fri, 3 Apr 2026 17:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=BF=90=E9=94=80=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract/ContractSalesPngPur/index.ts | 18 ++- .../common/contractSalesPngPurPointModal.vue | 42 ++--- .../contractSalesPngPurPointTcModal.vue | 147 +++++++++++++++++ src/components/common/supplierListModal.vue | 4 +- .../ContractSalesPngPur/components/config.ts | 6 +- .../components/createForm.vue | 151 ++++++++++++++---- .../contract/ContractSalesPngPur/index.vue | 6 +- 7 files changed, 313 insertions(+), 61 deletions(-) create mode 100644 src/components/common/contractSalesPngPurPointTcModal.vue diff --git a/src/api/contract/ContractSalesPngPur/index.ts b/src/api/contract/ContractSalesPngPur/index.ts index 6351b3f..c76ef69 100644 --- a/src/api/contract/ContractSalesPngPur/index.ts +++ b/src/api/contract/ContractSalesPngPur/index.ts @@ -10,6 +10,7 @@ enum Api { LngContractSalesPngPoint = '/contract/contractSalesPngPur', selectPcPageList = '/magic-api/contract/contractSalesPngPoint/selectPcPageList', selectScPageList = '/magic-api/contract/contractSalesPngPoint/selectScPageList', + selectTcPageList = '/magic-api/contract/contractSalesPngPoint/selectTcPageList', DataLog = '/contract/contractSalesPngPur/datalog', @@ -26,6 +27,19 @@ export async function getContractScPageList(ksppId: String, mode: ErrorMessageMo }, ); } +// 管输合同 +export async function getContractSalesPngPointTc(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.selectTcPageList, + params, + }, + { + errorMessageMode: mode, + }, + ); +} +// 采购合同 export async function getContractSalesPngPoint(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') { return defHttp.get( { @@ -55,11 +69,11 @@ export async function getLngContractSalesPngPointPage(params: LngContractSalesPn /** * @description: 获取LngContractSalesPngPoint信息 */ -export async function getLngContractSalesPngPoint(ksppId: String, mode: ErrorMessageMode = 'modal') { +export async function getLngContractSalesPngPoint(id: String, mode: ErrorMessageMode = 'modal') { return defHttp.get( { url: Api.Info, - params: { ksppId }, + params: { id }, }, { errorMessageMode: mode, diff --git a/src/components/common/contractSalesPngPurPointModal.vue b/src/components/common/contractSalesPngPurPointModal.vue index 97646b1..27fd36c 100644 --- a/src/components/common/contractSalesPngPurPointModal.vue +++ b/src/components/common/contractSalesPngPurPointModal.vue @@ -2,7 +2,7 @@
- +
@@ -14,19 +14,12 @@ import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; import { getContractSalesPngPoint } from '/@/api/contract/contractSalesPngPur'; + import { getContractSalesPngPointTc } from '/@/api/contract/contractSalesPngPur'; const { t } = useI18n(); const comId = ref('') + const dateArr = ref([]) const codeFormSchema: FormSchema[] = [ - { - field: 'dateFrom', - label: '有效期', - component: 'RangePicker', - componentProps: { - format: 'YYYY-MM-DD', - style: { width: '100%' }, - getPopupContainer: () => document.body, - }, - }, + ]; @@ -41,9 +34,10 @@ const selectedValues = ref([]); const props = defineProps({ selectType: { type: String, default: 'checkbox' }, - pageType: String - + pageType: String, + defaultDate: { type: Array, default: [] }, }); + dateArr.value = props.defaultDate || [] let columns: BasicColumn[] = [ { title: t('合同号'), dataIndex: 'kpNo', }, { title: t('合同名称'), dataIndex: 'kpName', }, @@ -55,7 +49,7 @@ ]; const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { - + dateArr.value = props.defaultDate || [] showTable.value = true comId.value = data.comId setModalProps({ confirmLoading: false }); @@ -72,8 +66,20 @@ pagination: true, canResize: false, formConfig: { - labelCol:{span: 9, offSet:10}, - schemas: codeFormSchema, + labelCol:{span: 9}, + schemas: [ + { + field: 'dateFrom', + label: '有效期', + component: 'RangePicker', + defaultValue: props.defaultDate || [], + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + } + ], fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, @@ -94,7 +100,7 @@ await nextTick(); nextTick(() => { - reload({searchInfo:{'limit':1,'size':10,'page':1}}); + reload({searchInfo:{'limit':1,'size':10,'page':1, startDate: props.defaultDate[0], endDate: props.defaultDate[1] }}); }); } }; @@ -124,7 +130,7 @@ + diff --git a/src/components/common/supplierListModal.vue b/src/components/common/supplierListModal.vue index dc51953..9411eb2 100644 --- a/src/components/common/supplierListModal.vue +++ b/src/components/common/supplierListModal.vue @@ -37,7 +37,7 @@ const selectedValues = ref([]); const props = defineProps({ selectType: { type: String, default: 'checkbox' }, - + paramsObj: { type: Object, default: {} }, }); const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { @@ -61,7 +61,7 @@ }, immediate: false, // 设置为不立即调用 beforeFetch: (params) => { - return { ...params, valid: 'Y',approCode: 'YSP',page:params.limit}; + return { ...params, valid: 'Y',approCode: 'YSP',page:params.limit, ...props.paramsObj}; }, rowSelection: { type: props.selectType, diff --git a/src/views/contract/ContractSalesPngPur/components/config.ts b/src/views/contract/ContractSalesPngPur/components/config.ts index 458a09e..0101b0d 100644 --- a/src/views/contract/ContractSalesPngPur/components/config.ts +++ b/src/views/contract/ContractSalesPngPur/components/config.ts @@ -17,7 +17,7 @@ export const searchFormSchema: FormSchema[] = [ }, }, { - field: 'ksName', + field: 'kpName', label: '销售合同号/名称', component: 'Input', }, @@ -119,7 +119,7 @@ export const columns: BasicColumn[] = [ sorter: true, }, { - dataIndex: 'ktpName', + dataIndex: 'ktName', title: '运输合同', componentType: 'input', align: 'left', @@ -131,7 +131,7 @@ export const columns: BasicColumn[] = [ title: '合同主体', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, diff --git a/src/views/contract/ContractSalesPngPur/components/createForm.vue b/src/views/contract/ContractSalesPngPur/components/createForm.vue index ee5c0ec..f1996c6 100644 --- a/src/views/contract/ContractSalesPngPur/components/createForm.vue +++ b/src/views/contract/ContractSalesPngPur/components/createForm.vue @@ -60,7 +60,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -112,7 +112,8 @@ - + + @@ -128,19 +129,19 @@ -