打印机不打印商品价格相关
This commit is contained in:
@@ -59,7 +59,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
|
|
||||||
<BR>
|
<BR>
|
||||||
商品明细: <BR>
|
商品明细: <BR>
|
||||||
品名 数量 单价 小计<BR>
|
品名 数量 <BR>
|
||||||
--------------------------------<BR>`
|
--------------------------------<BR>`
|
||||||
// <BOLD>实际支付:</BOLD>%s<BR>
|
// <BOLD>实际支付:</BOLD>%s<BR>
|
||||||
orderParams := []interface{}{
|
orderParams := []interface{}{
|
||||||
@@ -80,7 +80,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `%s<BR>`
|
orderFmt += `%s<BR>`
|
||||||
orderFmt += `%8s%10s%10s<BR>`
|
orderFmt += `%8s%10s%10s<BR>`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `<BR>
|
orderFmt += `<BR>
|
||||||
<BOLD>共%d种%d件商品</BOLD>
|
<BOLD>共%d种%d件商品</BOLD>
|
||||||
@@ -133,7 +134,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
|
|
||||||
<BR>
|
<BR>
|
||||||
<B>商品明细: <BR></B>
|
<B>商品明细: <BR></B>
|
||||||
<B>品名数量单价小计<BR></B>
|
<B>品名 数量<BR></B>
|
||||||
--------------------------------<BR>`
|
--------------------------------<BR>`
|
||||||
// <B><BOLD>实际支付:</BOLD></B><B>%s<BR></B>
|
// <B><BOLD>实际支付:</BOLD></B><B>%s<BR></B>
|
||||||
orderParams := []interface{}{
|
orderParams := []interface{}{
|
||||||
@@ -154,7 +155,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `<B>%s<BR></B>`
|
orderFmt += `<B>%s<BR></B>`
|
||||||
orderFmt += `<B>%s %s %s<BR><BR></B>`
|
orderFmt += `<B>%s %s %s<BR><BR></B>`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `<BR>
|
orderFmt += `<BR>
|
||||||
<B><BOLD>共%d种%d件商品</BOLD></B>
|
<B><BOLD>共%d种%d件商品</BOLD></B>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
客户备注: *
|
客户备注: *
|
||||||
<big>%s*
|
<big>%s*
|
||||||
商品明细: *
|
商品明细: *
|
||||||
品名 数量 单价 小计
|
品名 数量
|
||||||
--------------------------------*
|
--------------------------------*
|
||||||
`
|
`
|
||||||
// <S011>实际支付: %s*
|
// <S011>实际支付: %s*
|
||||||
@@ -81,7 +81,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `%s*`
|
orderFmt += `%s*`
|
||||||
orderFmt += `%8s%10s%10s*`
|
orderFmt += `%8s%10s%10s*`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
// jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `
|
orderFmt += `
|
||||||
*
|
*
|
||||||
@@ -135,7 +136,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
<big>客户备注: *
|
<big>客户备注: *
|
||||||
<big>%s*
|
<big>%s*
|
||||||
<big>商品明细: *
|
<big>商品明细: *
|
||||||
<big>品名数量单价小计*
|
<big>品名 数量*
|
||||||
--------------------------------*
|
--------------------------------*
|
||||||
`
|
`
|
||||||
// <big>实际支付: %s*
|
// <big>实际支付: %s*
|
||||||
@@ -156,7 +157,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `<big>%s*`
|
orderFmt += `<big>%s*`
|
||||||
orderFmt += `<big>%s %s %s*`
|
orderFmt += `<big>%s %s %s*`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
// jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `
|
orderFmt += `
|
||||||
<big>共%d种%d件商品*
|
<big>共%d种%d件商品*
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
if order.VendorID == model.VendorIDEBAI {
|
if order.VendorID == model.VendorIDEBAI {
|
||||||
getCode = fmt.Sprintf("<FS2>饿百取货码:%s</FS2>\\n\n", jxutils.GetEbaiOrderGetCode(order))
|
getCode = fmt.Sprintf("<FS2>饿百取货码:%s</FS2>\\n\n", jxutils.GetEbaiOrderGetCode(order))
|
||||||
}
|
}
|
||||||
|
//TODO 去掉单价和小计,2020-06-18
|
||||||
orderFmt := `
|
orderFmt := `
|
||||||
<FS2><center>%s</center></FS2>\n\n
|
<FS2><center>%s</center></FS2>\n\n
|
||||||
<center>手机买菜上京西</center>
|
<center>手机买菜上京西</center>
|
||||||
@@ -57,7 +58,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
\n
|
\n
|
||||||
\n
|
\n
|
||||||
商品明细: \n
|
商品明细: \n
|
||||||
品名 数量 单价 小计\n
|
品名 数量 \n
|
||||||
--------------------------------\n`
|
--------------------------------\n`
|
||||||
// <FB>实际支付:</FB>%s\n
|
// <FB>实际支付:</FB>%s\n
|
||||||
orderParams := []interface{}{
|
orderParams := []interface{}{
|
||||||
@@ -78,7 +79,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `%s\n`
|
orderFmt += `%s\n`
|
||||||
orderFmt += `%8s%10s%10s\n`
|
orderFmt += `%8s%10s%10s\n`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `\n
|
orderFmt += `\n
|
||||||
<FB>共%d种%d件商品</FB>
|
<FB>共%d种%d件商品</FB>
|
||||||
@@ -125,7 +127,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
\n
|
\n
|
||||||
\n
|
\n
|
||||||
<FS2>商品明细: \n</FS2>
|
<FS2>商品明细: \n</FS2>
|
||||||
<FS2>品名数量单价小计\n</FS2>
|
<FS2>品名 数量\n</FS2>
|
||||||
--------------------------------\n`
|
--------------------------------\n`
|
||||||
// <FS2><FB>实际支付:</FB>%s\n</FS2>
|
// <FS2><FB>实际支付:</FB>%s\n</FS2>
|
||||||
orderParams := []interface{}{
|
orderParams := []interface{}{
|
||||||
@@ -146,7 +148,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `<FS2>%s\n</FS2>`
|
orderFmt += `<FS2>%s\n</FS2>`
|
||||||
orderFmt += `<FS2>%s %s %s\n\n</FS2>`
|
orderFmt += `<FS2>%s %s %s\n\n</FS2>`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `\n
|
orderFmt += `\n
|
||||||
<FS2><FB>共%d种%d件商品</FB></FS2>
|
<FS2><FB>共%d种%d件商品</FB></FS2>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
<RN>
|
<RN>
|
||||||
<RN>
|
<RN>
|
||||||
商品明细: <RN>
|
商品明细: <RN>
|
||||||
品名 数量 单价 小计<RN>
|
品名 数量 <RN>
|
||||||
********************************<RN>`
|
********************************<RN>`
|
||||||
// <B1>实际支付:</B1>%s<RN>
|
// <B1>实际支付:</B1>%s<RN>
|
||||||
orderParams := []interface{}{
|
orderParams := []interface{}{
|
||||||
@@ -79,7 +79,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `%s<RN>`
|
orderFmt += `%s<RN>`
|
||||||
orderFmt += `%8s%10s%10s<RN>`
|
orderFmt += `%8s%10s%10s<RN>`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `<RN>
|
orderFmt += `<RN>
|
||||||
<B1>共%d种%d件商品</B1>
|
<B1>共%d种%d件商品</B1>
|
||||||
@@ -126,7 +127,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
<RN>
|
<RN>
|
||||||
<RN>
|
<RN>
|
||||||
<S2>商品明细: <RN></S2>
|
<S2>商品明细: <RN></S2>
|
||||||
<S2>品名数量单价小计<RN></S2>
|
<S2>品名 数量<RN></S2>
|
||||||
********************************<RN>`
|
********************************<RN>`
|
||||||
// <S2><B1>实际支付:</B1>%s<RN></S2>
|
// <S2><B1>实际支付:</B1>%s<RN></S2>
|
||||||
orderParams := []interface{}{
|
orderParams := []interface{}{
|
||||||
@@ -147,7 +148,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
orderFmt += `<S2>%s<RN></S2>`
|
orderFmt += `<S2>%s<RN></S2>`
|
||||||
orderFmt += `<S2>%s %s %s<RN><RN></S2>`
|
orderFmt += `<S2>%s %s %s<RN><RN></S2>`
|
||||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||||
|
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||||
}
|
}
|
||||||
orderFmt += `<RN>
|
orderFmt += `<RN>
|
||||||
<S2><B1>共%d种%d件商品</B1></S2>
|
<S2><B1>共%d种%d件商品</B1></S2>
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ func (p *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bo
|
|||||||
status, err := p.GetOrderStatus("", order.VendorOrderID2)
|
status, err := p.GetOrderStatus("", order.VendorOrderID2)
|
||||||
//说明此时该订单在平台上已经取消了
|
//说明此时该订单在平台上已经取消了
|
||||||
if status == model.OrderStatusApplyCancel {
|
if status == model.OrderStatusApplyCancel {
|
||||||
err = ChangeOrderStatus(order.VendorOrderID, model.OrderStatusFinishedPickup, "自动拣货完成")
|
|
||||||
} else {
|
|
||||||
err = ChangeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, "订单状态发生了改变")
|
err = ChangeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, "订单状态发生了改变")
|
||||||
|
} else {
|
||||||
|
err = ChangeOrderStatus(order.VendorOrderID, model.OrderStatusFinishedPickup, "自动拣货完成")
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user