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() } }