From c79d08de04bef891336a4fda5f27aa1a4bdd7363 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 29 Sep 2026 15:01:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(supplier):=20=E6=96=B0=E5=A2=9E=E5=A7=8B?= =?UTF-8?q?=E5=8F=91=E6=B8=AF=E5=AD=97=E6=AE=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在供应商列表页面新增始发港列显示和编辑功能 - 在供应商信息页面增加始发港下拉选择组件 - 集成港口信息API实现始发港数据查询和映射 - 添加始发港字段的数据保存和展示逻辑 - 更新检验列表页面显示计划开始结束日期和验货地址 - 重构表格列顺序以优化用户体验 --- .../modules/inspection/myInspectionList.vue | 6 +- .../modules/srmSupplier/supplierLeadTime.vue | 48 +++++++++++++- .../modules/srmSupplier/supplierList.vue | 59 +++++++++++++++++ .../modules/srmSupplier/supplierListView.vue | 63 +++++++++++++++++++ 4 files changed, 170 insertions(+), 6 deletions(-) diff --git a/src/views/modules/inspection/myInspectionList.vue b/src/views/modules/inspection/myInspectionList.vue index 1c35f05..2811c4f 100644 --- a/src/views/modules/inspection/myInspectionList.vue +++ b/src/views/modules/inspection/myInspectionList.vue @@ -13,6 +13,9 @@ v-loading="loading" style="width: 100%"> + + + @@ -28,10 +31,7 @@ - - - diff --git a/src/views/modules/srmSupplier/supplierLeadTime.vue b/src/views/modules/srmSupplier/supplierLeadTime.vue index 233046b..6a83663 100644 --- a/src/views/modules/srmSupplier/supplierLeadTime.vue +++ b/src/views/modules/srmSupplier/supplierLeadTime.vue @@ -42,6 +42,9 @@ + + + + + + + + + + +
@@ -420,6 +435,7 @@ import { testCurrentLoginSite } from '@/api/srm/srmSupplier.js' import excel from '@/utils/excel-util.js' +import { searchPortList } from '@/api/port/portInfo.js' import Chooselist from '@/views/modules/common/Chooselist_eam' import SysDictSelect from '@/components/dict/SysDictSelect.vue' import contract from './com_srmSupplier_Contract' @@ -454,6 +470,8 @@ export default { mainDataList: [], supplierGroupRequestList: [], supplierDocTypeOptions: [], + // 始发港下拉选项(来源 port_Info,is_departure_port='Y') + originPortOptions: [], dataListLoading: false, activeName: 'AddressTab', columnArray1: [ @@ -583,6 +601,24 @@ export default { status: true, fixed: false }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '811001Table1DefaultOriginPort', + tableId: '811001Table1', + tableName: '供应商信息', + columnProp: 'defaultOriginPort', + headerAlign: 'center', + align: 'center', + columnLabel: '默认始发港', + columnWidth: '120', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, { userId: this.$store.state.user.name, functionId: this.functionId, @@ -1324,6 +1360,7 @@ export default { updateBy: '', memo:'', planner: '', + defaultOriginPort: '', site: this.$store.state.user.site, }, supplierRules: { @@ -1378,6 +1415,26 @@ export default { 'status-inactive': status === 'Inactive' } }, + // 加载始发港下拉选项(port_Info 中 is_departure_port='Y') + loadOriginPortOptions () { + searchPortList({ isDeparturePort: 'Y' }).then(({ data }) => { + if (data && data.code === 0) { + this.originPortOptions = Array.isArray(data.rows) ? data.rows : [] + } else { + this.originPortOptions = [] + } + }).catch(() => { + this.originPortOptions = [] + }) + }, + // 始发港保存的是港口编码,列表/展示时映射为港口名称;无匹配则回退原值 + portNameByCode (code) { + if (code === null || code === undefined || code === '') { + return '' + } + const hit = this.originPortOptions.find(p => p.portCode === code) + return hit ? hit.portName : code + }, /** * 查询列表小单费去尾零。 * 业务意图:handling_charge 按“去尾零”展示,整数显示为 1 而不是 1.000。 @@ -1754,6 +1811,7 @@ export default { updateBy: '', memo:'', planner: '', + defaultOriginPort: '', site: this.$store.state.user.site, } this.loadSupplierDocTypeOptions() @@ -1841,6 +1899,7 @@ export default { created() { // 查询报表的类型 this.getMainData() + this.loadOriginPortOptions() } } diff --git a/src/views/modules/srmSupplier/supplierListView.vue b/src/views/modules/srmSupplier/supplierListView.vue index b5c2445..b07da63 100644 --- a/src/views/modules/srmSupplier/supplierListView.vue +++ b/src/views/modules/srmSupplier/supplierListView.vue @@ -68,6 +68,9 @@ {{ formatSupplierNumberDisplay(scope.row[item.columnProp]) }} + + {{ portNameByCode(scope.row.defaultOriginPort) }} + {{ scope.row[item.columnProp] }} { + if (data && data.code === 0) { + this.originPortOptions = Array.isArray(data.rows) ? data.rows : [] + } else { + this.originPortOptions = [] + } + }).catch(() => { + this.originPortOptions = [] + }) + }, + // 始发港保存的是港口编码,列表展示时映射为港口名称;无匹配则回退原值 + portNameByCode (code) { + if (code === null || code === undefined || code === '') { + return '' + } + const hit = this.originPortOptions.find(p => p.portCode === code) + return hit ? hit.portName : code + }, /** * 查询列表小单费去尾零。 * 业务意图:handling_charge 按“去尾零”展示,整数显示为 1 而不是 1.000。 @@ -1239,6 +1301,7 @@ export default { created () { // 查询报表的类型 this.getMainData() + this.loadOriginPortOptions() } }