作者 陈志颖

合并分支 'dev' 到 'test'

fix:修复导入销售日期错误提示



查看合并请求 !32
... ... @@ -1146,12 +1146,14 @@ func (c *OrderInfoController) ImportOrderFromExcel() {
// 销售日期时间格式转换
timeValue, err := time.ParseInLocation("2006/01/02", row[4], time.Local)
if err != nil {
e := lib.ThrowError(lib.ARG_ERROR, err.Error())
c.ResponseError(e)
return
var tmpRow []string
tmpRow = append(tmpRow, "无效的销售日期") // 错误信息
s := strconv.Itoa(i + 1)
tmpRow = append(tmpRow, s) // 行号
tmpRow = append(tmpRow, row...) // 错误行数据
partnerDataList = append(partnerDataList, tmpRow)
}
//saleDate, err := time.ParseInLocation("2006-01-02 15:04:05", param.SaleDate, time.Local)
saleDateWithTz := time.Date(timeValue.Year(), timeValue.Month(), timeValue.Day(), time.Now().Hour(), time.Now().Minute(), time.Now().Second(), time.Now().Nanosecond(), time.Local)
fmt.Print("销售日期:", saleDateWithTz, "\n")
... ...