|
@ -514,36 +514,35 @@ export default {
|
|
|
}
|
|
|
list.forEach(v=>{
|
|
|
printcon.push({
|
|
|
type:"text", text: (v.drugName)+"\n",nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
type:"text", text: (v.drugName||v.goodsName)+"\n",nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
})
|
|
|
printcon.push({
|
|
|
type:"text", text: `单价:${v.price}元 数量:${v.quantity}\n药品编码:${v.drugCode}\n规格:${v.specif}\n剂型:${v.dosForm||''}\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
type:"text", text: `数量:${v.quantity}\n规格:${v.specif}\n用法:${v.useWay||''} ${v.useDose||''}${v.unit||''} ${v.useRate||''}`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
})
|
|
|
printcon.push({type:"line"})
|
|
|
})
|
|
|
var {date, phone, num, remark, time, community, qrCodeContent, info} = this.orderInfo
|
|
|
printcon.push({
|
|
|
type:"text", text: `药品总价:${(allPrice).toFixed(2)}元\n药品数量:${allcount}\n订单金额:${allPrice.toFixed(2)}元\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
})
|
|
|
|
|
|
var {date, phone, num, remark, time, community, qrCodeContent, info} = this.orderInfo
|
|
|
// printcon.push({
|
|
|
// type:"text", text: `药品总价:${(allPrice).toFixed(2)}元\n药品数量:${allcount}\n订单金额:${allPrice.toFixed(2)}元\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
// })
|
|
|
|
|
|
var infoArr = (info&&info.split(',')) || [],
|
|
|
infoTextArr = []
|
|
|
if(infoArr.indexOf("community") != -1){
|
|
|
infoTextArr.push(`商家名称:${community}\n`)
|
|
|
infoTextArr.push(`机构名称:${community}\n`)
|
|
|
}
|
|
|
if(infoArr.indexOf("phone") != -1){
|
|
|
infoTextArr.push(`客服电话:${phone}\n`)
|
|
|
}
|
|
|
if(infoArr.indexOf("equNum") != -1){
|
|
|
infoTextArr.push(`设备编号:${this.deviceNum}\n`)
|
|
|
}
|
|
|
// if(infoArr.indexOf("equNum") != -1){
|
|
|
// infoTextArr.push(`设备编号:${this.deviceNum}\n`)
|
|
|
// }
|
|
|
if(infoArr.indexOf("orderNo") != -1){
|
|
|
infoTextArr.push(`处方单号:${num}\n`)
|
|
|
}
|
|
|
if(infoArr.indexOf("shipTime") != -1){
|
|
|
infoTextArr.push(`取药日期:${date}\n`)
|
|
|
infoTextArr.push(`取药时间:${time}\n`)
|
|
|
infoTextArr.push(`取药日期:${date} ${time}\n`)
|
|
|
}
|
|
|
if(infoTextArr&&infoTextArr.length){
|
|
|
printcon.push({type:"text", text:"--------------------------------\n",nLan:0,nOrgx:-2,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0})
|
|
@ -559,9 +558,9 @@ export default {
|
|
|
printcon.push({
|
|
|
type:"text", text: `备注:${remark||""}\n`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
|
|
|
})
|
|
|
if(qrCodeContent){
|
|
|
printcon.push({type:"qrcode",text: qrCodeContent, nWidth:6,nVersion:0,nErrlevenl:4})
|
|
|
}
|
|
|
// if(qrCodeContent){
|
|
|
printcon.push({type:"qrcode",text: qrCodeContent||"", nWidth:6,nVersion:0,nErrlevenl:4})
|
|
|
// }
|
|
|
|
|
|
printcon.push({type:"nline"})
|
|
|
printcon.push({type:"nline"})
|