1
This commit is contained in:
@@ -245,6 +245,111 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
return fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...)
|
||||
}
|
||||
|
||||
// getOrderContentBig805334 天星桥专属
|
||||
func (c *PrinterHandler) getOrderContentBig805334(order *model.GoodsOrder, storeTel string, storeDetail *dao.StoreDetail) (content string) {
|
||||
expectedDeliveryTime := order.ExpectedDeliveredTime
|
||||
if utils.IsTimeZero(expectedDeliveryTime) {
|
||||
expectedDeliveryTime = order.OrderCreatedAt.Add(1 * time.Hour)
|
||||
}
|
||||
getCode := ""
|
||||
if order.VendorID == model.VendorIDEBAI {
|
||||
getCode = fmt.Sprintf("<B>淘宝闪购取货码:%s</B><BR><BR>\n", jxutils.GetEbaiOrderGetCode(order))
|
||||
}
|
||||
orderParams := []interface{}{}
|
||||
orderFmt := ``
|
||||
if storeDetail != nil {
|
||||
if storeDetail.BrandIsPrint == model.NO {
|
||||
orderFmt += `<CB>%s</CB><BR>`
|
||||
if order.VendorOrgCode == "34665" {
|
||||
orderParams = append(orderParams, globals.StoreNameEbai2)
|
||||
} else {
|
||||
orderParams = append(orderParams, storeDetail.BrandName)
|
||||
}
|
||||
}
|
||||
}
|
||||
orderFmt += `<CB>%s#%d</CB><BR>
|
||||
<BOLD>%s:%s</BOLD><BR>
|
||||
--------------------------------<BR>
|
||||
<L>下单时间: %s</L><BR>
|
||||
<L>预计送达: %s</L><BR>
|
||||
<L>订单编号: %s</L><BR>
|
||||
<BR>`
|
||||
|
||||
if order.BusinessType == model.BusinessTypeDingshida {
|
||||
orderFmt += `
|
||||
<L>预订单</L><BR>
|
||||
`
|
||||
} else {
|
||||
orderFmt += `
|
||||
<L>立即送达</L><BR>
|
||||
`
|
||||
}
|
||||
|
||||
orderFmt += `<QR>%s</QR><BR>
|
||||
` + getCode +
|
||||
`<L>客户: %s</L><BR>
|
||||
<L>电话: %s</L><BR>
|
||||
<L>地址: %s</L><BR>
|
||||
<L>客户备注: </L><BR>
|
||||
<L>%s</L><BR>
|
||||
<BR>
|
||||
<L>商品明细: </L><BR>
|
||||
<L>品名数量单价小计</L><BR>
|
||||
--------------------------------<BR>`
|
||||
// <B><BOLD>实际支付:</BOLD></B><B>%s<BR></B>
|
||||
orderParams = append(orderParams,
|
||||
jxutils.GetVendorName(order.VendorID),
|
||||
order.OrderSeq,
|
||||
order.StoreName, storeTel,
|
||||
utils.Time2Str(order.OrderCreatedAt),
|
||||
utils.Time2Str(expectedDeliveryTime),
|
||||
order.VendorOrderID,
|
||||
order.VendorOrderID,
|
||||
order.ConsigneeName,
|
||||
order.ConsigneeMobile,
|
||||
order.ConsigneeAddress,
|
||||
order.BuyerComment,
|
||||
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
if sku.Count > 1 {
|
||||
orderFmt += `<L>%s <RIGHT>%s</RIGHT></L><BR>`
|
||||
} else {
|
||||
orderFmt += `</L>%s <RIGHT>%s</RIGHT></L><BR>`
|
||||
}
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
|
||||
//orderFmt += `<B>%s</B><BR>`
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += `<B>%s %s %s</B><BR>`
|
||||
// orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += `<CB>%s</CB><BR>`
|
||||
// orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//}
|
||||
//orderFmt += `<B>%s %s %s<BR><BR></B>`
|
||||
//orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
//标品需要打印条形码
|
||||
if sku.Upc != "" {
|
||||
orderFmt += `upc码: %s<BR>`
|
||||
orderParams = append(orderParams, sku.Upc)
|
||||
}
|
||||
}
|
||||
orderFmt += `
|
||||
<BOLD>共%d种%d件商品</BOLD>
|
||||
<BOLD>实付:%s</BOLD><BR>
|
||||
--------------------------------<BR>
|
||||
<C><BOLD>商品质量问题请联系:</BOLD></C><BR>
|
||||
更多信息请关注官方微信: %s<BR>
|
||||
--------------------------------<BR>
|
||||
`
|
||||
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
||||
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), globals.StoreName)
|
||||
return fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...)
|
||||
}
|
||||
|
||||
// 打印取消或者退款订单
|
||||
func (c *PrinterHandler) getCancelOrRefundOrderContent(order *model.GoodsOrder, printType int, storeDetail *dao.StoreDetail) (content string) {
|
||||
expectedDeliveryTime := order.ExpectedDeliveredTime
|
||||
@@ -389,7 +494,11 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
}
|
||||
content := ""
|
||||
if store.PrinterFontSize == partner.PrinterFontSizeBig || store.PrinterFontSize == partner.PrinterFontSizeBig2 {
|
||||
content = c.getOrderContentBig(order, store.Tel1, storeDetail)
|
||||
if store.ID == 805334 {
|
||||
content = c.getOrderContentBig805334(order, store.Tel1, storeDetail)
|
||||
} else {
|
||||
content = c.getOrderContentBig(order, store.Tel1, storeDetail)
|
||||
}
|
||||
} else {
|
||||
content = c.getOrderContent(order, store.Tel1, storeDetail)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user