diff --git a/src/api/price/PriceSalesPngApp/index.ts b/src/api/price/PriceSalesPngApp/index.ts index f431d4a..12d2b03 100644 --- a/src/api/price/PriceSalesPngApp/index.ts +++ b/src/api/price/PriceSalesPngApp/index.ts @@ -4,17 +4,27 @@ import { ErrorMessageMode } from '/#/axios'; enum Api { // Page = '/price/priceSalesPngApp/page', - Page = '/magic-api/price/priceSalesPngApp/page', + Page = '/magic-api/price/priceSalesPngApp/page', List = '/price/priceSalesPngApp/list', Info = '/price/priceSalesPngApp/info', LngPriceSalesPngApp = '/price/priceSalesPngApp', - + dpagePage = '/magic-api/price/priceSalesPngApp/dpage', DataLog = '/price/priceSalesPngApp/datalog', } - +export async function getLngPriceContractSalesPng(params: LngPriceSalesPngAppPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.dpagePage, + params, + }, + { + errorMessageMode: mode, + }, + ); +} /** * @description: 查询LngPriceSalesPngApp分页列表 */ diff --git a/src/components/common/contractPurPngtListModal.vue b/src/components/common/contractPurPngtListModal.vue index 2c7f1a8..8d74c44 100644 --- a/src/components/common/contractPurPngtListModal.vue +++ b/src/components/common/contractPurPngtListModal.vue @@ -2,7 +2,7 @@
- +
@@ -14,7 +14,7 @@ import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; import { getLngPriceContractPurPng} from '/@/api/price/PricePurPngApp'; - + import {getLngPriceContractSalesPng} from '/@/api/price/PriceSalesPngApp'; const { t } = useI18n(); const comId = ref('') const codeFormSchema: FormSchema[] = [ @@ -30,39 +30,49 @@ }, ]; - const columns: BasicColumn[] = [ - { title: t('合同号'), dataIndex: 'kNo', }, - { title: t('合同名称'), dataIndex: 'kName', }, - { title: t('供应商'), dataIndex: 'suName' ,}, - { title: '有效期开始',dataIndex: 'dateFrom', width: 120,}, - { title: '有效期结束',dataIndex: 'dateTo', width: 120}, - { title: t('合同主体'), dataIndex: 'comName', }, - { title: t('上载点'), dataIndex: 'pointUpName'}, - - ]; + const emit = defineEmits(['success', 'register']); const { notification } = useMessage(); const isUpdate = ref(true); const rowId = ref(''); + const showTable = ref(false) const selectedKeys = ref([]); const selectedValues = ref([]); const props = defineProps({ selectType: { type: String, default: 'checkbox' }, + pageType: String }); + let columns: BasicColumn[] = [ + { title: t('合同号'), dataIndex: 'kNo', }, + { title: t('合同名称'), dataIndex: 'kName', }, + { title: props.pageType == 'pur' ?'供应商' : '客户', dataIndex: props.pageType == 'pur'?'suName': 'cuName' ,}, + { title: '有效期开始',dataIndex: 'dateFrom', width: 120,}, + { title: '有效期结束',dataIndex: 'dateTo', width: 120}, + { title: t('合同主体'), dataIndex: 'comName', }, + { title: t('交割点'), dataIndex: 'pointDelyName'}, + { title: t('上载点'), dataIndex: 'pointUpName'}, + { title: t('计量单位'), dataIndex: 'uomName'}, + + ]; + if (props.pageType == 'sales') { + columns.splice(7, 1) + } const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { + showTable.value = true + comId.value = data.comId setModalProps({ confirmLoading: false }); - + setPagination({'limit': 1,'size': 10,'page': 1}); isUpdate.value = !!data?.isUpdate; - comId.value = data.comId }); - const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({ + const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload,setPagination }] = useTable({ title: t('管道气采购合同列表'), - api: getLngPriceContractPurPng, + api: props.pageType == 'pur' ? getLngPriceContractPurPng : getLngPriceContractSalesPng, + rowKey: 'id', columns, bordered: true, @@ -83,10 +93,15 @@ onChange: onSelectChange }, }); - const handleVisibleChange = (visible: boolean) => { + const handleVisibleChange = async (visible: boolean) => { if (visible) { + showTable.value = false + await nextTick(); + await nextTick(); + await nextTick(); nextTick(() => { - reload(); + + reload({searchInfo:{'limit':1,'size':10,'page':1}}); }); } }; @@ -94,7 +109,7 @@ selectedKeys.value = rowKeys; selectedValues.value = e } - const getTitle = computed(() => (!unref(isUpdate) ? t('管道气采购合同列表') : t(''))); + const getTitle = computed(() => (!unref(isUpdate) ? t(props.pageType == 'pur'?'管道气采购合同列表': '管道气销售合同列表') : t(''))); async function handleSubmit() { if (!selectedValues.value.length) { diff --git a/src/components/common/priceInfoList.vue b/src/components/common/priceInfoList.vue index 2aed8bf..e5a0940 100644 --- a/src/components/common/priceInfoList.vue +++ b/src/components/common/priceInfoList.vue @@ -2,14 +2,14 @@
删除 - +