From 312591bfd33c03779a14ba9ea13e845ec5fdf61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Mon, 23 Mar 2026 17:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inventory/LngInventoryIn/index.ts | 17 +- src/components/common/OpsPurIntListModal.vue | 40 ++-- src/components/common/priceInfoList.vue | 8 +- src/components/common/settleLngHdrList.vue | 31 +-- .../LngSettleHdr/components/createForm.vue | 9 - .../LngInventoryIn/components/createForm.vue | 192 +++++++++--------- src/views/inventory/LngInventoryIn/index.vue | 80 ++++---- 7 files changed, 198 insertions(+), 179 deletions(-) diff --git a/src/api/inventory/LngInventoryIn/index.ts b/src/api/inventory/LngInventoryIn/index.ts index 912577d..62e4729 100644 --- a/src/api/inventory/LngInventoryIn/index.ts +++ b/src/api/inventory/LngInventoryIn/index.ts @@ -3,17 +3,28 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/inventory/lngInventoryIn/page', + // Page = '/inventory/lngInventoryIn/page', + Page = '/magic-api/inventory/inventoryInPageList', List = '/inventory/lngInventoryIn/list', Info = '/inventory/lngInventoryIn/info', LngInventoryIn = '/inventory/lngInventoryIn', - + lngInventorySelectMpi='/magic-api/inventory/lngInventorySelectMpi', DataLog = '/inventory/lngInventoryIn/datalog', } - +export async function getLngInventoryInShip(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.lngInventorySelectMpi, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} /** * @description: 查询LngInventoryIn分页列表 */ diff --git a/src/components/common/OpsPurIntListModal.vue b/src/components/common/OpsPurIntListModal.vue index f3db0e6..64bc716 100644 --- a/src/components/common/OpsPurIntListModal.vue +++ b/src/components/common/OpsPurIntListModal.vue @@ -14,20 +14,10 @@ import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; import { getLngOpsPurIntPage} from '/@/api/ship/OpsPurInt'; - + import dayjs from 'dayjs'; const { t } = useI18n(); const codeFormSchema: FormSchema[] = [ - { field: 'ssNo', label: '船期编号', component: 'Input'}, - { - field: 'dateFrom', - label: '卸港ETA', - component: 'RangePicker', - componentProps: { - format: 'YYYY-MM-DD', - style: { width: '100%' }, - getPopupContainer: () => document.body, - }, - }, + ]; const columns: BasicColumn[] = [ @@ -50,8 +40,11 @@ const selectedValues = ref([]); const props = defineProps({ selectType: { type: String, default: 'radio' }, + defaultDateType: { type: Boolean, default: false } }); + const defaultDate = ref([dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]); + const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { showTable.value = true setModalProps({ confirmLoading: false }); @@ -69,7 +62,20 @@ canResize: false, formConfig: { labelCol:{span: 9, offSet:10}, - schemas: codeFormSchema, + schemas: [ + { field: 'ssNo', label: '船期编号', component: 'Input'}, + { + field: 'dateFrom', + label: '卸港ETA', + component: 'RangePicker', + defaultValue: props.defaultDateType ? defaultDate.value : [], + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, + ], fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, @@ -89,7 +95,11 @@ await nextTick(); await nextTick(); nextTick(() => { - reload(); + if (props.defaultDateType) { + reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }}); + } else { + reload() + } }); } }; @@ -97,7 +107,7 @@ selectedKeys.value = rowKeys; selectedValues.value = e } - const getTitle = computed(() => (!unref(isUpdate) ? t('采购执行列表') : t(''))); + const getTitle = ('采购执行列表') async function handleSubmit() { if (!selectedValues.value.length) { diff --git a/src/components/common/priceInfoList.vue b/src/components/common/priceInfoList.vue index 6e62f96..3c8535e 100644 --- a/src/components/common/priceInfoList.vue +++ b/src/components/common/priceInfoList.vue @@ -143,16 +143,16 @@ const emit = defineEmits(['change']); const numCount = (record, idx, k)=> { let uomCode = dataListPrice.value[idx].uomCode - if (uomCode == 'GJ' && k == 'rateQtyGj' && record[k]) { + if (uomCode == 'GJ' && k == 'rateQtyGj') { record.rateQtyM3 = record.rateM3Gj ? (Number(record.rateQtyGj || 0)/ Number(record.rateM3Gj)).toFixed(4) : '' } - if (uomCode == 'GJ' && k == 'priceGj' && record[k]) { + if (uomCode == 'GJ' && k == 'priceGj') { record.priceM3 = record.rateM3Gj ? (Number(record.priceGj || 0) / Number(record.rateM3Gj)).toFixed(4) : '' } - if (uomCode == 'M3' && k == 'rateQtyM3' && record[k]) { + if (uomCode == 'M3' && k == 'rateQtyM3' ) { record.rateQtyGj = (Number(record.rateQtyM3 || 0)*Number(record.rateM3Gj || 0)).toFixed(3) } - if (uomCode == 'M3' && k == 'priceM3' && record[k]) { + if (uomCode == 'M3' && k == 'priceM3') { record.priceGj = (Number(record.priceM3 || 0)*Number(record.rateM3Gj || 0)).toFixed(3) } updatePriceDesc(idx) diff --git a/src/components/common/settleLngHdrList.vue b/src/components/common/settleLngHdrList.vue index f1225f1..a294594 100644 --- a/src/components/common/settleLngHdrList.vue +++ b/src/components/common/settleLngHdrList.vue @@ -25,19 +25,19 @@