|
|
@ -77,6 +77,8 @@ |
|
|
<el-table-column prop="partDescription" label="备品备件名称" min-width="160" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="partDescription" label="备品备件名称" min-width="160" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="spec" label="规格型号" min-width="120" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="spec" label="规格型号" min-width="120" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="qty" label="采购数量" min-width="90" align="right" header-align="center"></el-table-column> |
|
|
<el-table-column prop="qty" label="采购数量" min-width="90" align="right" header-align="center"></el-table-column> |
|
|
|
|
|
<el-table-column prop="qtyOnHand" label="在库数量" min-width="90" align="right" header-align="center"></el-table-column> |
|
|
|
|
|
<el-table-column prop="qtyInTransit" label="在途订单数量" min-width="110" align="right" header-align="center"></el-table-column> |
|
|
<el-table-column prop="supplierName" label="供应商" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="supplierName" label="供应商" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column label="物品链接" min-width="100" align="center" header-align="center"> |
|
|
<el-table-column label="物品链接" min-width="100" align="center" header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
@ -688,7 +690,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
doExport (rows) { |
|
|
doExport (rows) { |
|
|
const header = ['BU', '备品备件编码', '备品备件名称', '规格型号', '采购数量', '供应商', '物品链接', '请购原因', '申请人'] |
|
|
|
|
|
|
|
|
const header = ['BU', '备品备件编码', '备品备件名称', '规格型号', '采购数量', '在库数量', '在途订单数量', '供应商', '物品链接', '请购原因', '申请人'] |
|
|
const sheetData = [header] |
|
|
const sheetData = [header] |
|
|
rows.forEach(row => { |
|
|
rows.forEach(row => { |
|
|
sheetData.push([ |
|
|
sheetData.push([ |
|
|
@ -697,6 +699,8 @@ export default { |
|
|
row.partDescription, |
|
|
row.partDescription, |
|
|
row.spec, |
|
|
row.spec, |
|
|
row.qty, |
|
|
row.qty, |
|
|
|
|
|
row.qtyOnHand, |
|
|
|
|
|
row.qtyInTransit, |
|
|
row.supplierName, |
|
|
row.supplierName, |
|
|
row.itemUrl, |
|
|
row.itemUrl, |
|
|
row.purchaseReason, |
|
|
row.purchaseReason, |
|
|
@ -704,7 +708,7 @@ export default { |
|
|
]) |
|
|
]) |
|
|
}) |
|
|
}) |
|
|
const ws = XLSX.utils.aoa_to_sheet(sheetData) |
|
|
const ws = XLSX.utils.aoa_to_sheet(sheetData) |
|
|
ws['!cols'] = [{ wch: 12 }, { wch: 16 }, { wch: 22 }, { wch: 18 }, { wch: 10 }, { wch: 18 }, { wch: 30 }, { wch: 18 }, { wch: 10 }] |
|
|
|
|
|
|
|
|
ws['!cols'] = [{ wch: 12 }, { wch: 16 }, { wch: 22 }, { wch: 18 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 18 }, { wch: 30 }, { wch: 18 }, { wch: 10 }] |
|
|
const wb = XLSX.utils.book_new() |
|
|
const wb = XLSX.utils.book_new() |
|
|
XLSX.utils.book_append_sheet(wb, ws, '待采购申请') |
|
|
XLSX.utils.book_append_sheet(wb, ws, '待采购申请') |
|
|
XLSX.writeFile(wb, `待采购申请_${this.exportTimeStr()}.xlsx`) |
|
|
XLSX.writeFile(wb, `待采购申请_${this.exportTimeStr()}.xlsx`) |
|
|
|