diff --git a/components/print/index.js b/components/print/index.js index f6606d0..d58112e 100644 --- a/components/print/index.js +++ b/components/print/index.js @@ -84,6 +84,9 @@ export default { }, //写入控制命令 async writeBLECharacteristicValue(onDone) { + const printTask = (getApp().globalData.printData && getApp().globalData.printData[0]) || {}; + const printReason = String(printTask.printReason || ''); + const scanVerifyPrint = printTask.scanVerify == 1 || printTask.scanVerify === true || printTask.scanVerify == 'true' || printReason.indexOf('SCAN_VERIFY') != -1; let printerJobs = new PrinterJobs(); printerJobs.setAlign('ct').setSize(2, 2).setLineSpacing(60).print( data1.deliveryType == 1 && data1.orderType == 3 ? data1.deliveryInfo.numberCode : data1.numberCode @@ -94,6 +97,7 @@ export default { (data1.status == 7 || data1.status == 11) ? '申请退款' : (data1.deliveryType == 1 && data1.orderType == 3) ? '面对面配送' : (data1.status == 3 && data1.deliveryType == 2 && data1.userRequireMake != 1) ? '待消费' : + scanVerifyPrint ? '到店核销' : data1.status == 5 ? '已完成' : data1.status == 6 ? '已取消' : data1.status == 8 ? '已退款' : diff --git a/pages/index/index.vue b/pages/index/index.vue index a04d41d..3579931 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -548,7 +548,7 @@ title: '核销成功', icon: 'none' }) - that.printAfterComplete(productId) + that.printAfterComplete(productId, true) } else { uni.showModal({ title: '提示', @@ -579,10 +579,11 @@ } }) }, - printAfterComplete(orderId) { + printAfterComplete(orderId, scanVerify) { if (!orderId) return; if (uni.getStorageSync('printingMethod') == 'cloud') { - this.NB.sendRequest("/mall/order/cloudPrint/" + orderId, {}, false, 'post', + const url = "/mall/order/cloudPrint/" + orderId + (scanVerify ? '?scanVerify=true' : ''); + this.NB.sendRequest(url, {}, false, 'post', 'application/x-www-form-urlencoded').then((res) => { if (res.code != 200) { uni.showToast({ @@ -594,7 +595,8 @@ return; } getApp().globalData.printData.push({ - order_id: orderId + order_id: orderId, + scanVerify: scanVerify ? 1 : 0 }); if (!getApp().globalData.isPrinting) { this.processPrintQueue(); diff --git a/pages/worker/index.vue b/pages/worker/index.vue index 7e055fb..c4668da 100644 --- a/pages/worker/index.vue +++ b/pages/worker/index.vue @@ -139,13 +139,11 @@ ¥{{(item.deliveryFee + item.deliveryFeeMarketplace).toFixed(2)}} - {{item.shopName != null ? item.shopName : ''}} - + {{item.shopName != null ? item.shopName : ''}} + - + 共{{item.allCount ? item.allCount : 0}}件 @@ -1472,11 +1470,46 @@ .shangjia { width: 100%; - height: 70rpx; margin: 0 auto; - line-height: 70rpx; - padding-left: 28rpx; + min-height: 70rpx; + padding: 12rpx 118rpx 8rpx 28rpx; + box-sizing: border-box; display: flex; + align-items: flex-start; + } + + .shop-name { + flex: 1; + min-width: 0; + font-weight: 700; + line-height: 38rpx; + word-break: break-all; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + .shop-detail-tag { + flex-shrink: 0; + width: 32rpx; + height: 30rpx; + margin: 4rpx 0 0 10rpx; + border-radius: 10rpx; + background: #00BFFF; + color: #fff; + font-size: 20rpx; + font-weight: 700; + line-height: 30rpx; + text-align: center; + } + + .shop-count { + flex-shrink: 0; + padding-left: 30rpx; + font-weight: 700; + line-height: 38rpx; } .maotou {