Browse Source

1配置

master
huangjiajun 6 months ago
parent
commit
2b00cf7711
3 changed files with 6 additions and 0 deletions
  1. +2
    -0
      app/admin/svc/order/svc_order_list.go
  2. +4
    -0
      app/db/db_order_list.go
  3. BIN
     

+ 2
- 0
app/admin/svc/order/svc_order_list.go View File

@@ -489,6 +489,7 @@ func OrderOutput(c *gin.Context) {
} }
for _, vv := range orderGoods { for _, vv := range orderGoods {
data[enterpriseName][v.Oid]["date"] = v.CreateAt.Format("2006-01-02") 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 data[enterpriseName][v.Oid]["goods_name"] = vv.GoodsTitle
skuData := make([]md.Sku, 0) skuData := make([]md.Sku, 0)
json.Unmarshal([]byte(vv.Sku), &skuData) json.Unmarshal([]byte(vv.Sku), &skuData)
@@ -523,6 +524,7 @@ func OrderOutput(c *gin.Context) {
vv["goods_name"], vv["goods_name"],
vv["sku_str"], vv["sku_str"],
vv["num"], vv["num"],
vv["send_date"],
}) })
xlsx.SetRowHeight("Sheet1", j, 18) xlsx.SetRowHeight("Sheet1", j, 18)
total += utils.StrToInt(vv["num"]) total += utils.StrToInt(vv["num"])


+ 4
- 0
app/db/db_order_list.go View File

@@ -137,6 +137,10 @@ func GetOrderListOutput(eg *xorm.Engine, param map[string]string) *[]model.Order
if param["end_at"] != "" { if param["end_at"] != "" {
sess.And("create_at <= ?", 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"] != "" { if param["enterprise_name"] != "" {
var enterprise []model.Enterprise var enterprise []model.Enterprise
eg.Where("name like ?", "%"+param["enterprise_name"]+"%").Find(&enterprise) eg.Where("name like ?", "%"+param["enterprise_name"]+"%").Find(&enterprise)


BIN
View File


Loading…
Cancel
Save