lilei 2 gadi atpakaļ
vecāks
revīzija
59c9fe0914

+ 0 - 3
pages/replenishmentManage/sendOutGoods.vue

@@ -193,9 +193,6 @@
 				console.log(qrCode,pa)
 				shelfReplenishDetailOutScan({
 					replenishBillSn: _this.replenishBillSn,
-					// shelfSn: getQueryString('&'+qrCode, 'shelfSn'),
-					// shelfPlaceSn: getQueryString('&'+qrCode, 'shelfPlaceSn'),
-					// productSn: getQueryString('&'+qrCode, 'productSn')
 					shelfSn: pa[0],
 					shelfPlaceSn: pa[3],
 					productSn: pa[2]

+ 23 - 9
pages/soldOut/creatOrder.vue

@@ -26,14 +26,14 @@
 			</view>
 		</view>
 		<view class="check-list">
-			<productList ref="productList" noDataText="暂无产品" @allChecked="allCheckedCallback"></productList>
+			<productList ref="productList" noDataText="暂无产品" @updateNums="updateNums" @allChecked="allCheckedCallback"></productList>
 		</view>
 		<!-- 底部栏 -->
 		<view class="footer-bar flex align_center">
 			<view class="f-left">
 				<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
 			</view>
-			<view class="f-mid flex align_center" @click="openCart">
+			<view class="f-mid" @click="openCart">
 				<view>
 					已选<text>{{totalCategory}}</text>款/<text>{{totalQty}}</text>件
 				</view>
@@ -134,7 +134,7 @@
 				</view>
 				<view class="btns">
 					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClear">重置</u-button>
-					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="clearSearch">查询</u-button>
+					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="changeSearch">查询</u-button>
 				</view>
 			</view>
 		</u-popup>
@@ -231,6 +231,9 @@
 			allCheckeChange(e){
 				this.$refs.productList.allSelect(e.value)
 				this.chooseList = this.$refs.productList.getAllChecked()
+				if(!e.value){
+					this.showCart = false
+				}
 			},
 			allCheckedCallback(val){
 				this.allChecked = val
@@ -296,19 +299,25 @@
 				this.chooseList = []
 				this.showCart = false
 				this.allChecked = false
-				this.$refs.productList.allSelect(false)
+				if(this.$refs.productList){
+					this.$refs.productList.allSelect(false)
+				}
+			},
+			updateNums(){
+				this.chooseList = this.$refs.productList.getAllChecked()
 			},
 			// 修改数量
 			cartChangeNums(v){
 				this.$refs.productList.changeNums(v.index.split('_')[1],v.value)
+				this.chooseList.splice()
+			},
+			clearSearch(){
+				this.queryWord = ''
+				this.changeSearch()
 			},
 			handleClear(){
 				this.stockStateList = []
 				this.queryKeys.map(item => item.checked = false)
-				this.clearSearch()
-			},
-			clearSearch(){
-				this.queryWord = ''
 				this.changeSearch()
 			},
 			changeSearch(){
@@ -324,6 +333,9 @@
 					queryWord: this.queryWord,
 					stockStateList: this.stockStateList
 				}
+				_this.clearChoose()
+				_this.partList = []
+				_this.$refs.productList && _this.$refs.productList.setData(_this.partList)
 				_this.status = 'loading'
 				uni.showLoading({
 					mask:true,
@@ -489,7 +501,6 @@
 		}
 		.f-mid{
 			flex-grow: 1;
-			font-size: 0.8rem;
 			color: #666;
 			> view{
 				padding: 0 5upx;
@@ -498,6 +509,9 @@
 						color: red;
 					}
 				}
+				&:last-child{
+					font-size: 0.8rem;
+				}
 			}
 		}
 		.f-btns{

+ 13 - 1
pages/soldOut/productList.vue

@@ -40,7 +40,16 @@
 					<view class="pcurnums flex align_center flex">
 						<text>补货数量</text>
 						<view class="u-ninput">
-							<u-number-box color="#000" :long-press="false" :input-height="60" bg-color="#fff" v-model="item.replenishQty" :min="1"></u-number-box>
+							<u-number-box 
+							color="#000" 
+							@minus="updateNums" 
+							@plus="updateNums" 
+							@blur="updateNums" 
+							:long-press="false" 
+							:input-height="60" 
+							bg-color="#fff" 
+							v-model="item.replenishQty" 
+							:min="1"></u-number-box>
 						</view>
 					</view>
 				</view>
@@ -125,6 +134,9 @@
 			getAllData(){
 				return this.partList
 			},
+			updateNums(e){
+				this.$emit("updateNums",e)
+			},
 			// 更新数量
 			changeNums(id,val){
 				const row = this.partList.find(item => item.id == id)