|
|
|
@ -269,39 +269,6 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="tui-order-info boxbg" v-if="isgys"> |
|
|
|
<view class="tui-order-title"> |
|
|
|
退款历史 |
|
|
|
</view> |
|
|
|
<view class="tui-order-content"> |
|
|
|
<u-collapse :value="[1]"> |
|
|
|
<u-collapse-item :open='true' v-for="(item,index) in returnList" :key="index" |
|
|
|
:title="item.returnSale.createTime" name="1"> |
|
|
|
<view style="display: flex;text-align: center;"> |
|
|
|
<view style="width:50%;">退货金额:{{item.returnSale.totalAmount}}</view> |
|
|
|
<view style="width:50%;"> |
|
|
|
拉包工:{{item.returnSale.workerName == null?'暂无':item.returnSale.workerName}}</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="u-collapse-content" v-for="(val, index2) in item.saleDetailDTOList" :key="index2"> |
|
|
|
<view style="text-align: center;margin-top: 20rpx;"> |
|
|
|
{{val.productName}}({{val.productSn != null?val.productSn: ""}}) |
|
|
|
</view> |
|
|
|
<view style="display: flex;text-align: center;border-top:1px solid #eee;margin-top:20rpx;"> |
|
|
|
<view style="width:50%;">规格</view> |
|
|
|
<view style="width:50%;">数量</view> |
|
|
|
</view> |
|
|
|
<view v-for="(val1, index3) in val.stockLogList1" :key="index3" v-if="val1.productCount!=0" |
|
|
|
style="display: flex;text-align: center;"> |
|
|
|
<view style="width:50%;">{{val1.attributeList | sliceMsg}}</view> |
|
|
|
<view style="width:50%;">{{val1.productCount}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-collapse-item> |
|
|
|
</u-collapse> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<view class="tui-order-info boxbg" v-if="isgys"> |
|
|
|
<view class="tui-order-title"> |
|
|
|
物流信息 |
|
|
|
@ -351,6 +318,21 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tui-order-info boxbg" v-if="isgys"> |
|
|
|
<view class="tui-order-title"> |
|
|
|
店铺信息 |
|
|
|
</view> |
|
|
|
<view class="tui-order-content"> |
|
|
|
<view class="tui-order-flex"> |
|
|
|
<view class="tui-item-title">店铺地址:</view> |
|
|
|
<view class="tui-item-content">{{ shopAddress }}</view> |
|
|
|
</view> |
|
|
|
<view class="tui-order-flex"> |
|
|
|
<view class="tui-item-title">店铺电话:</view> |
|
|
|
<view class="tui-item-content">{{ shopOwnerPhone }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 小静家的临时二维码 --> |
|
|
|
<view |
|
|
|
v-if="shopId == '1819168666252611584' || shopId == '1818888277105709056' || shopId == '1809982397626847232' || shopId == '1810586326525939712'" |
|
|
|
@ -496,6 +478,8 @@ |
|
|
|
userType: uni.getStorageSync('type'), |
|
|
|
show: false, |
|
|
|
popupShow: false, |
|
|
|
shopAddress:uni.getStorageSync('shopAddress'), |
|
|
|
shopOwnerPhone:uni.getStorageSync('shopOwnerPhone'), |
|
|
|
sales: {}, |
|
|
|
dealingsRecord: {}, |
|
|
|
order: {}, |
|
|
|
@ -655,9 +639,13 @@ |
|
|
|
this.shopData = res.result.shop |
|
|
|
this.splitTextIntoChunks(res.result.shop.shopAddress, 30) |
|
|
|
this.getReturnOrder(option.id) |
|
|
|
if (res.result.sale.status == '2') { |
|
|
|
this.tui.toast('该订单已撤销') |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
if (res.code == 500 && res.message == 'java.lang.NullPointerException') { |
|
|
|
this.tui.toast('订单已撤销,无法查看') |
|
|
|
this.tui.toast('该订单已撤销,无法查看') |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -1168,165 +1156,299 @@ |
|
|
|
'-----------------------------------------------------------------------------------') |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
strCmd += blesdk.addCPCLLocation(0); |
|
|
|
if (that.yNum + 60 >= 1990 * pageNum) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += |
|
|
|
blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
.balanceDeductionAmount)) |
|
|
|
// strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
|
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
.balanceDeductionAmount)) |
|
|
|
// strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
} |
|
|
|
|
|
|
|
console.log('销售数量', that.yNum) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense)) |
|
|
|
} |
|
|
|
|
|
|
|
console.log('退货数量', that.yNum) |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales |
|
|
|
.debtDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
if(this.shopId == '1820391948796694529'){ |
|
|
|
if (that.yNum + 30 >= 1990 * pageNum) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 30), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += |
|
|
|
blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '销售数量:' + that.sales.productCount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
.balanceDeductionAmount)) |
|
|
|
// strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
|
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '销售数量:' + that.sales.productCount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
.balanceDeductionAmount)) |
|
|
|
// strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
} |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales |
|
|
|
.debtDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount) |
|
|
|
// strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
// .balanceDeductionAmount)) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
|
|
|
|
console.log('销售数量', that.yNum) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
if (that.yNum + 30 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 30), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '退货数量:' + that.returnNum) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice) |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:0') |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '退货数量:' + that.returnNum) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice) |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log('欠款抵退货', that.yNum) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1,1) |
|
|
|
// if(that.yNum + 40 >= 1990){ |
|
|
|
// strCmd += blesdk.addCPCLPrint(); |
|
|
|
// that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
// strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 40) >= 1990 ?1990:(this.printHeight - that.yNum + 40), 1, 0,162); |
|
|
|
// that.yNum = 0 |
|
|
|
// pageNum ++ |
|
|
|
// strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, |
|
|
|
// '-----------------------------------------------------------------------------------') |
|
|
|
// }else{ |
|
|
|
// strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, |
|
|
|
// '-----------------------------------------------------------------------------------') |
|
|
|
// } |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// strCmd += blesdk.addCPCLSETMAG(2, 2) |
|
|
|
// strCmd += blesdk.addCPCLLocation(0); |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
if (that.sales.noEarn >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn)) |
|
|
|
|
|
|
|
console.log('退货数量', that.yNum) |
|
|
|
if (that.yNum + 30 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 30), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '欠款抵退货:' + that.sales |
|
|
|
.debtDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales |
|
|
|
.noEarn)) |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '欠款抵退货:' + that.sales |
|
|
|
.debtDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount) |
|
|
|
// strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
// .balanceDeductionAmount)) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', (that.yNum), '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', (that.yNum), '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('580', (that.yNum), '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
} |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
|
|
|
|
console.log('欠款抵退货', that.yNum) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
if (that.yNum + 30 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 30), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单应收:' + that.sales.realAmount) |
|
|
|
if (that.sales.noEarn >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单欠款:' + (that.sales.noEarn)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单余额:' + Math.abs(that.sales |
|
|
|
.noEarn)) |
|
|
|
} |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
|
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, '本单应收:' + that.sales.realAmount) |
|
|
|
if (that.sales.noEarn >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单欠款:' + (that.sales.noEarn)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '本单余额:' + Math.abs(that.sales |
|
|
|
.noEarn)) |
|
|
|
} |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (that.sales.noEarn >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn)) |
|
|
|
if (that.yNum + 30 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 30) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 30), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales |
|
|
|
.noEarn)) |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('580', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
} |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
}else{ |
|
|
|
if (that.yNum + 60 >= 1990 * pageNum) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += |
|
|
|
blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
.balanceDeductionAmount)) |
|
|
|
// strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
|
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '销售数量:' + that.sales.productCount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售金额:' + that.sales.totalAmount) |
|
|
|
// strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
.balanceDeductionAmount)) |
|
|
|
// strCmd += blesdk.addCPCLText('600', (that.yNum - 20), '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
} |
|
|
|
|
|
|
|
console.log('销售数量', that.yNum) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '退货数量:' + that.returnNum) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '退货金额:' + that.returnPrice) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '其他费用:' + (that.sales.otherExpense)) |
|
|
|
} |
|
|
|
|
|
|
|
console.log('退货数量', that.yNum) |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales |
|
|
|
.debtDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前余额:' + Math.abs(that.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('600', that.yNum, '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '欠款抵退货:' + that.sales |
|
|
|
.debtDeductionAmount) |
|
|
|
strCmd += blesdk.addCPCLText('300', that.yNum, '24', '0', 0, '销售抵退货:' + that.sales.saleDeductionAmount) |
|
|
|
// strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '余额抵销售:' + (that.sales |
|
|
|
// .balanceDeductionAmount)) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.dealingsRecord.lastDebtAmount >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:' + that.dealingsRecord |
|
|
|
.lastDebtAmount) |
|
|
|
} else if (that.dealingsRecord.lastDebtAmount < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前余额:' + Math.abs(that |
|
|
|
.dealingsRecord |
|
|
|
.lastDebtAmount)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('610', (that.yNum - 10), '24', '0', 0, '之前欠款:0') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log('欠款抵退货', that.yNum) |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 2) |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 60, '24', '0', 0, '本单实收:' + that.sales.alreadyEarn) |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '本单应收:' + that.sales.realAmount) |
|
|
|
} |
|
|
|
if (that.yNum + 60 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 60) >= 1990 ? 1990 : (this |
|
|
|
.printHeight - that.yNum + 60), 1, 0, 162); |
|
|
|
that.yNum = 0 |
|
|
|
pageNum++ |
|
|
|
if (that.sales.noEarn >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales |
|
|
|
.noEarn)) |
|
|
|
} |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (that.sales.noEarn >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单欠款:' + (that.sales.noEarn)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('0', that.yNum += 70, '24', '0', 0, '本单余额:' + Math.abs(that.sales |
|
|
|
.noEarn)) |
|
|
|
} |
|
|
|
if (that.dealingsRecord.balanceDue >= 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:' + that.dealingsRecord |
|
|
|
.balanceDue) |
|
|
|
} else if (that.dealingsRecord.balanceDue < 0) { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计余额:' + Math.abs(that |
|
|
|
.dealingsRecord.balanceDue)) |
|
|
|
} else { |
|
|
|
strCmd += blesdk.addCPCLText('610', that.yNum, '24', '0', 0, '累计欠款:0') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
strCmd += blesdk.addCPCLSETMAG(1, 1) |
|
|
|
@ -1453,7 +1575,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (that.yNum + 260 >= 1990) { |
|
|
|
if (that.yNum + 300 >= 1990) { |
|
|
|
strCmd += blesdk.addCPCLPrint(); |
|
|
|
that.bufferData.push(strCmd); |
|
|
|
|
|
|
|
|