You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.7 KiB
62 lines
2.7 KiB
package excel
|
|
|
|
import (
|
|
"bytes"
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type VendorOrderQueryRow struct {
|
|
OrderID uint `excel:"name:主订单编号"`
|
|
OrderGoodsID uint `excel:"name:子订单编号"`
|
|
Status string `excel:"name:订单状态"`
|
|
CreatedAt string `excel:"name:下单时间"`
|
|
PayTime string `excel:"name:支付时间"`
|
|
ExpressTime string `excel:"name:发货时间"`
|
|
TimeOut string `excel:"name:是否超时"`
|
|
ReceiveTime string `excel:"name:确认收货时间"`
|
|
AssType string `excel:"name:售后类型"`
|
|
AsID uint `excel:"name:关联售后单号"`
|
|
Category string `excel:"name:商品类目"`
|
|
Brand string `excel:"name:品牌"`
|
|
VendorName string `excel:"name:供应商名称"`
|
|
GoodsName string `excel:"name:商品名称"`
|
|
SkuCode string `excel:"name:商品条码"`
|
|
SkuName string `excel:"name:规格名"`
|
|
Quantity uint `excel:"name:数量"`
|
|
Receiver string `excel:"name:收件人;auth:check"`
|
|
Phone string `excel:"name:手机号;auth:check"`
|
|
ReceiveAddr string `excel:"name:收货人地址;auth:check"`
|
|
BuyerName string `excel:"name:购买人姓名;auth:check"`
|
|
Card string `excel:"name:身份证信息;auth:check"`
|
|
Remark string `excel:"name:备注"`
|
|
PurchasePrice decimal.Decimal `excel:"name:商家结算含税单价;auth:check"`
|
|
SettlementAmount decimal.Decimal `excel:"name:商家结算金额;auth:check"`
|
|
ExpressFee decimal.Decimal `excel:"name:运费;auth:check"`
|
|
TotalSettledAmount decimal.Decimal `excel:"name:商家合计结算金额;auth:check"`
|
|
}
|
|
|
|
type OrderQueryRow struct {
|
|
VendorOrderQueryRow
|
|
UnitPrice decimal.Decimal `excel:"name:销售含税单价;auth:check"`
|
|
GoodsAmount decimal.Decimal `excel:"name:销售价税合计;auth:check"`
|
|
CoinAmount decimal.Decimal `excel:"name:瑞币抵扣;auth:check"`
|
|
ActualAmount decimal.Decimal `excel:"name:实付金额;auth:check"`
|
|
PayMethod string `excel:"name:支付方式;auth:check"`
|
|
TotalCommission decimal.Decimal `excel:"name:个人返佣;auth:check"`
|
|
}
|
|
|
|
func (o OrderQueryRow) String() string {
|
|
b, err := json.Marshal(o)
|
|
if err != nil {
|
|
return fmt.Sprintf("%+v", err.Error())
|
|
}
|
|
var out bytes.Buffer
|
|
err = json.Indent(&out, b, "", " ")
|
|
if err != nil {
|
|
return fmt.Sprintf("%+v", err.Error())
|
|
}
|
|
return out.String()
|
|
}
|