chenrui hace 2 años
padre
commit
f91fbcc5b3

+ 5 - 4
pages/shuntBackManage/addBackOrder.vue

@@ -69,7 +69,7 @@
 						</view>
 					</view>
 			</scroll-view>
-			<view @click="toChooseProduct" class="nodata" v-else>
+			<view class="nodata" v-else>
 				<image :src="`/static/${$config('themePath')}/def_no_data@3x.png`"></image>
 				<view class="nodataTip">
 					暂无产品,请点击 
@@ -137,9 +137,9 @@ export default {
 		_this.theme = getApp().globalData.theme;
 		_this.shelfSn = options.shelfSn;
 		_this.shelfName = options.shelfName;
-		_this.queryParam.shelfSn = options.shelfSn
-		// _this.recallBillList = _this.$store.state.vuex_tempBackData || []
+		_this.recallBillList=_this.$store.state.shuntBackList || []
 		uni.$on("chooseBackProduct",function(data){
+			
 			_this.recallBillList = _this.recallBillList.concat(data).sort(function(a,b){
 				return (a.shelfPlaceCode+'').localeCompare(b.shelfPlaceCode+'');
 			});
@@ -169,7 +169,8 @@ export default {
 			  ret.push(item.id)
 			})
 			return ret
-		}
+		},
+		
 	},
 	methods: {
 		toChooseProduct(){

+ 5 - 2
pages/shuntBackManage/chooseProduct.vue

@@ -261,7 +261,7 @@
 						_this.partList =[]
 					}
 					//过滤之前选过的值
-					if(_this.nowData.chooseKey.length){
+					if(_this.nowData.chooseKey && _this.nowData.chooseKey.length >0){
 						_this.partList = _this.partList.filter(item => {
 							const row = _this.nowData.chooseKey.findIndex(k => k == item.id)
 							return !(row>=0)
@@ -282,7 +282,10 @@
 			submitOrder(){
 				if(this.totalCategory){
 					uni.$emit("chooseBackProduct",this.chooseList)
-					uni.navigateBack()
+					this.$store.commit('setShuntBackList',this.chooseList);
+					uni.navigateTo({
+						url:'/pages/shuntBackManage/addBackOrder?shelfSn='+ this.nowData.shelfSn+'&shelfName='+this.nowData.shelfName
+					})
 				}else{
 					uni.showToast({
 						icon: 'none',

+ 6 - 2
pages/shuntBackManage/shelfList.vue

@@ -131,9 +131,13 @@ export default {
 			});
 		},
 		viewDetail(item) {
+			let nowData={
+				shelfSn:item.shelfSn,
+				shelfName:item.shelfName
+			}
 			uni.navigateTo({
-				url: '/pages/shuntBackManage/addBackOrder?shelfSn='+ item.shelfSn+'&shelfName='+item.shelfName
-			});
+				url: "/pages/shuntBackManage/chooseProduct?data="+encodeURIComponent(JSON.stringify(nowData))
+			})
 		}
 	},
 	// 上拉加载更多