lilei 2 år sedan
förälder
incheckning
350197e9ae

+ 8 - 8
pages.json

@@ -62,7 +62,7 @@
             			"buttons": [ //原生标题栏按钮配置,
             				{
             					"text": "批量打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
-            					"fontSize": "16",
+            					"fontSize": "14",
 								"color":"#00aaff",
             					"width":"100px"
             				}
@@ -232,7 +232,7 @@
 							{
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "16",
+								"fontSize": "14",
 								"width":"90px"
 							}
 						]
@@ -266,7 +266,7 @@
 							{
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "16",
+								"fontSize": "14",
 								"width":"90px"
 							}
 						]
@@ -300,7 +300,7 @@
 							{
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "16",
+								"fontSize": "14",
 								"width":"90px"
 							}
 						]
@@ -373,7 +373,7 @@
             				{
             					"text": "" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
             					"fontSrc": "/static/iconfont/iconfont.ttf",
-            					"fontSize": "16",
+            					"fontSize": "14",
 								"color": "#ffffff",
             					"width":"auto"
             				},
@@ -471,7 +471,7 @@
             				{
             					"text": "\ue694 盘点历史" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
             					"fontSrc": "/static/iconfont/iconfont.ttf",
-            					"fontSize": "16",
+            					"fontSize": "14",
 								"color": "#00aaff",
             					"width":"120px"
             				}
@@ -566,14 +566,14 @@
 							{
 								"text": "\ue6ee 上架入库" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "16",
+								"fontSize": "14",
 								"color": "#00aaff",
 								"width":"110px"
 							},
 							{
 								"text": "\ue6f5 打印贴签" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "16",
+								"fontSize": "14",
 								"color": "#00aaff",
 								"width":"auto"
 							}

+ 20 - 10
pages/batchShelves/cartList.vue

@@ -55,7 +55,7 @@
 		</view>
 		
 		<!-- 合计弹框 -->
-		<u-popup mode="bottom" :mask="false" closeable v-model="showPop" :z-index="100">
+		<u-popup mode="bottom" closeable v-model="showPop" :z-index="100">
 			<view class="heji-content">
 				<scroll-view scroll-y="true" style="height: 400rpx;">
 					<view class="heji-con-list">
@@ -146,13 +146,21 @@
 		},
 		onNavigationBarButtonTap(e) {
 			console.log(e)
-			// 上架入库
-			if(e.index == 0){
-				this.toPutaway()
-			}
-			// 打印贴签
-			if(e.index == 1){
-				this.showPrintModal = true
+			if(this.placeTab.length){
+				// 上架入库
+				if(e.index == 0){
+					this.toPutaway()
+				}
+				// 打印贴签
+				if(e.index == 1){
+					this.showPrintModal = true
+				}
+			}else{
+				uni.showToast({
+					icon: 'none',
+					title: '还未录入产品,不能操作',
+					duration: 4000
+				})
 			}
 		},
 		methods: {
@@ -258,6 +266,7 @@
 				this.loading = true
 				queryMapList({ shelfSn: this.shelfSn }).then(res => {
 				  console.log(res.data)
+				  this.loading = false
 				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = JSON.stringify(res.data) == '{}' ? null : res.data
 					for(let a in res.data){
@@ -272,13 +281,14 @@
 					}
 					if(this.placeTab.length == 0){
 						this.shelfPlaceList = null
+						this.curTab = ''
 					}
 				  } else {
 				    this.shelfPlaceList = null
 					this.placeTab = []
+					this.curTab = ''
 				  }
 				  uni.hideLoading()
-				  this.loading = false
 				})
 			},
 			// 获取统计数据
@@ -462,7 +472,7 @@
 			}
 		}
 		.heji-content{
-			padding: 60upx 30upx 30upx;
+			padding: 60upx 30upx 100upx;
 		}
 		.heji-con-list{
 			> view{

+ 1 - 1
pages/batchShelves/editShelfHw.vue

@@ -85,7 +85,7 @@
 						{ required: true, message: '请输入货位号', trigger: 'change' },
 						{
 							pattern: /^[a-zA-Z]{1}[0-9]{1,29}$/g,
-							message: '必字母开头且后面紧跟数字'
+							message: '必字母开头且后面紧跟数字'
 						}
 					],
 					productSn: [{ required: true, message: '请选择绑定产品', trigger: 'change' }],

+ 17 - 14
pages/batchShelves/scanProduct.vue

@@ -13,7 +13,7 @@
 							<view class="ptxt flex align_center justify_between">
 								<view>{{productInfo.code}}</view>
 								<view class="pcode">
-									可用库存:<text>{{productInfo.currQty||0}} </text> {{productInfo.unit}}
+									可用库存:<text>{{productInfo.shelfCartApi?productInfo.shelfCartApi.qty:0}} </text> {{productInfo.unit}}
 								</view>
 							</view>
 							<view class="pname">
@@ -41,13 +41,13 @@
 			</view>
 		</view>
 		<!-- 确认弹框 -->
-		<u-popup v-model="confirmModal" closeable mode="center" border-radius="14" width="80%" @close="modalConfirm">
-			<view style="display: flex;flex-direction:column;justify-content: center;padding: 30rpx;">
+		<u-popup v-model="confirmModal" closeable mode="bottom" border-radius="14" width="80%" @close="modalConfirm">
+			<view style="display: flex;flex-direction:column;justify-content: center;padding: 30rpx 30rpx 120rpx;">
 				<view style="margin-top: 40rpx;text-align: center;">没有找到该产品,请重新扫描</view>
-				<view style="color: dodgerblue;padding: 30upx 30upx 50upx;text-align: center;">试一试</view>
+				<view style="color: #999;padding: 30upx 30upx 50upx;text-align: center;">试一试</view>
 				<view style="text-align: center;display: flex;justify-content: space-between;">
-					<u-button style="width: 40%;" shape="circle" @click="searchProduct()" size="medium">按产品编码搜索</u-button>
-					<u-button style="width: 40%;" @click="modalConfirm" type='primary' shape="circle" size="medium">继续扫码</u-button>
+					<u-button style="width: 40%;" type='primary' shape="circle" @click="searchProduct()" size="medium">按产品编码搜索</u-button>
+					<!-- <u-button style="width: 40%;" @click="modalConfirm" type='primary' shape="circle" size="medium">继续扫码</u-button> -->
 				</view>
 			</view>
 		</u-popup>
@@ -70,12 +70,16 @@
 				shelfCartSn: '',
 				curQty: '',
 				scleft: 0,
-				fromPage: null
+				fromPage: null,
+				qrCode: ''
 			}
 		},
 		onReady() {
 			// 初始化摄像头
 			this.init()
+			uni.setNavigationBarTitle({
+				title: '扫描条形码—' +this.layer+'层'
+			})
 		},
 		onLoad(options) {
 			this.shelfSn = options.shelfSn
@@ -83,9 +87,6 @@
 			this.shelfName = options.shelfName
 			this.customerSn = options.customerSn
 			this.fromPage = options.from
-			uni.setNavigationBarTitle({
-				title: '扫描条形码——' +this.layer+'层'
-			})
 		},
 		onBackPress(e) {
 			uni.$emit("updateTempHw")
@@ -111,13 +112,13 @@
 				})
 			},
 			// 扫码结果
-			scanResult(qrCode){
+			scanResult(){
 				const _this = this
 				uni.showLoading({
 					title: "正在查询产品信息"
 				})
 				let params = {
-					qrCode: qrCode,
+					qrCode: this.qrCode,
 					shelfSn: this.shelfSn,
 					shelfTierCode: this.layer
 				}
@@ -173,6 +174,7 @@
 						this.toashMsg('保存成功,继续扫描')
 						this.curQty = nums
 						this.shelfCartSn = res.data.shelfCartSn
+						this.scanResult()
 					}
 					setTimeout(()=>{
 						uni.hideLoading()
@@ -193,7 +195,7 @@
 					top:'0px',
 					left:'0px',
 					width: '100%',
-					height: '50%',
+					height: '45%',
 					position: 'static',
 					frameColor: '#00aaff',
 					scanbarColor: '#00aaff'
@@ -210,7 +212,8 @@
 				// 扫码成功后
 				this.barcode.onmarked = function(type, result) {
 					console.log(type,result)
-					_this.scanResult(result)
+					_this.qrCode = result
+					_this.scanResult()
 				}
 				// 扫码识别出错
 				this.barcode.onerror = function(error){

+ 5 - 2
pages/batchShelves/searchProduct.vue

@@ -87,8 +87,11 @@
 			this.shelfName = options.shelfName
 			this.customerSn = options.customerSn
 			this.fromPage = options.from
+			console.log(options)
+		},
+		onReady() {
 			uni.setNavigationBarTitle({
-				title: '按产品编码搜索——' +this.layer+'层'
+				title: '按产品编码搜索—' +this.layer+'层'
 			})
 		},
 		onBackPress(e) {
@@ -128,7 +131,7 @@
 				let params = {
 					pageNo:1,
 					pageSize:20,
-					code: this.queryWord,
+					code: this.$u.trim(this.queryWord),
 					shelfSn: this.shelfSn,
 					shelfTierCode: this.layer
 				}

+ 1 - 1
pages/shelfSetting/addShelfHw.vue

@@ -65,7 +65,7 @@
 						{ required: true, message: '请输入货位号', trigger: 'change' },
 						{
 							pattern: /^[a-zA-Z]{1}[0-9]{1,29}$/g,
-							message: '必字母开头且后面紧跟数字'
+							message: '必字母开头且后面紧跟数字'
 						}
 					],
 					price: [{ required: true,type:'number', message: '请输入销售价', trigger: 'change' }],