|
|
@ -460,16 +460,46 @@ export default { |
|
|
const second = String(now.getSeconds()).padStart(2, '0') |
|
|
const second = String(now.getSeconds()).padStart(2, '0') |
|
|
const exportName = `NPC_IQC_${year}${month}${day}${hour}${minute}${second}` |
|
|
const exportName = `NPC_IQC_${year}${month}${day}${hour}${minute}${second}` |
|
|
|
|
|
|
|
|
|
|
|
// 确保 site 正确,并按当前查询条件导出全部数据 |
|
|
|
|
|
this.searchData.site = this.$store.state.user.site |
|
|
const exportParams = { |
|
|
const exportParams = { |
|
|
...this.searchData, |
|
|
...this.searchData, |
|
|
limit: -1, |
|
|
|
|
|
|
|
|
limit: 999999, |
|
|
page: 1 |
|
|
page: 1 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
excel.exportTable({ |
|
|
excel.exportTable({ |
|
|
url: '/npcIqc/search', |
|
|
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: [], |
|
|
mergeSetting: [], |
|
|
params: exportParams, |
|
|
params: exportParams, |
|
|
fileName: exportName + '.xlsx', |
|
|
fileName: exportName + '.xlsx', |
|
|
|