From 40210e274a9344f81800e590e947c6add4254ec5 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Thu, 11 Jun 2026 10:39:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(inspection):=20=E6=B7=BB=E5=8A=A0=E5=8F=AF?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=9F=A5=E8=AF=A2=E6=A0=87=E7=AD=BE=E5=B9=B6?= =?UTF-8?q?=E6=96=B0=E5=A2=9EPO=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在检验模块多个页面添加供应商编码和申请人员的可点击标签功能 - 实现点击标签调用getBaseList方法进行基础数据查询 - 新增PO订单查询页面(poOrder_search.vue),包含完整的查询、分页和导出功能 - 优化检验计划列表中的QC人员和申请单号查询组件 - 添加申请单号选择弹窗功能,支持双击选择和搜索过滤 - 完善费用列表中的申请人选择逻辑,支持不同字段的目标赋值 --- .../inspection/inspectionPendingList.vue | 6 +- .../inspection/inspectionRequestAudit.vue | 6 +- .../inspection/inspectionRequestList.vue | 27 +- .../inspection/inspectionScheduleList.vue | 77 ++- src/views/modules/inspection/srmFeeList.vue | 29 +- src/views/modules/order/poOrder_search.vue | 543 ++++++++++++++++++ 6 files changed, 661 insertions(+), 27 deletions(-) create mode 100644 src/views/modules/order/poOrder_search.vue diff --git a/src/views/modules/inspection/inspectionPendingList.vue b/src/views/modules/inspection/inspectionPendingList.vue index f761815..d4ebe72 100644 --- a/src/views/modules/inspection/inspectionPendingList.vue +++ b/src/views/modules/inspection/inspectionPendingList.vue @@ -3,7 +3,8 @@
- + + 供应商编码 @@ -24,7 +25,8 @@
- + + 申请人员 diff --git a/src/views/modules/inspection/inspectionRequestAudit.vue b/src/views/modules/inspection/inspectionRequestAudit.vue index 9bbd1bc..2dd4093 100644 --- a/src/views/modules/inspection/inspectionRequestAudit.vue +++ b/src/views/modules/inspection/inspectionRequestAudit.vue @@ -3,7 +3,8 @@
- + + 供应商编码 @@ -27,7 +28,8 @@ - + + 申请人员 diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue index fce76e3..27b002a 100644 --- a/src/views/modules/inspection/inspectionRequestList.vue +++ b/src/views/modules/inspection/inspectionRequestList.vue @@ -3,7 +3,8 @@
- + + 供应商编码 @@ -33,7 +34,8 @@ - + + QC人员 @@ -1097,23 +1099,28 @@ export default { // 获取当前查询条件 const exportParams = { ...this.searchData, - limit: -1, // 导出全部数据 + limit: 99999, page: 1 } try { excel.exportTable({ - url: '/inspection/searchInspectionRequestHeaderList', - columnMapping: this.columnArray1, // 使用表格列配置 - mergeSetting: [], // 不需要合并 + url: 'inspection/searchInspectionRequestHeaderList', + columnMapping: this.columnArray1, + mergeSetting: [], params: exportParams, fileName: exportName + '.xlsx', rowFetcher: res => { console.log('导出数据响应:', res) - return res.data.page.list - }, // 从响应中提取数据列表 - columnFormatter: [], // 不需要格式化 - dropColumns: [] // 不需要剔除的列 + if (res.data && res.data.page && res.data.page.list) { + return res.data.page.list + } + console.error('响应数据结构异常:', res.data) + this.$message.error('导出数据格式异常,请查看控制台') + return [] + }, + columnFormatter: [], + dropColumns: [] }) console.log('导出请求已发送') } catch (error) { diff --git a/src/views/modules/inspection/inspectionScheduleList.vue b/src/views/modules/inspection/inspectionScheduleList.vue index d8b3c50..745e8dd 100644 --- a/src/views/modules/inspection/inspectionScheduleList.vue +++ b/src/views/modules/inspection/inspectionScheduleList.vue @@ -3,7 +3,8 @@
- + + 供应商编码 @@ -28,7 +29,8 @@ - + + QC人员 @@ -38,7 +40,8 @@
- + + 申请单号 @@ -60,6 +63,28 @@ + + + + + + + + 查询 + + + + + + + + + + + 关闭 + + + { + this.loadRequestNoList() + }) + }, + + // 加载申请单号列表 + loadRequestNoList () { + this.requestNoListLoading = true + const params = { + requestNo: this.requestNoSearchParam, + page: 1, + limit: 200 + } + searchInspectionRequestHeaderList(params).then(({ data }) => { + if (data.code === 0 && data.page) { + this.requestNoList = data.page.list || [] + } else { + this.requestNoList = [] + } + this.requestNoListLoading = false + }).catch(() => { + this.requestNoList = [] + this.requestNoListLoading = false + }) + }, + + // 选中申请单号 + selectRequestNo (row) { + this.searchData.requestNo = row.requestNo || '' + this.requestNoDialogVisible = false + }, + + // 关闭申请单号选择弹窗 + closeRequestNoChooser () { + this.requestNoList = [] + this.requestNoSearchParam = '' + }, + }, created () { diff --git a/src/views/modules/inspection/srmFeeList.vue b/src/views/modules/inspection/srmFeeList.vue index b4986ce..6659c80 100644 --- a/src/views/modules/inspection/srmFeeList.vue +++ b/src/views/modules/inspection/srmFeeList.vue @@ -7,7 +7,8 @@ - + + 申请人员 @@ -362,15 +363,21 @@ export default { console.log('异常处理,设置 loading 为 false') }) }, -// 打开申请人选择框 - getBaseList(val) { +// 打开选择框 + getBaseList(val, targetField) { this.tagNo = val + this.targetField = targetField // 保存目标字段,用于区分赋值位置 this.$nextTick(() => { let strVal = '' if (val === 2016) { - strVal = this.addFormData.applyUser || '' + // 根据 targetField 决定从哪个变量取值 + if (targetField === 'createBy') { + strVal = this.searchData.applyUser || '' + } else { + strVal = this.addFormData.applyUser || '' + } } this.$refs.baseList.init(val, strVal, '') @@ -379,13 +386,15 @@ export default { // 选择回调 getBaseData(val) { - if (this.tagNo === 2016) { - - this.addFormData.applyUser = val.username - this.addFormData.applyUserName = val.user_display - - this.$forceUpdate() + if (this.targetField === 'createBy') { + // 查询条件的赋值 + this.searchData.applyUser = val.user_display || val.username + } else { + // 新增弹窗的赋值 + this.$set(this.addFormData, 'applyUser', val.username) + this.$set(this.addFormData, 'applyUserName', val.user_display) + } } }, // 每页数 diff --git a/src/views/modules/order/poOrder_search.vue b/src/views/modules/order/poOrder_search.vue new file mode 100644 index 0000000..7a9e484 --- /dev/null +++ b/src/views/modules/order/poOrder_search.vue @@ -0,0 +1,543 @@ + + + + +