Browse Source

bug 修复

lilei 2 years ago
parent
commit
cf2eec9081

+ 9 - 9
pages.json

@@ -518,11 +518,11 @@
 						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
-								"text": "\ue694 按产品编码搜索" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue694" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "14",
+								"fontSize": "16",
 								"color": "#00aaff",
-								"width":"150px"
+								"width":"50px"
 							}
 						]
 					}
@@ -541,11 +541,11 @@
 						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
-								"text": "\ue694 扫描条形码" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue694" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "14",
+								"fontSize": "16",
 								"color": "#00aaff",
-								"width":"120px"
+								"width":"50px"
 							}
 						]
 					}
@@ -564,14 +564,14 @@
 						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
-								"text": "\ue6ee 上架入库" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue6ee 上架" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "14",
 								"color": "#00aaff",
-								"width":"100px"
+								"width":"80px"
 							},
 							{
-								"text": "\ue6f5 打印贴签" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"text": "\ue6f5 打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "14",
 								"color": "#00aaff",

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

@@ -86,7 +86,7 @@
 				backgroundColor: this.$config('primaryColor')
 			})
 			uni.setNavigationBarTitle({
-				title: this.type == 'search' ? '按编码搜索打印' : '批量打印—'+this.basicInfoData.layer+'层'
+				title: this.type == 'search' ? '按编码搜索打印' : '批量打印—'+this.basicInfoData.layer+'层'
 			})
 		},
 		onUnload() {

+ 37 - 22
pages/batchShelves/scanProduct.vue

@@ -4,7 +4,11 @@
 		<view class="info-body">
 			<view class="info" v-if="productInfo">
 				<view>
-					<view class="shelfPlaceCode">{{shelfPlaceCode}}</view>
+					<view class="shelfPlaceCode">
+						<text v-if="productInfo.shelfCartApi">{{productInfo.shelfCartApi.shelfPlaceCode}}</text>
+						<text v-else-if="productInfo.shelfProductApi">{{productInfo.shelfProductApi.shelfPlaceCode}}</text>
+						<text v-else>{{shelfPlaceCode}}</text>
+					</view>
 					<view class="flex flex_1 align_center">
 						<view class="pimgs">
 							<u-image :src="productInfo.images?productInfo.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
@@ -13,7 +17,10 @@
 							<view class="ptxt flex align_center justify_between">
 								<view>{{productInfo.code}}</view>
 								<view class="pcode">
-									可用库存:<text>{{productInfo.shelfCartApi?productInfo.shelfCartApi.qty:0}} </text> {{productInfo.unit}}
+									可用库存:
+									<text v-if="productInfo.shelfCartApi">{{productInfo.shelfCartApi.qty}}</text>
+									<text v-else-if="productInfo.shelfProductApi">{{productInfo.shelfProductApi.qty}}</text>
+									{{productInfo.unit}}
 								</view>
 							</view>
 							<view class="pname">
@@ -23,12 +30,14 @@
 					</view>
 				</view>
 				<view class="product-nums">
-					<view>本次上架数量</view>
+					<view>本次上架数量<text>(左右滑动选择)</text></view>
 					<view class="numsBox flex align_center justify_between">
 						<view class="a-left" @click="numsBoxScroll(0)"><u-icon name="arrow-left"></u-icon></view>
 						<scroll-view class="scroll-nums" scroll-x="true" :scroll-left="scleft">
 							<view class="ntabs-box flex align_center">
-								<view class="ntabs" @click="saveData(item)" :class="curQty==item?'active':''" v-for="item in 100" :key="item">{{item}}</view>
+								<view :id="'nums'+item" class="ntabs" @click="saveData(item)" :class="curQty==item?'active':''" v-for="item in 99" :key="item">
+									{{item<10?('&nbsp;'+item+'&nbsp;'):item}}
+								</view>
 							</view>
 						</scroll-view>
 						<view class="a-right" @click="numsBoxScroll(1)"><u-icon name="arrow-right"></u-icon></view>
@@ -71,7 +80,8 @@
 				curQty: '',
 				scleft: 0,
 				fromPage: null,
-				qrCode: ''
+				qrCode: '',
+				numsWidth: 52
 			}
 		},
 		onReady() {
@@ -112,7 +122,7 @@
 		},
 		methods: {
 			numsBoxScroll(type){
-				this.scleft = type ? (this.scleft+150) : (this.scleft-150)
+				this.scleft = type ? (this.scleft+this.numsWidth*3) : (this.scleft-this.numsWidth*3)
 			},
 			searchProduct(){
 				uni.redirectTo({
@@ -137,15 +147,18 @@
 						const ret = res.data.productList[0]
 						 this.productInfo = ret
 						 this.shelfPlaceCode = res.data.shelfPlaceCode
+						 // 数量区域宽度
+						 const query = uni.createSelectorQuery().in(_this);
+						 query.select('#nums1').boundingClientRect(data => {
+							 _this.numsWidth = data ? (data.width + 20) : 52
+						 }).exec()
 						 // 已录入
 						 if(ret.shelfCartApi){
 							 this.curQty = ret.shelfCartApi.qty
-							 this.scleft = this.curQty * 30
-							 this.shelfCartSn = ret.shelfCartApi.shelfCartSn
+							 _this.scleft = (_this.curQty -1) * _this.numsWidth
 						 }else{
 							 this.curQty = ''
 							 this.scleft = 0
-							 this.shelfCartSn =''
 						 }
 						 setTimeout(()=>{
 							 this.barcode.start()
@@ -161,19 +174,20 @@
 				uni.showLoading({
 					title: '正在保存...'
 				})
-				const a = this.productInfo.shelfCartApi || this.productInfo.shelfProductApi
+				const row = this.productInfo
+				const item = row.shelfCartApi || row.shelfProductApi
 				const params = {
 					shelfSn: this.shelfSn,
 					shelfName: this.shelfName,
-					shelfTierCode: a ? a.shelfTierCode : this.layer,
-					shelfPlaceSn: a ? a.shelfPlaceSn : undefined,
-					shelfPlaceCode: a?a.shelfPlaceCode:this.shelfPlaceCode,
-					productSn: this.productInfo.productSn,
-					productCode: this.productInfo.code,
+					shelfTierCode: item?item.shelfTierCode:this.layer,
+					shelfPlaceSn: item?item.shelfPlaceSn:undefined,
+					shelfPlaceCode: item?item.shelfPlaceCode:this.shelfPlaceCode,
+					productSn: row.productSn,
+					productCode: row.code,
 					qty: nums,
-					price: this.productInfo.price,
-					cost: this.productInfo.terminalPrice,
-					shelfCartSn: this.shelfCartSn
+					price: row.price,
+					cost: row.terminalPrice,
+					shelfCartSn: item?item.shelfCartSn:undefined
 				}
 				console.log(params)
 				shelfCartSave(params).then(res => {
@@ -181,7 +195,6 @@
 					if(res.status == 200){
 						this.toashMsg('保存成功,继续扫描')
 						this.curQty = nums
-						this.shelfCartSn = res.data.shelfCartSn
 						this.scanResult()
 					}
 					setTimeout(()=>{
@@ -297,11 +310,14 @@
 							text-align: center;
 							color: #999;
 							margin-top: 20rpx;
+							text{
+								font-size: 24rpx;
+							}
 						}
 					}
 					.numsBox{
 						.scroll-nums{
-							width: 85%;
+							width: 80%;
 							padding: 10rpx 0;
 							.ntabs-box{
 								margin: 10rpx 0;
@@ -312,8 +328,7 @@
 								box-shadow: 2rpx 4rpx 6rpx #eee;
 								border-radius: 15rpx;
 								padding: 10rpx 15rpx;
-								margin: 10rpx 2%;
-								width: 100rpx;
+								margin: 10rpx 20rpx;
 							}
 							.active{
 								border-color: crimson;

+ 8 - 5
pages/batchShelves/searchProduct.vue

@@ -56,10 +56,10 @@
 					</view>
 				</view>
 			</view>
-			<view v-if="productList && productList.length == 0">
+			<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-else>
+			<view style="padding: 20upx;" v-if="status != 'nomore'">
 				<u-loadmore :status="status" :load-text="loadText" />
 			</view>
 		</view>
@@ -83,7 +83,7 @@
 				fromPage: null,
 				loadText: {
 					loading: '努力加载中',
-					nomore: '最多显示前20条匹配产品,请尝试输入更多内容'
+					loadmore: '最多显示前20条匹配产品,请尝试输入更多内容'
 				}
 			}
 		},
@@ -138,18 +138,21 @@
 					shelfSn: this.shelfSn,
 					shelfTierCode: this.layer
 				}
+				this.productList = []
 				console.log(params)
 				this.status = 'loading'
 				queryProductPage(params).then(res => {
 					console.log(res)
-					if(res.status == 200&&res.data&&res.data.page){
+					if(res.status == 200&&res.data&&res.data.page&&res.data.page.list&&res.data.page.list.length){
 						this.productList = res.data.page.list
 						this.shelfPlaceCode = res.data.shelfPlaceCode
 						this.total = res.data.page.count
+						this.status = 'loadmore'
 					}else{
 						this.noDataText = '没有搜索到相关产品'
+						this.status = 'nomore'
 					}
-					this.status = 'nomore'
+					console.log(this.status)
 				})
 			},
 			// 新增

+ 3 - 1
pages/replenishmentManage/signWarehousing.vue

@@ -100,7 +100,8 @@
 			// 确认签收 confirm
 			modalConfirm(){
 				const arr = []
-				this.partList.map((item, index) => {
+				const retList = this.$refs.partList.getAllData()
+				retList.map((item, index) => {
 				  if (item.putQty || item.putQty == 0) {
 				    arr.push({
 						productSn: item.productSn,
@@ -115,6 +116,7 @@
 				  replenishBillSn: this.replenishBillSn,
 				  detailList: arr
 				}
+				console.log(params)
 				this.loading = true
 				shelfReplenishPutStock(params).then(res => {
 					if(res.status == 200){

+ 2 - 2
pages/shelfSetting/shelfSet.vue

@@ -48,7 +48,7 @@
 			</view>
 		</view>
 		<view v-else>
-			<view class="nodata">暂无货位信息,请点击 <text @click="toPlRacking">批量上架产品</text></view>
+			<view class="nodata">暂无货位信息,请点击 <text @click="toPlRacking">批量上架</text></view>
 		</view>
 	</view>
 </template>
@@ -314,7 +314,7 @@
 				var webView = this.$mp.page.$getAppWebview(); 
 				console.log(this.placeTab.length)
 				webView.setTitleNViewButtonStyle(0, {
-					"text":this.placeTab.length?"\ue6ee 批量上架产品 ":'',
+					"text":this.placeTab.length?"\ue6ee 批量上架 ":'',
 					"color": "#00aaff"
 				});
 				shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {