diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue index 6187adb..fe2afa0 100644 --- a/src/views/modules/inspection/inspectionRequestList.vue +++ b/src/views/modules/inspection/inspectionRequestList.vue @@ -407,9 +407,12 @@ @@ -473,9 +476,12 @@ @@ -919,9 +925,12 @@ @@ -1124,6 +1133,7 @@ import ComInspectionRequestAttachmentTab from './com_inspectionRequestAttachment import ComInspectionRequestFeeTab from './com_inspectionRequestFeeTab.vue' import { fetchSupplierDetail } from '@/utils/supplierChooselistHelper' import excel from '@/utils/excel-util.js' +import { listActiveShipMethods } from '@/api/port/portTransit.js' export default { props: { @@ -1161,6 +1171,7 @@ export default { currentRow: {}, tagNo: '', searchType: '', + shipMethodOptions: [], // 供应商模式上下文:来自 /sys/user/info(user.supplierNo / user.supplierName) currentSupplierNo: '', currentSupplierName: '', @@ -1701,12 +1712,32 @@ export default { removeMainTableResizeListener () { window.removeEventListener('resize', this.handleMainTableResize) }, + /** + * 加载启用的运输方式下拉选项。 + * 数据来源:POST /portTransitCycle/shipMethodList(仅 active=Y) + * 以 methodDesc 作为选项 label 与 value,与订单/港口周期表存储的运输方式描述保持一致。 + */ + loadShipMethodOptions () { + return listActiveShipMethods().then(({ data }) => { + if (data && data.code === 0) { + this.shipMethodOptions = (data.rows || []).map(item => ({ + label: item.methodDesc, + value: item.methodDesc + })) + } else { + this.shipMethodOptions = [] + } + }).catch(() => { + this.shipMethodOptions = [] + }) + }, /** * 页面初始化入口: * - 通用模式:直接查询; * - 供应商模式:先加载当前用户供应商信息,再按供应商过滤查询。 */ async initPageData () { + this.loadShipMethodOptions() if (!this.isSupplierPageMode) { this.getMainData() return diff --git a/src/views/modules/order/poOrder.vue b/src/views/modules/order/poOrder.vue index 239d4d6..009f02f 100644 --- a/src/views/modules/order/poOrder.vue +++ b/src/views/modules/order/poOrder.vue @@ -3965,7 +3965,7 @@ export default { return } - if (tag === 2019) { + if (tag === 532) { const via = data.method_desc || data.methodDesc || data.shipVia || '' if (ctx === 'add') { this.addForm.shipVia = via @@ -4927,7 +4927,7 @@ export default { }) }, - // 新增 schema 中若展示运输方式(ship_via / S_Method),则默认填充为海运 + // 新增 schema 中若展示运输方式(ship_via / S_Method),则默认填充为 Ocean applyAddDefaultShipViaBySchema (targetForm) { if (!targetForm || !Array.isArray(this.addFormSchemaFields) || !this.addFormSchemaFields.length) { return @@ -4942,7 +4942,7 @@ export default { } const current = targetForm[prop] if (current === undefined || current === null || String(current).trim() === '') { - this.$set(targetForm, prop, '海运') + this.$set(targetForm, prop, 'Ocean') } }, @@ -5298,7 +5298,7 @@ export default { }, openAddShipViaSelect (target = 'master') { const context = target === 'detail' ? 'addDetail' : 'add' - this.openEamList(2019, '', '', context, 'shipVia') + this.openEamList(532, '', '', context, 'shipVia') }, buildMergedAddDetailForm (detailRow) { @@ -5438,7 +5438,7 @@ export default { openShipViaSelect (row) { this.currentShipViaRow = row - this.openEamList(2019, '', '', 'row', 'shipVia') + this.openEamList(532, '', '', 'row', 'shipVia') }, /** diff --git a/src/views/modules/port/portTransit.vue b/src/views/modules/port/portTransit.vue index 594ede6..8c6dd84 100644 --- a/src/views/modules/port/portTransit.vue +++ b/src/views/modules/port/portTransit.vue @@ -95,7 +95,7 @@ -
+
运输周期
-