From 87cb31cbefd110931a97076f0190edb369997389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Mon, 3 Aug 2026 12:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=93=81=E6=B5=81=E7=A8=8BOK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/supplierChooselistHelper.js | 5 +- .../inspection/inspectionRequestList.vue | 71 ++++++++++++++--- src/views/modules/order/poOrder.vue | 19 +++-- .../modules/srmSupplier/supplierList.vue | 78 +++++++++++++++---- src/views/modules/sys/user-add-or-update.vue | 6 +- 5 files changed, 146 insertions(+), 33 deletions(-) diff --git a/src/utils/supplierChooselistHelper.js b/src/utils/supplierChooselistHelper.js index e086e32..cc47969 100644 --- a/src/utils/supplierChooselistHelper.js +++ b/src/utils/supplierChooselistHelper.js @@ -28,10 +28,11 @@ export function fetchSupplierDetail (supplierNo, site) { export function resolveSupplierShortFieldsFromDetail (detail) { if (!detail) { - return { shortOffice: '', shortNpc: '' } + return { shortOffice: '', shortNpc: '', planner: '' } } return { shortOffice: detail.cshortOffice || detail.cShortOffice || detail.c_short_office || detail.shortOffice || '', - shortNpc: detail.cshortNpc || detail.cShortNpc || detail.c_short_npc || detail.shortNpc || '' + shortNpc: detail.cshortNpc || detail.cShortNpc || detail.c_short_npc || detail.shortNpc || '', + planner: detail.planner || detail.cPlanner || detail.c_planner || '' } } diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue index a01ed8e..23c80d5 100644 --- a/src/views/modules/inspection/inspectionRequestList.vue +++ b/src/views/modules/inspection/inspectionRequestList.vue @@ -10,6 +10,9 @@ + + +
@@ -287,6 +290,13 @@ style="width: 100px" @keyup.enter.native="filterAddPoList"/> + + + 查询 @@ -309,6 +319,7 @@ + @@ -469,6 +480,13 @@ style="width: 200px" @keyup.enter.native="searchOrderSupplierByPo"/> + + + 查询 重置 @@ -487,6 +505,7 @@ :default-sort="{ prop: 'crd', order: 'descending' }"> + @@ -624,7 +643,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' }, selectedPoList: [], poSupplierDialogVisible: false, @@ -651,7 +671,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' }, pendingAutoSelectPoRow: null, // 上传相关 @@ -663,6 +684,7 @@ export default { requestNo: '', supplierNo: '', supplierName: '', + planner: '', status: '', qcOperator: '', createBy: '', @@ -771,6 +793,24 @@ export default { status: true, fixed: false }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: 'InspectionTable1Planner', + tableId: 'InspectionTable1', + tableName: '检验申请单', + columnProp: 'planner', + headerAlign: 'center', + align: 'left', + columnLabel: 'Planner', + columnWidth: '120', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, { userId: this.$store.state.user.name, functionId: this.functionId, @@ -1112,7 +1152,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' } this.poSupplierDialogVisible = false this.poSupplierLoading = false @@ -1138,7 +1179,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' } this.pendingAutoSelectPoRow = null if (this.$refs.addFormData) { @@ -1294,7 +1336,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' } this.poSupplierDialogVisible = false this.orderSupplierDialogVisible = false @@ -1357,7 +1400,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' } this.loadOrderSupplierList() }, @@ -1379,7 +1423,8 @@ export default { item: this.orderSupplierSearch.item || '', sku: this.orderSupplierSearch.sku || '', partDesc: this.orderSupplierSearch.partDesc || '', - supplierName: this.orderSupplierSearch.supplierName || '' + supplierName: this.orderSupplierSearch.supplierName || '', + planner: this.orderSupplierSearch.planner || '' } this.orderSupplierLoading = true queryPoSupplierOrderPage(params).then(({ data }) => { @@ -1388,6 +1433,7 @@ export default { ...item, supplierNo: item.supplierNo || item.supplier_no || '', supplierName: item.supplierName || item.supplier_name || '', + planner: item.planner || '', crd: item.crd ? String(item.crd).split(' ')[0] : '' })) this.orderSupplierList = list @@ -1430,7 +1476,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' } this.orderSupplierPageIndex = 1 this.loadOrderSupplierList() @@ -1509,6 +1556,7 @@ export default { ...item, supplierNo: item.supplierNo || item.supplier_no || this.addFormData.supplierNo || '', supplierName: item.supplierName || item.supplier_name || this.addFormData.supplierName || '', + planner: item.planner || '', inspectQty: item.waitInspectQty || 0, // 默认值为未验货数量 shipMethod: item.shipMethod || '',// 运输方式 crd: item.crd ? item.crd.split(' ')[0] : '' @@ -1544,6 +1592,7 @@ export default { const skuKeyword = (filter.sku || '').toLowerCase().trim() const partDescKeyword = (filter.partDesc || '').toLowerCase().trim() const supplierNameKeyword = (filter.supplierName || '').toLowerCase().trim() + const plannerKeyword = (filter.planner || '').toLowerCase().trim() if (orderNoKeyword) { result = result.filter(item => { @@ -1567,6 +1616,9 @@ export default { if (supplierNameKeyword) { result = result.filter(item => String(item.supplierName || '').toLowerCase().includes(supplierNameKeyword)) } + if (plannerKeyword) { + result = result.filter(item => String(item.planner || '').toLowerCase().includes(plannerKeyword)) + } this.filteredPoList = result }, @@ -1578,7 +1630,8 @@ export default { item: '', sku: '', partDesc: '', - supplierName: '' + supplierName: '', + planner: '' } this.filterAddPoList() }, diff --git a/src/views/modules/order/poOrder.vue b/src/views/modules/order/poOrder.vue index 65037e1..9bdf963 100644 --- a/src/views/modules/order/poOrder.vue +++ b/src/views/modules/order/poOrder.vue @@ -565,7 +565,7 @@ import ComPoOrderCustomerPicker from './com_poOrder_CustomerPicker.vue' import ComPoOrderDynamicFieldRenderer from './com_poOrder_DynamicFieldRenderer.vue' const ADD_CHOOSER_FIELD_CODES = new Set(['supplier_name', 'part_no', 'departure', 'destination', 'ship_via']) -const ADD_DISPLAY_ONLY_FIELD_CODES = new Set(['short_office', 'short_npc', 'item', 'category_name', 'sku', 'value', 'status', 'crd_ori']) +const ADD_DISPLAY_ONLY_FIELD_CODES = new Set(['short_office', 'short_npc', 'item', 'category_name', 'sku', 'value', 'status', 'planner', 'crd_ori']) const ADD_TEXTAREA_FIELD_CODES = new Set(['remark']) const ADD_FULL_ROW_FIELD_CODES = new Set(['remark']) const ADD_NUMBER_FIELD_CODES = new Set(['price', 'qty', 'ship_qty', 'sum_price']) @@ -3266,12 +3266,13 @@ export default { this.openEamList(SUPPLIER_CHOOSELIST_TAG, '', conSql, 'row', 'supplier') }, - applySupplierSelection (target, supplierNo, supplierName, shortOffice, shortNpc, markChanged) { + applySupplierSelection (target, supplierNo, supplierName, shortOffice, shortNpc, planner, markChanged) { if (!target) return this.$set(target, 'supplierName', supplierName) this.$set(target, 'supplierNo', supplierNo) this.$set(target, 'shortOffice', shortOffice) this.$set(target, 'shortNpc', shortNpc) + this.$set(target, 'planner', planner || '') if (markChanged) { this.$set(target, 'changeFlag', 1) } @@ -3281,10 +3282,18 @@ export default { if (!target || !supplierNo) { return Promise.resolve() } - this.applySupplierSelection(target, supplierNo, supplierName, target.shortOffice || '', target.shortNpc || '', markChanged) + this.applySupplierSelection( + target, + supplierNo, + supplierName, + target.shortOffice || '', + target.shortNpc || '', + target.planner || '', + markChanged + ) return fetchSupplierDetail(supplierNo, this.$store.state.user.site).then(detail => { - const { shortOffice, shortNpc } = resolveSupplierShortFieldsFromDetail(detail) - this.applySupplierSelection(target, supplierNo, supplierName, shortOffice, shortNpc, markChanged) + const { shortOffice, shortNpc, planner } = resolveSupplierShortFieldsFromDetail(detail) + this.applySupplierSelection(target, supplierNo, supplierName, shortOffice, shortNpc, planner, markChanged) }).catch(() => {}) }, diff --git a/src/views/modules/srmSupplier/supplierList.vue b/src/views/modules/srmSupplier/supplierList.vue index 90c05cb..85ab69d 100644 --- a/src/views/modules/srmSupplier/supplierList.vue +++ b/src/views/modules/srmSupplier/supplierList.vue @@ -17,6 +17,9 @@ + + + 查询 新增 @@ -190,18 +193,7 @@ /> - - - - - - - - + @@ -210,13 +202,19 @@ 采购员 - + Sourcing专员 - + + + + + + Planner + @@ -224,6 +222,18 @@
+ + + + + + + + 税率编号 @@ -392,6 +402,7 @@ export default { taxCode:'', paymentTerm:'', deliveryTerm:'', + planner: '', site: this.$store.state.user.site, page: 1, limit: 10 @@ -400,7 +411,7 @@ export default { pageSize: 50, totalPage: 0, tagNo: '', - currentFieldType: '', // 当前字段类型('buyer' 或 'sourcingStaff') + currentFieldType: '', // 当前字段类型('buyer' / 'sourcingStaff' / 'planner') mainDataList: [], supplierGroupRequestList: [], supplierDocTypeOptions: [], @@ -551,6 +562,24 @@ export default { status: true, fixed: false }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '811001Table1Planner', + tableId: '811001Table1', + tableName: '供应商信息', + columnProp: 'planner', + headerAlign: 'center', + align: 'left', + columnLabel: 'Planner', + columnWidth: '120', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, { userId: this.$store.state.user.name, functionId: this.functionId, @@ -1181,6 +1210,7 @@ export default { updateDate: '', updateBy: '', memo:'', + planner: '', site: this.$store.state.user.site, }, supplierRules: { @@ -1267,6 +1297,11 @@ export default { // 防止 Druid 拦截 where 1=1 conSql = " and username <> '' " } + if (val === 530 && type === 'planner'){ + strVal = this.currentSupplier.planner || '' + // 防止 Druid 拦截 where 1=1;角色过滤由 tagNo=530 的 SQLCode 承担 + conSql = " and username <> '' " + } console.log('getBaseList调用:', { val, type, strVal, conSql }) this.$refs.baseList.init(val, strVal, conSql) @@ -1314,6 +1349,10 @@ export default { this.currentSupplier.sourcingStaff = val.UserName console.log('Sourcing专员赋值:', this.currentSupplier.sourcingStaff) } + if (this.tagNo === 530 && this.currentFieldType === 'planner') { + this.currentSupplier.planner = val.UserName || val.userName || val.username || '' + console.log('Planner赋值:', this.currentSupplier.planner) + } }, // 加载供应商文档类型下拉 - rqrq loadSupplierDocTypeOptions () { @@ -1549,6 +1588,7 @@ export default { updateDate: '', updateBy: '', memo:'', + planner: '', site: this.$store.state.user.site, } this.loadSupplierDocTypeOptions() @@ -1561,7 +1601,13 @@ export default { return } this.isAdd = false - this.currentSupplier = {...this.currentRow} + this.currentSupplier = { + ...this.currentRow, + // 列表展示使用 user_display,编辑回填需恢复为账号 + buyer: this.currentRow.buyerAccount || this.currentRow.buyer || '', + sourcingStaff: this.currentRow.sourcingStaffAccount || this.currentRow.sourcingStaff || '', + planner: this.currentRow.plannerAccount || this.currentRow.planner || '' + } this.loadSupplierDocTypeOptions() this.supplierDialogVisible = true }, diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index 66a623f..e9b4ec4 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -20,7 +20,7 @@ - + @@ -269,6 +269,10 @@ export default { this.$message.warning('请选择工厂') return } + if (!this.dataForm.userDisplay || !String(this.dataForm.userDisplay).trim()) { + this.$message.warning('用户名不能为空') + return + } if (this.showSupplierPicker && !this.dataForm.supplierNo) { this.$message.warning('请选择供应商') return