diff --git a/app/admin/svc/order/svc_order_list.go b/app/admin/svc/order/svc_order_list.go index 8c8075a..08f62ad 100644 --- a/app/admin/svc/order/svc_order_list.go +++ b/app/admin/svc/order/svc_order_list.go @@ -489,6 +489,7 @@ func OrderOutput(c *gin.Context) { } for _, vv := range orderGoods { data[enterpriseName][v.Oid]["date"] = v.CreateAt.Format("2006-01-02") + data[enterpriseName][v.Oid]["send_date"] = gjson.Get(v.BuyInfo, "date").String() data[enterpriseName][v.Oid]["goods_name"] = vv.GoodsTitle skuData := make([]md.Sku, 0) json.Unmarshal([]byte(vv.Sku), &skuData) @@ -523,6 +524,7 @@ func OrderOutput(c *gin.Context) { vv["goods_name"], vv["sku_str"], vv["num"], + vv["send_date"], }) xlsx.SetRowHeight("Sheet1", j, 18) total += utils.StrToInt(vv["num"]) diff --git a/app/db/db_order_list.go b/app/db/db_order_list.go index 365bd80..90c03a9 100644 --- a/app/db/db_order_list.go +++ b/app/db/db_order_list.go @@ -137,6 +137,10 @@ func GetOrderListOutput(eg *xorm.Engine, param map[string]string) *[]model.Order if param["end_at"] != "" { sess.And("create_at <= ?", param["end_at"]) } + if param["date"] != "" { + param["date"] = strings.ReplaceAll(param["date"], "-", "") + sess.And("date = ?", param["date"]) + } if param["enterprise_name"] != "" { var enterprise []model.Enterprise eg.Where("name like ?", "%"+param["enterprise_name"]+"%").Find(&enterprise) diff --git a/static/template/商品销售明细表.xlsx b/static/template/商品销售明细表.xlsx index 5ecb983..0e9975d 100644 Binary files a/static/template/商品销售明细表.xlsx and b/static/template/商品销售明细表.xlsx differ