Browse Source

feat(srm): 更新SRM模块的字段标签和验证规则

- 将进仓编号字段统一修改为物流单号显示
- 为SrmSupplier文档上传添加orderReftype参数
- 在NPC IQC列表中添加完整的列映射配置以支持导出功能
- 调整SRM文档类型定义中的预计完成天数验证规则为非必填
- 为SRM零件家族添加是否跳过新品流程的配置选项
- 优化相关页面的数据导出功能和字段映射逻辑
master
qiankanghui 1 month ago
parent
commit
5534fa2092
  1. 20
      src/views/modules/npcIqc/logisticsManagement.vue
  2. 34
      src/views/modules/npcIqc/npcIqcList.vue
  3. 2
      src/views/modules/order/com_logisticsPoList.vue
  4. 21
      src/views/modules/srmBaseInformation/srmPartFamily.vue
  5. 12
      src/views/modules/srmDocument/srmDocumentTypeDefinition.vue
  6. 1
      src/views/modules/srmSupplier/com_srmSupplier_DocumentDefinition.vue

20
src/views/modules/npcIqc/logisticsManagement.vue

@ -31,7 +31,7 @@
style="margin-top: 0px; width: 100%;">
<el-table-column
prop="flexId"
label="进仓编号"
label="物流单号"
min-width="160"
show-overflow-tooltip />
<el-table-column
@ -361,7 +361,7 @@ export default {
const exportData = []
for (let i = 0; i < mainList.length; i++) {
const mainRow = mainList[i]
// 获取该进仓编号下的PO清单
const poParams = {
flexId: mainRow.flexId,
@ -374,7 +374,7 @@ export default {
try {
const { data: poResp } = await getPoList(poParams)
const poList = (poResp && poResp.code === 0 && poResp.page) ? (poResp.page.list || []) : []
// 如果没有PO清单,也要导出一条主表数据(PO字段为空)
if (poList.length === 0) {
exportData.push({
@ -464,27 +464,27 @@ export default {
// 手动下载Excel文件
downloadExcelFile (data, columns, fileName) {
const XLSX = require('xlsx')
// 构建表头和数据行
const headerRow = columns.map(col => 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('导出成功')
}
},

34
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',

2
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,

21
src/views/modules/srmBaseInformation/srmPartFamily.vue

@ -330,6 +330,17 @@
</el-row>
<el-row :gutter="24" v-if="modalData.familyType === 'level1'">
<el-col :span="12">
<el-form-item label="是否跳过新品流程" prop="skipNew">
<el-select v-model="modalData.skipNew" style="width: 100%">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
@ -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,

12
src/views/modules/srmDocument/srmDocumentTypeDefinition.vue

@ -123,7 +123,7 @@
</el-select>
</el-form-item>
<el-form-item label="预计完成天数" prop="estimatedCompletionDays" style="margin-left: 15px" :rules="rules.estimatedCompletionDaysType">
<el-form-item label="预计完成天数" prop="estimatedCompletionDays" style="margin-left: 15px">
<el-input v-model="modalData.estimatedCompletionDays" style="width: 230px"></el-input>
</el-form-item>
</el-form>
@ -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

1
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){

Loading…
Cancel
Save