From 8f7725c18e7129043bf5a7a7569fc821eee1f937 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Wed, 6 Nov 2024 08:41:26 +0800
Subject: [PATCH] 11
---
package1/AI/AIHangOrderList.vue | 2 +-
package1/AI/addAiList.vue | 143 ++++++++++++----
package1/AI/voiceInventory.vue | 11 +-
package1/index/orderDetail.vue | 284 +++++++++++++++++++-------------
package1/other/custom.vue | 71 +++++++-
package1/stock/addStockList.vue | 16 +-
package1/stock/stockDetail.vue | 27 ++-
7 files changed, 389 insertions(+), 165 deletions(-)
diff --git a/package1/AI/AIHangOrderList.vue b/package1/AI/AIHangOrderList.vue
index aeec06f..b263f54 100644
--- a/package1/AI/AIHangOrderList.vue
+++ b/package1/AI/AIHangOrderList.vue
@@ -513,7 +513,7 @@
that.hangId = item.id
if(res.scanType == "QR_CODE"){ //二维码
let shopId = base.decode(res.result.split(',')[1])
- if(shopId == uni.getStorageSync('shopId')){
+ if(shopId == uni.getStorageSync('shopId').substring('10','12')){
that.productId = base.decode(res.result.split(',')[0])
that.toggle('bottom', base.decode(res.result.split(',')[0]));
if (item.saleDetailDTOList) {
diff --git a/package1/AI/addAiList.vue b/package1/AI/addAiList.vue
index 4a1ac4c..752f269 100644
--- a/package1/AI/addAiList.vue
+++ b/package1/AI/addAiList.vue
@@ -1,24 +1,31 @@
-
+
新增
-
+
+
-
-
-
-
+
+
+
+
-
+
提交
+
@@ -27,26 +34,98 @@
data() {
return {
//旧的二维码路径
- QRList:[
+ QRList: [
'wxp://f2f0egWTC-6-dnZPjtxrXAnLQemXglhjQB92wtNu01tRoeE',
'https://u.wechat.com/MINRIYDQnbErEZEUAAhuOL0',
'https://u.wechat.com/ELXU0g00OAM8huehO8nDQMQ',
'https://qr.alipay.com/fkx11051559cgeldh61dyf6'
],
- QrUrl:'', //二维码临时存放
- newQRList:[], // 生成的二维码临时路径的数组
- QrList1:[] // 点击新增按钮,新增一条数据
+ QrUrl: 'https://qr.95516.com/01020001/wcqr?f=ICBCqr&X=1&T=3&P=13&I=e03d925776684b4d&N=b4cbb142eeafe2bddce7a7878c57f5ca&L=3f7aafc9dbc03de742513fbb73a3380023c77748dbca0813d7a49f63159d542ed2f1e45fac242c519fb6c9a3a51a8caaa3b79f53b538a276', //二维码临时存放
+ newQRList: [], // 生成的二维码临时路径的数组
+ QrList1: [], // 点击新增按钮,新增一条数据
+ aaa: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/67fd6f17a7634400afac9b6694ed9234.png'
}
},
onShow() {
-
+
},
onLoad(option) {
-
+ let that = this
+ let ctx = uni.createCanvasContext('aaaa', this)
+ uni.getImageInfo({
+ src: this.aaa,
+ success: (res) => {
+ // 绘制图片
+ ctx.drawImage(res.path, 0, 0, 200, 200);
+ ctx.draw(true);
+ },
+ fail: (err) => {
+ console.log(err)
+ }
+ });
+
+ setTimeout(res => {
+ // 返回canvas的位图数据
+ uni.canvasGetImageData({
+ canvasId: 'aaaa',
+ x: 0,
+ y: 0,
+ width: 100,
+ height: 100,
+ success(res) {
+ console.log('宽高:' + res.width + ' * ' + res.height) // 100
+ let data = {
+ width:res.width,
+ height:res.height,
+ imageData:res.data,
+ threshold:180
+ }
+ console.log(that.overwriteImageData(data))
+ }
+ })
+ }, 2000)
},
methods: {
- addList(){
- if(this.QrList1.length>=4){
+ grayPixle(pix) {
+ return pix[0] * 0.299 + pix[1] * 0.587 + pix[2] * 0.114;
+ },
+ overwriteImageData(data) {
+ let sendWidth = data.width,
+ sendHeight = data.height;
+ const threshold = data.threshold || 180;
+ let sendImageData = new ArrayBuffer((sendWidth * sendHeight) / 8);
+ sendImageData = new Uint8Array(sendImageData);
+ let pix = data.imageData;
+ const part = [];
+ let index = 0;
+ for (let i = 0; i < pix.length; i += 32) {
+ //横向每8个像素点组成一个字节(8位二进制数)。
+ for (let k = 0; k < 8; k++) {
+ const grayPixle1 = this.grayPixle(pix.slice(i + k * 4, i + k * 4 + (4 - 1)));
+ //阈值调整
+ if (grayPixle1 > threshold) {
+ //灰度值大于threshold位 白色 为第k位0不打印
+ part[k] = 0;
+ } else {
+ part[k] = 1;
+ }
+ }
+ let temp = 0;
+ for (let a = 0; a < part.length; a++) {
+ temp += part[a] * Math.pow(2, part.length - 1 - a);
+ }
+ sendImageData[index++] = temp;
+ }
+ return {
+ array: Array.from(sendImageData),
+ width: sendWidth / 8,
+ height: sendHeight,
+ };
+ console.log(sendImageData)
+
+ },
+ addList() {
+ if (this.QrList1.length >= 4) {
uni.showToast({
title: '最多只能添加4个二维码',
icon: 'none'
@@ -54,25 +133,25 @@
return
}
let data = {
- name:'',
- path:''
+ name: '',
+ path: ''
}
this.QrList1.push(data)
},
- getQRCode(){
- for(let i=0;i<=this.QRList.length;i++){
-
- setTimeout(res=>{
- this.QrUrl = this.QRList[i]
+ getQRCode() {
+ // for (let i = 0; i <= this.QRList.length; i++) {
+
+ // setTimeout(res => {
+ // this.QrUrl = this.QRList[i]
this.$refs.uqrcode.toTempFilePath({
- success: res => {
- this.newQRList.push(res.tempFilePath)
- }
+ success: res => {
+ this.newQRList.push(res.tempFilePath)
+ }
});
- },1000*(i+1))
- }
+ // }, 1000 * (i + 1))
+ // }
},
- addItemName(e,index){
+ addItemName(e, index) {
this.QrList1[index].name = e.detail.value
console.log(this.QrList1)
},
@@ -80,10 +159,10 @@
let that = this;
uni.scanCode({
success: (res) => {
- if(res.result != ''){
+ if (res.result != '') {
console.log(res.result)
this.QrList1[index].path = res.result
- }else{
+ } else {
uni.showToast({
title: '扫描失败',
icon: 'none'
@@ -98,7 +177,7 @@
}
})
},
- delItem(index){
+ delItem(index) {
let that = this;
uni.showModal({
title: "提示",
@@ -109,7 +188,7 @@
}
}
})
-
+
}
}
}
diff --git a/package1/AI/voiceInventory.vue b/package1/AI/voiceInventory.vue
index 71105ad..538068c 100644
--- a/package1/AI/voiceInventory.vue
+++ b/package1/AI/voiceInventory.vue
@@ -6145,7 +6145,7 @@
if (res.scanType == "QR_CODE") { //二维码
let shopId = base.decode(res.result.split(',')[1])
- if (shopId == uni.getStorageSync('shopId')) {
+ if (shopId == uni.getStorageSync('shopId').substring('10','12')) {
that.productId = base.decode(res.result.split(',')[0])
that.toggle('bottom', base.decode(res.result.split(',')[0]));
// if (item.saleDetailDTOList) {
@@ -6350,8 +6350,7 @@
await this.$nextTick(() => {
// if (that.discountType != 0) { //单品折扣
that.carList.get(index).price1 = Number(that.carList.get(index).productCount) * that
- .carList
- .get(index).purchasePrice
+ .carList.get(index).purchasePrice
// }
})
this.$forceUpdate()
@@ -8048,7 +8047,11 @@
let purchaseDetails = [];
await this.carList.forEach(function(value, key) {
value.customerCategoryRule = JSON.stringify(value.customerCategoryList)
- if (that.userType == 1) {
+ let shopId = uni.getStorageSync('shopId')
+ // 提钱和沐港,员工入库采购价为零
+ if (that.userType == 1 && (shopId == '1853332569559535619' || shopId == '1810179818189361152')) {
+ value.purchasePrice = 0
+ }else if(that.userType == 1){
value.purchasePrice = ''
}
if (value.productSn == '') {
diff --git a/package1/index/orderDetail.vue b/package1/index/orderDetail.vue
index 1570d65..e5d8ffc 100644
--- a/package1/index/orderDetail.vue
+++ b/package1/index/orderDetail.vue
@@ -17,7 +17,7 @@
style="font-size: 22rpx;position: absolute;top: 50rpx;right: 70rpx;background: blue;color: #fff;border-radius: 7px;">
分享
-
@@ -573,15 +573,10 @@
-
-
+
-
- {{qrArr[qrArr.length-1].name}}
-
-
-
+
{{qrArr[index].name}}
@@ -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
diff --git a/package1/other/custom.vue b/package1/other/custom.vue
index 14922c4..9480af8 100644
--- a/package1/other/custom.vue
+++ b/package1/other/custom.vue
@@ -11,7 +11,10 @@
-
+
+
+
-
@@ -27,12 +30,18 @@
{{ ' 欠款: ' }}
{{ item.noEarn== null ?'暂无': item.noEarn}}
+
+ 退货额:
+ {{item.returnSaleTotalAmount == null ?'暂无':item.returnSaleTotalAmount}}
+ {{' 退货数: '}}
+ {{item.returnSaleProductCount == null ?'暂无':item.returnSaleProductCount}}
+
订单状态:
{{item.status == '0' ?'待抢单' :item.status == '2' ?'作废' :item.status == '1' ?'待取货' :item.status == '3' ?'待送达' :item.status == '4' ?'已完成' :item.status == '5' ?'下游客户待退货' :item.status == '00' ?'退货待抢单' :item.status == '01' ?'退货待取货' :item.status == '03' ?'退货待送达' :item.status == '04' ?'待确认退货' :item.status == '6' ?'待配货':item.status == '8' ?'待物流上门':item.status == '9' ?'已完成' :'挂单'}}
- 查看详情
+ 查看详情
@@ -56,6 +65,7 @@
shopList: [],
list: ['采购单', '退货单'],
current: 0,
+ items: ['拿货记录','对账单'],
userId: '',
shopId: '',
bList: [],
@@ -89,7 +99,10 @@
this.getShopList()
this.getAllList()
},
- onLoad(option){
+ onLoad(option){
+ if(option.q){
+ uni.setStorageSync('codePage',true)
+ }
if(option.saleId !='' && option.userId == uni.getStorageSync('userId')){
this.kehuList(option.saleId)
}
@@ -115,6 +128,46 @@
}
})
})
+ },
+ onClickItem(e) {
+ if (this.current !== e.currentIndex) {
+ this.current = e.currentIndex
+ }
+ if (e.currentIndex == 0) {
+ this.bList = []
+ this.getAllList()
+ } else if (e.currentIndex == 1) {
+ this.duizhangList = []
+ this.bList = []
+ this.pageNum = 1
+ this.pages = 1
+ this.duizhangdan()
+ }
+ },
+ duizhangdan() {
+ this.tui.request("/app/bill/getCustomerBill", "post", {
+ customerId: uni.getStorageSync('id'),
+ pageNum: this.pageNum,
+ pageSize: '10',
+ startDate: this.range[0],
+ endDate: this.range[1],
+ shopId: this.shopId
+ }, false, false).then((res) => {
+ if (res.code == 200) {
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.duizhangList = res.result
+ this.duizhangRecords = res.result.customerBillSaleVos.records
+ } else {
+ for (let i = 0; i < res.result.customerBillSaleVos.records.length; i++) {
+ this.duizhangRecords.push(res.result.customerBillSaleVos.records[i])
+ }
+ }
+ this.pages = res.result.customerBillSaleVos.pages
+ } else {
+ this.tui.toast(res.message)
+ }
+ }).catch((res) => {})
},
trigger(e) {
let that = this;
@@ -177,14 +230,18 @@
this.sectionChange(this.current)
},
- kehuList(id){
+ kehuList(id,shopId){
uni.navigateTo({
- url: '/package1/other/customDetail?id='+id
+ url: '/package1/index/orderDetail?id='+id + '&shopId='+shopId
})
},
//门店下拉选择
- change(e){
- this.getAllList()
+ change(e){
+ if(this.current == 0){
+ this.getAllList()
+ }else{
+ this.duizhangdan()
+ }
},
formatDate(date, fmt) {
var o = {
diff --git a/package1/stock/addStockList.vue b/package1/stock/addStockList.vue
index 665b6b9..8cc07fb 100644
--- a/package1/stock/addStockList.vue
+++ b/package1/stock/addStockList.vue
@@ -41,7 +41,7 @@
盘点数
-
+
{{item1.attributeList | sliceMsg}}
@@ -142,13 +142,23 @@
}, false, false).then((res) => {
if (res.code == 200) {
this.stock = res.result
- this.znum=res.result.checkStockDetailVoList.total
+ this.znum = res.result.checkStockDetailVoList.total
this.status = 'nomore';
if (this.pages == 1) {
this.stockList = res.result.checkStockDetailVoList.records
} else {
this.stockList = [...this.stockList, ...res.result.checkStockDetailVoList.records]
}
+ for(let i=0;i 0){
+ res.result.checkStockDetailVoList.records[i].checkStockAttributeVos[m].color = 'red'
+ }else if(res.result.checkStockDetailVoList.records[i].checkStockAttributeVos[m].pdNum - res.result.checkStockDetailVoList.records[i].checkStockAttributeVos[m].stockCount < 0){
+ res.result.checkStockDetailVoList.records[i].checkStockAttributeVos[m].color = 'blue'
+ }
+ }
+ }
this.totalPages = res.result.checkStockDetailVoList.pages
this.carType = this.stockList.length
} else {
@@ -183,7 +193,7 @@
if (res.scanType == "QR_CODE") { //二维码
let shopId = base.decode(res.result.split(',')[1])
- if (shopId == uni.getStorageSync('shopId')) {
+ if (shopId == uni.getStorageSync('shopId').substring('10','12')) {
that.productId = base.decode(res.result.split(',')[0])
that.getById(base.decode(res.result.split(',')[0]));
if (item.saleDetailDTOList) {
diff --git a/package1/stock/stockDetail.vue b/package1/stock/stockDetail.vue
index e48513c..d046220 100644
--- a/package1/stock/stockDetail.vue
+++ b/package1/stock/stockDetail.vue
@@ -95,15 +95,26 @@
//点击选择列表,带参数 返回上一页
clickList() {
var data = []
- for(let i=0;i