lilei 2 سال پیش
والد
کامیت
a658f2a330
9فایلهای تغییر یافته به همراه1306 افزوده شده و 3 حذف شده
  1. 120 0
      api/stockCheck.js
  2. 1 1
      config/index.js
  3. 1 0
      libs/axios.js
  4. 18 0
      pages.json
  5. 11 2
      pages/index/index.vue
  6. 150 0
      pages/stockCheck/editModal.vue
  7. 104 0
      pages/stockCheck/freezeQtyModal.vue
  8. 227 0
      pages/stockCheck/shelfList.vue
  9. 674 0
      pages/stockCheck/startCheck.vue

+ 120 - 0
api/stockCheck.js

@@ -0,0 +1,120 @@
+import axios from '@/libs/axios.js'
+
+// 盘点完成
+export const stockCheckConfirm = (params) => {
+	let url = `shelfStockCheck/confirm/${params.stockCheckSn}`
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 盘点-删除
+export const stockCheckDeleteBySn = (params) => {
+	let url = `shelfStockCheck/deleteBySn/${params.stockCheckSn}`
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 盘点明细-删除
+export const stockCheckDetailDelete = (params) => {
+	let url = `shelfStockCheck/detail/deleteBySn/${params.stockCheckDetailSn}`
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 盘点明细-详情
+export const stockCheckDetailBySn = (params) => {
+	let url = `shelfStockCheck/detail/queryBySn/${params.stockCheckDetailSn}`
+	return axios.request({
+		url: url,
+		method: 'get'
+	})
+}
+// 盘点明细-分页列表
+export const stockCheckDetailQueryPage = (params) => {
+	let url = `shelfStockCheck/detail/queryPage/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 盘点明细-列表
+export const stockCheckDetailQueryList = (params) => {
+	let url = `shelfStockCheck/detail/queryList/${params.stockCheckSn}`
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 盘点明细-保存
+export const stockCheckDetailSave = (params) => {
+	let url = `shelfStockCheck/detail/save`
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 盘点-详情
+export const stockCheckBySn = (params) => {
+	let url = `shelfStockCheck/queryBySn/${params.stockCheckSn}`
+	return axios.request({
+		url: url,
+		method: 'get'
+	})
+}
+// 盘点-分页列表
+export const stockCheckQueryPage = (params) => {
+	let url = `shelfStockCheck/queryPage/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+
+// 查询货架待取货状态的订单明细
+export const queryWaitListByShelfSn = (params) => {
+	let url = `shelfStockCheck/queryWaitListByShelfSn/${params.shelfSn}`
+	return axios.request({
+		url: url,
+		method: 'get'
+	})
+}
+
+// 查看经销商未完结的盘点单数量
+export const queryStockCheckWaitStateNum = (params) => {
+	let url = `shelfStockCheck/queryWaitStateNum`
+	return axios.request({
+		url: url,
+		method: 'get'
+	})
+}
+// 盘点-保存
+export const stockCheckSave = (params) => {
+	let url = `shelfStockCheck/save`
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 选择货架盘点单
+export const selectShelfStockCheck = (params) => {
+	let url = `shelfStockCheck/selectShelfStockCheck`
+	return axios.request({
+		url: url,
+		method: 'get'
+	})
+}

+ 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.215:8076/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.0.182:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 1 - 0
libs/axios.js

@@ -27,6 +27,7 @@ const request = (opts, hasToken) => {
 	let promise = new Promise(function(resolve, reject) {
 		uni.request(DefaultOpts).then(
 			(res) => {
+				console.log(res,'----------')
 				// 是否超时已跳转
 				let loginTimeOut = uni.getStorageSync('loginTimeOut');
 				if(res[0]&&res[0].errMsg.indexOf('request:fail')>=0){

+ 18 - 0
pages.json

@@ -433,6 +433,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/stockCheck/shelfList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "选择货架",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/stockCheck/startCheck",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "库存盘点",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 11 - 2
pages/index/index.vue

@@ -32,9 +32,10 @@
 				 </div>
 				 <div class="title">门店审核</div>
 			 </div>
-			 <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')">
+			 <div class="graid-box-1" @click="toPage('/pages/stockCheck/shelfList')">
 				 <div class="icon">
 					<u-icon name="icon_warehousing" custom-prefix="iscm-icon" size="65"></u-icon>
+					<u-badge type="error" size="mini" :offset="[-5,20]" :count="stockCheckNums"></u-badge>
 				 </div>
 				 <div class="title">库存盘点</div>
 			 </div>
@@ -47,6 +48,7 @@
 <script>
 	import iconItemsList from '@/components/icon-items-list/icon-items-list.vue';
 	import { shelfReplenishStateCount } from '@/api/shelfReplenish'
+	import { queryStockCheckWaitStateNum } from '@/api/stockCheck'
 	import { xprhStoreApplyQueryPage } from '@/api/approveStore'
 	export default {
 		components: {
@@ -57,7 +59,8 @@
 				// 数字货架
 				storageRacksNavList: [],
 				theme: '',
-				storeAuthNums: 0
+				storeAuthNums: 0,
+				stockCheckNums: 0
 			}
 		},
 		onLoad() {
@@ -107,6 +110,7 @@
 		onShow() {
 			this.queryByTypeSum()
 			this.getStoreNums()
+			this.getStockCheckNums()
 		},
 		methods:{
 			toPage(url){
@@ -126,6 +130,11 @@
 				xprhStoreApplyQueryPage({pageNo:1,pageSize:1,auditStatus:'WAIT'}).then(res => {
 					 this.storeAuthNums = res.data.count || 0
 				})
+			},
+			getStockCheckNums(){
+				queryStockCheckWaitStateNum().then(res => {
+					 this.stockCheckNums = res.data || 0
+				})
 			}
 		}
 	}

+ 150 - 0
pages/stockCheck/editModal.vue

@@ -0,0 +1,150 @@
+<template>
+	<u-mask class="productModal" :show="isShow" :mask-click-able="false">
+		<view class="product-con">
+			<view class="product-main">
+				 <view class="p-title">
+					 <text>[{{infoData.shelfPlaceCode}}]</text> {{infoData.productCode}}
+				 </view>
+				 <view class="p-info flex align_center">
+					 <text>产品名称</text> {{infoData.productEntity.productName}}
+				 </view>
+				 <view class="p-info flex align_center">
+				 	<text>单位</text> {{infoData.productEntity.unit}}
+				 </view>
+				 <view class="p-info flex align_center">
+				 	<text>可用库存</text> {{infoData.qty}}
+				 </view>
+				 <view class="p-info flex align_center">
+				 	<text>冻结库存</text>
+					<view class="flex align_center">
+						{{infoData.freezeQty}}
+						<view>
+							<text>冻结明细</text>
+							<u-icon name="arrow-right"></u-icon>
+						</view>
+					</view>
+				 </view>
+				 <view class="p-info flex align_center">
+				 	<text>结算价格</text>
+					<view>
+						<text>{{infoData.price}}</text> 元
+					</view>
+				 </view>
+				 <view class="p-info flex align_center">
+				 	<text>实际可用库存</text>
+					<view>
+						<u-number-box v-model="infoData.checkQty" :index="infoData.id" :min="0" :max="infoData.maxQty||999999"></u-number-box>
+					</view>
+				 </view>
+			</view>
+			<view class="product-footer">
+				<view class="button-cancel" @click="isShow=false">取消</view>
+				<view class="button-confirm" @click="handleConfirm">确定</view>
+			</view>
+		</view>
+	</u-mask>
+</template>
+
+<script>
+	import { stockCheckDetailSave } from '@/api/stockCheck'
+	export default {
+		props: {
+			openModal: { //  弹框显示状态
+				type: Boolean,
+				default: false
+			},
+			infoData: {
+				tyoe: Object,
+				default: ()=>{
+					return null
+				}
+			},
+		},
+		data() {
+			return {
+				isShow: this.openModal, //  是否打开弹框
+			}
+		},
+		methods: {
+			// 确认
+			handleConfirm(){
+				this.$emit('addProduct',{
+					shelfSn: this.infoData.shelfSn,
+					shelfPlaceSn: this.infoData.shelfPlaceSn,
+					shelfPlaceCode: this.infoData.shelfPlaceCode,
+					productCode: this.infoData.productCode,
+					stockQty: this.infoData.stockQty,
+					freezeQty: this.infoData.freezeQty,
+					checkQty: this.infoData.checkQty,
+				})
+			},
+		},
+		watch: {
+			//  父页面传过来的弹框状态
+			openModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.productModal{
+		width: 100%;
+		height: 100%;
+		.text-c{
+			text-align: center;
+		}
+		.product-con{
+			width: 78%;
+			margin: 30vh auto 0;
+			background-color: #fff;
+			border-radius: 24upx;
+			.product-main{
+				padding: 60upx 20upx 50upx;
+				max-height: 50vh;
+				overflow: auto;
+				.p-title{
+					padding: 20upx 30upx;
+					background-color: #999;
+					border-radius: 60upx;
+				}
+				.p-info{
+					padding: 20upx 30upx;
+					> text{
+						width: 100upx;
+						color: #999;
+					}
+					> view{
+						flex-grow:1;
+					}
+				}
+			}
+			.product-footer{
+				font-size: 30upx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				text-align: center;
+				border-top: 1upx solid #E5E5E5;
+				.button-cancel{
+					color: #999;
+					border-right: 1upx solid #E5E5E5;
+					flex-grow: 1;
+					padding: 20upx 0;
+				}
+				.button-confirm{
+					color: #2A86F4;
+					flex-grow: 1;
+					padding: 20upx 0;
+				}
+			}
+		}
+	}
+</style>

+ 104 - 0
pages/stockCheck/freezeQtyModal.vue

@@ -0,0 +1,104 @@
+<template>
+	<u-mask class="productModal" :show="isShow" :mask-click-able="false">
+		<view class="product-con">
+			<view class="product-main">
+				 <view v-for="item in list" :key="item.id">22</view>
+			</view>
+			<view class="product-footer">
+				<view class="button-cancel" @click="isShow=false">取消</view>
+				<view class="button-confirm" @click="handleConfirm">确定</view>
+			</view>
+		</view>
+	</u-mask>
+</template>
+
+<script>
+	import { queryWaitListByShelfSn } from '@/api/stockCheck'
+	export default {
+		props: {
+			openModal: { //  弹框显示状态
+				type: Boolean,
+				default: false
+			},
+			infoData: {
+				tyoe: Object,
+				default: ()=>{
+					return null
+				}
+			},
+		},
+		data() {
+			return {
+				isShow: this.openModal, //  是否打开弹框
+				list: []
+			}
+		},
+		methods: {
+			// 确认
+			handleConfirm(){
+				 
+			},
+			// 获取列表数据
+			getList(){
+				queryWaitListByShelfSn({shelfSn: this.infoData.shelfSn}).then(res => {
+					if(res.status == 200){
+						this.list = res.data||[]
+					}
+				})
+			}
+		},
+		watch: {
+			//  父页面传过来的弹框状态
+			openModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}else{
+					this.getList()
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.productModal{
+		width: 100%;
+		height: 100%;
+		.text-c{
+			text-align: center;
+		}
+		.product-con{
+			width: 78%;
+			margin: 55% auto 0;
+			background-color: #fff;
+			border-radius: 24upx;
+			.product-main{
+				padding: 60upx 20upx 50upx;
+				 
+			}
+			.product-footer{
+				font-size: 30upx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				text-align: center;
+				border-top: 1upx solid #E5E5E5;
+				.button-cancel{
+					color: #999;
+					border-right: 1upx solid #E5E5E5;
+					flex-grow: 1;
+					padding: 20upx 0;
+				}
+				.button-confirm{
+					color: #2A86F4;
+					flex-grow: 1;
+					padding: 20upx 0;
+				}
+			}
+		}
+	}
+</style>

+ 227 - 0
pages/stockCheck/shelfList.vue

@@ -0,0 +1,227 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="moreShelfPart-search">
+			<u-search
+			placeholder="请输入货架名称搜索" 
+			v-model="shelfName" 
+			:show-action="isGobleSearch" 
+			@input="change"
+			@focus="isGobleSearch=true"
+			@blur="isGobleSearch=false"
+			@custom="getShelfList" 
+			@search="getShelfList" 
+			@clear="clearSearch"
+			:action-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', 'padding': '12upx 0'}">
+			</u-search>
+		</view>
+		<view class="moreShelfPart-body">
+			<view class="nav-right">
+				<view 
+				class="nav-right-item" 
+				v-for="(item, index) in shelfList" 
+				:key="item.id" 
+				>
+					<view class="item-info" @click="viewDetail(item)">
+						<view class="item-name">
+							<text>{{item.shelfName}}</text>
+						</view>
+						<view class="item-detail">
+							<view>
+								产品款数:
+								<text class="item-detail-text">{{item.totalCategory}}</text>
+							</view>
+							<view>
+								可用库存:
+								<text class="item-detail-text">{{item.totalStockQty}}</text>
+							</view>
+							<view>
+								冻结库存:
+								<text class="item-detail-text">{{item.totalFreezeQty}}</text>
+							</view>
+						</view>
+					</view>
+					<view class="item-info button-box justify_between align_center" v-if="item.checkState=='WAIT'">
+						<text>{{item.checkStateDictValue}}</text>
+						<view>
+							<u-button @click.stop="delCheck(item)" size="mini" :hair-line="false" shape="circle" plain type="error" hover-class="none" >删除盘点</u-button>
+							<u-button @click.stop="viewDetail(item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" >继续盘点</u-button>
+						</view>
+					</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="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+				</view>
+				<view style="padding: 20upx;">
+					<u-loadmore :status="status" />
+				</view>
+			</view>
+		</view>
+		<freezeQtyModal :openModal="showModal" :infoData="tempData"></freezeQtyModal>
+	</view>
+</template>
+
+<script>
+	import { selectShelfStockCheck, stockCheckDeleteBySn } from '@/api/stockCheck'
+	import freezeQtyModal from './freezeQtyModal'
+	import { clzConfirm } from '@/libs/tools'
+	export default {
+		components: {
+			freezeQtyModal
+		},
+		data() {
+			return {
+				shelfName: '',
+				isGobleSearch: false,
+				shelfList: [],
+				noDataText: '暂无货架',
+				status: 'loading',
+				tempData: null,
+				showModal: false
+			}
+		},
+		onLoad(opts) {
+			this.getShelfList()
+			uni.$on("setCustome",(data)=>{
+				this.pageNo = 1
+				this.shelfList = []
+				this.getShelfList()
+			})
+		},
+		onUnload() {
+			uni.$off("setCustome")
+		},
+		methods: {
+			clearSearch(){
+				this.shelfName = ''
+				this.shelfList = []
+				this.getShelfList()
+			},
+			change(v){
+				if(v==''){
+					this.clearSearch()
+				}
+			},
+			// 获取数字货架列表
+			getShelfList(){
+				const _this = this
+				_this.status = 'loading'
+				selectShelfStockCheck().then(res => {
+					uni.hideLoading()
+					if(res.data&&res.data.length){
+						let list = res.data.filter(item => item.shelfName.indexOf(this.shelfName)>=0)
+						if (list && list.length){
+							_this.status = 'nomore'
+							_this.shelfList = list
+						} else {
+							_this.shelfList = []
+							_this.status = 'nomore'
+							_this.noDataText = '没有查询到相关货架'
+						}
+					}else{
+						_this.status = 'loadmore'
+						_this.shelfList = []
+						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+					}
+				})
+			},
+			// 删除盘点单
+			delCheck(row){
+				const _this = this
+				clzConfirm({
+				  title: '提示',
+				  content: '删除后不可恢复,确定删除吗?',
+				  success (ret) {
+					if (ret.confirm || ret.index == 0) {
+						uni.showLoading({
+							title:"正在删除.."
+						})
+						stockCheckDeleteBySn({ stockCheckSn: row.stockCheckSn }).then(res => {
+						  if (res.status == 200) {
+							  uni.showToast({
+								icon: "none",
+								title: res.message
+							  })
+							  _this.getShelfList()
+						  }
+						  uni.hideLoading()
+						})
+					}
+				  }
+				})
+			},
+			viewDetail(item){
+				this.tempData = item
+				// 如果有冻结库存
+				if(item.totalFreezeQty>0){
+					 this.showModal = true
+				}else{
+					// 去库存盘点
+					uni.navigateTo({
+						url:"/pages/stockCheck/startCheck?data="+encodeURIComponent(JSON.stringify(item))
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.moreShelfPart{
+		width: 100%;
+		height: 100vh;
+		.moreShelfPart-search{
+			padding: 20rpx;
+			background-color: #FFFFFF;
+		}
+		.moreShelfPart-body{
+			flex-grow: 1;
+			background-color: #fff;
+		}
+		.nav-right{
+			padding: 0 30upx;
+			height: calc(100vh - 110rpx);
+			box-sizing: border-box;
+			 
+			.nav-right-item{
+				padding:20upx;
+				border: 2rpx solid #f5f5f5;
+				border-radius: 15upx;
+				margin-bottom: 20upx;
+				box-shadow: 2rpx 3rpx 5rpx #f8f8f8;
+				&:active{
+					background: #f8f8f8;
+				}
+				.item-info{
+					.item-name{
+						font-size: 30upx;
+						display: flex;
+						align-items: center;
+					}
+					.item-detail{
+						margin-top: 15rpx;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						color: #9DA8B5;
+						font-size: 26upx;
+						.item-detail-text{
+							font-size: 26upx;
+							color: #333;
+						}
+					}
+				}
+				.button-box{
+					display: flex;
+					margin-top: 20upx;
+					button{
+						margin: 0 10upx;
+					}
+					> text{
+						font-size: 24upx;
+						color: #00aaff;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 674 - 0
pages/stockCheck/startCheck.vue

@@ -0,0 +1,674 @@
+<template>
+	<view class="content flex flex_column">
+		<view class="searchBar">
+			<view class="p-title flex align_center">
+				<view class="shelfName flex align_center"><text></text>{{nowData.shelfName}}</view>
+				<view class="btns" @click="showTab = true">筛选<u-icon name="more-circle"></u-icon></view>
+			</view>
+			<view class="search flex align_center">
+				<view class="input">
+					<u-search 
+					focus
+					v-model="queryWord" 
+					@input="change"
+					@custom="getpartList" 
+					@search="getpartList" 
+					@clear="clearSearch" 
+					bg-color="#fff" 
+					:action-style="{border:'0.1rpx solid #00aaff',borderRadius:'50rpx',color:'#00aaff'}" 
+					placeholder="请输入产品编码或名称搜索"></u-search>
+				</view>
+				<view class="icon" @click="toScan">
+					<u-icon name="scan"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="check-list">
+			<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
+				<view class="partList-list-box" v-for="item in partList" :key="item.id">
+					<view class="product" @click="toEdit(item)">
+						<view class="flex align_center flex_1">
+							<view class="pimgs">
+								<u-image :src="item.productEntity&&item.productEntity.images?item.productEntity.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+							</view>
+							<view class="pinfo">
+								<view class="pname">
+									<text>{{item.shelfPlaceCode}}</text>{{item.productEntity&&item.productEntity.code}}
+								</view>
+								<view class="ptxt flex align_center justify_between">
+									<view>
+										<text class="pcode">{{item.productEntity&&item.productEntity.productName}}</text>
+									</view>
+								</view>
+								<view class="item-detail">
+									<view>
+										可用库存:
+										<text class="item-detail-text">{{item.qty}}</text>
+										{{item.productEntity&&item.productEntity.unit}}
+									</view>
+									<view>
+										冻结库存:
+										<text class="item-detail-text">{{item.freezeQty}}</text>
+										{{item.productEntity&&item.productEntity.unit}}
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="partList&&partList.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'">
+					<u-loadmore :status="status" />
+				</view>
+			</scroll-view>
+		</view>
+		<!-- 底部栏 -->
+		<view class="footer-bar flex align_center">
+			<view class="f-left" :style="{background:orderTotal?$config('primaryColor'):''}">
+				<u-icon name="order" size="45"></u-icon>
+				<u-badge type="error" size="mini" :offset="[-10,-10]" :count="orderTotal"></u-badge>
+			</view>
+			<view class="f-mid">
+				盘盈总数:<text>3</text>
+				盘亏总数:<text>3</text>
+			</view>
+			<view class="f-btns">
+				<u-button size="medium" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >提交盘点单</u-button>
+			</view>
+		</view>
+		<!-- 已选配件 购物车 -->
+		<div class="cpb_cart-mask" v-if="showCart">
+			<div class="cpb_cart-box">
+				<div class="cpb_close flex align-center justify_center" @click="showCart=false">
+					<u-icon name="close"></u-icon>
+				</div>
+				<div class="cpb_cart-tit">
+					<view>已选配件</view>
+					<view class="cpb_heji flex align_center justify_between">
+						<text>清空列表</text>
+						<view>
+							盈亏总数量:
+							<text>
+								-2334
+							</text>
+							盈亏总金额:
+							<text>
+								¥-254
+							</text>
+						</view>
+					</view>
+				</div>
+				<div class="cpb_cart-list">
+					<view class="nav-right-item flex" v-for="(item, index) in chooseList" :key="item.id">
+						<view class="uni-col-2">
+							<u-image :src="item.productEntity&&item.productEntity.images?item.productEntity.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="100" height="100" border-radius="30"></u-image>
+						</view>
+						<view class="item-info uni-col-10">
+							<view class="item-name">
+								<text>{{item.productEntity&&item.productEntity.code}}</text>
+								{{item.productEntity&&item.productEntity.productName}}
+							</view>
+							<view class="item-detail">
+								<view class="item-detail-info">
+									<view class="flex justify_end">
+										<text class="item-detail-text">
+											可用:{{item.qty?item.qty:0}} {{item.productEntity&&item.productEntity.unit}}
+										</text>
+										<text class="item-detail-text">
+											冻结:{{item.freezeQty?item.freezeQty:0}} {{item.productEntity&&item.productEntity.unit}}
+										</text>
+									</view>
+								</view>
+							</view>
+							<view class="item-detail">
+								<view class="item-detail-info">
+									<view class="flex justify_end">
+										 <view class="item-detail-text">
+										 	实际可用:
+										 	<u-number-box v-model="item.qty" :index="'cart_'+item.id" :min="0" :max="item.qty||999999"></u-number-box>
+										 </view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</div>
+			</div>
+		</div>
+		<!-- 编辑弹框 -->
+		<editModal :openModal="editModal" :infoData="tempData" @close="editModal=false"></editModal>
+		<!-- 筛选项 -->
+		<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='available'">有可用库存的产品</view>
+						<view :class="'blocked'==curType?'active':''" @click="curType='blocked'">有冻结库存的产品</view>
+					</view>
+					<view class="flex">
+						<view :class="item==curTab?'active':''" v-for="item in placeTab" :key="item" @click="curTab=item">{{item}}层</view>
+					</view>
+				</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>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import { getShelfProductList,getProductPlace } from '@/api/shelf'
+	import { stockCheckDetailQueryList, stockCheckDetailDelete, stockCheckSave, stockCheckBySn } from '@/api/stockCheck'
+	import editModal from './editModal'
+	export default {
+		components: {
+			editModal
+		},
+		data() {
+			return {
+				queryWord: '',
+				nowData:null,
+				detail:null,
+				pageNo:1,
+				pageSize: 10,
+				total: 0, // 列表总数
+				noDataText: '暂无产品',
+				status: 'loading',
+				partList: [],
+				showTab: false,
+				placeTab: [],
+				curTab: '',
+				curType: '',
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				orderTotal: 0,
+				showCart: false,
+				chooseList: [],
+				editModal: false,
+				tempData: null
+			}
+		},
+		onLoad(opts) {
+			this.nowData = JSON.parse(decodeURIComponent(opts.data));
+			this.getpartList()
+			this.getShelfPlace()
+			
+			if(this.nowData.stockCheckSn){
+				// 获取盘点单明细
+				this.getDetail()
+				// 获取盘点明细列表
+				this.getChooseList()
+			}
+		},
+		methods: {
+			// 获取盘点明细列表
+			getChooseList(){
+				stockCheckDetailQueryList({
+					stockCheckSn: this.nowData.stockCheckSn
+				}).then(res => {
+					this.chooseList = res.data || []
+				})
+			},
+			// 详细
+			getDetail(){
+				stockCheckBySn({stockCheckSn: this.nowData.stockCheckSn}).then(res => {
+					this.detail = res.data || null
+				})
+			},
+			//添加产品
+			toEdit(item){
+				item.checkQty = item.qty
+				this.tempData = item
+				this.editModal = true
+			},
+			// 添加产品明细
+			addProduct(data){
+				// 是否第一次添加产品
+				if(this.chooseList.length==0){
+					// 先创建盘点单
+					stockCheckSave({
+						 shelfSn: this.nowData.shelfSn,
+						 totalCategory: this.nowData.totalCategory,
+						 totalStockQty: this.nowData.totalStockQty,
+						 totalFreezeQty: this.nowData.totalFreezeQty
+					}).then(res => {
+						 if(res.status == 200){
+							 this.detail = res.data || null
+							 this.saveProduct(data)
+						 }
+					})
+				}else{
+					this.saveProduct(data)
+				}
+			},
+			saveProduct(data){
+				stockCheckDetailSave({
+					stockCheckSn: this.detail.stockCheckSn,
+					stockCheckNo: this.detail.stockCheckNo,
+					...data
+				}).then(res => {
+					if(res.status == 200){
+					}
+				})
+			},
+			// 获取货位号
+			getShelfPlace(flag){
+				getProductPlace({ shelfSn: this.nowData.shelfSn }).then(res => {
+				  if (res.status == 200) {
+					for(let a in res.data){
+						this.placeTab.push(a)
+					}
+					if(!flag){
+					  this.curTab = ''
+					}
+				  } else {
+				    this.placeTab = []
+				  }
+				})
+			},
+			handleClear(){
+				this.curTab = ''
+				this.curType = ''
+				this.clearSearch()
+			},
+			clearSearch(){
+				this.queryWord = ''
+				this.pageNo = 1
+				this.partList = []
+				this.getpartList()
+			},
+			change(v){
+				if(v==''){
+					this.clearSearch()
+				}
+			},
+			// 获取数字货架列表
+			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 : '',
+				}
+				_this.status = 'loading'
+				getShelfProductList(params).then(res => {
+					uni.hideLoading()
+					if(res.status == 200){
+						let list = res.data.list
+						console.log(list)
+						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'
+							}
+						} 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
+				})
+			},
+			// 加载更多
+			onreachBottom () {
+				if(this.partList.length < this.total ){
+					this.pageNo++
+					this.getpartList()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 扫描
+			toScan(){
+				this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
+				this.mpaasScanModule.scan(
+				{
+					"scanMode":"Customized",
+					"scanStyle":{
+						"scanFrameSizePlus":{"width":250,"height":250},
+						"scanFrameSize":200,
+						"scanLight":"visible",
+						"scanText":"对准条形码/二维码进行识别",
+						"scanTitle":"扫码搜索货位产品",
+					}
+				},
+				(result) => {
+					console.log(result)
+					if(result.scanStatus == 1){
+						this.scanResult(result)
+					}
+				})
+			},
+			// 扫描结果
+			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] // 产品编码
+				}else{
+					params.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
+							})
+						}
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	height: 100vh;
+	width: 100%;
+	background: #fff;
+	.searchBar{
+		padding: 0 0.5rem;
+		.p-title{
+			padding: 0 20rpx;
+			display: flex;
+			align-items: center;
+			color: #222;
+			font-size: 32rpx;
+			.shelfName{
+				width: 80%;
+				flex-grow: 1;
+				font-weight: bold;
+				text{
+					display: block;
+					height: 30rpx;
+					width: 6rpx;
+					background: #0485F6;
+					margin-right: 10rpx;
+					border-radius: 10rpx;
+				}
+			}
+			.btns{
+				width:100rpx;
+				text-align: right;
+				font-size: 28rpx;
+			}
+		}
+		.search{
+			padding: 0.5rem 0.5rem 0.3rem 0.5rem;
+			.input{
+				flex-grow: 1;
+				border:0.1rpx solid #eee;
+				padding: 0.1rpx;
+				border-radius: 50rpx;
+				padding-right: 10rpx;
+			}
+			.icon{
+				width: 10%;
+				text-align: center;
+				font-size: 50rpx;
+				color: #999;
+			}
+		}
+	}
+	.check-list{
+		padding: 0 0.5rem;
+		flex-grow: 1;
+		.scroll-view{
+			height: calc(100vh - 180rpx);
+			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;
+				}
+				.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;
+						}
+					}
+				}
+			}
+		} 
+	}
+	.footer-bar{
+		background-color: #f8f8f8;
+		padding: 52upx 20upx;
+		.f-left{
+			background-color: #d8d8d8;
+			padding: 15upx;
+			border-radius: 100upx;
+			color: #fff;
+			position: relative;
+		}
+		.active{
+			background-color: #0485F6;
+		}
+		.f-mid{
+			flex-grow: 1;
+			text{
+				margin-right: 15upx;
+				&:first-child{
+					color: #00cb00;
+				}
+				&:last-child{
+					color: red;
+				}
+			}
+			padding: 0 15upx;
+			font-size: 0.8rem;
+			color: #666;
+		}
+		.f-btns{
+			button{
+				width: 200upx;
+			}
+		}
+	}
+	// 筛选
+	.tabBox{
+		height: 100vh;
+		.tabs{
+			flex-grow: 1;
+			overflow: auto;
+			padding: 20rpx;
+			> view{
+				flex-wrap: wrap;
+				justify-content: space-between;
+				> view{
+					width: 45%;
+					border: 0.1rpx solid #eee;
+					padding: 15rpx;
+					border-radius: 50rpx;
+					text-align: center;
+					margin-bottom: 15rpx;
+				}
+				.active{
+					border:0;
+					background-color: #0485F6;
+					color: #fff;
+				}
+				&:first-child{
+					> view{
+						width: 100%;
+					}
+				}
+			}
+		}
+		.btns{
+			display: flex;
+			padding: 20upx;
+			justify-content: space-between;
+			.handle-btn {
+				font-size: 28upx;
+			}
+		}
+	}
+	
+	// 购物车
+	.cpb_cart-mask{
+		position: fixed;
+		width: 100%;
+		background: rgba(0,0,0,0.5);
+		z-index: 10000;
+		bottom: 100rpx;
+		top: 0;
+	}
+	.cpb_cart-box{
+		background-color: #fff;
+		position: absolute;
+		width: 100%;
+		z-index: 1000;
+		bottom: 0;
+		border-radius: 30rpx 30rpx 0 0;
+		max-height: 70vh;
+		display: flex;
+		flex-direction: column;
+		.cpb_close{
+			position: absolute;
+			top: 10rpx;
+			right: 20rpx;
+			width: 70rpx;
+			height: 70rpx;
+			font-size: 32rpx;
+			color: #999;
+		}
+		.cpb_cart-tit{
+			text-align: center;
+			padding: 20rpx;
+			font-size: 32rpx;
+			border-bottom: 2rpx solid #eee;
+			.cpb_heji{
+				padding-top: 20rpx;
+				font-size: 26upx;
+				> text{
+					color: #333;
+				}
+				> view{
+					color: #999;
+					> text{
+						color: #333;
+						&:first-child{
+							margin-right: 20upx;
+						}
+					}
+				}
+			}
+		}
+		.cpb_cart-list{
+			padding: 20rpx 30rpx;
+			overflow: auto;
+			flex-grow: 1;
+			> view{
+				margin-bottom: 20rpx;
+			}
+			.item-name{
+				font-size: 30rpx;
+				text{
+					background: #eef6ff;
+					color: #1c588a;
+					border-radius: 1em;
+					font-size: 0.8em;
+					padding: 0 0.5em;
+					margin-right: 10upx;
+				}
+			}
+			.item-info{
+				border-bottom:2rpx solid #f8f8f8;
+				flex-grow: 1;
+				padding-left: 0.2em;
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 10upx 0 4upx;
+					font-size: 24upx;
+					> view{
+						padding-bottom: 20rpx;
+						align-items: center;
+						.item-detail-text{
+							color: #999;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>