...
|
...
|
@@ -682,7 +682,7 @@ func (c *OrderInfoController) DownloadTemplate() { |
|
|
} else {
|
|
|
logs.Info(resp)
|
|
|
ret = map[string]interface{}{
|
|
|
"url": "http://" + c.Ctx.Request.Host + "/download/订单数据模板.xlsx",
|
|
|
"url": "http://" + c.Ctx.Request.Host + "/partnermg/download/订单数据模板.xlsx",
|
|
|
}
|
|
|
c.ResponseData(ret)
|
|
|
}
|
...
|
...
|
@@ -690,7 +690,7 @@ func (c *OrderInfoController) DownloadTemplate() { |
|
|
|
|
|
/**
|
|
|
* @Author SteveChan
|
|
|
* @Description //TODO 导入excel订单
|
|
|
* @Description // 导入excel订单
|
|
|
* @Date 10:52 2021/1/6
|
|
|
* @Param
|
|
|
* @return
|
...
|
...
|
@@ -763,7 +763,7 @@ func (c *OrderInfoController) ImportOrderFromExcel() { |
|
|
for j, cell := range row {
|
|
|
if j != 8 { // 业务员抽成比例非必填
|
|
|
if cell == "" || cell == " " { // 空字符串填充
|
|
|
tmpRow[j] = "null"
|
|
|
tmpRow[j] = ""
|
|
|
nullFlag = true
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -779,7 +779,7 @@ func (c *OrderInfoController) ImportOrderFromExcel() { |
|
|
} else if len(row) > 0 && len(row) < constant.EXCEL_COLUMN { // 尾部空字符校验
|
|
|
var myRow []string
|
|
|
for i := 0; i < constant.EXCEL_COLUMN-len(row); i++ { // null补位
|
|
|
myRow = append(myRow, "null")
|
|
|
myRow = append(myRow, "")
|
|
|
}
|
|
|
myRow = append(myRow, "必填项不能为空") // 错误信息
|
|
|
s := strconv.Itoa(i + 1)
|
...
|
...
|
@@ -863,7 +863,7 @@ func (c *OrderInfoController) ImportOrderFromExcel() { |
|
|
|
|
|
if typeErrFlag || lenErrFlag || ratioErrFlag {
|
|
|
var tmpRow []string
|
|
|
tmpRow = append(tmpRow, "业务员抽成比例格式错误,请输入正确的业务员抽成比例比例,保留两位小数") // 错误信息
|
|
|
tmpRow = append(tmpRow, "业务员抽成比例格式错误,请输入正确的业务员抽成比例,保留两位小数") // 错误信息
|
|
|
s := strconv.Itoa(i + 1)
|
|
|
tmpRow = append(tmpRow, s) // 行号
|
|
|
tmpRow = append(tmpRow, row...) // 错误行数据
|
...
|
...
|
|