|
|
@ -48,7 +48,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import _ from 'lodash' |
|
|
|
import _, { min } from 'lodash' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import * as XLSX from 'xlsx'; |
|
|
|
import ExcelJS from "exceljs"; |
|
|
@ -320,11 +320,29 @@ export default { |
|
|
|
let that = this |
|
|
|
let tableHeader = [] |
|
|
|
let tableData = [] |
|
|
|
let widthObj = { |
|
|
|
"Order":105, |
|
|
|
"Sku":165, |
|
|
|
// "Description":126, |
|
|
|
"Type of merchandise": 100, |
|
|
|
"Quantity to deliver": 100, |
|
|
|
"Store": 100, |
|
|
|
"Quantity of containers": 100, |
|
|
|
"Barcode": 100, |
|
|
|
"Quantity per container": 102, |
|
|
|
"Total": 60, |
|
|
|
"Cluster": 60, |
|
|
|
"": 60, |
|
|
|
"_1": 60, |
|
|
|
"_2": 160, |
|
|
|
"_3": 75, |
|
|
|
} |
|
|
|
for (let key in that.fileData2[0]) { |
|
|
|
tableHeader.push({ |
|
|
|
prop: key, |
|
|
|
label: key, |
|
|
|
type: "text" |
|
|
|
type: "text", |
|
|
|
width: widthObj[key] || "", |
|
|
|
}) |
|
|
|
} |
|
|
|
for (let index = 0; index < that.fileData2.length; index++) { |
|
|
@ -364,8 +382,8 @@ export default { |
|
|
|
let cell = worksheet.getCell(1, index + 1); |
|
|
|
cell.value = element; |
|
|
|
cell.font = { name: 'Arial', size: 10, color: { argb: '000000' } }; |
|
|
|
cell.fill = { type: 'pattern', pattern: 'solid', fgColor: { argb: 'EEEEEE' } }; |
|
|
|
cell.alignment = { horizontal: 'center', vertical: 'center' }; |
|
|
|
cell.fill = { type: 'pattern', pattern: 'solid', fgColor: { argb: 'EEEEEE' }, }; |
|
|
|
cell.alignment = { horizontal: 'center', vertical: 'top' }; |
|
|
|
}); |
|
|
|
|
|
|
|
// 设置数据行样式 |
|
|
|