From 62e9e7fa856bed1da44b610275ef64f6dc7014c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Thu, 5 Mar 2026 16:09:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E6=89=A7=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/ship/OpsSalesInt/index.ts | 3 +-
src/router/routes/basic.ts | 8 +
src/views/ship/OpsPurInt/index.vue | 4 +-
.../ship/OpsSalesInt/components/config.ts | 53 +-
.../OpsSalesInt/components/createForm.vue | 740 ++++++++++++++++++
src/views/ship/OpsSalesInt/index.vue | 105 +--
src/views/ship/ShipSchedule/index.vue | 27 +-
7 files changed, 842 insertions(+), 98 deletions(-)
create mode 100644 src/views/ship/OpsSalesInt/components/createForm.vue
diff --git a/src/api/ship/OpsSalesInt/index.ts b/src/api/ship/OpsSalesInt/index.ts
index 8987aa1..0a30260 100644
--- a/src/api/ship/OpsSalesInt/index.ts
+++ b/src/api/ship/OpsSalesInt/index.ts
@@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
- Page = '/ship/opsSalesInt/page',
+ // Page = '/ship/opsSalesInt/page',
+ Page = '/magic-api/ship/opsSalesIntPageList',
List = '/ship/opsSalesInt/list',
Info = '/ship/opsSalesInt/info',
LngOpsSalesInt = '/ship/opsSalesInt',
diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts
index 2c40371..e32005e 100644
--- a/src/router/routes/basic.ts
+++ b/src/router/routes/basic.ts
@@ -326,6 +326,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
title: (route) => route.query.formName
}
},
+ {
+ path: '/ship/OpsSalesInt/createForm',
+ name: 'OpsSalesInt',
+ component: () => import('/@/views/ship/OpsSalesInt/components/createForm.vue'),
+ meta: {
+ title: (route) => route.query.formName
+ }
+ },
]
diff --git a/src/views/ship/OpsPurInt/index.vue b/src/views/ship/OpsPurInt/index.vue
index b9cec4e..17d2df8 100644
--- a/src/views/ship/OpsPurInt/index.vue
+++ b/src/views/ship/OpsPurInt/index.vue
@@ -135,7 +135,7 @@
},
immediate: false,
beforeFetch: (params) => {
- return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
+ return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit};
},
afterFetch: (res) => {
tableRef.value.setToolBarWidth();
@@ -146,7 +146,7 @@
striped: false,
actionColumn: {
- width: 160,
+ width: 130,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
diff --git a/src/views/ship/OpsSalesInt/components/config.ts b/src/views/ship/OpsSalesInt/components/config.ts
index 7b280de..0c63875 100644
--- a/src/views/ship/OpsSalesInt/components/config.ts
+++ b/src/views/ship/OpsSalesInt/components/config.ts
@@ -6,41 +6,17 @@ export const formConfig = {
};
export const searchFormSchema: FormSchema[] = [
- {
- field: 'id',
- label: 'id',
- component: 'Input',
- },
+
{
field: 'ssNo',
label: '船期编号',
component: 'Input',
},
- {
- field: 'kId',
- label: '合同',
- component: 'Input',
- },
- {
- field: 'longSpotCode',
- label: '长协/现货',
- component: 'Input',
- },
- {
- field: 'comId',
- label: '交易主体',
- component: 'Input',
- },
{
field: 'dateEta',
label: '卸港ETA',
component: 'Input',
},
- {
- field: 'portUnloading1Code',
- label: '卸港港口',
- component: 'Input',
- },
{
field: 'cuName',
label: '客户',
@@ -49,26 +25,17 @@ export const searchFormSchema: FormSchema[] = [
];
export const columns: BasicColumn[] = [
- {
- dataIndex: 'id',
- title: 'id',
- componentType: 'input',
- align: 'left',
-
- sorter: true,
- },
-
{
dataIndex: 'ssNo',
title: '船期编号',
componentType: 'input',
align: 'left',
-
+ width: 130,
sorter: true,
},
{
- dataIndex: 'kId',
+ dataIndex: 'kName',
title: '合同',
componentType: 'input',
align: 'left',
@@ -77,20 +44,20 @@ export const columns: BasicColumn[] = [
},
{
- dataIndex: 'longSpotCode',
+ dataIndex: 'longSpotName',
title: '长协/现货',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
{
- dataIndex: 'comId',
+ dataIndex: 'comName',
title: '交易主体',
componentType: 'input',
align: 'left',
-
+ width: 130,
sorter: true,
},
@@ -99,7 +66,7 @@ export const columns: BasicColumn[] = [
title: '卸港ETA',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -108,7 +75,7 @@ export const columns: BasicColumn[] = [
title: '卸港港口',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
@@ -117,7 +84,7 @@ export const columns: BasicColumn[] = [
title: '客户',
componentType: 'input',
align: 'left',
-
+ width: 150,
sorter: true,
},
];
diff --git a/src/views/ship/OpsSalesInt/components/createForm.vue b/src/views/ship/OpsSalesInt/components/createForm.vue
new file mode 100644
index 0000000..01971f2
--- /dev/null
+++ b/src/views/ship/OpsSalesInt/components/createForm.vue
@@ -0,0 +1,740 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.fullName }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.fullName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ship/OpsSalesInt/index.vue b/src/views/ship/OpsSalesInt/index.vue
index 720dc36..18d6ebe 100644
--- a/src/views/ship/OpsSalesInt/index.vue
+++ b/src/views/ship/OpsSalesInt/index.vue
@@ -29,9 +29,7 @@
const logId = ref('')
const logPath = ref('/ship/opsSalesInt/datalog');
import { DataLog } from '/@/components/pcitc';
- import { ref, computed, onMounted, onUnmounted, createVNode,
-
-} from 'vue';
+ import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
@@ -51,7 +49,7 @@
import Icon from '/@/components/Icon/index';
import useEventBus from '/@/hooks/event/useEventBus';
import { cloneDeep } from 'lodash-es';
-
+ import dayjs from 'dayjs';
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
const { notification } = useMessage();
@@ -89,8 +87,9 @@
formIdComputedRef.value = currentRoute.value.meta.formId
const schemaIdComputedRef = ref();
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
+ const defaultDate = ref([dayjs().startOf('year').format('YYYY-MM-DD'), dayjs().add(1, 'year').endOf('year').format('YYYY-MM-DD')]);
const [registerModal, { openModal }] = useModal();
- const formName='销售执行';
+ const formName=currentRoute.value.meta?.title;
const [registerTable, { reload, }] = useTable({
title: '' || (formName + '列表'),
api: getLngOpsSalesIntPage,
@@ -100,12 +99,35 @@
rowProps: {
gutter: 16,
},
- schemas: customSearchFormSchema,
- fieldMapToTime: [],
- showResetButton: false,
+ schemas: [
+ {
+ field: 'dateEta',
+ label: '卸港ETA',
+ component: 'RangePicker',
+ defaultValue: defaultDate.value,
+ componentProps: {
+ format: 'YYYY-MM-DD',
+ style: { width: '100%' },
+ getPopupContainer: () => document.body,
+ },
+ },
+ {
+ field: 'ssNo',
+ label: '船期编号',
+ component: 'Input',
+ },
+ {
+ field: 'cuName',
+ label: '客户',
+ component: 'Input',
+ },
+ ],
+ fieldMapToTime: [['dateEta', ['startDate', 'endDate'], 'YYYY-MM-DD']],
+ showResetButton: true,
},
+ immediate: false,
beforeFetch: (params) => {
- return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
+ return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit };
},
afterFetch: (res) => {
tableRef.value.setToolBarWidth();
@@ -116,7 +138,7 @@
striped: false,
actionColumn: {
- width: 160,
+ width: 130,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
@@ -129,39 +151,16 @@
});
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/OpsSalesInt/' + record.id + '/viewForm',
- query: {
+ router.push({
+ path: '/ship/OpsSalesInt/createForm',
+ query: {
formPath: 'ship/OpsSalesInt',
- formName: formName,
- formId:currentRoute.value.meta.formId
- }
- });
- }
+ formName: '查看'+ formName,
+ formId:currentRoute.value.meta.formId,
+ id: record.id,
+ type: 'view'
+ }
+ });
}
function buttonClick(code) {
@@ -180,10 +179,10 @@
});
} else {
router.push({
- path: '/form/OpsSalesInt/0/createForm',
+ path: '/ship/OpsSalesInt/createForm',
query: {
formPath: 'ship/OpsSalesInt',
- formName: formName,
+ formName: '新建'+formName,
formId:currentRoute.value.meta.formId
}
});
@@ -193,11 +192,13 @@
function handleEdit(record: Recordable) {
router.push({
- path: '/form/OpsSalesInt/' + record.id + '/updateForm',
+ path: '/ship/OpsSalesInt/createForm',
query: {
formPath: 'ship/OpsSalesInt',
- formName: formName,
- formId:currentRoute.value.meta.formId
+ formName: '编辑'+ formName,
+ formId:currentRoute.value.meta.formId,
+ id: record.id,
+ type: 'edit'
}
});
}
@@ -237,7 +238,7 @@
}
onMounted(() => {
-
+ reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }});
if (schemaIdComputedRef.value) {
bus.on(FLOW_PROCESSED, handleRefresh);
bus.on(CREATE_FLOW, handleRefresh);
@@ -305,4 +306,12 @@
.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;
+ }
\ No newline at end of file
diff --git a/src/views/ship/ShipSchedule/index.vue b/src/views/ship/ShipSchedule/index.vue
index b18e22f..78314bf 100644
--- a/src/views/ship/ShipSchedule/index.vue
+++ b/src/views/ship/ShipSchedule/index.vue
@@ -248,11 +248,30 @@
}
});
}
- function handleOpspur () {
-
+ function handleOpspur (record) {
+ router.push({
+ path: '/ship/OpsPurInt/createForm',
+ query: {
+ formPath: 'ship/OpsPurInt',
+ formName: record.opsPurId ? '编辑采购执行' : '新建采购执行',
+ formId:currentRoute.value.meta.formId,
+ id: record.opsPurId,
+ type: record.opsPurId ? 'edit' : ''
+ }
+ });
+
}
- function handleOpssales () {
-
+ function handleOpssales (record) {
+ router.push({
+ path: '/ship/OpsSalesInt/createForm',
+ query: {
+ formPath: 'ship/OpsSalesInt',
+ formName: record.opsSalesId ? '编辑销售执行' : '新建销售执行',
+ formId:currentRoute.value.meta.formId,
+ id: record.opsSalesId,
+ type: record.opsSalesId ? 'edit' : ''
+ }
+ });
}
function handleSend () {
// if (!selectedKeys.value.length) {