浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
ae8ed7f519

+ 11 - 10
pages.json

@@ -58,7 +58,7 @@
             	"navigationStyle":"custom",
             	"app-plus":{
             		"titleNView": {
-            			"titleAlign": "auto",
+            			"titleAlign": "left",
             			"buttons": [ //原生标题栏按钮配置,
             				{
             					"text": "批量打印" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -227,7 +227,7 @@
 				"navigationStyle":"custom",
 				"app-plus":{
 					"titleNView": {
-						"titleAlign": "auto",
+						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -261,7 +261,7 @@
 				"navigationStyle":"custom",
 				"app-plus":{
 					"titleNView": {
-						"titleAlign": "auto",
+						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -295,7 +295,7 @@
 				"navigationStyle":"custom",
 				"app-plus":{
 					"titleNView": {
-						"titleAlign": "auto",
+						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -368,7 +368,7 @@
             	"navigationStyle":"custom",
             	"app-plus":{
             		"titleNView": {
-            			"titleAlign": "auto",
+            			"titleAlign": "left",
             			"buttons": [ //原生标题栏按钮配置,
             				{
             					"text": "" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -466,7 +466,7 @@
             	"navigationStyle":"custom",
             	"app-plus":{
             		"titleNView": {
-            			"titleAlign": "auto",
+            			"titleAlign": "left",
             			"buttons": [ //原生标题栏按钮配置,
             				{
             					"text": "\ue694 盘点历史" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -515,7 +515,7 @@
                 "enablePullDownRefresh": false,
 				"app-plus":{
 					"titleNView": {
-						"titleAlign": "auto",
+						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
 								"text": "\ue694 按产品编码搜索" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -538,7 +538,7 @@
                 "enablePullDownRefresh": false,
 				"app-plus":{
 					"titleNView": {
-						"titleAlign": "auto",
+						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
 								"text": "\ue694 扫描条形码" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -561,7 +561,7 @@
                 "enablePullDownRefresh": false,
 				"app-plus":{
 					"titleNView": {
-						"titleAlign": "auto",
+						"titleAlign": "left",
 						"buttons": [ //原生标题栏按钮配置,
 							{
 								"text": "\ue6ee 上架入库" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
@@ -616,7 +616,8 @@
 		"app-plus": {
 			// 将回弹属性关掉
 			"bounce": "none",
-			"scrollIndicator": "none"
+			"scrollIndicator": "none",
+			"titleAlign": "left"
 		}
 	},
 	"tabBar": {

+ 2 - 2
pages/batchShelves/cartList.vue

@@ -166,13 +166,13 @@
 			scanProduct(){
 				this.showLayer = false
 				uni.navigateTo({
-					url: "/pages/batchShelves/scanProduct?shelfSn="+this.shelfSn+'&layer='+this.curLayer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
+					url: "/pages/batchShelves/scanProduct?shelfSn="+this.shelfSn+'&layer='+this.curLayer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn+'&from=cartList'
 				})
 			},
 			searchProduct(){
 				this.showLayer = false
 				uni.navigateTo({
-					url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.curLayer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
+					url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.curLayer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn+'&from=cartList'
 				})
 			},
 			// 上架入库

+ 1 - 1
pages/batchShelves/editShelfHw.vue

@@ -104,7 +104,7 @@
 		},
 		onLoad(opts) {
 			const _this = this
-			this.nowData = this.$store.state.vuex_tempData;
+			this.nowData = JSON.parse(JSON.stringify(this.$store.state.vuex_tempData));
 			console.log(this.nowData)
 			this.shelfName = opts.shelfName
 			this.shelfSn = opts.shelfSn

+ 18 - 9
pages/batchShelves/scanProduct.vue

@@ -69,7 +69,8 @@
 				shelfPlaceCode: '',
 				shelfCartSn: '',
 				curQty: '',
-				scleft: 0
+				scleft: 0,
+				fromPage: null
 			}
 		},
 		onReady() {
@@ -81,14 +82,21 @@
 			this.layer = options.layer
 			this.shelfName = options.shelfName
 			this.customerSn = options.customerSn
+			this.fromPage = options.from
 			uni.setNavigationBarTitle({
 				title: '扫描条形码——' +this.layer+'层'
 			})
 		},
-		onBackPress() {
-			uni.redirectTo({
-				url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
-			})
+		onBackPress(e) {
+			uni.$emit("updateTempHw")
+			if(!this.fromPage){
+				uni.redirectTo({
+					url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
+				})
+			}else{
+				return false
+			}
+			return true
 		},
 		onNavigationBarButtonTap(e) {
 			 this.searchProduct()
@@ -99,7 +107,7 @@
 			},
 			searchProduct(){
 				uni.redirectTo({
-					url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
+					url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn+'&from='+this.fromPage
 				})
 			},
 			// 扫码结果
@@ -155,7 +163,7 @@
 					productCode: this.productInfo.code,
 					qty: nums,
 					price: this.productInfo.price,
-					cost: this.productInfo.cost,
+					cost: this.productInfo.terminalPrice,
 					shelfCartSn: this.shelfCartSn
 				}
 				console.log(params)
@@ -185,7 +193,7 @@
 					top:'0px',
 					left:'0px',
 					width: '100%',
-					height: '35%',
+					height: '50%',
 					position: 'static',
 					frameColor: '#00aaff',
 					scanbarColor: '#00aaff'
@@ -194,6 +202,7 @@
 				const query = uni.createSelectorQuery().in(this);
 				query.select('#barcode').boundingClientRect(data => {
 					this.barcode.setStyle({
+						width: data.width + 'px',
 						height: data.height	+ 'px'	// 调整扫码控件的位置
 					})
 				}).exec()
@@ -228,7 +237,7 @@
 		display: flex;
 		flex-direction: column;
 		.barCode{
-			height: 35%;
+			height: 45%;
 		}
 		.info-body{
 			flex-grow: 1;

+ 14 - 8
pages/batchShelves/searchProduct.vue

@@ -31,7 +31,7 @@
 							{{item.productName}}
 						</view>
 						<view class="ptxt flex justify_between">
-							<text>{{item.code}}</text>
+							<text style="word-break: break-all;">{{item.code}}</text>
 							<view v-if="item.shelfProductApi">
 								可用库存:<text>{{item.shelfProductApi.qty}}</text>{{item.unit}}
 							</view>
@@ -77,7 +77,8 @@
 				total: 0, // 列表总数
 				noDataText: '暂无产品',
 				status: 'nomore',
-				shelfPlaceCode: ''
+				shelfPlaceCode: '',
+				fromPage: null
 			}
 		},
 		onLoad(options) {
@@ -85,16 +86,20 @@
 			this.layer = options.layer
 			this.shelfName = options.shelfName
 			this.customerSn = options.customerSn
+			this.fromPage = options.from
 			uni.setNavigationBarTitle({
 				title: '按产品编码搜索——' +this.layer+'层'
 			})
 		},
 		onBackPress(e) {
-			console.log(e,'-----------')
 			uni.$emit("updateTempHw")
-			uni.redirectTo({
-				url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
-			})
+			if(!this.fromPage){
+				uni.redirectTo({
+					url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
+				})
+			}else{
+				return false
+			}
 			return true
 		},
 		onNavigationBarButtonTap(e) {
@@ -103,7 +108,7 @@
 		methods: {
 			scanProduct(){
 				uni.redirectTo({
-					url: "/pages/batchShelves/scanProduct?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
+					url: "/pages/batchShelves/scanProduct?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn+'&from='+this.fromPage
 				})
 			},
 			clearSearch(){
@@ -168,7 +173,7 @@
 					productCode: row.code,
 					qty: nums,
 					price: row.price,
-					cost: row.cost,
+					cost: row.terminalPrice,
 					shelfCartSn: item?item.shelfCartSn:undefined
 				}
 				console.log(params)
@@ -222,6 +227,7 @@
 						color: #666;
 						font-size: 26rpx;
 						font-weight: bold;
+						word-break: break-all;
 						text{
 							font-weight: normal;
 							margin-right: 10rpx;

+ 8 - 8
pages/latePlay/chooseBulk.vue

@@ -34,9 +34,9 @@
 					</view>
 				</view>
 				<view v-if="shelfList&&shelfList.length==0">
-					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
 				</view>
-				<view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
+				<view style="padding: 20upx;" v-else>
 					<u-loadmore :status="status" />
 				</view>
 			</scroll-view>
@@ -85,12 +85,12 @@
 						let list = res.data.list
 						if (list && list.length){
 							// 分页 拼接数据
-							if (_this.pageNo != 1) {
-								_this.shelfList = _this.shelfList ? _this.shelfList.concat(list) : list
-							} else {
-								_this.shelfList = list
+							if(_this.pageNo>1){
+								_this.shelfList = _this.shelfList.concat(res.data.list || [])
+							}else{
+								_this.shelfList = res.data.list || []
 							}
-							this.total = res.data.count
+							_this.total = res.data.count
 							if (_this.shelfList.length == res.data.count) {
 								_this.status = 'nomore'
 							} else {
@@ -98,7 +98,7 @@
 							}
 						} else {
 							_this.shelfList = list || []
-							this.total = 0
+							_this.total = 0
 							_this.status = 'nomore'
 						}
 						_this.noDataText = '暂无货架'

+ 3 - 6
pages/latePlay/chooseProduct.vue

@@ -16,8 +16,8 @@
 					<u-search 
 					focus
 					v-model="queryWord" 
-					@custom="searchPart" 
-					@search="searchPart" 
+					@custom="getpartList" 
+					@search="getpartList" 
 					@clear="clearSearch" 
 					@input="$u.debounce(changeSearch, 800)"
 					bg-color="#fff" 
@@ -180,10 +180,6 @@
 				this.showTab = false
 				this.changeSearch()
 			},
-			// 搜索配件
-			searchPart(){
-				this.getpartList()
-			},
 			// 获取数字货架列表
 			getpartList(){
 				const _this = this
@@ -194,6 +190,7 @@
 				}
 				_this.status = 'loading'
 				queryShelfProductList(params).then(res => {
+					console.log(res)
 					uni.hideLoading()
 					if(res.status == 200){
 						let list = res.data

+ 1 - 1
pages/shelfSetting/editShelfHw.vue

@@ -141,7 +141,7 @@
 				if(this.productEntity && this.productEntity.currQty){
 					uni.showToast({
 						icon:'none',
-						title: '库存为0时才可更换产品',
+						title: '只有当前库存为0时才能更换产品',
 						duration: 4000
 					})
 					return

+ 7 - 7
pages/shelfSetting/shelfList.vue

@@ -46,7 +46,7 @@
 				<view v-if="shelfList&&shelfList.length==0">
 					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
 				</view>
-				<view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
+				<view style="padding: 20upx;" v-else>
 					<u-loadmore :status="status" />
 				</view>
 			</scroll-view>
@@ -123,12 +123,12 @@
 						let list = res.data.list
 						if (list && list.length){
 							// 分页 拼接数据
-							if (_this.pageNo != 1) {
-								_this.shelfList = _this.shelfList ? _this.shelfList.concat(list) : list
-							} else {
-								_this.shelfList = list
+							if(_this.pageNo>1){
+								_this.shelfList = _this.shelfList.concat(res.data.list || [])
+							}else{
+								_this.shelfList = res.data.list
 							}
-							this.total = res.data.count
+							_this.total = res.data.count
 							console.log(res.data.count)
 							if (_this.shelfList.length == res.data.count) {
 								_this.status = 'nomore'
@@ -137,7 +137,7 @@
 							}
 						} else {
 							_this.shelfList = list || []
-							this.total = 0
+							_this.total = 0
 							_this.status = 'nomore'
 							_this.noDataText = '没有查询到相关货架'
 						}

+ 2 - 1
pages/shelfSetting/shelfSet.vue

@@ -312,6 +312,7 @@
 			},
 			getHasCartNotEmpty(){
 				var webView = this.$mp.page.$getAppWebview(); 
+				console.log(this.placeTab.length)
 				webView.setTitleNViewButtonStyle(0, {
 					"text":this.placeTab.length?"\ue6ee 批量上架产品 ":'',
 					"color": "#00aaff"
@@ -319,7 +320,7 @@
 				shelfCartNotEmpty({ shelfSn: this.shelfSn }).then(res => {
 					this.cartNotEmpty = res.data == 1
 					webView.setTitleNViewButtonStyle(1, {  
-						"redDot": this.cartNotEmpty
+						"redDot": this.placeTab.length && this.cartNotEmpty
 					}); 
 				})
 			}