Browse Source

bug 修复

lilei 2 năm trước cách đây
mục cha
commit
b152a67f81

+ 8 - 3
components/kk-printer/index.vue

@@ -19,6 +19,7 @@
 						<view>注意事项:</view>
 						<view>1、连接打印机之前,先打开手机蓝牙开关</view>
 						<view>2、请检查打印机是否已被其它手机连接,如果是请关闭其它手机蓝牙,然后再用您的手机连接</view>
+						<view>3、如果一直处于打印中状态,但打印机没有任何反应,请关闭app应用重新打开再试试</view>
 					</view>
 					<view class="kk-btn-wrap">
 						<view class="kk-btn-item confirm-btn" @tap="searchBtnTap" v-if="!isSearching">
@@ -265,9 +266,9 @@
 						plus.nativeUI.toast('设备'+ res.deviceId + '已断开连接',{
 							verticalAlign:'center'
 						})
-						this.isShowSearch = true
-						this.devicesList = []
-						this.searchBtnTap()
+						_this.isShowSearch = true
+						_this.devicesList = []
+						_this.searchBtnTap()
 					}
 					_this.isConnecting = false
 			    })
@@ -311,6 +312,7 @@
 			},
 			onGetCharacterFail(err){
 				console.log('特征值获取失败')
+				this.isPrinting = false;
 			},
 			onPrintSuccess(){
 				this.isPrinting = false;
@@ -323,6 +325,9 @@
 			},
 			closeConnect(){
 				blesdk.closeBLEConnection(this.deviceId)
+				this.isPrinting = false;
+				uni.hideLoading();
+				this.$emit('closeConnect')
 			},
 		}
 	}

+ 14 - 13
pages.json

@@ -60,12 +60,13 @@
             		"titleNView": {
             			"titleAlign": "left",
             			"buttons": [ //原生标题栏按钮配置,
-            				{
-            					"text": "批量打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
-            					"fontSize": "14",
-								"color":"#00aaff",
-            					"width":"100px"
-            				}
+							{
+								"text": "\ue65a 批量打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#00aaff",
+								"width":"110px"
+							}
             			]
             		}
             	}
@@ -518,11 +519,11 @@
 						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
-								"text": "\ue694" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue694 搜索" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "16",
 								"color": "#00aaff",
-								"width":"50px"
+								"width":"80px"
 							}
 						]
 					}
@@ -534,18 +535,18 @@
             "path" : "pages/batchShelves/searchProduct",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "产品编码搜索",
+                "navigationBarTitleText": "产品编码搜索",
                 "enablePullDownRefresh": false,
 				"app-plus":{
 					"titleNView": {
 						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
-								"text": "\ue694" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue617 扫码" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "16",
 								"color": "#00aaff",
-								"width":"50px"
+								"width":"80px"
 							}
 						]
 					}
@@ -564,14 +565,14 @@
 						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
-								"text": "\ue6ee 上架" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue67a 上架" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "14",
 								"color": "#00aaff",
 								"width":"80px"
 							},
 							{
-								"text": "\ue6f5 打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue65a 打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "14",
 								"color": "#00aaff",

+ 5 - 1
pages/batchShelves/batchPrint/batchPrint.vue

@@ -28,7 +28,7 @@
 			<view>
 			</view>
 			<view>
-				<kk-printer ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
+				<kk-printer ref="kkprinter" defaultText="开始打印" @closeConnect="closeConnect" @startPrint="startPrint"></kk-printer>
 			</view>
 		</view>
 	</view>
@@ -187,6 +187,10 @@
 					}
 				});
 			},
+			closeConnect(){
+				this.isParinting = false
+				uni.hideLoading()
+			},
 			// 批量打印 
 			startPrint(opt,tsc,blesdk){
 				const result =this.$refs.productList.getAllChecked()

+ 3 - 2
pages/batchShelves/editShelfHw.vue

@@ -217,7 +217,6 @@
 		margin-bottom: 15upx;
 	}
 	.form-body{
-		flex-grow: 1;
 		> view{
 			background-color: #fff;
 			padding: 0 1.5rem;
@@ -231,6 +230,7 @@
 		.pinfo{
 			line-height:normal;
 			color: #666;
+			padding-left: 15rpx;
 			.pcode{
 				color:rgb(0, 170, 255);
 			}
@@ -238,6 +238,7 @@
 				font-weight: bold;
 			}
 			.pkuc{
+				width: 200rpx;
 				color: #999;
 				text{
 					color: #333;
@@ -276,7 +277,7 @@
 		}
 	}
 	.footer-btn{
-		padding: 0.5rem 1rem;
+		padding: 2.5rem 1rem 0.5rem;
 		justify-content: space-between;
 		button{
 			min-width: 45%;

+ 6 - 4
pages/batchShelves/searchProduct.vue

@@ -13,12 +13,12 @@
 					:show-action="false"
 					placeholder="请输入产品编码查询"></u-search>
 				</view>
-				<!-- <view class="icon" @click="toScan">
-					<u-icon name="scan"></u-icon>
+				<!-- <view class="icon">
 				</view> -->
 			</view>
 		</view>
 		<view class="productList-body">
+			<view v-if="status == 'loading'"><u-loadmore :status="status" :load-text="loadText" /></view>
 			<view class="partList-list-box" v-for="item in productList" :key="item.shelfCartSn">
 				<view class="flex align_center flex_1">
 					<view class="pimgs">
@@ -55,7 +55,7 @@
 			<view v-if="productList && productList.length == 0 && status == 'nomore'">
 				<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="60"></u-empty>
 			</view>
-			<view style="padding: 20upx;" v-if="status != 'nomore'">
+			<view style="padding: 20upx;" v-if="productList.length && status != 'nomore'">
 				<u-loadmore :status="status" :load-text="loadText" />
 			</view>
 		</view>
@@ -134,7 +134,6 @@
 					shelfSn: this.shelfSn,
 					shelfTierCode: this.layer
 				}
-				this.productList = []
 				console.log(params)
 				this.status = 'loading'
 				queryProductPage(params).then(res => {
@@ -145,6 +144,9 @@
 						this.total = res.data.page.count
 						this.status = 'loadmore'
 					}else{
+						this.productList = []
+						this.shelfPlaceCode = ''
+						this.total = 0
 						this.noDataText = '没有搜索到相关产品'
 						this.status = 'nomore'
 					}

+ 4 - 4
pages/batchShelves/setProductCost.vue

@@ -19,12 +19,11 @@
 						</view>
 					</view>
 				</view>
-				<view class="ptools flex align_center justify_between">
-					<view></view>
-					<view class="pcurnums flex align_center">
+				<view class="ptools flex align_center justify_end">
+					<view class="pcurnums flex align_center justify_end">
 						<text>结算价</text>
 						<view class="u-ninput">
-							<u-input trim border type="digit" clearable @blur="numberToFixed(item,2,999999)" v-model="item.cost" placeholder="请输入价格,最多两位小数"/>
+							<u-input style="width: 400rpx;" trim border type="digit" clearable @blur="numberToFixed(item,2,999999)" v-model="item.cost" placeholder="请输入价格,最多两位小数"/>
 						</view>
 					</view>
 				</view>
@@ -133,6 +132,7 @@
 		}
 		.ptools{
 			.pcurnums{
+				width: 80%;
 				color: #999;
 				> text{
 					margin-right: 20rpx;

+ 5 - 1
pages/common/printTag/printTag.vue

@@ -29,7 +29,7 @@
 			<view v-if="fromPage == 'bdtq'"><u-button @click="cancel" shape="circle" plain>返回列表</u-button></view>
 			<view v-if="fromPage == 'smdy'"><u-button @click="cancel" shape="circle" plain>重新扫描</u-button></view>
 			<view>
-				<kk-printer ref="kkprinter" @startPrint="startPrint"></kk-printer>
+				<kk-printer @closeConnect="closeConnect" ref="kkprinter" @startPrint="startPrint"></kk-printer>
 			</view>
 		</view>
 	</view>
@@ -138,6 +138,10 @@
 				}
 				console.log('printInfo-----------',_this.printInfo)
 			},
+			closeConnect(){
+				this.isParinting = false
+				uni.hideLoading()
+			},
 			// 打印
 			startPrint(opt,tsc,blesdk){
 				console.log(opt,'opt')

+ 1 - 1
pages/index/printAbc.vue

@@ -2,7 +2,7 @@
 	<view class="replenishment-manualPrint-wrap">
 		<view class="replenishment-manualPrint-footer">
 			<view>
-				<kk-printer ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
+				<kk-printer @closeConnect="closeConnect" ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
 			</view>
 		</view>
 	</view>

+ 5 - 1
pages/replenishmentManage/manualPrint.vue

@@ -11,7 +11,7 @@
 				<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
 			</view>
 			<view>
-				<kk-printer ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
+				<kk-printer @closeConnect="closeConnect" ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
 			</view>
 		</view>
 	</view>
@@ -152,6 +152,10 @@
 					}
 				});
 			},
+			closeConnect(){
+				this.isParinting = false
+				uni.hideLoading()
+			},
 			// 批量打印 
 			startPrint(opt,tsc,blesdk){
 				const result =this.$refs.partList.getAllChecked()

+ 5 - 1
pages/shelfSetting/batchPrint.vue

@@ -14,7 +14,7 @@
 				共 {{partList.length}}产品
 			</view>
 			<view>
-				<kk-printer ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
+				<kk-printer ref="kkprinter" defaultText="开始打印" @closeConnect="closeConnect" @startPrint="startPrint"></kk-printer>
 			</view>
 		</view>
 	</view>
@@ -135,6 +135,10 @@
 					}
 				});
 			},
+			closeConnect(){
+				this.isParinting = false
+				uni.hideLoading()
+			},
 			// 批量打印 
 			startPrint(opt,tsc,blesdk){
 				const result =this.$refs.productList.getAllChecked()

+ 5 - 1
pages/shelfSetting/quickReplenish.vue

@@ -21,7 +21,7 @@
 			</view>
 			<view class="btns flex align_item justify_end">
 				<view>
-					<kk-printer ref="kkprinter" :isPrinting="isParinting" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @startPrint="startPrint"></kk-printer>
+					<kk-printer ref="kkprinter" :isPrinting="isParinting" :autoConnect="false" printBtnStyle="default-mid" defaultText="打印贴签" @closeConnect="closeConnect"  @startPrint="startPrint"></kk-printer>
 				</view>
 				<view style="padding: 0 10rpx;"></view>
 				<view>
@@ -169,6 +169,10 @@
 				this.modalChooseType(params,1)
 				this.stockModal = false
 			},
+			closeConnect(){
+				this.isParinting = false
+				uni.hideLoading()
+			},
 			printOnce(opt,tsc,blesdk,data){
 				const _this = this
 				const dealer = this.$store.state.vuex_userData

+ 6 - 1
pages/shelfSetting/shelfSet.vue

@@ -285,7 +285,12 @@
 				})
 			},
 			getShelfPlace(flag){
+				uni.showLoading({
+					mask: true,
+					title: '正在查询...'
+				})
 				getProductPlace({ shelfSn: this.shelfSn }).then(res => {
+				  uni.hideLoading()
 				  console.log(res.data)
 				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = res.data
@@ -314,7 +319,7 @@
 				var webView = this.$mp.page.$getAppWebview(); 
 				console.log(this.placeTab.length)
 				webView.setTitleNViewButtonStyle(0, {
-					"text":this.placeTab.length?"\ue6ee 批量上架 ":'',
+					"text":this.placeTab.length?"\ue67a 批量上架 ":'',
 					"color": "#00aaff"
 				});
 				shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác