From 5534fa2092c1d77fd979de84b722b923d82582fd Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Mon, 31 Aug 2026 17:09:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(srm):=20=E6=9B=B4=E6=96=B0SRM=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E5=AD=97=E6=AE=B5=E6=A0=87=E7=AD=BE=E5=92=8C?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将进仓编号字段统一修改为物流单号显示 - 为SrmSupplier文档上传添加orderReftype参数 - 在NPC IQC列表中添加完整的列映射配置以支持导出功能 - 调整SRM文档类型定义中的预计完成天数验证规则为非必填 - 为SRM零件家族添加是否跳过新品流程的配置选项 - 优化相关页面的数据导出功能和字段映射逻辑 --- .../modules/npcIqc/logisticsManagement.vue | 20 +++++------ src/views/modules/npcIqc/npcIqcList.vue | 34 +++++++++++++++++-- .../modules/order/com_logisticsPoList.vue | 2 +- .../srmBaseInformation/srmPartFamily.vue | 21 +++++++++++- .../srmDocument/srmDocumentTypeDefinition.vue | 12 +++---- .../com_srmSupplier_DocumentDefinition.vue | 1 + 6 files changed, 70 insertions(+), 20 deletions(-) diff --git a/src/views/modules/npcIqc/logisticsManagement.vue b/src/views/modules/npcIqc/logisticsManagement.vue index 57b0b04..dd3c8ef 100644 --- a/src/views/modules/npcIqc/logisticsManagement.vue +++ b/src/views/modules/npcIqc/logisticsManagement.vue @@ -31,7 +31,7 @@ style="margin-top: 0px; width: 100%;"> col.columnLabel) const dataRows = data.map(row => columns.map(col => row[col.columnProp] || '')) - + // 合并表头和数据 const wsData = [headerRow, ...dataRows] - + // 创建工作表 const ws = XLSX.utils.aoa_to_sheet(wsData) - + // 设置列宽 ws['!cols'] = columns.map(() => ({ wch: 15 })) - + // 创建工作簿 const wb = XLSX.utils.book_new() XLSX.utils.book_append_sheet(wb, ws, 'Sheet1') - + // 下载文件 XLSX.writeFile(wb, `${fileName}.xlsx`) - + this.$message.success('导出成功') } }, diff --git a/src/views/modules/npcIqc/npcIqcList.vue b/src/views/modules/npcIqc/npcIqcList.vue index b8605cc..4d47fc5 100644 --- a/src/views/modules/npcIqc/npcIqcList.vue +++ b/src/views/modules/npcIqc/npcIqcList.vue @@ -460,16 +460,46 @@ export default { const second = String(now.getSeconds()).padStart(2, '0') const exportName = `NPC_IQC_${year}${month}${day}${hour}${minute}${second}` + // 确保 site 正确,并按当前查询条件导出全部数据 + this.searchData.site = this.$store.state.user.site const exportParams = { ...this.searchData, - limit: -1, + limit: 999999, page: 1 } try { excel.exportTable({ url: '/npcIqc/search', - columnMapping: [], + columnMapping: [ + { columnProp: 'iqcNo', columnLabel: 'IQC检验单号' }, + { columnProp: 'purOrder', columnLabel: '采购订单号' }, + { columnProp: 'supplierName', columnLabel: '供应商名称' }, + { columnProp: 'dateReceived', columnLabel: '收货日期' }, + { columnProp: 'itemCode', columnLabel: '产品编码' }, + { columnProp: 'item', columnLabel: 'Item' }, + { columnProp: 'sku', columnLabel: 'SKU' }, + { columnProp: 'quantity', columnLabel: '数量' }, + { columnProp: 'sampleSize', columnLabel: '抽样数量' }, + { columnProp: 'dimA', columnLabel: '尺寸A' }, + { columnProp: 'dimB', columnLabel: '尺寸B' }, + { columnProp: 'dimC', columnLabel: '尺寸C' }, + { columnProp: 'dimD', columnLabel: '尺寸D' }, + { columnProp: 'dimE', columnLabel: '尺寸E' }, + { columnProp: 'inspectionTotal', columnLabel: '检验结果总计' }, + { columnProp: 'inspectionStatus', columnLabel: '状态' }, + { columnProp: 'problem', columnLabel: '问题描述' }, + { columnProp: 'comments', columnLabel: '备注' }, + { columnProp: 'inspectorName', columnLabel: '检验员姓名' }, + { columnProp: 'supplierEmail', columnLabel: '供应商邮箱' }, + { columnProp: 'caRequestText', columnLabel: '纠正措施请求' }, + { columnProp: 'reworkHours', columnLabel: '返工工时' }, + { columnProp: 'reworkRate', columnLabel: '返工费率' }, + { columnProp: 'reworkTotal', columnLabel: '返工总成本' }, + { columnProp: 'materialCost', columnLabel: '物料成本' }, + { columnProp: 'collectionBatch', columnLabel: '收集/批次号' }, + { columnProp: 'entryDate', columnLabel: '录入日期' } + ], mergeSetting: [], params: exportParams, fileName: exportName + '.xlsx', diff --git a/src/views/modules/order/com_logisticsPoList.vue b/src/views/modules/order/com_logisticsPoList.vue index cd21408..af74c3a 100644 --- a/src/views/modules/order/com_logisticsPoList.vue +++ b/src/views/modules/order/com_logisticsPoList.vue @@ -74,7 +74,7 @@ export default { columnProp: 'flexId', headerAlign: 'center', align: 'center', - columnLabel: isEn ? 'Warehouse No' : '进仓编号', + columnLabel: isEn ? 'Logistics No' : '物流单号', columnWidth: '120', columnHidden: false, columnSortable: false, diff --git a/src/views/modules/srmBaseInformation/srmPartFamily.vue b/src/views/modules/srmBaseInformation/srmPartFamily.vue index 4502788..f178574 100644 --- a/src/views/modules/srmBaseInformation/srmPartFamily.vue +++ b/src/views/modules/srmBaseInformation/srmPartFamily.vue @@ -330,6 +330,17 @@ + + + + + + + + + + + @@ -526,6 +537,8 @@ export default { active: 'Y', + skipNew: 'N', + createBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, @@ -1023,7 +1036,9 @@ export default { onFamilyTypeChange () { this.loadParentOptions(this.modalData.familyType, false) - + if (this.modalData.familyType !== 'level1') { + this.modalData.skipNew = 'N' + } this.$nextTick(() => { if (this.$refs.modalForm) { @@ -1136,6 +1151,8 @@ export default { active: 'Y', + skipNew: 'N', + createBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, @@ -1180,6 +1197,8 @@ export default { active: row.active, + skipNew: row.skipNew || '', + createBy: row.createBy, updateBy: this.$store.state.user.name, diff --git a/src/views/modules/srmDocument/srmDocumentTypeDefinition.vue b/src/views/modules/srmDocument/srmDocumentTypeDefinition.vue index 0bb6d8a..e5bdffe 100644 --- a/src/views/modules/srmDocument/srmDocumentTypeDefinition.vue +++ b/src/views/modules/srmDocument/srmDocumentTypeDefinition.vue @@ -123,7 +123,7 @@ - + @@ -386,7 +386,7 @@ export default { ], estimatedCompletionDaysType:[ { - required: true, + required: false, message: ' ', trigger: ['blur','change'] } @@ -634,10 +634,10 @@ export default { this.$message.warning('请选择责任部门!') return } - if (this.modalData.estimatedCompletionDays === '' || this.modalData.estimatedCompletionDays == null) { - this.$message.warning('请输入预计完成天数!') - return - } + // if (this.modalData.estimatedCompletionDays === '' || this.modalData.estimatedCompletionDays == null) { + // this.$message.warning('请输入预计完成天数!') + // return + // } // if (this.modalData.active === '' || this.modalData.active == null) { // this.$message.warning('选择是否在用!') // return diff --git a/src/views/modules/srmSupplier/com_srmSupplier_DocumentDefinition.vue b/src/views/modules/srmSupplier/com_srmSupplier_DocumentDefinition.vue index ba2b44c..7f197b4 100644 --- a/src/views/modules/srmSupplier/com_srmSupplier_DocumentDefinition.vue +++ b/src/views/modules/srmSupplier/com_srmSupplier_DocumentDefinition.vue @@ -663,6 +663,7 @@ export default { id:this.fileData.id, site:this.searchData.site, supplierNo:this.searchData.supplierNo, + orderReftype:'SrmSupplierDocument', } refreshDocumentUploadFlag(inData).then(({data})=>{ if (data && data.code === 0){