1、优化游戏卡带库存调拨明细导出excel接口,按照页面调整导出字段和格式;
This commit is contained in:
parent
a195ebec65
commit
2b176ff313
|
@ -2871,8 +2871,8 @@ func exportCannibalizeTaskDetail(dataList []GameCardAllotDetailData) (string, er
|
|||
|
||||
// 标题栏
|
||||
headers := []string{
|
||||
"任务ID", "调出门店", "调入门店", "制单人", "制单时间", "调出时间", "调入时间",
|
||||
"调拨状态", "卡带ID", "卡带名称", "串码",
|
||||
"任务ID", "游戏卡串码", "游戏卡名称", "制单人", "制单时间", "调出门店", "调出时间",
|
||||
"调入门店", "调入时间", "调拨状态",
|
||||
}
|
||||
|
||||
// 设置标题栏
|
||||
|
@ -2908,16 +2908,15 @@ func exportCannibalizeTaskDetail(dataList []GameCardAllotDetailData) (string, er
|
|||
|
||||
values := []interface{}{
|
||||
item.TaskId,
|
||||
item.DeliverStoreName,
|
||||
item.ReceiveStoreName,
|
||||
item.SerialNumber,
|
||||
item.GameCardName,
|
||||
item.MakerName,
|
||||
makerTime,
|
||||
item.DeliverStoreName,
|
||||
sendTime,
|
||||
item.ReceiveStoreName,
|
||||
receiveTime,
|
||||
stateStr,
|
||||
item.GameCardId,
|
||||
item.GameCardName,
|
||||
item.SerialNumber,
|
||||
}
|
||||
|
||||
for colIndex, val := range values {
|
||||
|
@ -2938,10 +2937,17 @@ func exportCannibalizeTaskDetail(dataList []GameCardAllotDetailData) (string, er
|
|||
}`)
|
||||
|
||||
lastRow := len(dataList) + 1
|
||||
endCell := fmt.Sprintf("K%d", lastRow)
|
||||
endCell := fmt.Sprintf("J%d", lastRow)
|
||||
_ = file.SetCellStyle(sheet, "A1", endCell, style)
|
||||
_ = file.SetRowHeight(sheet, 1, 20)
|
||||
_ = file.SetColWidth(sheet, "A", "K", 20)
|
||||
file.SetColWidth("Sheet1", "B", "B", 15)
|
||||
file.SetColWidth("Sheet1", "C", "C", 25)
|
||||
file.SetColWidth("Sheet1", "D", "D", 12)
|
||||
file.SetColWidth("Sheet1", "E", "E", 12)
|
||||
file.SetColWidth("Sheet1", "F", "F", 25)
|
||||
file.SetColWidth("Sheet1", "G", "G", 20)
|
||||
file.SetColWidth("Sheet1", "H", "H", 25)
|
||||
file.SetColWidth("Sheet1", "I", "I", 20)
|
||||
|
||||
// 保存文件
|
||||
if err := file.SaveAs(savePath); err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user