huangjiajun 6 miesięcy temu
rodzic
commit
2b00cf7711
3 zmienionych plików z 6 dodań i 0 usunięć
  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 Wyświetl plik

@@ -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"])


+ 4
- 0
app/db/db_order_list.go Wyświetl plik

@@ -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)



Ładowanie…
Anuluj
Zapisz