chenrui 3 lat temu
rodzic
commit
d219bd3ab5

+ 11 - 0
api/shelf.js

@@ -18,4 +18,15 @@ export const shelfProductList = (params) => {
     data: params,
     method: 'post'
   })
+}
+// 货架  货位产品 列表 分页
+export const getShelfProductList = (params) => {
+	let url = `shelf/placeProduct/queryPage/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
 }

+ 22 - 6
pages.json

@@ -58,16 +58,16 @@
                 "navigationBarTitleText": "补打贴签",
                 "enablePullDownRefresh": false
             }
-        }
-        ,{
+        },
+		{
             "path" : "pages/shuntBackManage/shuntBackList",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "调回管理",
                 "enablePullDownRefresh": false
             }
-        }
-        ,{
+        },
+		{
             "path" : "pages/shuntBackManage/cancellingStocks",
             "style" :                                                                                    
             {
@@ -77,8 +77,16 @@
 				// 将回弹属性关掉
 				"bounce":"none"
             }
-        }
-		,{
+        },
+		{
+		    "path" : "pages/shuntBackManage/detail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "调回详情",
+		        "enablePullDownRefresh": false
+		    }
+		},
+		{
 		    "path" : "pages/replenishmentManage/replenishmentList",
 		    "style" :
 		    {
@@ -118,6 +126,14 @@
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path" : "pages/replenishmentManage/sendOutGoods",
+			"style" :
+			{
+				"navigationBarTitleText": "发货出库",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path" : "pages/replenishmentManage/signWarehousing",
 			"style" :

+ 16 - 2
pages/common/partList.vue

@@ -2,7 +2,7 @@
 	<view class="partList-box">
 		<view class="partList-title flex align_center justify_between">
 			<text>{{title}}</text>
-			<view>{{list.length}}款,共<text>{{totalNums}}</text>件</view>
+			<view>{{list.length}}款,{{pageType=='shuntBackDetail'?'实退':''}}<text>{{totalNums}}</text>件</view>
 		</view>
 		<view class="partList-list">
 			<view class="partList-list-box" v-for="item in partList" :key="item.id">
@@ -29,6 +29,10 @@
 									实发<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
 									签收<text class="pnums">{{item.putQty||item.putQty==0?item.putQty:'--'}}</text>
 								</view>
+								<view v-if="pageType=='sendOutGoods'">
+									实发:<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
+									/已扫:<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
+								</view>
 								<view v-if="pageType=='replenishmentDetailc'">
 									<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
 									{{item.product&&item.product.unit?item.product.unit:'--'}}
@@ -37,6 +41,14 @@
 								  调回数量:<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
 									{{item.product&&item.product.unit?item.product.unit:'--'}}
 								</view>
+								<view v-if="pageType=='shuntBackDetail'">
+									调回:<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
+									/实退:<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
+								</view>
+								<view v-if="pageType=='shuntBackDetailc'">
+									<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
+									{{item.product&&item.product.unit?item.product.unit:'--'}}
+								</view>
 							</view>
 						</view>
 					</view>
@@ -97,7 +109,7 @@
 				type: String,
 				default: 'checkbox'
 			},
-			// 那个功能页面调用,展示不同的字段,recall: 调回退库,replenishmentSign:补货签收,replenishmentOut:补货出库,manualPrint:手动打印,replenishmentDetail:补货详情-已完成,replenishmentDetailc:补货详情-已取消,scanCodePrint:扫码打印
+			// 那个功能页面调用,展示不同的字段,recall: 调回退库,调回详情-已完成:shuntBackDetail,调回详情-已取消:shuntBackDetailc,replenishmentSign:补货签收,replenishmentOut:补货出库,manualPrint:手动打印,sendOutGoods:发货出库,replenishmentDetail:补货详情-已完成,replenishmentDetailc:补货详情-已取消,scanCodePrint:扫码打印
 			fromPage: {
 				type: String,
 				default: ''
@@ -120,6 +132,8 @@
 						this.totalNums = this.totalNums + item.putQty
 					}else if(_this.pageType=='replenishmentDetailc'){  // 补货详情-已取消
 						this.totalNums = this.totalNums + item.qty
+					}else if(_this.pageType=='shuntBackDetail'){  // 调回详情-已完成
+						this.totalNums = this.totalNums + item.confirmQty
 					}else{
 						this.totalNums = this.totalNums + item.qty
 					}

+ 9 - 12
pages/latePlay/chooseProduct.vue

@@ -23,20 +23,18 @@
 					<view class="product flex align_center">
 						<view class="flex align_center flex_1">
 							<view class="pimgs">
-								<u-image :src="item.shelfProductApiEntity&&item.shelfProductApiEntity.productMsg?item.shelfProductApiEntity.productMsg:`../../static/${theme}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+								<u-image :src="item.productEntity&&item.productEntity.images?item.productEntity.images:`../../static/${theme}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
 							</view>
 							<view class="pinfo">
 								<view class="pname">
-									<!-- <text class="pno">A10</text>
-									箭牌机油滤清器10款进口大众途锐 5.0L V10 TDI -->
-									{{item.shelfProductApiEntity&&item.shelfProductApiEntity.productName}}
+									{{item.productEntity&&item.productEntity.productName}}
 								</view>
 								<view class="ptxt flex align_center justify_between">
 									<view>
-										<text class="pcode">{{item.shelfProductApiEntity&&item.shelfProductApiEntity.productCode}}</text>
+										<text class="pcode">{{item.productEntity&&item.productEntity.code}}</text>
 									</view>
 									<view>
-									  库存数量:<text class="pnums">3个</text>
+									  库存数量:<text class="pnums">{{item.qty}}{{item.productEntity&&item.productEntity.unit}}</text>
 									</view>
 								</view>
 							</view>
@@ -61,7 +59,7 @@
 </template>
 
 <script>
-	import { shelfProductList } from '@/api/shelf'
+	import { getShelfProductList } from '@/api/shelf'
 	export default {
 		data() {
 			return {
@@ -112,7 +110,7 @@
 					queryWord: this.queryWord
 				}
 				_this.status = 'loading'
-				shelfProductList(params).then(res => {
+				getShelfProductList(params).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
 						let list = res.data.list
@@ -155,10 +153,9 @@
 					this.status = "nomore"
 				}
 			},
-			print(item){
-				uni.navigateTo({
-					url: "/pages/common/printTag/printTag?id="+item.id+"&from=bdtq"
-				})
+			print(data){
+				
+				uni.navigateTo({ url: "/pages/common/printTag/printTag?id="+data.id+"&from=bdtq" })
 			}
 		}
 	}

+ 5 - 1
pages/replenishmentManage/outWarehousing.vue

@@ -24,7 +24,7 @@
 		</view>
 		<view class="replenishment-outWarehousing-footer">
 			<u-button class="button" @click="printModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
-			<u-button class="button" @click="" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
+			<u-button class="button" @click="goSendOutGoods" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
 		</view>
 		<!-- 打印贴签 -->
 		<print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
@@ -120,6 +120,10 @@
 				}else if(type == 'scan'){  // 扫码打印
 					uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
 				}
+			},
+			// 发货出库
+			goSendOutGoods(){
+				uni.navigateTo({ url: "/pages/replenishmentManage/sendOutGoods?sn="+this.replenishBillSn })
 			}
 		}
 	}

+ 140 - 0
pages/replenishmentManage/sendOutGoods.vue

@@ -0,0 +1,140 @@
+<template>
+	<view class="sendOutGoods-wrap">
+		<view class="barCode" id="barcode"></view>
+		<view class="info-body">
+			<view class="info partList">
+				<!-- 补货产品 -->
+				<partList :list="partList" title="补货产品" model="view" fromPage="sendOutGoods" ref="partList" noDataText="暂无产品"></partList>
+			</view>
+		</view>
+		<!-- 确认弹框 -->
+		<common-modal v-if="confirmModal" :openModal="confirmModal" title="扫码失败" content="确认对该数字货架进行补货吗?" confirmText="好的" :isCancel="false" @confirm="modalConfirm" @close="confirmModal=false" />
+	</view>
+</template>
+
+<script>
+	import partList from '@/pages/common/partList.vue'
+	import commonModal from '@/pages/common/commonModal.vue'
+	import { shelfReplenishDetailList, shelfReplenishQrCode } from '@/api/shelfReplenish'
+	export default {
+		components: { partList, commonModal },
+		data() {
+			return {
+				barcode:null,
+				replenishBillSn: null,
+				partList: [],
+				confirmModal: false
+			}
+		},
+		onReady() {
+			// 初始化摄像头
+			// this.init()
+		},
+		onLoad(options) {
+			this.replenishBillSn = options.replenishBillSn
+			this.getPartList()
+		},
+		methods: {
+			// 查询列表
+			getPartList(){
+				const _this = this
+				shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
+					if(res.status == 200 && res.data){
+						res.data.map(item =>{
+							item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
+						})
+						this.partList = res.data || []
+					}else{
+						this.partList = []
+					}
+				})
+			},
+			// 扫码结果
+			scanResult(qrCode){
+				const _this = this
+				shelfReplenishQrCode({
+					qrCode: qrCode,
+					replenishBillSn: this.replenishBillSn
+				}).then(res => {
+					if(res.status == 200){
+						_this.toashMsg("扫码成功!")
+						uni.navigateTo({ url: "/pages/common/printTag/printTag?sn="+item.replenishBillSn })
+					}else{
+						this.confirmModal = true
+						// clzConfirm({
+						// 	title: '扫码失败',
+						// 	content: res.message,
+						// 	showCancel: false,
+						// 	success: (ret) => { 
+						// 		_this.barcode.start()
+						// 	}
+						// })
+					}
+				})
+			},
+			modalConfirm(){
+				this.confirmModal = false
+				this.barcode.start()
+			},
+			init(){
+				const _this = this
+				// 初始化
+				this.barcode = plus.barcode.create('barcode', [], {
+					top:'0px',
+					left:'0px',
+					width: '100%',
+					height: '28%',
+					position: 'static',
+					frameColor: '#00aaff',
+					scanbarColor: '#00aaff'
+				})
+				// 设置高度
+				const query = uni.createSelectorQuery().in(this);
+				query.select('#barcode').boundingClientRect(data => {
+					this.barcode.setStyle({
+						height: data.height	+ 'px'	// 调整扫码控件的位置
+					})
+				}).exec()
+				 
+				// 扫码成功后
+				this.barcode.onmarked = function(type, result) {
+					_this.scanResult(result)
+				}
+				// 扫码识别出错
+				this.barcode.onerror = function(error){
+					console.log(error)
+					_this.toashMsg("条形码错误!")
+					_this.barcode.start()
+				}
+				
+				 const currentWebview = this.$mp.page.$getAppWebview()
+				 currentWebview.append(this.barcode)
+				 this.barcode.start()
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	page{
+		height: 100vh;
+	}
+	.sendOutGoods-wrap{
+		width: 100%;
+		height: 100%;
+		.barCode{
+			height: 28%;
+		}
+		.info-body{
+			flex-flow: 1;
+			overflow: auto;
+			height: 72%;
+		}
+		.info{
+			background-color: #FFFFFF;
+			padding: 10rpx 30upx;
+			font-size: 32rpx;
+			margin-top: 20rpx;
+		}
+	}
+</style>

+ 1 - 1
pages/shuntBackManage/cancellingStocks.vue

@@ -38,7 +38,7 @@
 <script>
 	import commonModal from '@/pages/common/commonModal.vue'
 	import partList from '@/pages/common/partList.vue'
-	import { shelfRecallFindBySn, detailQueryCount, shelfRecallDetail, shelfRecallConfirm } from '@/api/shelfRecall.js'
+	import { shelfRecallFindBySn, shelfRecallDetail, shelfRecallConfirm } from '@/api/shelfRecall.js'
 	export default {
 		components: { commonModal, partList },
 		data() {

+ 156 - 0
pages/shuntBackManage/detail.vue

@@ -0,0 +1,156 @@
+<template>
+	<view class="shuntBack-detail-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
+		<view class="shuntBack-detail-body">
+			<view class="head-info" v-if="basicInfoData">
+				<view class="states">
+					<view>
+						<u-icon :name="pageType=='success'?'icon_complete':'icon_cancel'" custom-prefix="iscm-icon" size="48"></u-icon>
+						<text>{{pageType=='success'?'已完成':'已取消'}}</text>
+					</view>
+				</view>
+				<view>
+					<view class="label"><u-icon name="icon_order" custom-prefix="iscm-icon" size="32"></u-icon><text>调回单号</text></view>
+					<view class="info-txt">{{basicInfoData.recallBillNo || '--'}}</view>
+				</view>
+				<view>
+					<view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32"></u-icon><text>货架名称</text></view>
+					<view class="info-txt">{{basicInfoData.shelfInfo&&basicInfoData.shelfInfo.shelfName || '--'}}</view>
+				</view>
+			</view>
+			<view class="part-list">
+				<!-- 调回产品 -->
+				<partList :list="partList" title="调回产品" model="view" :fromPage="pageType=='success'?'shuntBackDetail':'shuntBackDetailc'" ref="partList" noDataText="暂无产品"></partList>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { shelfRecallFindBySn, shelfRecallDetail } from '@/api/shelfRecall'
+	import partList from '@/pages/common/partList.vue'
+	export default {
+		components: { partList },
+		data() {
+			return {
+				recallBillSn: '',
+				basicInfoData:null,
+				partList: [],
+				customStyle: {
+					borderRadius:'100rpx',
+					fontSize:'30rpx',
+					background: this.$config('primaryColor')
+				},
+				pageType: ''
+			}
+		},
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+		},
+		onLoad(option) {
+			this.recallBillSn = option.sn
+			this.pageType = option.type
+			this.getDetail()
+			this.getPartList()
+		},
+		methods: {
+			// 查询详情
+			getDetail(){
+				shelfRecallFindBySn({ sn: this.recallBillSn }).then(res => {
+					if(res.status == 200){
+						this.basicInfoData = res.data || null
+					}else{
+						this.basicInfoData = null
+					}
+				})
+			},
+			// 查询列表
+			getPartList(){
+				const _this = this
+				shelfRecallDetail({ recallBillSn: this.recallBillSn }).then(res => {
+					if(res.status == 200 && res.data){
+						res.data.map(item =>{
+							item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
+							item.putQty = item.confirmQty ? Number(item.confirmQty) : 0
+						})
+						this.partList = res.data || []
+					}else{
+						this.partList = []
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.shuntBack-detail-wrap{
+	position: relative;
+	width: 100%;
+	height: 100%;
+	overflow: hidden;
+	.shuntBack-detail-body{
+		padding: 0 30rpx;
+		height: 100%;
+		overflow: auto;
+		> view{
+			padding: 10rpx 25rpx;
+			background-color: #fff;
+			margin-bottom: 20rpx;
+			border-radius: 25rpx;
+			box-shadow: 2rpx 3rpx 5rpx #eee;
+		}
+		.head-info{
+			.states{
+				border: 0;
+				padding: 20rpx 0;
+				> view{
+					color: #191919;
+					text-align: center;
+					font-size: 40rpx;
+					text{
+						margin-left: 20rpx;
+					}
+				}
+			}
+			.info-txt{
+				word-break: break-word;
+			}
+			font-size: 30rpx;
+			> view{
+				display: flex;
+				border-bottom: 2rpx solid #f5f5f5;
+				padding: 20rpx 0;
+				> view:last-child{
+					flex-grow: 1;
+					width: 80%;
+				}
+				&:last-child{
+					border:0;
+				}
+			}
+			.label{
+				display: flex;
+				align-items: center;
+				width: 220rpx;
+				height: 44rpx;
+				color: #7C7D7E;
+				text{
+					margin-left: 10rpx;
+				}
+			}
+		}
+	}
+	.shuntBack-detail-footer{
+		padding: 26upx 32upx 30upx;
+		background-color: #fff;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		box-shadow: 3px 1px 7px #eee;
+	}
+}
+</style>

+ 10 - 6
pages/shuntBackManage/shuntBackList.vue

@@ -97,10 +97,14 @@
 		methods:{
 			pageInit(){
 				queryStateCount({}).then(res =>{
-					this.tabList[1].count = res.data.WAIT_CONFIRM || 0
-					this.tabList[2].count = res.data.FINISH || 0
-					this.tabList[3].count = res.data.CANCEL || 0
-					this.getRow(1)
+					if(res.status==200 && res.data){
+						this.tabList[1].count = res.data.WAIT_CONFIRM || 0
+						this.tabList[2].count = res.data.FINISH || 0
+						this.tabList[3].count = res.data.CANCEL || 0
+						this.getRow(1)
+					}else{
+						this.getRow(1)
+					}
 				})
 			},
 			// tabs通知swiper切换
@@ -185,9 +189,9 @@
 				if(item.billState=='WAIT_CONFIRM'){ // 待退库
 					uni.navigateTo({ url: "/pages/shuntBackManage/cancellingStocks?sn="+item.recallBillSn })
 				}else if(item.billState=='FINISH'){ // 已完成
-					// uni.navigateTo({ url: "/pages/replenishmentManage/detail?sn="+item.replenishBillSn+"&type=success" })
+					uni.navigateTo({ url: "/pages/shuntBackManage/detail?sn="+item.recallBillSn+"&type=success" })
 				}else if(item.billState=='CANCEL'){ // 已取消
-					// uni.navigateTo({ url: "/pages/replenishmentManage/detail?sn="+item.replenishBillSn+"&type=cancel" })
+					uni.navigateTo({ url: "/pages/shuntBackManage/detail?sn="+item.recallBillSn+"&type=cancel" })
 				}
 			}
 		}