1
This commit is contained in:
@@ -1034,6 +1034,9 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
||||
if len(skuList) > 0 {
|
||||
flagVendorOrderID = skuList[0].VendorOrderID
|
||||
}
|
||||
if storeIDList[0] == 805178 {
|
||||
globals.SugarLogger.Debugf("-------skuList := %s", utils.Format4Output(skuList, false))
|
||||
}
|
||||
for k, v := range skuList {
|
||||
storeDetail, _ := dao.GetStoreDetail(db, v.StoreID, v.VendorID, "")
|
||||
if v.EarningPrice == 0 {
|
||||
|
||||
@@ -68,12 +68,12 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
<big>%s*
|
||||
商品明细: *
|
||||
`
|
||||
priceQuote := `品名 数量
|
||||
--------------------------------*
|
||||
`
|
||||
pricePoints := `品名 数量 单价 小计
|
||||
orderFmt += `品名 数量
|
||||
--------------------------------*
|
||||
`
|
||||
// pricePoints := `品名 数量 单价 小计
|
||||
//--------------------------------*
|
||||
//`
|
||||
// <S011>实际支付: %s*
|
||||
orderParams := []interface{}{
|
||||
globals.StoreName,
|
||||
@@ -89,23 +89,24 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
buyerComment,
|
||||
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
||||
}
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += pricePoints
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += priceQuote
|
||||
}
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += pricePoints
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += priceQuote
|
||||
//}
|
||||
for _, sku := range order.Skus {
|
||||
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `%s*`
|
||||
orderFmt += `%8s%10s%10s*`
|
||||
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 += `%s %25s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
orderFmt += `%s %25s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += `%s*`
|
||||
// orderFmt += `%8s%10s%10s*`
|
||||
// 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 += `%s %25s*`
|
||||
// orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//}
|
||||
|
||||
}
|
||||
orderFmt += `
|
||||
|
||||
@@ -80,18 +80,18 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
\n
|
||||
\n
|
||||
商品明细: \n`
|
||||
points := `
|
||||
orderFmt += `
|
||||
品名 数量 小计\n
|
||||
--------------------------------\n`
|
||||
quote := `
|
||||
品名 数量 \n
|
||||
--------------------------------\n`
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += points
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += quote
|
||||
}
|
||||
// quote := `
|
||||
//品名 数量 \n
|
||||
//--------------------------------\n`
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += points
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += quote
|
||||
//}
|
||||
orderParams = append(orderParams,
|
||||
jxutils.GetVendorName(order.VendorID),
|
||||
order.OrderSeq,
|
||||
@@ -107,15 +107,17 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `<FH>%s</FH>\n`
|
||||
orderFmt += `<FH>%20s%8s</FH>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += `<FH>%s%25s</FH>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
orderFmt += `<FH><LR>%s,%s</LR></FH>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += `<FH>%s</FH>\n`
|
||||
// orderFmt += `<FH>%20s%8s</FH>\n`
|
||||
// orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += `<FH>%s%25s</FH>\n`
|
||||
// orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//}
|
||||
|
||||
//标品需要打印条形码
|
||||
if sku.Upc != "" {
|
||||
@@ -188,17 +190,14 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
\n
|
||||
<FS>商品明细: \n</FS>`
|
||||
|
||||
points := `品名 数量 小计\n
|
||||
orderFmt += `品名 小计\n
|
||||
--------------------------------\n`
|
||||
|
||||
quote := `品名 小计\n
|
||||
--------------------------------\n`
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += points
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += quote
|
||||
}
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += points
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += quote
|
||||
//}
|
||||
|
||||
orderParams = append(orderParams,
|
||||
jxutils.GetVendorName(order.VendorID),
|
||||
@@ -215,15 +214,17 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `<FH2>%s\n</FH2>`
|
||||
orderFmt += `<FS><FB>%15s%8s</FB>\n</FS>`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += `<FH2>%s%25s\n</FH2>`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
orderFmt += `<FH2><LR>%s,%s</LR></FH2>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count))
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += `<FH2>%s\n</FH2>`
|
||||
// orderFmt += `<FS><FB>%15s%8s</FB>\n</FS>`
|
||||
// orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += `<FH2>%s%25s\n</FH2>`
|
||||
// orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count))
|
||||
//}
|
||||
|
||||
//标品需要打印条形码
|
||||
if sku.Upc != "" {
|
||||
|
||||
@@ -95,8 +95,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s<RN>`
|
||||
orderFmt += `%8s<RN>`
|
||||
orderFmt += `%s <R>%s</R><RN>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||
}
|
||||
@@ -179,8 +178,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `<S2>%s<RN></S2>`
|
||||
orderFmt += `<S2>%s<RN><RN></S2>`
|
||||
orderFmt += `<S2>%s <R>%s</R></S2><RN>`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user