This commit is contained in:
邹宗楠
2025-08-07 16:55:20 +08:00
parent b15f7ac442
commit 99ad4b5f97
8 changed files with 157 additions and 33 deletions

View File

@@ -62,6 +62,10 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `
<B>预订单</B><BR>
`
} else {
orderFmt += `
<B>立即送达</B><BR>
`
}
orderFmt += `
@@ -124,11 +128,9 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
orderFmt += `<BR>
<BOLD>共%d种%d件商品</BOLD><BR>
<BOLD>实付:%s</BOLD>
<BR>
--------------------------------<BR>
<C><BOLD>商品质量问题请联系:</BOLD><BR></C>
<C><BOLD>%s:%s</BOLD><BR></C><BR>
<BR>
更多信息请关注官方微信: %s<BR>
<BR>
--------------------------------<BR>
@@ -173,6 +175,10 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `
<B>预订单</B><BR>
`
} else {
orderFmt += `
<B>立即送达</B><BR>
`
}
@@ -231,7 +237,6 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
--------------------------------<BR>
<C><BOLD>商品质量问题请联系:</BOLD><BR></C>
<BOLD>%s:%s</BOLD><BR><BR>
<BR>
更多信息请关注官方微信: %s<BR>
<BR>
--------------------------------<BR>

View File

@@ -196,6 +196,11 @@ func (c *PrinterHandler) getOrderContentV2(order *model.GoodsOrder, storeTel str
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><font# bolder=0 height=2 width=2>预订单</font#>`
} else {
orderFmt += `<C><font# bolder=0 height=2 width=2>立即送达</font#>`
}
orderFmt += `
<font# bolder=0 height=1 width=1>--------------------------------</font#>
<LEFT>下单时间: %s</LEFT>
@@ -261,6 +266,11 @@ func (c *PrinterHandler) getOrderContentBigV2(order *model.GoodsOrder, storeTel
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><font# bolder=0 height=2 width=2>预订单</font#>`
} else {
orderFmt += `<C><font# bolder=0 height=2 width=2>立即送达</font#>`
}
orderFmt += `
<font# bolder=0 height=2 width=1>--------------------------------</font#>
<LEFT>下单时间: %s</LEFT>
@@ -328,6 +338,11 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><font# bolder=0 height=2 width=2>预订单</font#>`
} else {
orderFmt += `<C><font# bolder=0 height=2 width=2>立即送达</font#>`
}
orderFmt += `
<font# bolder=0 height=1 width=1>--------------------------------</font#>
<LEFT>下单时间: %s</LEFT>
@@ -397,6 +412,11 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><font# bolder=0 height=2 width=2>预订单</font#>`
} else {
orderFmt += `<C><font# bolder=0 height=2 width=2>立即送达</font#>`
}
orderFmt += `
<font# bolder=0 height=1 width=1>--------------------------------</font#>
<LEFT><font# bolder=0 height=2 width=1>下单时间: %s</font#></LEFT>

View File

@@ -46,8 +46,13 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
orderFmt := `
<big> %s**
手机买菜上京西*
极速到家送惊喜*
------------------------------*
极速到家送惊喜*`
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<big> 预订单*`
} else {
orderFmt += `<big> 立即送达*`
}
orderFmt += `------------------------------*
下单时间: %s*
预计送达: %s*
订单编号: %s*
@@ -137,8 +142,13 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
orderFmt := `
<big> %s**
手机买菜上京西*
极速到家送惊喜*
------------------------------*
极速到家送惊喜*`
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<big> 预订单*`
} else {
orderFmt += `<big> 立即送达*`
}
orderFmt += `------------------------------*
<big>下单时间: %s**
<big>预计送达: %s**
<big>订单编号: %s*
@@ -215,8 +225,13 @@ func (c *PrinterHandler) getOrderContent2(order *model.GoodsOrder, storeTel stri
orderFmt := `
|7 %s
|5 手机买菜上京西
|5 极速到家送惊喜
|5--------------------------------
|5 极速到家送惊喜`
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `|5 预订单`
} else {
orderFmt += `|5 立即送达`
}
orderFmt += `|5--------------------------------
|5下单时间: %s
|5预计送达: %s
|5订单编号: %s

View File

@@ -193,6 +193,11 @@ func (c *PrinterHandler) getOrderContentV2(order *model.GoodsOrder, storeTel str
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><B>预订单</B><C>`
} else {
orderFmt += `<C><B>立即送达</B><C>`
}
orderFmt += `
` + xpyunapi.StrRepeat("-", 32) + `
<L>下单时间: %s
@@ -256,6 +261,11 @@ func (c *PrinterHandler) getOrderContentBigV2(order *model.GoodsOrder, storeTel
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><B>预订单</B><C>`
} else {
orderFmt += `<C><B>立即送达</B><C>`
}
orderFmt += `
` + xpyunapi.StrRepeat("-", 32) + `
<HB><L>下单时间: %s
@@ -321,6 +331,11 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><B>预订单</B><C>`
} else {
orderFmt += `<C><B>立即送达</B><C>`
}
orderFmt += `
` + xpyunapi.StrRepeat("-", 32) + `
<L>下单时间: %s
@@ -401,6 +416,11 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
}
}
}
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C><B>预订单</B><C>`
} else {
orderFmt += `<C><B>立即送达</B><C>`
}
orderFmt += `
` + xpyunapi.StrRepeat("-", 32) + `
<HB><L>下单时间: %s

View File

@@ -62,6 +62,10 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
orderFmt += `
<FS>预订单</FS>\n
`
} else {
orderFmt += `
<FS>立即送达</FS>\n
`
}
orderFmt += `
\n
@@ -162,8 +166,17 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
<FS>下单时间: %s\n\n</FS>
<FS>预计送达: %s\n\n</FS>
<FS>订单编号: %s\n</FS>
\n
<QR>%s</QR>
\n`
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `
<FS>预订单</FS>\n
`
} else {
orderFmt += `
<FS>立即送达</FS>\n
`
}
orderFmt += `<QR>%s</QR>
` + getCode + `\n
<FS>客户: %s\n</FS>
<FS>电话: %s\n</FS>

View File

@@ -54,8 +54,13 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
}
orderFmt += `
<C>手机买菜上京西</C>
<C>极速到家送惊喜</C><RN>
********************************
<C>极速到家送惊喜</C><RN>`
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C>预订单</C><RN>`
} else {
orderFmt += `<C>立即送达</C><RN>`
}
orderFmt += `********************************
下单时间: %s<RN>
预计送达: %s<RN>
订单编号: %s<RN>
@@ -133,8 +138,13 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
}
orderFmt += `
<C>手机买菜上京西</C>
<C>极速到家送惊喜</C><RN>
********************************
<C>极速到家送惊喜</C><RN>`
if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += `<C>预订单</C><RN>`
} else {
orderFmt += `<C>立即送达</C><RN>`
}
orderFmt += `********************************
<S2>下单时间: %s<RN><RN></S2>
<S2>预计送达: %s<RN><RN></S2>
<S2>订单编号: %s<RN></S2>