lilei 2 سال پیش
والد
کامیت
2c5d7d7e7a
2فایلهای تغییر یافته به همراه23 افزوده شده و 9 حذف شده
  1. 2 1
      pages/queryByCode/confirmQh.vue
  2. 21 8
      pages/queryByCode/queryByCode.vue

+ 2 - 1
pages/queryByCode/confirmQh.vue

@@ -64,6 +64,7 @@
 							title: res.message,
 							duration: 4000
 						 })
+						 uni.$emit("updateQueryByCodeList")
 						 uni.redirectTo({
 						 	url: "/pages/digitalShelf/orderDetail?shelfOrderSn="+res.data.shelfOrderSn
 						 })
@@ -107,7 +108,7 @@
 				margin-right: 6rpx;
 				padding: 0 10rpx;
 				background: rgba(3, 54, 146, 0.15);
-				border-radius: 100rpx;
+				border-radius: 20rpx;
 				color: #033692;
 				font-size: 24rpx;
 			}

+ 21 - 8
pages/queryByCode/queryByCode.vue

@@ -10,9 +10,9 @@
 					@custom="getpartList" 
 					@search="getpartList" 
 					@clear="clearSearch" 
-					:height="80"
+					:height="90"
 					bg-color="#fff" 
-					:action-style="{border:'0.1rpx solid #00aaff',borderRadius:'50rpx',color:'#00aaff'}" 
+					:action-style="{borderRadius:'50rpx',color:'#ffffff',width: '120rpx',padding:'12rpx 20rpx',background:'#00aaff'}" 
 					placeholder="请输入产品编码或名称搜索"></u-search>
 				</view>
 			</view>
@@ -27,7 +27,7 @@
 							</view>
 							<view class="pinfo">
 								<view class="pname flex align_center justify_between">
-									<view><text>{{item.shelfPlaceCode}}</text>{{item.code}}</view>
+									<view class="code"><text>{{item.shelfPlaceCode}}</text>{{item.code}}</view>
 									<view class="kc">库存:<text>{{item.currentInven}}</text>{{item.unit}}</view>
 								</view>
 								<view class="ptxt">
@@ -66,17 +66,18 @@
 		},
 		onLoad(opts) {
 			this.shelfSn = this.$store.state.vuex_storeShelf.shelfSn
-		},
-		onShow() {
-			if(this.queryWord!=''){
+			uni.$on("updateQueryByCodeList",()=>{
 				this.getpartList()
-			}
+			})
+		},
+		onUnload() {
+			uni.$off("updateQueryByCodeList")
 		},
 		methods: {
 			//取货
 			toEdit(item){
 				if(item.currentInven){
-					const params = Object.assign({shelfSn: this.shelfSn, billSource: 'product_code'},item)
+					const params = {shelfSn: this.shelfSn, billSource: 'product_code', productSn: item.productSn}
 					uni.navigateTo({
 						url: '/pages/queryByCode/confirmQh?data='+ encodeURIComponent(JSON.stringify(params))
 					})
@@ -92,6 +93,7 @@
 				this.queryWord = ''
 				this.pageNo = 1
 				this.partList = []
+				this.getpartList()
 			},
 			change(v){
 				if(v==''){
@@ -197,6 +199,17 @@
 						font-size: 28rpx;
 						color: #191919;
 						margin-bottom: 10rpx;
+						.code{
+							text{
+								font-weight: normal;
+								margin-right: 6rpx;
+								padding: 0 10rpx;
+								background: rgba(3, 54, 146, 0.15);
+								border-radius: 20rpx;
+								color: #033692;
+								font-size: 24rpx;
+							}
+						}
 						.kc{
 							color: #999;
 							text{