wangfukang 2 years ago
parent
commit
e6ae5800ad
  1. 2
      package1/AI/AIInventoryList.vue
  2. 606
      package1/AI/voiceInventory.vue
  3. 488
      package1/index/orderDetail.vue
  4. 28
      package1/inventory/inventoryConfirm.vue
  5. 23
      package1/stock/addStock.vue

2
package1/AI/AIInventoryList.vue

@ -207,7 +207,7 @@
return str
},
goInventory(){
uni.setStorageSync('carList1', this.carList1)
uni.setStorageSync('carList1', JSON.stringify(this.carList1))
uni.navigateTo({
url: '/package1/AI/voiceInventory'
})

606
package1/AI/voiceInventory.vue

File diff suppressed because it is too large

488
package1/index/orderDetail.vue

@ -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);

28
package1/inventory/inventoryConfirm.vue

@ -117,7 +117,7 @@
return {
purchase:'',
purchaseDetails:'',
aiinventory:0, //1是AI入库 0是普通入库
aiinventory:0, //1是AI入库 0是普通入库 2采购退货
userType:1,
leijiqiankuan:0,
zhiqianqiankuan:0,
@ -137,7 +137,23 @@
}
},
onLoad(option) {
this.purchaseDetails = JSON.parse(option.purchaseDetails)
this.purchaseDetails = JSON.parse(option.purchaseDetails)
console.log('purchaseDetails',this.purchaseDetails)
if(this.purchaseDetails != '' && uni.getStorageSync('type') == 0){
for(let i=0;i<this.purchaseDetails.length;i++){
if(this.purchaseDetails[i].purchasePrice == '' || this.purchaseDetails[i].purchasePrice == null){
this.purchaseDetails[i].purchasePrice = 0
}
if(this.purchaseDetails[i].wholesalePrice == '' || this.purchaseDetails[i].wholesalePrice == null){
this.purchaseDetails[i].wholesalePrice = 0
}
for(let m=0;m<this.purchaseDetails[i].stockLogList1.length;m++){
if(this.purchaseDetails[i].stockLogList1[m].productCount == '' || this.purchaseDetails[i].stockLogList1[m].productCount == null){
this.purchaseDetails[i].stockLogList1[m].productCount = 0
}
}
}
}
this.purchase = JSON.parse(option.purchase)
this.aiinventory = option.aiinventory
this.userType = uni.getStorageSync('type')
@ -157,8 +173,10 @@
for(let i=0;i<this.purchaseDetails.length;i++){
delete this.purchaseDetails[i].id;
}
}else{
}else if(this.aiinventory == 0){
url = '/app/stock/putInOfProduct'
}else{
url = '/app/stock/putOutPrice'
}
this.$nextTick(()=>{
@ -169,7 +187,7 @@
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "入库成功",
title: "退货成功",
icon: 'none'
})
setTimeout(res => {
@ -179,7 +197,7 @@
}, 1000)
} else {
uni.showToast({
title: "入库失败",
title: "退货失败",
icon: 'none'
})
}

23
package1/stock/addStock.vue

@ -15,15 +15,16 @@
<view class="content-right">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view>
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask(item)"></view>
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productSn}}
{{item.productSn==null?'':item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
@ -48,7 +49,7 @@
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view>
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask(item)"></view>
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
@ -57,8 +58,9 @@
<view class="box-right-name">
{{item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.supplierName}}</view>
<view class="box-right-num">{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
@ -329,6 +331,19 @@
})
}
},
//未入库遮罩
clickMask(item) {
let title = ''
if (item.delFlag == 0) {
title = '请将商品上架后再操作!'
} else {
title = '请将上次入库的采购价维护后再进行操作!'
}
uni.showToast({
title: title,
icon: 'none'
})
},
stockSelect(){
this.stockList = []

Loading…
Cancel
Save