lilei 3 anni fa
parent
commit
fcbee51a81

+ 2 - 0
pages/common/partList.vue

@@ -131,8 +131,10 @@
 						this.totalNums = this.totalNums + item.confirmQty
 					}else if(_this.pageType=='manualPrint'){  // 补货-手动打印
 						this.totalNums = this.totalNums + item.confirmQty
+						item.printQty = item.printQty ? item.printQty : 1
 					}else if(_this.pageType=='scanCodePrint'){  // 补货-扫码打印
 						this.totalNums = this.totalNums + item.confirmQty
+						item.printQty = item.printQty ? item.printQty : 1
 					}else if(_this.pageType=='replenishmentDetail'){  // 补货详情-已完成
 						this.totalNums = this.totalNums + item.putQty
 					}else if(_this.pageType=='replenishmentDetailc'){  // 补货详情-已取消

+ 2 - 2
pages/common/printTag/printTag.vue

@@ -76,7 +76,7 @@
 						shelfPlaceCode: _this.infoData.shelfPlaceCode || '',
 						currentInven: _this.printNum,
 						printDate: nowDate,
-						printUser: _this.$store.state.vuex_userData.username,
+						printUser: _this.$store.state.vuex_userData.userNameCN,
 						barCode: `dealerSn=${_this.$store.state.vuex_userData.orgSn}&shelfSn=${_this.infoData.shelfSn}&productSn=${_this.infoData.productEntity&&_this.infoData.productEntity.productSn}&productCode=${_this.infoData.productEntity&&_this.infoData.productEntity.code}&shelfPlaceCode=${_this.infoData.shelfPlaceCode}&shelfPlaceSn=${_this.infoData.shelfPlaceSn}`
 					}
 				}else if(_this.fromPage == 'smdy'){
@@ -88,7 +88,7 @@
 						shelfPlaceCode: _this.infoData.shelfPlaceCode || '',
 						currentInven: _this.printNum,
 						printDate: nowDate,
-						printUser: _this.$store.state.vuex_userData.username,
+						printUser: _this.$store.state.vuex_userData.userNameCN,
 						barCode: `dealerSn=${_this.$store.state.vuex_userData.orgSn}&shelfSn=${_this.infoData.shelfSn}&productSn=${_this.infoData.productSn}&productCode=${_this.infoData.productCode}&shelfPlaceCode=${_this.infoData.shelfPlaceCode}&shelfPlaceSn=${_this.infoData.shelfPlaceSn}`
 					}
 				}

+ 1 - 0
pages/login/login.vue

@@ -139,6 +139,7 @@ export default {
 			login(_this.form).then(res => {
 				uni.hideLoading();
 				if (res.status == 200) {
+					console.log(_this.fiterAuthCode(res.data.auth_user))
 					_this.$u.vuex('vuex_userData', _this.fiterAuthCode(res.data.auth_user));
 					_this.$u.vuex('vuex_token', res.data.access_token);
 					getApp().globalData.token = res.data.access_token;

+ 10 - 6
pages/replenishmentManage/manualPrint.vue

@@ -45,7 +45,7 @@
 			this.getPartList()
 		},
 		onUnload() {
-			this.$refs.kkprinter.closeConnect()
+			// this.$refs.kkprinter.closeConnect()
 		},
 		methods: {
 			// 查询详情
@@ -81,9 +81,12 @@
 				this.allChecked = val
 			},
 			printOnce(opt,tsc,blesdk,data){
+				if(this.isParinting){
+					return
+				}
+				this.isParinting = true
 				const _this = this
 				const dealer = this.$store.state.vuex_userData
-				console.log(opt,data,'opt')
 				let top = 10 // 距离顶部10点像素
 				const left = 8 // 距离左边
 				const lightHeight = 24 // 行高3mm,1mm = 8点
@@ -91,7 +94,7 @@
 				const pageH = 30 // 页签高度mm
 				const maxFontNums = Math.floor((pageW*8-left*2)/lightHeight) // 每行最多字体数
 				let rightTop = 0
-				let rightLeft = Math.floor(maxFontNums*0.6)*lightHeight
+				let rightLeft = (Math.floor(maxFontNums*0.6)+1)*lightHeight
 				// 初始化打印机
 				const command = tsc.jpPrinter.createNew()
 				command.init()
@@ -109,11 +112,11 @@
 				top = top+10
 				top = textFormat(command,data.productCode,lwidth,left,top,lightHeight,"left",1)
 				// 产品名称
-				top = top+5
+				top = top+10
 				top = textFormat(command,data.product.name,lwidth,left,top,lightHeight,"left",1)
-				// 时间
+				// 时间,打印人
 				top = top+10
-				top = textFormat(command,this.$u.timeFormat(this.timestamp, 'yyyy-mm-dd hh:MM'),lwidth,left,top,lightHeight,"left",1)
+				top = textFormat(command,this.$u.timeFormat(this.timestamp, 'yyyy-mm-dd hh:MM')+" "+this.$store.state.vuex_userData.userNameCN,lwidth,left,top,lightHeight,"left",1)
 				// 货位号
 				textFormat(command,data.shelfPlaceCode,maxFontNums-lwidth,rightLeft,rightTop,lightHeight,"center",1)
 				// 二维码
@@ -136,6 +139,7 @@
 					}else{
 						_this.printIndex = 0
 						_this.$refs.kkprinter.onPrintSuccess()
+						_this.isParinting = false
 					}
 				});
 			},