|
@@ -138,38 +138,16 @@ export default {
|
|
// 单元格内容
|
|
// 单元格内容
|
|
titleCell.value = '发货清单';
|
|
titleCell.value = '发货清单';
|
|
worksheet.columns.forEach(function (column, i) {
|
|
worksheet.columns.forEach(function (column, i) {
|
|
- column.font = {
|
|
|
|
- size: 14,
|
|
|
|
- };
|
|
|
|
|
|
+ column.font = { size: 14 };
|
|
column.width = 38;
|
|
column.width = 38;
|
|
- column.alignment = {
|
|
|
|
- wrapText: true,
|
|
|
|
- vertical: 'middle',
|
|
|
|
- horizontal: 'left',
|
|
|
|
- };
|
|
|
|
- column.border = {
|
|
|
|
- top: { style: 'thin' },
|
|
|
|
- left: { style: 'thin' },
|
|
|
|
- bottom: { style: 'thin' },
|
|
|
|
- right: { style: 'thin' },
|
|
|
|
- };
|
|
|
|
|
|
+ column.alignment = { wrapText: true, vertical: 'middle', horizontal: 'left' };
|
|
|
|
+ column.border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
|
|
});
|
|
});
|
|
// 单元格内容样式
|
|
// 单元格内容样式
|
|
titleCell.style = {
|
|
titleCell.style = {
|
|
- alignment: {
|
|
|
|
- vertical: 'middle',
|
|
|
|
- horizontal: 'center',
|
|
|
|
- },
|
|
|
|
- font: {
|
|
|
|
- size: 20,
|
|
|
|
- bold: true,
|
|
|
|
- },
|
|
|
|
- border: {
|
|
|
|
- top: { style: 'thin' },
|
|
|
|
- left: { style: 'thin' },
|
|
|
|
- bottom: { style: 'thin' },
|
|
|
|
- right: { style: 'thin' },
|
|
|
|
- },
|
|
|
|
|
|
+ alignment: { vertical: 'middle', horizontal: 'center' },
|
|
|
|
+ font: { size: 20, bold: true },
|
|
|
|
+ border: { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } },
|
|
};
|
|
};
|
|
// 设置标题-end
|
|
// 设置标题-end
|
|
let data = [
|
|
let data = [
|
|
@@ -189,12 +167,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
workbook.xlsx.writeBuffer().then((buffer) => {
|
|
workbook.xlsx.writeBuffer().then((buffer) => {
|
|
- FileSaver.saveAs(
|
|
|
|
- new Blob([buffer], {
|
|
|
|
- type: 'application/octet-stream',
|
|
|
|
- }),
|
|
|
|
- `发货清单.xlsx`
|
|
|
|
- );
|
|
|
|
|
|
+ FileSaver.saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `发货清单.xlsx`);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|