Explorar o código

Merge branch 'develop_szhj07' of http://git.chelingzhu.com/jianguan-web/qpls-md-app into develop_szhj07

chenrui %!s(int64=2) %!d(string=hai) anos
pai
achega
8ab4ea63d1

+ 1 - 1
App.vue

@@ -7,7 +7,7 @@
 			token: '',
 			changeOrg:'',
 			version: '', // 当前版本号
-			buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
+			buildType: 'dev', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
 			envTips: '', // 环境文字提示
 			theme: 'default', // 主题,default
 			isIphoneXup: false //是否iphonex以及以上的版本

+ 16 - 0
api/shelf.js

@@ -36,6 +36,22 @@ export const shelfDetail = (params) => {
     method: 'post'
   })
 }
+//待补货产品列表
+export const queryListForReplenish = (params) => {
+  return axios.request({
+    url: `shelf/queryListForReplenish`,
+    data: params,
+    method: 'post'
+  })
+}
+// 补货产品明细
+export const queryProductListForReplenish = (params) => {
+  return axios.request({
+    url: `shelf/queryProductListForReplenish `,
+    data: params,
+    method: 'post'
+  })
+}
 // 货架  货位产品 列表 分页
 export const getShelfProductList = (params) => {
 	let url = `shelf/placeProduct/queryPage/${params.pageNo}/${params.pageSize}`

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.0.115:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.0.182:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 43 - 1
pages/batchShelves/cartList.vue

@@ -58,6 +58,9 @@
 		<!-- 合计弹框 -->
 		<u-popup mode="bottom" closeable v-model="showPop" :z-index="100">
 			<view class="heji-content">
+				<view style="color: red;margin-top: -35rpx;margin-bottom: 15rpx;">
+					<text @click="showDelLay=true"><u-icon name="trash"></u-icon>批量删除</text>
+				</view>
 				<scroll-view scroll-y="true" style="height: 400rpx;">
 					<view class="heji-con-list">
 						<view class="flex align_center" v-for="item in countData" :key="item.shelfTierCode">
@@ -89,6 +92,26 @@
 				 </view>
 			</view>
 		</u-popup>
+		<!-- 选择层删除 -->
+		<u-popup mode="center" width="80%" :mask-close-able="false" closeable @close="delLayer=[]" v-model="showDelLay" border-radius="15">
+			<view class="layer-content">
+				 <view class="tits">
+					 <view>请选择需要删除的层</view>
+					 <view>删除后,该层所有已录入的产品都会删除</view>
+				 </view>
+				 <view class="tagbox flex">
+				 	<view>
+				 		<view class="tag" :class="delLayer.indexOf(item)>=0?'active':''" v-for="item in layerList" :key="item" @click="chooseDelLay(item)">
+				 			{{item}}层
+				 		</view>
+				 	</view>
+				 </view>
+				 <view class="newbtn flex justify_between">
+				 	<u-button shape="circle" @click="showDelLay=false" size="medium">取消</u-button>
+				 	<u-button type='primary' @click="confirmDel" shape="circle" size="medium">确定删除</u-button>
+				 </view>
+			</view>
+		</u-popup>
 		<!-- 上架确认 -->
 		<choose-type-modal v-if="chooseModal" :totalKs="totalKs" :totalNums="totalNums" :openModal="chooseModal" @confirm="confirmPut" @close="chooseModal = false" />
 		<printStickerModal v-if="showPrintModal" :layer="curTab" :openModal="showPrintModal" @confirm="confirmPrint" @close="showPrintModal = false"></printStickerModal>
@@ -121,7 +144,9 @@
 				countData: [],
 				layerList: [],
 				showLayer: false,
-				curLayer: ''
+				showDelLay: false,
+				curLayer: '',
+				delLayer: []
 			}
 		},
 		onShow() {
@@ -328,6 +353,23 @@
 				  }
 				})
 			},
+			// 批量删除
+			chooseDelLay(val){
+				const i = this.delLayer.findIndex(item => item == val)
+				if(i>=0){
+					this.delLayer.splice(i,1)
+				}else{
+					this.delLayer.push(val)
+				}
+			},
+			confirmDel(){
+				console.log(this.delLayer)
+				if(this.delLayer.length){
+					
+				}else{
+					this.toashMsg("请选择层号")
+				}
+			},
 			// 修改数量
 			updateNums(e){
 				console.log(e)

+ 32 - 4
pages/replenishmentManage/replenishmentList.vue

@@ -28,9 +28,12 @@
 						<view class="ptools flex align_center justify_between">
 							<view><text>{{item.createDate}}</text></view>
 							<view class="flex align_center justify_between">
-								<!-- <view v-if="item.billState=='WAIT_CONFIRM'||item.billState=='WAIT_OUT_STOCK'">
-									<u-button shape="circle" size="mini" @click.stop="handleCancelOrder(item)" type="primary" plain>取消补货单</u-button>
-								</view> -->
+								<view v-if="item.billState=='WAIT_CONFIRM'||item.billState=='WAIT_OUT_STOCK'">
+									<u-button shape="circle" size="mini" @click.stop="handleCancelOrder(item)" type="error" plain>取消补货单</u-button>
+								</view>
+								<view v-if="item.billState=='CANCEL'">
+									<u-button shape="circle" size="mini" @click.stop="handleDelOrder(item)" type="error" plain>删除补货单</u-button>
+								</view>
 								<view class="print" v-if="item.billState!='CANCEL'&&item.billState!='WAIT_CONFIRM'" @click.stop="print(item)">
 									<u-image :src="`/static/${$config('themePath')}/icon_printer@3x.png`" width="48" height="48"></u-image>
 								</view>
@@ -52,7 +55,11 @@
 <script>
 	import printStickerModal from './printStickerModal.vue'
 	import { clzConfirm } from '@/libs/tools';
-	import { shelfReplenishList, shelfReplenishStateCount, shelfReplenishCancel, shelfReplenishDelete } from '@/api/shelfReplenish'
+	import { 
+		shelfReplenishList, 
+		shelfReplenishStateCount, 
+		shelfReplenishCancel, 
+		shelfReplenishDelete } from '@/api/shelfReplenish'
 	export default {
 		components: {printStickerModal},
 		data() {
@@ -230,6 +237,27 @@
 							shelfReplenishCancel({ replenishBillSn: row.replenishBillSn }).then(res => {
 							  if (res.status == 200) {
 							    _this.toashMsg(res.message)
+								_this.queryByTypeSum()
+							  }
+							  uni.hideLoading()
+							})
+						}
+					}
+				});
+			},
+			// 删除补货单
+			handleDelOrder(row){
+				const _this = this;
+				clzConfirm({
+					title: '提示',
+					content: '确认删除补货单吗?',
+					success: function(res) {
+						if (res.confirm || res.index == 0) {
+							_this.showLoading('正在删除...')
+							shelfReplenishDelete({ replenishBillSn: row.replenishBillSn }).then(res => {
+							  if (res.status == 200) {
+							    _this.toashMsg(res.message)
+								_this.queryByTypeSum()
 							  }
 							  uni.hideLoading()
 							})

+ 127 - 305
pages/soldOut/creatOrder.vue

@@ -6,7 +6,7 @@
 				<view class="shelfName">
 					<view>{{nowData.shelfName}}</view>
 				</view>
-				<view v-if="placeTab.length" class="btns" @click="showTab = true">筛选<u-icon size="20" name="arrow-down"></u-icon></view>
+				<view class="btns" @click="showTab = true">筛选<u-icon size="20" name="arrow-down"></u-icon></view>
 			</view>
 			<view class="search flex align_center">
 				<view class="input">
@@ -35,7 +35,7 @@
 			</view>
 			<view class="f-mid flex align_center" @click="openCart">
 				<view>
-					已选<text>{{orderTotal}}</text>款/<text>{{orderTotal}}</text>件
+					已选<text>{{totalCategory}}</text>款/<text>{{totalQty}}</text>件
 				</view>
 				<view>
 					查看明细
@@ -56,72 +56,68 @@
 					<view>已选配件</view>
 					<view class="cpb_heji flex align_center justify_between">
 						<text @click="clearDetail">清空列表</text>
-						<view v-if="detail">
-							盈亏总数量:
-							<text>
-								{{detail.totalProfitLossQty}}
-							</text>
-							盈亏总金额:
-							<text>
-								¥{{detail.totalProfitLossCost}}
-							</text>
-						</view>
 					</view>
 				</div>
 				<div class="cpb_cart-list">
-					<u-swipe-action 
-					:show="item.show" 
-					:btn-width="120"
-					:index="index" 
+					<view 
 					@click="delDetail"
 					v-for="(item, index) in chooseList" 
 					:key="item.id" 
-					:options="options"
 					>
-					<view class="nav-right-item flex">
-						<view class="uni-col-2">
-							<u-image :src="item.product&&item.product.images?item.product.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="100" height="100" border-radius="30"></u-image>
+					<view class="nav-right-item flex align_center">
+						<view class="uni-col-1">
+							<u-icon name="close-circle" color="#999" size="35"></u-icon>
 						</view>
-						<view class="item-info uni-col-10">
-							<view class="item-name">
-								<text>{{item.shelfPlaceCode}}</text>
-								{{item.product.productName}}
+						<view class="uni-col-11 flex">
+							<view class="uni-col-2">
+								<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
 							</view>
-							<view class="item-detail">
-								<view class="item-detail-info align_center flex justify_between">
-									<view>
-										{{item.productCode}}
-									</view>
-									<view class="flex justify_end">
-										<text class="item-detail-text">
-											可用:{{item.stockQty?item.stockQty:0}} {{item.product&&item.product.unit}}
-										</text>
-										<text class="item-detail-text">
-											冻结:{{item.freezeQty?item.freezeQty:0}} {{item.product&&item.product.unit}}
-										</text>
+							<view class="item-info uni-col-9">
+								<view class="item-name">
+									<text>{{item.shelfPlaceCode}}</text>
+									{{item.productCode}}
+								</view>
+								<view class="item-name">
+									{{item.productName}}
+								</view>
+								<view class="item-detail">
+									<view class="item-detail-info align_center flex justify_between">
+										<view></view>
+										<view class="flex justify_end">
+											<view class="item-detail-text">
+											最大库容:<text class="pnums">{{item.maxQty||0}}</text>
+											货架库存:<text class="pnums">{{item.qty||0}}</text>
+											门店库存:<text class="pnums">{{item.qplsStockQty||0}}</text>
+											</view>
+										</view>
 									</view>
 								</view>
 							</view>
-							<view class="item-detail">
-								<view class="item-detail-info">
-									<view class="flex justify_between">
-										<view></view>
-										 <view class="item-detail-text">
-										 	实际可用:
-										 	<u-number-box 
-											v-model="item.checkQty" 
-											@minus="cartChangeNums" 
-											@plus="cartChangeNums" 
-											@blur="cartChangeNums"
-											:index="'cart_'+item.id" 
-											:max="999999"></u-number-box>
-										 </view>
+						</view>
+					</view>
+					<view class="nav-right-item">
+						<view class="item-detail">
+							<view class="item-detail-info">
+								<view class="flex justify_between">
+									<view class="item-detail-text flex">
+										<view v-if="item.replenishBillQty">补货在途:<text class="pnums1">{{item.replenishBillQty||0}}</text></view>
+										<view v-if="item.recallBillQty">调回在途:<text class="pnums1">{{item.recallBillQty||0}}</text></view>
 									</view>
+									 <view class="item-detail-text">
+										补货数量:
+										<u-number-box 
+										v-model="item.checkQty" 
+										@minus="cartChangeNums" 
+										@plus="cartChangeNums" 
+										@blur="cartChangeNums"
+										:index="'cart_'+item.id" 
+										:max="999999"></u-number-box>
+									 </view>
 								</view>
 							</view>
 						</view>
 					</view>
-				</u-swipe-action>
+				</view>
 				</div>
 			</div>
 		</div>
@@ -129,13 +125,13 @@
 		<u-popup v-model="showTab" mode="right" width="70%">
 			<view class="tabBox flex flex_column">
 				<view class="tabs">
-					<view>
-						<view :class="'available'==curType?'active':''" @click="curType=curType=='available'?'':'available'">有可用库存的产品</view>
-						<view :class="'blocked'==curType?'active':''" @click="curType=curType=='blocked'?'':'blocked'">有冻结库存的产品</view>
-					</view>
-					<view class="flex">
-						<view :class="item==curTab?'active':''" v-for="item in placeTab" :key="item" @click="curTab=curTab==item?'':item">{{item}}层</view>
-					</view>
+					<u-checkbox-group wrap @change="checkboxGroupChange">
+						<u-checkbox 
+							v-model="item.checked" 
+							v-for="(item, index) in queryKeys" :key="index" 
+							:name="item.code"
+						>{{item.name}}</u-checkbox>
+					</u-checkbox-group>
 				</view>
 				<view class="btns">
 					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClear">重置</u-button>
@@ -147,16 +143,8 @@
 </template>
 
 <script>
-	import { getShelfProductList,getProductPlace } from '@/api/shelf'
+	import { queryProductListForReplenish } from '@/api/shelf'
 	import productList from './productList.vue'
-	import { 
-		stockCheckDetailQueryList, 
-		stockCheckDetailDelete, 
-		stockCheckSave, 
-		stockCheckBySn, 
-		stockCheckDetailSave,
-		deleteByStockCheckSn
-	} from '@/api/stockCheck'
 	import { clzConfirm } from '@/libs/tools'
 	export default {
 		components: {
@@ -165,8 +153,8 @@
 		data() {
 			return {
 				queryWord: '',
+				qrCode: '',
 				nowData:null,
-				stockCheckSn: null,
 				detail:null,
 				pageNo:1,
 				pageSize: 20,
@@ -176,9 +164,7 @@
 				partList: [],
 				allChecked: false,
 				showTab: false,
-				placeTab: [],
-				curTab: '',
-				curType: '',
+				curType: [],
 				customBtnStyle: {  //  自定义按钮样式
 					borderColor: this.$config('primaryColor'),
 					backgroundColor: this.$config('primaryColor'),
@@ -188,14 +174,24 @@
 				showCart: false,
 				chooseList: [],
 				tempData: null,
-				options: [
+				queryKeys: [
 					{
-						text: '删除',
-						style: {
-							backgroundColor: '#dd524d'
-						}
+						name: '库存充足',
+						code: 'stockEnough',
+						checked: false
+					},
+					{
+						name: '部分缺货',
+						code: 'portionStockout',
+						checked: false
+					},
+					{
+						name: '全部缺货',
+						code: 'allStockout',
+						checked: false
 					}
-				]
+				],
+				stockStateList:[]
 			}
 		},
 		onNavigationBarButtonTap(e) {
@@ -214,62 +210,33 @@
 		},
 		onLoad(opts) {
 			this.nowData = JSON.parse(decodeURIComponent(opts.data));
-			this.stockCheckSn = this.nowData.stockCheckSn
 			this.getpartList()
-			this.getShelfPlace()
-			
-			if(this.stockCheckSn){
-				// 获取盘点单明细
-				this.getDetail()
-				// 获取盘点明细列表
-				this.getChooseList()
-			}
-			
-			// 重置盘点单
-			uni.$on("resetStockCheck",()=>{
-				this.resetStockCheck()
-			})
 		},
-		onUnload() {
-			uni.$off("resetStockCheck")
+		computed: {
+			totalCategory () {
+			  return this.chooseList.length
+			},
+			totalQty () {
+			  let ret = 0
+			  this.chooseList.map(item => {
+			    ret = ret + item.replenishQty
+			  })
+			  return ret
+			}
 		},
 		methods: {
+			checkboxGroupChange(e) {
+				console.log(e);
+				this.curType = e
+			},
 			// 全选
 			allCheckeChange(e){
 				this.$refs.productList.allSelect(e.value)
+				this.chooseList = this.$refs.productList.getAllChecked()
 			},
 			allCheckedCallback(val){
 				this.allChecked = val
-			},
-			// 重置盘点单
-			resetStockCheck(){
-				this.chooseList = []
-				this.orderTotal = 0
-				this.stockCheckSn = null
-				this.detail = null
-				this.tempData = null
-				this.queryWord = ''
-				this.showCart = false
-				this.handleClear()
-			},
-			// 获取盘点明细列表
-			getChooseList(){
-				stockCheckDetailQueryList({
-					stockCheckSn: this.stockCheckSn
-				}).then(res => {
-					this.chooseList = res.data || []
-					this.orderTotal = this.chooseList.length
-				})
-			},
-			// 详细
-			getDetail(){
-				stockCheckBySn({stockCheckSn: this.stockCheckSn}).then(res => {
-					this.detail = res.data || null
-				})
-			},
-			//添加产品
-			toEdit(item){
-				 
+				this.chooseList = this.$refs.productList.getAllChecked()
 			},
 			// 创建补货单
 			creatOrder(data){
@@ -292,7 +259,7 @@
 			},
 			// 打开购物车
 			openCart(){
-				if(this.orderTotal){
+				if(this.totalCategory){
 					this.showCart = !this.showCart
 				}else{
 					uni.showToast({
@@ -309,7 +276,8 @@
 				  content: '确认要清空列表吗?',
 				  success (ret) {
 					if (ret.confirm || ret.index == 0) {
-						 
+						_this.chooseList = []
+						_this.showCart = false
 					}
 				  }
 				})
@@ -319,44 +287,9 @@
 				console.log(v,this.showCart)
 				const data = this.chooseList.find(item => item.id == v.index.split('_')[1])
 			},
-			// 删除盘点详细
-			delDetail(a,b){
-				if(b==0){
-					const data = this.chooseList[a]
-					stockCheckDetailDelete({stockCheckDetailSn: data.stockCheckDetailSn}).then(res=>{
-						if(res.status == 200){
-							this.chooseList.splice(a,1)
-							this.orderTotal = this.chooseList.length 
-							// 删除最后一个后刷新列表
-							if(this.orderTotal == 0){
-								this.showCart = false
-								this.getChooseList()
-							}
-							this.getDetail()
-						}
-					})
-				}
-			},
-			// 获取货位号
-			getShelfPlace(flag){
-				getProductPlace({ shelfSn: this.nowData.shelfSn }).then(res => {
-				  if (res.status == 200) {
-					for(let a in res.data){
-						this.placeTab.push(a)
-					}
-					// 排序
-					this.placeTab.sort(function(a,b){ return (a+'').localeCompare(b+'');});
-					if(!flag){
-					  this.curTab = ''
-					}
-				  } else {
-				    this.placeTab = []
-				  }
-				})
-			},
 			handleClear(){
-				this.curTab = ''
-				this.curType = ''
+				this.curType = []
+				this.queryKeys.map(item => item.checked = false)
 				this.clearSearch()
 			},
 			clearSearch(){
@@ -372,57 +305,27 @@
 			getpartList(){
 				const _this = this
 				let params = {
-				    pageNo: this.pageNo,
-				    pageSize: this.pageSize,
 					shelfSn: this.nowData.shelfSn,
 					queryWord: this.queryWord,
-					shelfPlaceCodeHead: this.curTab,
-					currQtyFlag: this.curType=='available' ? 1 : '',
-					freezeQtyFlag: this.curType=='blocked' ? 1 : '',
+					stockStateList: this.stockStateList
 				}
 				_this.status = 'loading'
-				getShelfProductList(params).then(res => {
+				queryProductListForReplenish(params).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
-						let list = res.data.list
-						console.log(list)
+						let list = res.data
 						if (list && list.length){
-							// 分页 拼接数据
-							if (_this.pageNo != 1) {
-								_this.partList = _this.partList ? _this.partList.concat(list) : list
-							} else {
-								_this.partList = list
-							}
-							this.total = res.data.count
-							if (_this.partList.length == res.data.count) {
-								_this.status = 'nomore'
-							} else {
-								_this.status = 'loadmore'
-							}
+							_this.partList = list
 						} else {
 							_this.partList = list || []
-							this.total = 0
-							_this.status = 'nomore'
 						}
-						_this.noDataText = '暂无匹配产品'
 					}else{
-						_this.status = 'loadmore'
 						_this.partList = []
-						_this.total = 0
-						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
 					}
 					this.showTab = false
+					this.$refs.productList.setData(_this.partList)
 				})
 			},
-			// 加载更多
-			onreachBottom () {
-				if(this.partList.length < this.total ){
-					this.pageNo++
-					this.getpartList()
-				}else{
-					this.status = "nomore"
-				}
-			},
 			// 提交盘点单
 			submitOrder(){
 				if(this.chooseList.length){
@@ -458,32 +361,15 @@
 			},
 			// 扫描结果
 			scanResult(data){
-				const params = {
-					pageNo: 1,
-					pageSize:1,
-					shelfSn: this.nowData.shelfSn
-				}
 				// 二维码
 				if(data.scanType == 'QRCODE'){
 					const ret = data.scanValue.split("&")
-					params.queryWord = ret[1] // 产品编码
+					this.queryWord = ret[1] // 产品编码
 				}else{
-					params.qrCode = data.scanValue
+					this.qrCode = data.scanValue
 				}
-				getShelfProductList(params).then(res => {
-					console.log(res)
-					if(res.status == 200){
-						if(res.data&&res.data.list.length){
-							this.toEdit(res.data.list[0])
-						}else{
-							uni.showToast({
-								icon: "none",
-								title: "产品不属于此货架,请重新扫描",
-								duration: 5000
-							})
-						}
-					}
-				})
+				this.stockStateList = []
+				this.getpartList()
 			}
 		}
 	}
@@ -545,82 +431,10 @@
 		}
 	}
 	.check-list{
-		padding: 0 0.5rem;
+		padding: 0 0.8rem;
 		flex-grow: 1;
-		.scroll-view{
-			height: calc(100vh - 260rpx);
-			box-sizing: border-box;
-		}
-		.partList-list-box{
-			padding: 20rpx 30rpx;
-			border-bottom: 2rpx solid #f5f5f5;
-			&:last-child{
-				border:0;
-			}
-			.product{
-				flex-grow: 1;
-				&:active{
-					opacity: 0.6;
-					background-color: #f8f8f8;
-				}
-				.pimgs{
-					position: relative;
-					border:2rpx solid #eee;
-					border-radius: 15rpx;
-					padding: 5rpx;
-					> text{
-						position: absolute;
-						left: 0;
-						bottom:0;
-						z-index: 500;
-						width: 100%;
-						text-align: center;
-						background: rgba(255, 0, 0, 0.6);
-						color: #fff;
-						font-size: 20upx;
-					}
-				}
-				.item-detail{
-					margin-top: 10rpx;
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-					color: #9DA8B5;
-					font-size: 26upx;
-					.item-detail-text{
-						font-size: 26upx;
-						color: #333;
-					}
-				}
-				.pinfo{
-					flex-grow: 1;
-					padding-left: 20rpx;
-					.pname{
-						font-size: 28rpx;
-						color: #191919;
-						text{
-							font-weight: normal;
-							margin-right: 6rpx;
-							padding: 0 10rpx;
-							background: rgba(3, 54, 146, 0.15);
-							border-radius: 100rpx;
-							color: #033692;
-							font-size: 24rpx;
-						}
-					}
-					.ptxt{
-						font-size: 28rpx;
-						color: #333;
-						font-weight: bold;
-						margin-top: 10upx;
-						.pnums{
-							color: #222;
-						}
-					}
-				}
-			}
-		} 
-	}
+		overflow: auto; 
+	 }
 	.footer-bar{
 		background-color: #f8f8f8;
 		padding: 20upx;
@@ -653,24 +467,21 @@
 	.tabBox{
 		height: 100vh;
 		.tabs{
-			flex-grow: 1;
 			overflow: auto;
 			padding: 20rpx;
 			> view{
 				flex-wrap: wrap;
 				justify-content: space-between;
 				> view{
-					width: 45%;
+					width: 98%;
 					border: 1rpx solid #eee;
 					padding: 15rpx;
 					border-radius: 50rpx;
 					text-align: center;
 					margin-bottom: 15rpx;
-				}
-				.active{
-					border:0;
-					background-color: #0485F6;
-					color: #fff;
+					/deep/ .u-checkbox__label{
+						flex-grow: 1;
+					}
 				}
 				&:first-child{
 					> view{
@@ -681,7 +492,7 @@
 		}
 		.btns{
 			display: flex;
-			padding: 20upx;
+			padding: 40upx 20upx 20upx;
 			justify-content: space-between;
 			.handle-btn {
 				font-size: 28upx;
@@ -748,9 +559,12 @@
 			}
 			.nav-right-item{
 				padding: 0 30upx;
+				&:last-child{
+					border-bottom:2rpx solid #eee;
+				}
 			}
 			.item-name{
-				font-size: 30rpx;
+				font-size: 26rpx;
 				text{
 					background: rgba(3, 54, 146, 0.15);
 					color: #1c588a;
@@ -759,18 +573,26 @@
 					padding: 0 0.5em;
 					margin-right: 10upx;
 				}
+				margin-top: 10upx;
 			}
 			.item-info{
-				border-bottom:2rpx solid #eee;
 				flex-grow: 1;
-				padding-left: 0.2em;
+				padding-left: 0.8em;
 			}
 			.item-detail{
 				.item-detail-info{
 					padding: 10upx 0 4upx;
 					font-size: 24upx;
+					.pnums{
+						margin-right: 10rpx;
+						color: #333;
+					}
+					.pnums1{
+						margin-right: 10rpx;
+						color: red;
+					}
 					> view{
-						padding-bottom: 20rpx;
+						padding-bottom: 10rpx;
 						align-items: center;
 						.item-detail-text{
 							color: #999;

+ 23 - 7
pages/soldOut/productList.vue

@@ -25,15 +25,22 @@
 					<view>
 					最大库容:<text class="pnums">{{item.maxQty}}</text>
 					当前库存:<text class="pnums">{{item.qty}}</text>
-					补货在途:<text class="pnums">{{item.afloatQty||0}}</text>
+					补货在途:<text class="pnums">{{item.replenishBillQty||0}}</text>
 					</view>
 				</view>
 				<view class="ptools flex align_center justify_between">
-					<view></view>
-					<view class="pcurnums flex align_center">
+					<view class="flex align_center">
+						<view v-if="item.replenishBillQty">
+							补货在途:<text class="pnums">{{item.replenishBillQty||0}}</text>
+						</view>
+						<view v-if="item.recallBillQty">
+							调回在途:<text class="pnums">{{item.recallBillQty||0}}</text>
+						</view>
+					</view>
+					<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.printQty" :min="0" :max="999999"></u-number-box>
+							<u-number-box color="#000" :long-press="false" :input-height="60" bg-color="#fff" v-model="item.replenishQty" :min="1"></u-number-box>
 						</view>
 					</view>
 				</view>
@@ -77,7 +84,7 @@
 			setData(list){
 				const _this = this
 				list.map(item => {
-					item.printQty = item.replenishBillQty
+					item.replenishQty = item.replenishBillWaitQty || 1
 					item.checked = false
 				})
 				this.partList = list
@@ -101,7 +108,7 @@
 			},
 			// 获取所有选择的
 			getAllChecked(){
-				return this.partList.filter(item => item.checked && item.printQty)
+				return this.partList.filter(item => item.checked)
 			},
 			// 获取所有数据
 			getAllData(){
@@ -149,10 +156,13 @@
 						font-size: 24rpx;
 					}
 				}
+				.pname1{
+					font-size: 26rpx;
+				}
 			}
 		}
 		.ptxt{
-			font-size: 28rpx;
+			font-size: 26rpx;
 			color: #999;
 			.pnums{
 				color: #222;
@@ -160,7 +170,13 @@
 			}
 		}
 		.ptools{
+			font-size: 26rpx;
 			margin-top: 20rpx;
+			color: #999;
+			.pnums{
+				color: #ff5500;
+				margin-right: 20upx;
+			}
 			.pcurnums{
 				> text{
 					margin-right: 20rpx;

+ 69 - 62
pages/soldOut/shelfList.vue

@@ -3,7 +3,7 @@
 		<view class="moreShelfPart-search">
 			<u-search
 			placeholder="请输入货架名称搜索" 
-			v-model="shelfName" 
+			v-model="queryParam.shelfName" 
 			:show-action="isGobleSearch" 
 			@input="change"
 			@focus="isGobleSearch=true"
@@ -15,25 +15,25 @@
 			</u-search>
 		</view>
 		<view class="flex align_center justify_between" style="padding: 10rpx 20rpx 20rpx;">
-			<view class="flex align_center">
+			<view class="flex align_center" @click="sortList('productCategory',0)">
 				<text>待补货产品款数</text>
-				<view class="flex flex_column" style="margin-left: 5rpx;">
-					<u-icon name="arrow-up-fill" size="12" color="#333"></u-icon>
-					<u-icon name="arrow-down-fill" size="12" color="#ccc"></u-icon>
+				<view class="flex flex_column" style="margin-left: 5rpx;" >
+					<u-icon name="arrow-up-fill" size="10" :color="sortVal0=='ASC'?'#666':'#ccc'"></u-icon>
+					<u-icon name="arrow-down-fill" size="10" :color="sortVal0=='DESC'?'#666':'#ccc'"></u-icon>
 				</view>
 			</view>
-			<view class="flex align_center">
+			<view class="flex align_center" @click="sortList('productQty',1)">
 				<text>待补货产品数量</text>
 				<view class="flex flex_column" style="margin-left: 5rpx;">
-					<u-icon name="arrow-up-fill" size="12" color="#ccc"></u-icon>
-					<u-icon name="arrow-down-fill" size="12" color="#ccc"></u-icon>
+					<u-icon name="arrow-up-fill" size="10" :color="sortVal1=='ASC'?'#666':'#ccc'"></u-icon>
+					<u-icon name="arrow-down-fill" size="10" :color="sortVal1=='DESC'?'#666':'#ccc'"></u-icon>
 				</view>
 			</view>
-			<view class="flex align_center">
+			<view class="flex align_center" @click="sortList('lastDate',2)">
 				<text>最后一次补货时间</text>
 				<view class="flex flex_column" style="margin-left: 5rpx;">
-					<u-icon name="arrow-up-fill" size="12" color="#ccc"></u-icon>
-					<u-icon name="arrow-down-fill" size="12" color="#ccc"></u-icon>
+					<u-icon name="arrow-up-fill" size="10" :color="sortVal2=='ASC'?'#666':'#ccc'"></u-icon>
+					<u-icon name="arrow-down-fill" size="10" :color="sortVal2=='DESC'?'#666':'#ccc'"></u-icon>
 				</view>
 			</view>
 		</view>
@@ -50,17 +50,17 @@
 						<view class="item-detail">
 							<view>
 								待补货产品款数:
-								<text class="item-detail-text">{{item.shelfPlaceBindNum}}</text>
+								<text class="item-detail-text">{{item.productCategory}}</text>
 							</view>
 							<view>
 								待补货产品数量:
-								<text class="item-detail-text">{{item.shelfPlaceNum}}</text>
+								<text class="item-detail-text">{{item.productQty}}</text>
 							</view>
 						</view>
 						<view class="item-detail">
 							<view>
 								最后一次补货时间:
-								<text class="item-detail-text">{{item.createDate}}</text>
+								<text class="item-detail-text">{{item.lastDate}}</text>
 							</view>
 						</view>
 					</view>
@@ -80,11 +80,10 @@
 </template>
 
 <script>
-	import { getShelfList, shelfSave } from '@/api/shelf'
+	import { queryListForReplenish } from '@/api/shelf'
 	export default {
 		data() {
 			return {
-				shelfName: '',
 				isGobleSearch: false,
 				shelfList: [],
 				pageNo:1,
@@ -92,13 +91,18 @@
 				total: 0, // 列表总数
 				noDataText: '暂无货架',
 				status: 'loading',
-				tempData: null
+				tempData: null,
+				allList: [],
+				sortVal0:'',
+				sortVal1:'',
+				sortVal2:'',
+				queryParam: {
+				  shelfName: ''
+				}
 			}
 		},
 		onLoad(opts) {
-			uni.$on("setCustome",(data)=>{
-				this.saveShelf(data)
-			})
+			 
 		},
 		onUnload() {
 			uni.$off("setCustome")
@@ -108,7 +112,7 @@
 		},
 		methods: {
 			clearSearch(){
-				this.shelfName = ''
+				this.queryParam.shelfName = ''
 				this.search()
 			},
 			change(v){
@@ -116,52 +120,47 @@
 					this.clearSearch()
 				}
 			},
+			// 排序
+			sortList(key,index){
+				// 重置其它排序字段为空
+				for(let i=0;i<3;i++){
+					if(i!=index){
+						this['sortVal'+i] = ''
+					}
+				}
+				const val = this['sortVal'+index]
+				if(val==''){
+					this['sortVal'+index] = 'ASC'
+				}
+				if(val=='ASC'){
+					this['sortVal'+index] = 'DESC'
+				}
+				if(val=='DESC'){
+					this['sortVal'+index] = ''
+				}
+				
+				this.queryParam.queryWord = key
+				this.queryParam.orderBy = this['sortVal'+index]
+				this.search()
+			},
 			search(){
 				this.pageNo = 1
 				this.shelfList = []
 				this.getShelfList()
 			},
-			// 关联客户
-			saveShelf(data){
-				uni.showLoading({
-					mask: true,
-					title: '正在关联客户...'
-				})
-				shelfSave({
-					shelfSn: this.tempData.shelfSn,
-					customerSn: data.customerSn
-				}).then(res => {
-					if(res.status == 200){
-						uni.navigateTo({
-							url: "/pages/shelfSetting/shelfSet?shelfSn="+this.tempData.shelfSn
-						})
-					}
-					uni.hideLoading()
-				})
-			},
 			// 获取数字货架列表
 			getShelfList(){
 				const _this = this
-				let params = {
-				    pageNo: this.pageNo,
-				    pageSize: this.pageSize,
-					shelfName: this.shelfName
-				}
 				_this.status = 'loading'
-				getShelfList(params).then(res => {
+				queryListForReplenish(this.queryParam).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
-						let list = res.data.list
+						let list = res.data
 						if (list && list.length){
 							// 分页 拼接数据
-							if(_this.pageNo>1){
-								_this.shelfList = _this.shelfList.concat(res.data.list || [])
-							}else{
-								_this.shelfList = res.data.list
-							}
-							_this.total = res.data.count
-							console.log(res.data.count)
-							if (_this.shelfList.length == res.data.count) {
+							_this.shelfList = res.data.slice(0,this.pageSize)
+							_this.total = res.data.length
+							if (_this.shelfList.length == res.data.length) {
 								_this.status = 'nomore'
 							} else {
 								_this.status = 'loadmore'
@@ -172,10 +171,12 @@
 							_this.status = 'nomore'
 							_this.noDataText = '没有查询到相关货架'
 						}
+						_this.allList = res.data
 						_this.noDataText = '暂无货架'
 					}else{
 						_this.status = 'loadmore'
 						_this.shelfList = []
+						_this.allList = []
 						_this.total = 0
 						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
 					}
@@ -184,21 +185,27 @@
 			// 加载更多
 			onreachBottom () {
 				if(this.shelfList.length < this.total ){
-					if(this.isGobleSearch&&this.shelfName==''){
+					if(this.isGobleSearch&&this.queryParam.shelfName==''){
 						return
 					}
 					this.pageNo++
-					this.getShelfList()
+					const s = (this.pageNo-1)*this.pageSize
+					const e = s + this.pageSize
+					this.shelfList = this.shelfList.concat(this.allList.slice(s,e))
 				}else{
 					this.status = "nomore"
 				}
 			},
-			viewDetail(item){
-				this.tempData = item
-				uni.navigateTo({
-					url: "/pages/soldOut/creatOrder?data="+encodeURIComponent(JSON.stringify(this.tempData))
-				})
-			}
+			viewDetail (row) {
+			  if (row.productCategory) {
+			    this.tempData = row
+			    uni.navigateTo({
+			    	url: "/pages/soldOut/creatOrder?data="+encodeURIComponent(JSON.stringify(this.tempData))
+			    })
+			  } else {
+			    this.$message.info('此货架没有待补货产品')
+			  }
+			},
 		}
 	}
 </script>