|
|
|
@ -17,7 +17,7 @@ |
|
|
|
style="font-size: 22rpx;position: absolute;top: 50rpx;right: 70rpx;background: blue;color: #fff;border-radius: 7px;"> |
|
|
|
分享 |
|
|
|
</button> |
|
|
|
<button v-if="false" @tap="getData()" |
|
|
|
<button v-if="shopId == '1848242501496999936' || shopId == '1843114735801864192' || shopId == '1818888277105709056' || shopId == '1811579958284390400'" @tap="getData()" |
|
|
|
style="font-size: 22rpx;position: absolute;top: 50rpx;right: 200rpx;background: blue;color: #fff;border-radius: 7px;"> |
|
|
|
分享图片 |
|
|
|
</button> |
|
|
|
@ -573,15 +573,10 @@ |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<view style="width: 93%;margin: 0 auto;display: flex;"> |
|
|
|
<view style="width: 160rpx;height: 260rpx;display: flex;flex-direction: column;"> |
|
|
|
<uqrcode v-if="qrArr.length > 0" ref="uqrcode" size="160" sizeUnit="rpx" canvas-id="qrcode" :value="QrUrl"> |
|
|
|
<uqrcode v-if="qrArr.length > 0" :hide='true' ref="uqrcode" size="160" sizeUnit="rpx" canvas-id="qrcode" :value="QrUrl"> |
|
|
|
</uqrcode> |
|
|
|
<view style="text-align: center;font-size: 24rpx;margin-top:10rpx;" v-if="qrArr.length > 0"> |
|
|
|
{{qrArr[qrArr.length-1].name}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-for="(item,index) in newQRList" v-if="newQRList.length > 0"> |
|
|
|
<view v-for="(item,index) in newQRList" :key="index" v-if="newQRList.length > 0"> |
|
|
|
<image show-menu-by-longpress :src="item.path" alt="" style="margin: 0 0 0 16rpx;width: 160rpx;height: 160rpx;" /></image> |
|
|
|
<view style="text-align: center;font-size: 24rpx;">{{qrArr[index].name}}</view> |
|
|
|
</view> |
|
|
|
@ -698,7 +693,7 @@ |
|
|
|
addressArr: [], |
|
|
|
jinjuPhone: '', //金桔家单独改成这个电话 |
|
|
|
modal_qr: false, |
|
|
|
qrCodeUrl: 'https://u.wechat.com/EOzom56XQ_1MKeVPPqgwMlI', // 要生成的二维码值 |
|
|
|
qrCodeUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8e305338798c4152a89e3351eaf6c84e.png', // 要生成的二维码值 |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -759,7 +754,6 @@ |
|
|
|
// success () { }, |
|
|
|
// fail () {} |
|
|
|
// }) |
|
|
|
console.log(this.sales) |
|
|
|
let titleText = this.shopName +' '+ this.sales.createTime.split(' ')[0]+'\n销售单' |
|
|
|
const imageUrl = await this.senrPath() |
|
|
|
return { |
|
|
|
@ -1099,16 +1093,7 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
returnRealSize(size){ |
|
|
|
return Number((size / this.smailDcl).toFixed(2)) |
|
|
|
}, |
|
|
|
returnRealFontSize(size){ |
|
|
|
if(Number((size - this.fontsmailDcl).toFixed(2)) < 0){ |
|
|
|
return (18 - (this.smailSize * 1.2).toFixed(2)).toFixed(2) |
|
|
|
}else if(Number((size - this.fontsmailDcl).toFixed(2)) < 12){ |
|
|
|
return 12 |
|
|
|
}else{ |
|
|
|
return Number((size - this.fontsmailDcl).toFixed(2)) |
|
|
|
} |
|
|
|
return Number((size / this.smailDcl).toFixed(0)) |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
let that = this |
|
|
|
@ -1129,7 +1114,7 @@ |
|
|
|
|
|
|
|
//店铺名 |
|
|
|
// 设置字体样式 |
|
|
|
ctx.font = 'bold '+ that.returnRealFontSize(120) +'px SimSun'; |
|
|
|
ctx.font = 'bold '+ that.returnRealSize(150) +'px SimSun'; |
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
var text = this.shopName+' 销售单'; |
|
|
|
@ -1142,10 +1127,10 @@ |
|
|
|
|
|
|
|
// 设置字体样式 |
|
|
|
|
|
|
|
ctx.font = 'bold '+ that.returnRealFontSize(60) +'px SimSun'; |
|
|
|
ctx.font = 'bold '+ that.returnRealSize(60) +'px SimSun'; |
|
|
|
|
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
// 客户 |
|
|
|
ctx.fillText('客户:' + (that.order.name ? that.order.name : '散客'), that.returnRealSize(20), that.returnRealSize(500)) |
|
|
|
ctx.fillText('单号:' + that.sales.id, that.returnRealSize(1450), that.returnRealSize(500)) |
|
|
|
@ -1155,8 +1140,7 @@ |
|
|
|
// 横线 |
|
|
|
ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), that.returnRealSize(700)) |
|
|
|
// 数据 |
|
|
|
let printingMethod = '0' |
|
|
|
if (printingMethod == '0') { |
|
|
|
if (this.printingMethod == '0') { |
|
|
|
ctx.fillText('货号(名称)', that.returnRealSize(20), that.returnRealSize(800)) |
|
|
|
ctx.fillText('规格', that.returnRealSize(1040), that.returnRealSize(800)) |
|
|
|
ctx.fillText('数量', that.returnRealSize(1590), that.returnRealSize(800)) |
|
|
|
@ -1170,7 +1154,7 @@ |
|
|
|
let moretime = 0 |
|
|
|
let Xindex = 0 |
|
|
|
for (var i = 0; i < that.newData.length; i++){ |
|
|
|
if (printingMethod == '1') { |
|
|
|
if (this.printingMethod == '1') { |
|
|
|
moretime+=140 |
|
|
|
dataheigth += that.returnRealSize(100) |
|
|
|
//货号 |
|
|
|
@ -1273,7 +1257,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
let lastHeight = 0 |
|
|
|
if (printingMethod == '1') { |
|
|
|
if (this.printingMethod == '1') { |
|
|
|
lastHeight = dataheigth |
|
|
|
}else{ |
|
|
|
lastHeight = dataheigth1 |
|
|
|
@ -1285,7 +1269,7 @@ |
|
|
|
ctx.draw(true) |
|
|
|
|
|
|
|
// 设置字体样式 |
|
|
|
ctx.font = 'bold '+that.returnRealFontSize(70)+'px SimSun'; |
|
|
|
ctx.font = 'bold '+that.returnRealSize(70)+'px SimSun'; |
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
ctx.fillText('本单应收:' + that.sales.realAmount + '(' + this.convertToChineseNumeral(that.sales.realAmount) + ')', that.returnRealSize(20) , lastHeight+=that.returnRealSize(100)) |
|
|
|
@ -1310,7 +1294,7 @@ |
|
|
|
ctx.fillText('-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------', that.returnRealSize(20), lastHeight+=that.returnRealSize(100)) |
|
|
|
ctx.draw(true) |
|
|
|
// 设置字体样式 |
|
|
|
ctx.font = 'bold '+that.returnRealFontSize(60)+'px SimSun'; |
|
|
|
ctx.font = 'bold '+that.returnRealSize(60)+'px SimSun'; |
|
|
|
// 设置文字颜色 |
|
|
|
ctx.fillStyle = 'black'; |
|
|
|
|
|
|
|
@ -1348,23 +1332,41 @@ |
|
|
|
ctx.draw(true) |
|
|
|
let begineidth = that.returnRealSize(20) |
|
|
|
let wenheight = lastHeight + that.returnRealSize(150) |
|
|
|
lastHeight+=that.returnRealSize(150) |
|
|
|
lastHeight+=that.returnRealSize(200) |
|
|
|
let qrarr = [] |
|
|
|
let data = { |
|
|
|
name : '店铺微信', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8e305338798c4152a89e3351eaf6c84e.png', |
|
|
|
if(that.shopId == '1848242501496999936' || that.shopId == '1811579958284390400'){ |
|
|
|
let data = { |
|
|
|
name : '店铺微信', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8e305338798c4152a89e3351eaf6c84e.png', |
|
|
|
} |
|
|
|
qrarr.push(data) |
|
|
|
}else{ |
|
|
|
let data = { |
|
|
|
name : '店铺微信', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/4280d25c885847ca9fc0cccbc936ad1a.png', |
|
|
|
} |
|
|
|
qrarr.push(data) |
|
|
|
} |
|
|
|
qrarr.push(data) |
|
|
|
let data1 = { |
|
|
|
name : '微信收款码', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3456337911cd4c759e4237da6aefaa01.png', |
|
|
|
if(that.shopId == '1848242501496999936' || that.shopId == '1811579958284390400'){ |
|
|
|
let data1 = { |
|
|
|
name : '微信收款码', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3456337911cd4c759e4237da6aefaa01.png', |
|
|
|
} |
|
|
|
qrarr.push(data1) |
|
|
|
} |
|
|
|
qrarr.push(data1) |
|
|
|
let data2 = { |
|
|
|
name : '银行收款码', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d3f594face1e432fb9b4a0e4fd8ed685.png', |
|
|
|
if(that.shopId == '1848242501496999936' || that.shopId == '1811579958284390400'){ |
|
|
|
let data2 = { |
|
|
|
name : '银行收款码', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d3f594face1e432fb9b4a0e4fd8ed685.png', |
|
|
|
} |
|
|
|
qrarr.push(data2) |
|
|
|
}else{ |
|
|
|
let data2 = { |
|
|
|
name : '银行收款码', |
|
|
|
path : 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f34a7c8e2ba44f5dbc8d199d12b1d841.png', |
|
|
|
} |
|
|
|
qrarr.push(data2) |
|
|
|
} |
|
|
|
qrarr.push(data2) |
|
|
|
for(let a = 0;a < qrarr.length; a++){ |
|
|
|
setTimeout(ress=>{ |
|
|
|
uni.downloadFile({ |
|
|
|
@ -1372,7 +1374,7 @@ |
|
|
|
success: (res2) => { |
|
|
|
if (res2.statusCode === 200) { |
|
|
|
ctx.fillText(qrarr[a].name, begineidth , wenheight) |
|
|
|
ctx.drawImage(res2.tempFilePath, begineidth,lastHeight , that.returnRealSize(500), that.returnRealSize(500)); |
|
|
|
ctx.drawImage(res2.tempFilePath, begineidth,lastHeight , that.returnRealSize(400), that.returnRealSize(400)); |
|
|
|
ctx.draw(true) |
|
|
|
begineidth += that.returnRealSize(640) |
|
|
|
} |
|
|
|
@ -1444,7 +1446,6 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
largeImg(img) { |
|
|
|
console.log('largeImg',img) |
|
|
|
if (img.productPicture == null && img.productPictures == null) { |
|
|
|
this.tui.toast("暂无可展示的图片", 1000) |
|
|
|
return |
|
|
|
@ -1635,7 +1636,7 @@ |
|
|
|
|
|
|
|
if (that.qrArr.length > 0) { |
|
|
|
this.printHeight += 360 |
|
|
|
this.printHeight1 += 800 |
|
|
|
this.printHeight1 += 1000 |
|
|
|
} |
|
|
|
if (that.shopRemark.length > 0) { |
|
|
|
this.printHeight += that.shopRemark.length * 40 |
|
|
|
@ -1645,15 +1646,16 @@ |
|
|
|
this.printHeight += 100 |
|
|
|
this.printHeight1 += 100 |
|
|
|
} |
|
|
|
if(this.printHeight1 > 11600){ |
|
|
|
this.smailSize = ((this.printHeight1 - 11600) / 505).toFixed(2) |
|
|
|
let smailBegin = 4000 |
|
|
|
if(that.deviceType == 'ios'){ |
|
|
|
smailBegin = 2500 |
|
|
|
} |
|
|
|
this.smailDcl = (this.printHeight1 / 2500).toFixed(2) |
|
|
|
this.fontsmailDcl = ((this.printHeight1 - 2500) / 100).toFixed(2) |
|
|
|
this.printHeight1 = 2500 |
|
|
|
this.smailDcl = Number(Number(this.printHeight1 / smailBegin).toFixed(2)) |
|
|
|
this.printHeight1 = smailBegin |
|
|
|
this.myCanvasHeight = this.printHeight1+'px' |
|
|
|
|
|
|
|
this.printWidth1 = (this.printWidth1 / this.smailDcl).toFixed(2) |
|
|
|
if(this.smailDcl >= 1){ |
|
|
|
this.printWidth1 = Number(Number(this.printWidth1 / this.smailDcl).toFixed(0)) |
|
|
|
} |
|
|
|
this.myCanvasWidth = this.printWidth1+'px' |
|
|
|
setTimeout(res => { |
|
|
|
that.picOk = true |
|
|
|
@ -1669,16 +1671,21 @@ |
|
|
|
name:that.qrArr[i].name, |
|
|
|
path:"" |
|
|
|
} |
|
|
|
this.$refs.uqrcode.toTempFilePath({ |
|
|
|
success: res => { |
|
|
|
data.path = res.tempFilePath |
|
|
|
that.newQRList1.push(data) |
|
|
|
that.newQRList.push(data) |
|
|
|
}, |
|
|
|
fail: err => { |
|
|
|
console.log('err', err); |
|
|
|
} |
|
|
|
}); |
|
|
|
setTimeout(res1 => { |
|
|
|
this.$refs.uqrcode.toTempFilePath({ |
|
|
|
success: res => { |
|
|
|
console.log('res.tempFilePath',res.tempFilePath) |
|
|
|
data.path = res.tempFilePath |
|
|
|
that.newQRList1.push(data) |
|
|
|
that.newQRList.push(data) |
|
|
|
|
|
|
|
}, |
|
|
|
fail: err => { |
|
|
|
console.log('err', err); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, 500 * i) |
|
|
|
|
|
|
|
}, 1000 * i) |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1701,7 +1708,6 @@ |
|
|
|
let strCmd = '' |
|
|
|
let pageNum = 1 |
|
|
|
let Xindex = 0 |
|
|
|
console.log('newQRList',that.newQRList) |
|
|
|
if (this.printingMethod == '0') { |
|
|
|
that.yNum = 405 |
|
|
|
} else { |
|
|
|
@ -2545,7 +2551,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (this.shopId == '1810179818189361152' || this.shopId == '1843114735801864192') { |
|
|
|
} else if (this.shopId == '1810179818189361152' || this.shopId == '1843114735801864192' || this.shopId == '1818888277105709056') { |
|
|
|
//华秀 |
|
|
|
if (that.yNum + 64 >= 1990 * pageNum) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
@ -2574,32 +2580,64 @@ |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单应收:' + that.sales.realAmount + |
|
|
|
'(' + this.convertToChineseNumeral(that.sales.realAmount) + ')') |
|
|
|
|
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
if(this.shopId == '1810179818189361152'){ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单应收:' + that.sales.realAmount + |
|
|
|
'(' + this.convertToChineseNumeral(that.sales.realAmount) + ')') |
|
|
|
|
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount + |
|
|
|
'(' + this.convertToChineseNumeral(that.sales.realAmount) + ')') |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单应收:' + that.sales.realAmount + |
|
|
|
'(' + this.convertToChineseNumeral(that.sales.realAmount) + ')') |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
if(this.shopId == '1810179818189361152'){ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单应收:' + that.sales.realAmount + |
|
|
|
'(' + this.convertToChineseNumeral(that.sales.realAmount) + ')') |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount + |
|
|
|
'(' + this.convertToChineseNumeral(that.sales.realAmount) + ')') |
|
|
|
} |
|
|
|
} |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
@ -2612,31 +2650,58 @@ |
|
|
|
pageNum++ |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales |
|
|
|
.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')') |
|
|
|
|
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
if(this.shopId == '1810179818189361152'){ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales |
|
|
|
.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')') |
|
|
|
|
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单实收:' + that.sales |
|
|
|
.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')') |
|
|
|
} |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales |
|
|
|
.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')') |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
if(this.shopId == '1810179818189361152'){ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales |
|
|
|
.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')') |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('578', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
strCmd += blesdk.addCPCLText('248', that.yNum, '24', '0', 0, '本单实收:' + that.sales |
|
|
|
.alreadyEarn + '(' + this.convertToChineseNumeral(that.sales.alreadyEarn) + ')') |
|
|
|
} |
|
|
|
} |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
@ -3536,7 +3601,6 @@ |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
console.log('1111') |
|
|
|
}) |
|
|
|
setTimeout(res => { |
|
|
|
let that = this |
|
|
|
|