lilei 2 роки тому
батько
коміт
0909b7b9ce

+ 3 - 2
api/stockCheck.js

@@ -94,10 +94,11 @@ export const stockCheckQueryPage = (params) => {
 
 // 查询货架待取货状态的订单明细
 export const queryWaitListByShelfSn = (params) => {
-	let url = `shelfStockCheck/queryWaitListByShelfSn/${params.shelfSn}`
+	let url = `shelfStockCheck/queryWaitListByShelfSn`
 	return axios.request({
 		url: url,
-		method: 'get'
+		data: params,
+		method: 'post'
 	})
 }
 

+ 11 - 1
pages/stockCheck/editModal.vue

@@ -18,7 +18,7 @@
 				 	<text>冻结库存</text>
 					<view class="flex align_center">
 						{{infoData.freezeQty}}
-						<view v-if="infoData.freezeQty">
+						<view v-if="infoData.freezeQty" @click="showDetail">
 							<text>冻结明细</text>
 							<u-icon name="arrow-right"></u-icon>
 						</view>
@@ -43,11 +43,17 @@
 				<view class="button-confirm" @click="handleConfirm">确定</view>
 			</view>
 		</view>
+		<!-- 冻结明细 -->
+		<freezeDetailModal v-if="showModal" :openModal="showModal" :infoData="infoData" @close="showModal=false"></freezeDetailModal>
 	</u-mask>
 </template>
 
 <script>
+	import freezeDetailModal from './freezeDetailModal'
 	export default {
+		components: {
+			freezeDetailModal
+		},
 		props: {
 			openModal: { //  弹框显示状态
 				type: Boolean,
@@ -63,9 +69,13 @@
 		data() {
 			return {
 				isShow: this.openModal, //  是否打开弹框
+				showModal: false,
 			}
 		},
 		methods: {
+			showDetail(){
+				this.showModal = true
+			},
 			// 确认
 			handleConfirm(){
 				if(this.infoData.checkQty){

+ 117 - 0
pages/stockCheck/freezeDetailModal.vue

@@ -0,0 +1,117 @@
+<template>
+	<u-mask class="productModal" :show="isShow" :mask-click-able="false">
+		<view class="product-con">
+			<view class="product-head">
+				<view>
+					修理厂提交以下订单,但未取货,请联系修理厂处理
+				</view>
+			</view>
+			<view class="product-main">
+				<view class="p-h1">
+					<text>下单时间</text>
+					<text>下单人员</text>
+					<text>数量</text>
+				</view>
+				 <view class="p-row" v-for="item in list" :key="item.id">
+					  <text>下单时间</text>
+					  <text>下单人员</text>
+					  <text>数量</text>
+				 </view>
+			</view>
+			<view class="product-footer">
+				<view class="button-cancel" @click="isShow=false">关闭</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: {
+			// 获取列表数据
+			getList(){
+				queryWaitListByShelfSn({
+					shelfSn: this.infoData.shelfSn,
+					productSn:this.infoData.productSn,
+				}).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%;
+		.product-head{
+			font-size: 24rpx;
+			padding: 20upx 30upx 15upx;
+			border-bottom: 2rpx solid #eee;
+			color: #666;
+		}
+		.product-con{
+			width: 78%;
+			margin: 55% auto 0;
+			background-color: #fff;
+			border-radius: 24upx;
+			.product-main{
+				padding: 0 30upx 20upx 30upx;
+				font-size: 24upx;
+				max-height: 30vh;
+				overflow: auto;
+				
+			}
+			.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;
+				}
+			}
+		}
+	}
+</style>

+ 77 - 8
pages/stockCheck/freezeQtyModal.vue

@@ -1,12 +1,24 @@
 <template>
 	<u-mask class="productModal" :show="isShow" :mask-click-able="false">
 		<view class="product-con">
+			<view class="product-head">
+				<view class="shelfName flex align_center"><text></text>{{infoData.shelfName}}</view>
+				<view>
+					此货架存在以下未取货的订单,导致库存被冻结,为方便盘点,请先联系修理厂处理
+				</view>
+			</view>
 			<view class="product-main">
-				 <view v-for="item in list" :key="item.id">22</view>
+				 <view v-for="item in list" :key="item.id">
+					 <view class="flex align_center">
+						 <view class="l-no"><text>{{item.shelfPlaceCode}}</text>{{item.productCode}}</view>
+						 <view class="r-nums">冻结库存:<text>{{item.totalQty}}</text> 个</view>
+					 </view>
+					 <view class="p-name">{{item.productName}}</view>
+				 </view>
 			</view>
 			<view class="product-footer">
-				<view class="button-cancel" @click="isShow=false">取消</view>
-				<view class="button-confirm" @click="handleConfirm">确定</view>
+				<view class="button-cancel" @click="isShow=false">返回列表</view>
+				<view class="button-confirm" @click="handleConfirm">继续盘点</view>
 			</view>
 		</view>
 	</u-mask>
@@ -36,7 +48,7 @@
 		methods: {
 			// 确认
 			handleConfirm(){
-				 
+				 this.$emit("ok")
 			},
 			// 获取列表数据
 			getList(){
@@ -68,8 +80,29 @@
 	.productModal{
 		width: 100%;
 		height: 100%;
-		.text-c{
-			text-align: center;
+		.product-head{
+			font-size: 24rpx;
+			padding: 20upx 30upx 15upx;
+			border-bottom: 2rpx solid #eee;
+			color: #666;
+			.shelfName{
+				width: 100%;
+				height: 48rpx;
+				text-overflow: ellipsis;
+				overflow: hidden;
+				flex-grow: 1;
+				font-weight: bold;
+				font-size: 26rpx;
+				color: #333;
+				text{
+					display: block;
+					height: 30rpx;
+					width: 6rpx;
+					background: #0485F6;
+					margin-right: 10rpx;
+					border-radius: 10rpx;
+				}
+			}
 		}
 		.product-con{
 			width: 78%;
@@ -77,8 +110,44 @@
 			background-color: #fff;
 			border-radius: 24upx;
 			.product-main{
-				padding: 60upx 20upx 50upx;
-				 
+				padding: 0 30upx 20upx 30upx;
+				font-size: 24upx;
+				max-height: 30vh;
+				overflow: auto;
+				> view{
+					border-bottom: 2rpx solid #eee;
+					padding: 15upx 0;
+					&:last-child{
+						border: 0;
+					}
+					> view{
+						justify-content: space-between;
+						&:first-child{
+							margin-bottom: 10upx;
+							.l-no{
+								text{
+									background-color: #eee;
+									padding: 0 10upx;
+									border-radius: 10upx;
+									margin-right: 15upx;
+								}
+							}
+							.r-nums{
+								color: #999;
+								text{
+									color:red;
+								}
+								font-size: 22upx;
+							}
+						}
+					}
+					.p-name{
+						font-size: 24upx;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						white-space: nowrap;
+					}
+				} 
 			}
 			.product-footer{
 				font-size: 30upx;

+ 7 - 4
pages/stockCheck/shelfList.vue

@@ -57,7 +57,7 @@
 				</view>
 			</view>
 		</view>
-		<freezeQtyModal :openModal="showModal" :infoData="tempData"></freezeQtyModal>
+		<freezeQtyModal :openModal="showModal" :infoData="tempData" @ok="toCheck"></freezeQtyModal>
 	</view>
 </template>
 
@@ -149,10 +149,13 @@
 					 this.showModal = true
 				}else{
 					// 去库存盘点
-					uni.navigateTo({
-						url:"/pages/stockCheck/startCheck?data="+encodeURIComponent(JSON.stringify(item))
-					})
+					this.toCheck()
 				}
+			},
+			toCheck(){
+				uni.navigateTo({
+					url:"/pages/stockCheck/startCheck?data="+encodeURIComponent(JSON.stringify(this.tempData))
+				})
 			}
 		}
 	}

+ 1 - 1
pages/stockCheck/startCheck.vue

@@ -195,7 +195,7 @@
 	import { clzConfirm } from '@/libs/tools'
 	export default {
 		components: {
-			editModal
+			editModal,
 		},
 		data() {
 			return {