浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
51b571ad4a

+ 9 - 0
pages/common/printTag/printTag.vue

@@ -162,6 +162,15 @@
 				this.$refs.kkprinter.onPrintSuccess()
 				this.isParinting = false
 				this.show = false
+				clzConfirm({
+				  title: '提示',
+				  content: '打印已经结束,是否返回上页!',
+				  success (ret) {
+					if (ret.confirm || ret.index == 0) {
+						uni.navigateBack()
+					} 
+				  }
+				})
 			}
 		}
 	}

+ 1 - 1
pages/latePlay/chooseProduct.vue

@@ -315,7 +315,7 @@
 				.shelfName{
 					flex-grow: 1;
 					font-weight: bold;
-					width: 80%;
+					width: 60%;
 					> view{
 						overflow: hidden;
 						white-space: nowrap;

+ 9 - 0
pages/shelfSetting/batchPrint.vue

@@ -119,6 +119,15 @@
 						_this.$refs.kkprinter.onPrintSuccess()
 						_this.isParinting = false
 						_this.show = false
+						clzConfirm({
+						  title: '提示',
+						  content: '打印已经结束,是否返回上页!',
+						  success (ret) {
+							if (ret.confirm || ret.index == 0) {
+								uni.navigateBack()
+							} 
+						  }
+						})
 					}
 				});
 			},

+ 11 - 3
pages/shelfSetting/editShelfHw.vue

@@ -5,19 +5,19 @@
 				<u-form-item label="货位号">
 					<view class="flex align_center flex_1 justify_between">
 						<view style="width: 80%;">{{shelfPlaceCode}}</view>
-						<view style="width: 20%;text-align: center;" @click="editShelf"><u-icon name='edit-pen'></u-icon>修改</view>
+						<view v-if="!productEntity" style="width: 20%;text-align: center;" @click="editShelf"><u-icon name='edit-pen'></u-icon>修改</view>
 					</view>
 				</u-form-item>
 				<view v-if="productEntity">
 					<u-form-item label="" prop="productSn">
-						<view class="flex flex_1">
+						<view class="flex flex_1 align_center">
 							<view class="pimgs">
 								<u-image :src="productEntity.productMsg?productEntity.productMsg:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
 							</view>
 							<view class="pinfo flex_1">
 								<view class="ptxt flex align_center justify_between">
 									<text>{{productEntity.code}}</text>
-									<text class="pcode" v-if="!productEntity.currQty" @click="toBindProduct">
+									<text class="pcode" @click="toBindProduct">
 										<u-icon name='reload'></u-icon>
 										更换产品
 									</text>
@@ -138,6 +138,14 @@
 			},
 			// 更换产品
 			toBindProduct(){
+				if(this.productEntity && this.productEntity.currQty){
+					uni.showToast({
+						icon:'none',
+						title: '库存为0时才可更换产品',
+						duration: 4000
+					})
+					return
+				} 
 				uni.navigateTo({
 					url: "/pages/shelfSetting/bindProduct?customerSn="+this.customerSn+"&shelfSn="+this.shelfSn
 				})

+ 4 - 2
pages/shelfSetting/productList.vue

@@ -92,8 +92,10 @@
 				this.partList = JSON.parse(JSON.stringify(list))
 			},
 			qtyChange(v){
-				 this.partList = []
-				 this.setData(this.list)
+				 this.partList.map(item => {
+				 	item.printQty = this.printNum == 2 ? item.maxQty : item.qty
+				 })
+				 this.partList.splice()
 			},
 			// 全选
 			allSelect(val){

+ 16 - 2
pages/shelfSetting/quickReplenish.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="content flex flex_column">
+		<u-alert-tips :show="isParinting" @close="isParinting = false" type="warning" description="正在打印中,请勿息屏或退出应用!"></u-alert-tips>
 		<view class="head-info">
 			<view class="p-title flex align_center">
 				<text></text>
@@ -20,7 +21,7 @@
 			</view>
 			<view class="btns flex align_item justify_end">
 				<view>
-					<kk-printer ref="kkprinter" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
+					<kk-printer ref="kkprinter" :isPrinting="isParinting" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
 				</view>
 				<view style="padding: 0 10rpx;"></view>
 				<view>
@@ -195,9 +196,19 @@
 					if(_this.printIndex < result.length){
 						_this.printOnce(opt,tsc,blesdk,result[_this.printIndex])
 					}else{
+						// 打印结束
 						_this.printIndex = 0
 						_this.$refs.kkprinter.onPrintSuccess()
 						_this.isParinting = false
+						clzConfirm({
+						  title: '提示',
+						  content: '打印已经结束,是否返回上页!',
+						  success (ret) {
+							if (ret.confirm || ret.index == 0) {
+								uni.navigateBack()
+							} 
+						  }
+						})
 					}
 				});
 			},
@@ -217,7 +228,10 @@
 					 	if (ret.confirm || ret.index == 0) {
 					 		_this.isParinting = true
 					 		_this.printOnce(opt,tsc,blesdk,result[_this.printIndex])
-					 	}
+					 	}else{
+							_this.$refs.kkprinter.onPrintFail()
+							_this.isParinting = false
+						}
 					   }
 					 })
 				}else{