From 29709662de898e6798d3894e47cc50b359f63f3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Tue, 24 Mar 2026 16:20:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/inventory/LngInventoryOut/index.ts | 3 +-
.../common/contractSalesLngListModal.vue | 142 +++++++
src/router/routes/basic.ts | 8 +
.../LngInventoryIn/components/config.ts | 24 +-
.../LngInventoryIn/components/createForm.vue | 13 +-
.../LngInventoryOut/components/config.ts | 27 +-
.../LngInventoryOut/components/createForm.vue | 399 ++++++++++++++++++
src/views/inventory/LngInventoryOut/index.vue | 86 ++--
8 files changed, 618 insertions(+), 84 deletions(-)
create mode 100644 src/components/common/contractSalesLngListModal.vue
create mode 100644 src/views/inventory/LngInventoryOut/components/createForm.vue
diff --git a/src/api/inventory/LngInventoryOut/index.ts b/src/api/inventory/LngInventoryOut/index.ts
index be34f44..a9d477b 100644
--- a/src/api/inventory/LngInventoryOut/index.ts
+++ b/src/api/inventory/LngInventoryOut/index.ts
@@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
- Page = '/inventory/lngInventoryOut/page',
+ // Page = '/inventory/lngInventoryOut/page',
+ Page = '/magic-api/inventory/inventoryOutPageList',
List = '/inventory/lngInventoryOut/list',
Info = '/inventory/lngInventoryOut/info',
LngInventoryOut = '/inventory/lngInventoryOut',
diff --git a/src/components/common/contractSalesLngListModal.vue b/src/components/common/contractSalesLngListModal.vue
new file mode 100644
index 0000000..0fb38be
--- /dev/null
+++ b/src/components/common/contractSalesLngListModal.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts
index 7d98ce5..e324b5d 100644
--- a/src/router/routes/basic.ts
+++ b/src/router/routes/basic.ts
@@ -374,6 +374,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
title: (route) => (route.query.formName)
}
},
+ {
+ path: '/inventory/LngInventoryOut/createForm',
+ name: 'LngInventoryOut',
+ component: () => import('/@/views/inventory/LngInventoryOut/components/createForm.vue'),
+ meta: {
+ title: (route) => (route.query.formName)
+ }
+ },
]
diff --git a/src/views/inventory/LngInventoryIn/components/config.ts b/src/views/inventory/LngInventoryIn/components/config.ts
index e476925..707089e 100644
--- a/src/views/inventory/LngInventoryIn/components/config.ts
+++ b/src/views/inventory/LngInventoryIn/components/config.ts
@@ -49,7 +49,7 @@ export const columns: BasicColumn[] = [
title: '入库类型',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
{
@@ -57,7 +57,7 @@ export const columns: BasicColumn[] = [
title: '船期编号',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
{
@@ -65,7 +65,7 @@ export const columns: BasicColumn[] = [
title: '接收站',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -74,7 +74,7 @@ export const columns: BasicColumn[] = [
title: '入库日期',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -83,7 +83,7 @@ export const columns: BasicColumn[] = [
title: '入库热值(MMBtu)',
componentType: 'input',
align: 'left',
-
+ width: 130,
sorter: true,
},
@@ -92,7 +92,7 @@ export const columns: BasicColumn[] = [
title: '入库重量(吨)',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -101,7 +101,7 @@ export const columns: BasicColumn[] = [
title: '入库体积(标方)',
componentType: 'input',
align: 'left',
-
+ width: 130,
sorter: true,
},
@@ -110,7 +110,7 @@ export const columns: BasicColumn[] = [
title: '入库体积(方)',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -119,7 +119,7 @@ export const columns: BasicColumn[] = [
title: '入库热值(吉焦)',
componentType: 'input',
align: 'left',
-
+ width: 130,
sorter: true,
},
{
@@ -127,7 +127,7 @@ export const columns: BasicColumn[] = [
title: '合同',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
{
@@ -135,7 +135,7 @@ export const columns: BasicColumn[] = [
title: '供应商',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
{
@@ -143,7 +143,7 @@ export const columns: BasicColumn[] = [
title: '公司',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
];
diff --git a/src/views/inventory/LngInventoryIn/components/createForm.vue b/src/views/inventory/LngInventoryIn/components/createForm.vue
index 5a502ec..b4ae59a 100644
--- a/src/views/inventory/LngInventoryIn/components/createForm.vue
+++ b/src/views/inventory/LngInventoryIn/components/createForm.vue
@@ -16,7 +16,7 @@
-
+
{{ item.label }}
@@ -30,7 +30,7 @@
-
+
{{ item.name }}
@@ -54,7 +54,7 @@
-
+
@@ -344,7 +344,6 @@
}
}
async function getOption() {
- optionSelect.approCodeList = await getDictionary('LNG_APPRO')
optionSelect.typeCodeList = await getDictionary('LNG_INV_I')
let res = await getAllCom() || []
optionSelect.comIdList = res.map(v=> {
@@ -443,11 +442,7 @@
formState.qtyUnloadM3 = res[0]?.qtyM3
formState.qtyUnloadGj = res[0]?.qtyGj
- numCount()
-
- if (pageSource.value) {
- getOptionParams()
- }
+ numCount('')
} catch (error) {
spinning.value = false
}
diff --git a/src/views/inventory/LngInventoryOut/components/config.ts b/src/views/inventory/LngInventoryOut/components/config.ts
index 818005d..c0646fa 100644
--- a/src/views/inventory/LngInventoryOut/components/config.ts
+++ b/src/views/inventory/LngInventoryOut/components/config.ts
@@ -48,7 +48,7 @@ export const columns: BasicColumn[] = [
title: '出库类型',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -57,7 +57,7 @@ export const columns: BasicColumn[] = [
title: '接收站',
componentType: 'input',
align: 'left',
-
+ width: 150,
sorter: true,
},
@@ -66,7 +66,7 @@ export const columns: BasicColumn[] = [
title: '出库日期',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -75,7 +75,7 @@ export const columns: BasicColumn[] = [
title: '出库量(吉焦)',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -84,16 +84,7 @@ export const columns: BasicColumn[] = [
title: '出库量(吨)',
componentType: 'input',
align: 'left',
-
- sorter: true,
- },
-
- {
- dataIndex: 'qtyM3',
- title: '出库量(方)',
- componentType: 'input',
- align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -102,7 +93,7 @@ export const columns: BasicColumn[] = [
title: '出库金额',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
{
@@ -110,7 +101,7 @@ export const columns: BasicColumn[] = [
title: '销售合同',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
{
@@ -118,7 +109,7 @@ export const columns: BasicColumn[] = [
title: '客户名称',
componentType: 'input',
align: 'left',
-
+ width: 150,
sorter: true,
},
{
@@ -126,7 +117,7 @@ export const columns: BasicColumn[] = [
title: '公司名称',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
];
diff --git a/src/views/inventory/LngInventoryOut/components/createForm.vue b/src/views/inventory/LngInventoryOut/components/createForm.vue
new file mode 100644
index 0000000..f98bea5
--- /dev/null
+++ b/src/views/inventory/LngInventoryOut/components/createForm.vue
@@ -0,0 +1,399 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/inventory/LngInventoryOut/index.vue b/src/views/inventory/LngInventoryOut/index.vue
index 45259e2..b2c4b15 100644
--- a/src/views/inventory/LngInventoryOut/index.vue
+++ b/src/views/inventory/LngInventoryOut/index.vue
@@ -29,9 +29,7 @@
const logId = ref('')
const logPath = ref('/inventory/lngInventoryOut/datalog');
import { DataLog } from '/@/components/pcitc';
- import { ref, computed, onMounted, onUnmounted, createVNode,
-
-} from 'vue';
+ import { ref, computed, onMounted, onUnmounted, createVNode, watch} from 'vue';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
@@ -52,6 +50,7 @@
import useEventBus from '/@/hooks/event/useEventBus';
import { cloneDeep } from 'lodash-es';
import { getAllCom} from '/@/api/contract/ContractPurInt';
+ import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
@@ -83,7 +82,7 @@
});
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,delete : handleDelete,}
-
+ const tableData = ref([])
const { currentRoute } = useRouter();
const router = useRouter();
const formIdComputedRef = ref();
@@ -92,7 +91,7 @@
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
const [registerModal, { openModal }] = useModal();
const formName=currentRoute.value.meta?.title;
- const [registerTable, { reload, }] = useTable({
+ const [registerTable, { reload, setTableData }] = useTable({
title: '' || (formName + '列表'),
api: getLngInventoryOutPage,
rowKey: 'id',
@@ -109,6 +108,7 @@
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
},
afterFetch: (res) => {
+ tableData.value = res || []
tableRef.value.setToolBarWidth();
},
@@ -128,41 +128,37 @@
},
});
-
+ watch(
+ () => tableData.value,
+ (val) => {
+ if (val) {
+ let arr = DataFormat.format(val, [
+ FormatOption.createQty('qtyGj'),
+ FormatOption.createQty('qtyTon'),
+ FormatOption.createQty('qtyM3'),
+ FormatOption.createAmt('amount'),
+ ]);
+ if (arr.length) {
+ setTableData(arr)
+ }
+ }
+ },
+ {
+ immediate: true,
+ deep: true,
+ }
+ );
function dbClickRow(record) {
- if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
- return;
- }
- 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
- }
- });
- } else if (schemaId && !taskIds && processId) {
- router.push({
- path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
- query: {
- readonly: 1,
- taskId: '',
- formName: formName,
- formId:currentRoute.value.meta.formId
- }
- });
- } else {
- router.push({
- path: '/form/LngInventoryOut/' + record.id + '/viewForm',
- query: {
+ router.push({
+ path: '/inventory/LngInventoryOut/createForm',
+ query: {
formPath: 'inventory/LngInventoryOut',
- formName: formName,
- formId:currentRoute.value.meta.formId
- }
- });
- }
+ formName: '查看'+formName,
+ formId:currentRoute.value.meta.formId,
+ type: 'view',
+ id: record.id
+ }
+ });
}
function buttonClick(code) {
@@ -181,10 +177,10 @@
});
} else {
router.push({
- path: '/form/LngInventoryOut/0/createForm',
+ path: '/inventory/LngInventoryOut/createForm',
query: {
formPath: 'inventory/LngInventoryOut',
- formName: formName,
+ formName: '新建'+formName,
formId:currentRoute.value.meta.formId
}
});
@@ -194,11 +190,13 @@
function handleEdit(record: Recordable) {
router.push({
- path: '/form/LngInventoryOut/' + record.id + '/updateForm',
+ path: '/inventory/LngInventoryOut/createForm',
query: {
formPath: 'inventory/LngInventoryOut',
- formName: formName,
- formId:currentRoute.value.meta.formId
+ formName: '编辑'+formName,
+ formId:currentRoute.value.meta.formId,
+ type: 'edit',
+ id: record.id
}
});
}
@@ -216,7 +214,7 @@
deleteLngInventoryOut(ids).then((_) => {
handleSuccess();
notification.success({
- message: 'Tip',
+ message: '提示',
description: t('删除成功!'),
});
});