Parcourir la source

物料复合模块

asd26269546 il y a 2 ans
Parent
commit
594544452d

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智能仓储2",
     "appid" : "__UNI__4E49201",
     "description" : "",
-    "versionName" : "1.0.3.4",
+    "versionName" : "1.0.3.6",
     "versionCode" : 200,
     "transformPx" : false,
     /* 5+App特有相关 */

+ 21 - 0
pages.json

@@ -183,6 +183,27 @@
 		}, {
 			"path": "pages/store-out-manage/return-material/return-material-tag-scan",
 			"style": {}
+		},{
+			"path": "pages/warehouse/warehouse-list",
+			"style": {}
+		},{
+			"path": "pages/warehouse/return-warehouse",
+			"style": {}
+		},{
+			"path": "pages/warehouse/review",
+			"style": {}
+		},{
+			"path": "pages/warehouse/reviewDtl",
+			"style": {}
+		},{
+			"path": "pages/warehouse/scan",
+			"style": {}
+		},{
+			"path": "pages/warehouse/tag",
+			"style": {}
+		},{
+			"path": "pages/warehouse/tag-scan",
+			"style": {}
 		}
 	],
 	"globalStyle": {

+ 13 - 0
pages/index/index.vue

@@ -50,6 +50,7 @@
 			},
 			/* 首页页面跳转 */
 			go (type) {
+				console.log(type)
 				switch(type) {
 					
 					/* 扫描贴标 */
@@ -140,6 +141,18 @@
 					case '20' :
 						this.$utils.open('/pages/store-out-manage/return-material/return-material')
 						break
+					/* 物料接收 */
+					case '22' :
+						this.$utils.open('/pages/warehouse/warehouse-list')
+						break
+					/* 面料退仓 */
+					case '23' :
+						this.$utils.open('/pages/warehouse/return-warehouse')
+						break
+					case '24' :
+						this.$utils.open('/pages/warehouse/review')
+						break	
+					
 				}
 			},
 			/* 扫码贴标 */

+ 1 - 1
pages/login/login.vue

@@ -57,7 +57,7 @@ import config from '@/libs/config/config.js'
 				remember: true,
 				form: {
 					account: '',
-					password: '123456',
+					password: 'fjhx2012',
 					mobileId: '_mobileId'
 				},
 				rules: {

+ 1 - 0
pages/store-in-manage/store-in/store-in.vue

@@ -120,6 +120,7 @@
 					remark: this.remark
 				}
 				console.log(obj)
+				return
 				this.$http.HandleMacStockInOut(obj).then(res => {
 					console.log(res)
 					if(res.code === 0) {

+ 23 - 0
pages/store-out-manage/store-out/store-out.vue

@@ -112,6 +112,7 @@
 				})
 			},
 			cfm(){
+				
 				let obj = {
 					userId: this.operateUser,
 					plcCode: this.plcStationCode,
@@ -119,16 +120,38 @@
 					stockChangeType: this.stockChangeType,
 					remark: this.remark
 				}
+				if((this.roleKey == 'sewing' || this.roleKey == 'crop') && this.stockChangeType == 20){
+					obj.stockChangeType = 30
+				}
 				console.log(obj)
 				this.$http.HandleMacStockInOut(obj).then(res => {
 					console.log(res)
 					if(res.code === 0) {
+						this.materialReceiveSubmit()
 						this.$msg.showToast(res.msg || '操作成功!')
 						this.timer = setTimeout(() => {
 							this.$utils.back()
 						}, 2000)
 					}
 				})
+				
+			},
+			materialReceiveSubmit(){
+				if(this.stockChangeType == 29 || this.stockChangeType == 20 || this.stockChangeType == 30){
+					uni.request({
+						url: 'http://120.79.80.64:8050' + '/cloudApi/materialReceive/list',
+						method: 'POST',
+						header:{
+							'Content-Type' : 'application/json',
+						},
+						data: {
+							jobNo: this.userInfo.jobNo
+						},
+						success: res => {
+							console.log(res);
+						},
+					});
+				}
 			},
 			/* 扫描添加 */
 			scan() {

+ 400 - 0
pages/warehouse/return-warehouse.vue

@@ -0,0 +1,400 @@
+<template>
+	<div>
+		<uni-nav-bar title="面料退仓" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.back()">
+				<span style="color: #FFFFFF;">返回</span> 
+			</view>
+		</uni-nav-bar> 
+		<view class="add-header">
+			退仓面料: <button @click="openModal">添加物料</button>
+		</view>
+		<view class="ul">
+			<view class="li" v-for="(i,index) in form.backDetailList" :key="i.materialId">
+				<view class="label">
+					物料名称:{{i.name}}
+				</view>
+				<view class="lists">
+					<view class="list-box" v-for="(j,jindex) in i.materialMetersList">
+						<view>卷{{jindex + 1}}</view>
+						<view>
+							<span>{{j}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="list-btn-warp">
+					<button @click="listDelete(index)">删除</button>
+					<button @click="listUpdate(i,index)">{{i.isEdit ? '确认' : '修改'}}</button>
+				</view>
+			</view>
+		</view>
+		<view class="footer-btn-warp" style="margin-top: 20rpx;" v-if="form.backDetailList.length != 0">
+			<button class="cancel" style="background-color:red"  @tap="$utils.back()">取消</button>
+			<button class="upload" style="background-color:blue" @click="submitBack()">确定</button>
+		</view>
+		<uni-popup ref="addModal" type="bottom">
+			<view class="addModal-content">
+				<view class="select-warp">
+					<view class="label">
+						选择面料
+					</view>
+					<view class="show-text" @click="openSelectModal">
+						{{!selectMaterialDtl.name ? '请选择物料' : selectMaterialDtl.name }}
+					</view>
+					<view class="add-icon">
+						+
+					</view>
+				</view>
+				<view style="height:40rpx;border-bottom: 1px solid #ccc;">
+					
+				</view>
+				<view class="ul">
+					<view class="li" v-for="(i,index) in selectMaterialDtl.materialMetersList">
+						<view class="delete-icon" @click="materialMetersListDelete(index)">
+							-
+						</view>
+						<view class="li-label">
+							卷{{index + 1}}
+						</view>
+						<view class="input">
+							
+							<input type="number" :value="i" @input="((e)=>inputChange(e,index))">
+						</view>
+					</view>
+					
+				</view>
+				<button class="add-btn" @click="addList">在添加一卷</button>
+				<view class="footer-btn-warp" style="margin-top: 20rpx;">
+					<button class="cancel" style="background-color:red">取消</button>
+					<button class="upload" style="background-color:blue" @click="pushList">确定</button>
+				</view>
+			</view>
+		</uni-popup>
+		<uni-popup ref="popup2" type="bottom">
+			<u-tabs-swiper ref="uTabs" :list="list" :current="current" @change="tabsChange" :is-scroll="false"
+			 swiperWidth="750"></u-tabs-swiper>
+			<view class="search-box" v-if="current == 0">
+				<ul>
+					<li @click="selectMaterialList(i)" v-for="i in pickingToday" :key="i.id">
+						{{i.name}}
+					</li>
+					<view class="no-data" v-if="pickingToday.length == 0">
+						暂无今日领取面料数据
+					</view>
+				</ul>
+			</view>
+			<view  class="search-box" v-if="current == 1">
+				<view class="input-warp">
+					<u-input
+						v-model="req.search"
+						:searchIcon="true" 
+						:border="true" 
+						placeholder="请输入物料名称或编码"
+						@search="getSelectMaterialList"
+						class="search-input"
+						 />
+				</view>
+				<ul>
+					<li @click="selectMaterialList(i)" v-for="i in materialData" :key="i.id">
+						{{i.name}}
+					</li>
+					<view class="no-data" v-if="materialData.length == 0">
+						暂无数据
+					</view>
+				</ul>
+			</view>
+		</uni-popup>
+	</div>
+</template>
+
+<script>
+	export default{
+		name:"xx",
+		data(){
+			return{
+				isEdit:false,
+				swiperCurrent:0,
+				current:0,
+				list: [{
+					name: '今日领取的面料'
+				}, {
+					name: '选择其他'
+				}],
+				userInfo:this.$storage.getStorageSync('userInfo'),
+				form:{
+					operatorId:this.$storage.getStorageSync('userInfo').id,
+					backDetailList:[],
+				},
+				req:{
+					userId:this.$storage.getStorageSync('userInfo').id,
+					pageNum:1,
+					pageSize:10,
+					search:null,
+					materialCode:null,
+				},
+				pickingToday:[],
+				materialData:[],
+				selectMaterialDtl:{},
+				updateIndex:null,
+			}
+		},
+		created(){
+			this.selectList()
+			this.getSelectMaterialList()
+		},
+		methods:{
+			
+			submitBack(){
+				const v = this
+				console.log(v.form)
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/submitBack',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.form,
+					success: res => {
+						console.log(res)
+						if(res.data.code == 200){
+							this.$msg.showToast('操作成功!')
+							this.$utils.back()
+						}
+					},
+				});
+				
+			},
+			materialMetersListDelete(index){
+				this.selectMaterialDtl.materialMetersList.splice(index,1)
+			},
+			listUpdate(i,index){
+				this.selectMaterialDtl = i
+				this.updateIndex = index
+				this.$refs.addModal.open()
+			},
+			listDelete(index){
+				this.form.backDetailList.splice(index,1)
+			},
+			pushList(){
+				if(this.updateIndex === null){
+					this.form.backDetailList.push(this.selectMaterialDtl)
+				}else{
+					this.form.backDetailList[this.updateIndex] = this.selectMaterialDtl
+				}
+				
+				this.selectMaterialDtl = {}
+				this.$refs.addModal.close()
+			},
+			inputChange(e,index){
+				this.selectMaterialDtl.materialMetersList[index] = e.detail.value
+				console.log(this.selectMaterialDtl)
+			},
+			tabsChange(index) {
+				this.swiperCurrent = index;
+				this.current = index; 
+			},
+			addList(){
+				if(!this.selectMaterialDtl.name){
+					this.$msg.showToast('请选择物料!')
+					return
+				}
+				this.selectMaterialDtl.materialMetersList.push(0)
+			},
+			selectMaterialList(i){
+				const v = this
+				v.selectMaterialDtl = {
+					materialId:i.id,
+					materialMetersList:[],
+					name:i.name,
+					isEdit:false,
+				}
+				this.$refs.popup2.close()
+			},
+			openSelectModal(){
+				this.selectMaterialDtl = {}
+				this.updateIndex = null
+				this.$refs.popup2.open()
+			},
+			
+			getSelectMaterialList(){
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/material/selectList',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.req,
+					success: res => {
+						console.log(res)
+						this.materialData = res.data.data
+					},
+				});
+			},
+			selectList(){
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/getPickingToday',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.req,
+					success: res => {
+						console.log(res)
+						this.pickingToday = res.data.data
+					},
+				});
+			},
+			openModal(){
+				this.$refs.addModal.open('bottom')
+			},
+		},
+	}
+</script>
+
+<style scoped lang="less">
+	.footer-btn-warp{
+		display: flex;
+		padding: 20rpx;
+		button{
+			width: 48%;
+			color: #fff;
+		}
+	}
+	.search-box{
+		.input-warp{
+			padding: 40rpx;
+		}
+		.search-input{
+		}
+		background-color: #fff;
+		
+		text-align: center;
+		ul{
+			li{
+				padding: 25rpx 30rpx;
+				border-bottom: 1rpx solid #dcdcdc;
+				list-style: none;
+			}
+		}
+		.no-data{
+			padding: 100rpx;
+		}
+	}
+	.addModal-content{
+		background-color: #fff;
+		border-top-left-radius:20rpx;
+		border-top-right-radius:20rpx;
+		padding-top:40rpx;
+		.footer-btn-warp{
+			display: flex;
+			padding: 20rpx;
+			button{
+				width: 48%;
+				color: #fff;
+			}
+		}
+		.ul{
+			
+			.li{
+				display: flex;
+				justify-content: space-between;
+				height: 80rpx;
+				line-height: 80rpx;
+				margin-top: 20rpx;
+				.input{
+					width: 70%;
+					input{
+						border:1rpx solid #dcdcdc;
+						height: 78rpx;
+						line-height: 78rpx;
+						padding: 0 20rpx;
+					}
+				}
+			}
+			.delete-icon{
+				height: 80rpx;
+				width: 80rpx;
+				text-align: center;
+				line-height: 80rpx;
+				font-size: 40rpx;
+				color: #fff;
+				background-color: #ccc;
+			}
+		}
+		.select-warp{
+			height: 80rpx;
+			line-height: 80rpx;
+			padding: 0 20rpx ;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: space-between;
+			
+			.show-text{
+				width: 70%;
+				border:1rpx solid #dcdcdc;
+				padding: 0 20rpx;
+			}
+			.add-icon{
+				height: 80rpx;
+				width: 80rpx;
+				text-align: center;
+				line-height: 80rpx;
+				font-size: 40rpx;
+				color: #fff;
+				background-color: #ccc;
+			}
+		}
+	}
+	.ul{
+		.li{
+			background-color: #fff;
+			border-radius: 5rpx;
+			margin: 20rpx 20rpx 0;
+			.label{
+				height: 100rpx;
+				line-height: 100rpx;
+				font-weight: 30rpx;
+				border-bottom: 1rpx solid #ccc;
+				padding: 0 20rpx;
+				
+			}
+			.lists{
+				border-bottom: 1rpx solid #ccc;
+				.list-box{
+					height: 100rpx;
+					line-height: 100rpx;
+					display: flex;
+					justify-content: space-between;
+					padding: 0 20rpx;
+				}
+			}
+			.list-btn-warp{
+				display: flex;
+				padding: 20rpx;
+				button{
+					width: 48%;
+				}
+			}
+		}
+	}
+	.add-header{
+		height: 100rpx;
+		line-height: 100rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		overflow: hidden;
+		padding: 20rpx;
+		button{
+			width: 200rpx;
+			color: #fff;
+			background-color: red;
+			float: right;
+			margin: 14rpx 0;
+		}
+	}
+</style>

+ 98 - 0
pages/warehouse/review.vue

@@ -0,0 +1,98 @@
+<template>
+	<div>
+		<uni-nav-bar title="退仓复核" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.open(`/pages/index/index`)">
+				<span style="color: #FFFFFF;">返回</span> 
+			</view>
+		</uni-nav-bar> 
+		<ul >
+			<li v-for="i in checkList" :key="i.stockBackId">
+				<view class="text">
+					退仓人员:{{i.realName}}
+				</view>
+				<view class="text">
+					提交时间:{{i.operationTime}}
+				</view>
+				<view class="text">
+					面料卷数:{{i.operationNum}}
+				</view>
+				<view class="text">
+					面料米数:{{i.operationMeters}}
+				</view>
+				<button style="" @click="toDtl(i.stockBackId)">去复核</button>
+			</li>
+		</ul>
+	</div>
+</template>
+
+<script>
+	export default{
+		name:"xx",
+		data(){
+			return{
+				checkList:[],
+			}
+		},
+		created(){
+			this.selectList()
+		},
+		methods:{
+			toDtl(_id){
+				console.log(_id)
+				const v = this
+				uni.removeStorage({
+					key: 'reviewDtl',
+					success: function (res) {
+						v.$utils.open(`/pages/warehouse/reviewDtl?id=${_id}`)
+					},fail() {
+						v.$utils.open(`/pages/warehouse/reviewDtl?id=${_id}`)
+					}
+				});
+				
+			},
+			selectList(){
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/checkList',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.req,
+					success: res => {
+						console.log(res)
+						this.checkList = res.data.data
+					},
+				});
+			},
+		},
+	}
+</script>
+
+<style scoped lang="less">
+	ul{
+		
+		padding: 0 20rpx;
+		li{
+			.text{
+				height: 60rpx;
+				line-height: 60rpx;
+				padding: 0 20rpx;
+			}
+			border-radius: 5rpx;
+			list-style: none;
+			background-color: #fff;
+			overflow: hidden;
+			margin-top: 20rpx;
+			button{
+				background-color: blue;
+				margin-top: 20prx;
+				color: #fff;
+			}
+		}
+	}
+</style>

+ 125 - 0
pages/warehouse/reviewDtl-2.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="">
+		<uni-nav-bar title="退仓复核-详情" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.back()">
+				<span style="color: #FFFFFF;">返回</span> 
+			</view>
+		</uni-nav-bar>
+		<ul>
+			<li v-for="i in dtlData.checkDetailsInfoList" :key="i.materialId">
+				<view class="title">
+					物料名称:{{i.materialName}}
+				</view>
+				<view class="lists">
+					<view class="list-box" v-for="(j,jindex) in i.stockBackDetailsList" :key="i.id">
+						<view class="col">
+							卷{{jindex + 1}}
+						</view>
+						<view class="col" style="padding: 0 10rpx;">
+							{{j.materialMeters}}
+						</view style="padding: 0 10rpx;">
+						<view class="col">
+							{{j.id}}
+						</view>
+						<view class="col">
+							<button>扫描</button>
+						</view>
+						<view class="col">
+							<button>生成</button>
+						</view>
+					</view>
+					<view class="footer-btn-warp" style="margin-top: 20rpx;">
+						<button class="cancel" style="color:#333">删除</button>
+						<button class="upload" style="color:#333" @click="pushList">修改</button>
+					</view>
+				</view> 
+			</li>
+		</ul>
+		<view class="footer-btn-warp" style="margin-top: 20rpx;">
+			<button class="cancel" style="background-color:red">取消</button>
+			<button class="upload" style="background-color:blue" @click="pushList">确定</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				dtlData:{},
+			}
+		},
+		onLoad(option){
+			console.log(option)
+			this.getDtl(option.id)
+		},
+		methods:{
+			pushList(){},
+			getDtl(_id){
+				console.log(_id)
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/checkDetails',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: {
+						stockBackId:_id
+					},
+					success: res => {
+						this.dtlData = res.data.data
+						console.log(this.dtlData)
+					},
+				});
+			},
+		},
+	}
+</script>
+
+<style scoped lang="less">
+	.footer-btn-warp{
+		display: flex;
+		padding: 20rpx;
+		button{
+			width: 48%;
+			color: #fff;
+		}
+	}
+	ul{
+		padding: 0 20rpx; 
+		li{
+			background-color: #fff;
+			border-radius: 6rpx;
+			list-style: none;
+			margin-top: 20rpx;
+			.title{ 
+				height: 100rpx;
+				line-height: 100rpx;
+				font-size: 30rpx;
+				border-bottom: 1px solid #dcdcdc;
+				padding: 0 20rpx;
+			}
+			.lists{
+				.list-box{
+					overflow: hidden;
+					line-height: 80rpx;
+					.col{
+						float: left;
+						width: 20%;
+						text-align: center;
+						overflow: hidden;
+						
+						button{
+							width: 80%;
+							
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 543 - 0
pages/warehouse/reviewDtl.vue

@@ -0,0 +1,543 @@
+<template>
+	<div>
+		<uni-nav-bar title="退仓复核-详情" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.openNew(`/pages/warehouse/review`)">
+				<span style="color: #FFFFFF;">返回</span> 
+			</view>
+		</uni-nav-bar>
+		<ul class="review-ul">
+			<li v-for="(i,index) in dtlData.checkDetailsInfoList" :key="i.materialId">
+				<view class="title">
+					物料名称:{{i.materialName}}
+				</view>
+				<view class="lists">
+					<view class="list-box" v-for="(j,jindex) in i.stockBackDetailsList" :key="i.id">
+						<view class="col">
+							卷{{jindex + 1}}
+						</view>
+						<view class="col" style="padding: 0 10rpx;">
+							{{j.materialMeters}}
+						</view style="padding: 0 10rpx;"> 
+						<view class="col" style="min-height:10rpx"> 
+							{{j.rfid ? j.rfid : ' '}}
+						</view>
+						<view class="col">
+							<button @click="sacnFn(index,jindex)">扫描</button>
+						</view>
+						<view class="col">
+							<button @click="tagFn(index,jindex)">生成</button>
+						</view>
+					</view>
+					<view class="footer-btn-warp" style="margin-top: 20rpx;">
+						<button class="cancel" style="color:#333" @click="dtlDataListDlt(index)">删除</button>
+						<button class="upload" style="color:#333" @click="listUpdate(i,index)">修改</button>
+					</view>
+				</view>
+			</li>
+		</ul>
+		<view class="footer-btn-warp" style="margin-top: 20rpx;">
+			<button class="cancel" style="background-color:red"  @tap="$utils.back()">取消</button>
+			<button class="upload" style="background-color:blue" @click="submitCheck">确定</button>
+		</view>
+		<uni-popup ref="addModal" type="bottom">
+			<view class="addModal-content">
+				<view class="select-warp">
+					<view class="label">
+						选择面料
+					</view>
+					<view class="show-text" @click="openSelectModal">
+						{{!selectMaterialDtl.materialName ? '请选择物料' : selectMaterialDtl.materialName }}
+					</view>
+					<view class="add-icon">
+						+
+					</view>
+				</view>
+				<view style="height:40rpx;border-bottom: 1px solid #ccc;">
+					
+				</view>
+				<view class="ul">
+					<view class="li" v-for="(i,index) in selectMaterialDtl.stockBackDetailsList">
+						<view class="delete-icon" @click="materialMetersListDelete(index)">
+							-
+						</view>
+						<view class="li-label">
+							卷{{index + 1}}
+						</view>
+						<view class="input">
+							
+							<input type="number" :value="i.materialMeters" @input="((e)=>inputChange(e,index))">
+						</view>
+					</view>
+					
+				</view>
+				<!-- <button class="add-btn" @click="addList">在添加一卷</button> -->
+				<view class="footer-btn-warp" style="margin-top: 20rpx;">
+					<button class="cancel" style="background-color:red" @click="closeaddModal">取消</button>
+					<button class="upload" style="background-color:blue" @click="closeaddModal">确定</button>
+				</view>
+			</view>
+		</uni-popup>
+		<uni-popup ref="popup2" type="bottom">
+			<u-tabs-swiper ref="uTabs" :list="list" :current="current" @change="tabsChange" :is-scroll="false"
+			 swiperWidth="750"></u-tabs-swiper>
+			<view class="search-box" v-if="current == 0">
+				<ul>
+					<li @click="selectMaterialList(i)" v-for="i in pickingToday" :key="i.id">
+						{{i.name}}
+					</li>
+					<view class="no-data" v-if="pickingToday.length == 0">
+						暂无今日领取面料数据
+					</view>
+				</ul>
+			</view>
+			<view  class="search-box" v-if="current == 1">
+				<view class="input-warp">
+					<u-input
+						v-model="req.search"
+						:searchIcon="true" 
+						:border="true" 
+						placeholder="请输入物料名称或编码"
+						@search="getSelectMaterialList"
+						class="search-input"
+						 />
+				</view>
+				<ul>
+					<li @click="selectMaterialList(i)" v-for="i in materialData" :key="i.id">
+						{{i.name}}
+					</li>
+					<view class="no-data" v-if="materialData.length == 0">
+						暂无数据
+					</view>
+				</ul>
+			</view>
+		</uni-popup>
+	</div>
+</template>
+
+<script>
+	import scan from './scan'
+	export default{
+		name:"xx",
+		components:{
+			scan
+		},
+		data(){
+			return{
+				dtlData:{},
+				isEdit:false,
+				swiperCurrent:0,
+				current:0,
+				list: [{
+					name: '今日领取的面料'
+				}, {
+					name: '选择其他'
+				}],
+				userInfo:this.$storage.getStorageSync('userInfo'),
+				form:{
+					operatorId:this.$storage.getStorageSync('userInfo').id,
+					backDetailList:[],
+				},
+				req:{
+					userId:this.$storage.getStorageSync('userInfo').id,
+					pageNum:1,
+					pageSize:10,
+					search:null,
+					materialCode:null,
+				},
+				pickingToday:[],
+				materialData:[],
+				selectMaterialDtl:{},
+				updateIndex:null,
+			}
+		},
+		onLoad(option){
+			const v = this
+			uni.getStorage({
+				key: 'reviewDtl',
+				success: function (res) {
+					console.log(res)
+					v.dtlData = res.data
+				} ,fail(err) {
+					v.getDtl(option.id)
+				}
+			});
+			
+		},
+		created(){
+			this.selectList()
+			this.getSelectMaterialList()
+		},
+		methods:{
+			closeaddModal(){
+				this.$refs.addModal.close()
+			},
+			submitCheck(){
+				uni.showLoading({
+					title: '正在提交'
+				})
+				const v = this
+				var rfidItems = []
+				for (var i = 0; i < v.dtlData.checkDetailsInfoList.length; i++) {
+					const element = v.dtlData.checkDetailsInfoList[i]
+					for (var j = 0; j < element.stockBackDetailsList.length; j++) {
+						const jelement = element.stockBackDetailsList[j]
+						if(!jelement.rfid){
+							this.$msg.showToast('请扫描或生成所有面料!')
+							return
+						}else{
+							rfidItems.push(jelement.rfid)
+						}
+					}
+				}
+				console.log(rfidItems)
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/submitCheck',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.dtlData,
+					success: res => {
+						console.log(res)
+						if(res.data.code == 200){
+							
+							this.$utils.openNew(`/pages/warehouse/review`)
+						}
+					}, 
+				});
+			},
+			tagFn(index,jindex){
+				const v = this
+				v.dtlData.index = index
+				v.dtlData.jindex = jindex
+				uni.setStorage({
+					key: 'reviewDtl',
+					data: v.dtlData,
+					success: function () {
+						v.$utils.open('/pages/warehouse/tag')
+					}
+				});
+			},
+			sacnFn(index,jindex){
+				const v = this
+				v.dtlData.index = index 
+				v.dtlData.jindex = jindex
+				uni.setStorage({
+					key: 'reviewDtl',
+					data: v.dtlData,
+					success: function () {
+						v.$utils.open('/pages/warehouse/scan')
+					}
+				});
+			},
+			getDtl(_id){
+				console.log(_id)
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/checkDetails',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: {
+						stockBackId:_id
+					},
+					success: res => {
+						this.dtlData = res.data.data
+						v.dtlData.checkerId = this.$storage.getStorageSync('userInfo').id
+						console.log(this.dtlData)
+					},
+				});
+			},
+			submitBack(){
+				const v = this
+				console.log(v.form)
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/submitBack',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.form,
+					success: res => {
+						console.log(res)
+						if(res.data.code == 200){
+							this.$msg.showToast('操作成功!')
+							this.$utils.back()
+						}
+					},
+				});
+				
+			},
+			dtlDataListDlt(index){
+				this.dtlData.checkDetailsInfoList.splice(index,1)
+			},
+			materialMetersListDelete(index){
+				this.dtlData.checkDetailsInfoList[this.updateIndex].stockBackDetailsList.splice(index,1)
+			},
+			listUpdate(i,index){
+				console.log(i)
+				this.selectMaterialDtl = i
+				this.updateIndex = index
+				this.$refs.addModal.open()
+			},
+			listDelete(index){
+				this.form.backDetailList.splice(index,1)
+			},
+			pushList(){
+				if(this.updateIndex === null){
+					this.form.backDetailList.push(this.selectMaterialDtl)
+				}else{
+					this.form.backDetailList[this.updateIndex] = this.selectMaterialDtl
+				}
+				
+				this.selectMaterialDtl = {}
+				this.$refs.addModal.close()
+			},
+			inputChange(e,index){
+				
+				this.selectMaterialDtl.stockBackDetailsList[index].materialMeters = e.detail.value
+				console.log(this.selectMaterialDtl)
+			},
+			tabsChange(index) {
+				this.swiperCurrent = index;
+				this.current = index; 
+			},
+			addList(){
+				this.selectMaterialDtl.materialMetersList.push({
+					"id": "1565274397500047361",
+					"stockBackId": "1565274397445521410",
+					"materialId": "01.002.0043",
+					"materialMeters": 0,
+					"oldMaterialMeters": 0,
+					"rfid": ""
+				})
+			},
+			selectMaterialList(i){
+				const v = this
+				this.dtlData.checkDetailsInfoList[this.updateIndex].materialId = i.code
+				this.dtlData.checkDetailsInfoList[this.updateIndex].materialName = i.name
+				console.log(i)
+				console.log(this.updateIndex)
+			},
+			openSelectModal(){
+				
+				this.$refs.popup2.open()
+			},
+			
+			getSelectMaterialList(){
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/material/selectList',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.req,
+					success: res => {
+						console.log(res)
+						this.materialData = res.data.data
+					},
+				});
+			},
+			selectList(){
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/getPickingToday',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: v.req,
+					success: res => {
+						console.log(res)
+						this.pickingToday = res.data.data
+					},
+				});
+			},
+			openModal(){
+				this.$refs.addModal.open('bottom')
+			},
+		},
+	}
+</script>
+
+<style scoped lang="less">
+	.review-ul{
+		padding: 0 20rpx; 
+		li{
+			background-color: #fff;
+			border-radius: 6rpx;
+			list-style: none;
+			margin-top: 20rpx;
+			.title{ 
+				height: 100rpx;
+				line-height: 100rpx;
+				font-size: 30rpx;
+				border-bottom: 1px solid #dcdcdc;
+				padding: 0 20rpx;
+			}
+			.lists{
+				.list-box{
+					overflow: hidden;
+					line-height: 80rpx;
+					.col{
+						float: left;
+						width: 20%;
+						text-align: center;
+						overflow: hidden;
+						
+						button{
+							width: 80%;
+							
+						}
+					}
+				}
+			}
+		}
+	}
+	.footer-btn-warp{
+		display: flex;
+		padding: 20rpx;
+		button{
+			width: 48%;
+			color: #fff;
+		}
+	}
+	.search-box{
+		.input-warp{
+			padding: 40rpx;
+		}
+		.search-input{
+		}
+		background-color: #fff;
+		
+		text-align: center;
+		ul{
+			li{
+				padding: 25rpx 30rpx;
+				border-bottom: 1rpx solid #dcdcdc;
+				list-style: none;
+			}
+		}
+		.no-data{
+			padding: 100rpx;
+		}
+	}
+	.addModal-content{
+		background-color: #fff;
+		border-top-left-radius:20rpx;
+		border-top-right-radius:20rpx;
+		padding-top:40rpx;
+		.footer-btn-warp{
+			display: flex;
+			padding: 20rpx;
+			button{
+				width: 48%;
+				color: #fff;
+			}
+		}
+		.ul{
+			
+			.li{
+				display: flex;
+				justify-content: space-between;
+				height: 80rpx;
+				line-height: 80rpx;
+				margin-top: 20rpx;
+				.input{
+					width: 70%;
+					input{
+						border:1rpx solid #dcdcdc;
+						height: 78rpx;
+						line-height: 78rpx;
+						padding: 0 20rpx;
+					}
+				}
+			}
+			.delete-icon{
+				height: 80rpx;
+				width: 80rpx;
+				text-align: center;
+				line-height: 80rpx;
+				font-size: 40rpx;
+				color: #fff;
+				background-color: #ccc;
+			}
+		}
+		.select-warp{
+			height: 80rpx;
+			line-height: 80rpx;
+			padding: 0 20rpx ;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: space-between;
+			
+			.show-text{
+				width: 70%;
+				border:1rpx solid #dcdcdc;
+				padding: 0 20rpx;
+			}
+			.add-icon{
+				height: 80rpx;
+				width: 80rpx;
+				text-align: center;
+				line-height: 80rpx;
+				font-size: 40rpx;
+				color: #fff;
+				background-color: #ccc;
+			}
+		}
+	}
+	.ul{
+		.li{
+			background-color: #fff;
+			border-radius: 5rpx;
+			margin: 20rpx 20rpx 0;
+			.label{
+				height: 100rpx;
+				line-height: 100rpx;
+				font-weight: 30rpx;
+				border-bottom: 1rpx solid #ccc;
+				padding: 0 20rpx;
+				
+			}
+			.lists{
+				border-bottom: 1rpx solid #ccc;
+				.list-box{
+					height: 100rpx;
+					line-height: 100rpx;
+					display: flex;
+					justify-content: space-between;
+					padding: 0 20rpx;
+				}
+			}
+			.list-btn-warp{
+				display: flex;
+				padding: 20rpx;
+				button{
+					width: 48%;
+				}
+			}
+		}
+	}
+	.add-header{
+		height: 100rpx;
+		line-height: 100rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		overflow: hidden;
+		padding: 20rpx;
+		button{
+			width: 200rpx;
+			color: #fff;
+			background-color: red;
+			float: right;
+			margin: 14rpx 0;
+		}
+	}
+</style>

+ 201 - 0
pages/warehouse/scan.vue

@@ -0,0 +1,201 @@
+<!-- 手动入库扫描添加 -->
+<template>
+	<view class="container-wrap">
+		<uni-nav-bar title="扫描添加" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.back()">
+				<span style="color: #FFFFFF;">返回</span>
+			</view>
+		</uni-nav-bar>
+		<view class="container">
+			<!-- 扫描rfid -->
+			<view class="reading">
+				<view class="title">请扫描要入库的<br/>物料RFID标签</view>
+				
+				<u-image height="300rpx" mode="aspectFit" src="../../static/images/rfid.png"></u-image>
+				<view class="title" v-if="isReading">扫描中...</view>
+				<view class="title" v-if="!isReading">扫描结果</view>
+			</view>
+			<!-- 扫描到RFID标签时,打开质检结果 -->
+			<view v-if="!isReading" class="info">
+				<view class="title">物料信息</view>
+				<view class="row flex-start">
+					<view class="label">
+						物料标签:
+					</view>
+					<view class="value">
+						{{ data.rfidCode }}
+					</view>
+				</view>
+				<view class="row flex-start">
+					<view class="label">
+						物料编码:
+					</view>
+					<view class="value">
+						{{ data.materialCode }}
+					</view>
+				</view>
+				<view class="row flex-start">
+					<view class="label">
+						物料名称:
+					</view>
+					<view class="value">
+						{{ data.materialName }}
+					</view>
+				</view>
+				<view class="row flex-start">
+					<view class="label">
+						物料规格:
+					</view>
+					<view class="value">
+						{{ data.spec }}
+					</view>
+				</view>
+				<view class="row flex-start">
+					<view class="label">
+						物料数量:
+					</view>
+					<view class="value">
+						{{ data.quantity }}
+					</view>
+				</view>
+			</view>
+			<view class="btn" v-if="!isReading">
+				<view class="row">
+					<u-button throttleTime="300" type="primary" style="width: 100%;" @click="cfm">确定</u-button>
+				</view>
+				<view class="row">
+					<u-button throttleTime="300" type="error" style="width: 100%;" @click="$utils.back()">取消</u-button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-PLUS
+	// #endif
+	export default {
+		data() {
+			return {
+				rfidCode: '',
+				isReading: true,
+				data: {},
+				isActive: true,
+			};
+		},
+		methods: {
+			cfm() {
+				const v = this
+				uni.getStorage({
+					key: 'reviewDtl',
+					success: function (res) {
+						res.data.checkDetailsInfoList[res.data.index].stockBackDetailsList[res.data.jindex].rfid = v.rfidCode
+						uni.setStorage({
+							key: 'reviewDtl',
+							data: res.data,
+							success: function () {
+								v.$utils.open(`/pages/warehouse/reviewDtl`)
+								v.$msg.showToast('扫描成功!')
+							},fail() {
+								v.$msg.showToast('扫描失败!')
+							}
+						});
+						
+					}
+				});
+			},
+			getList() {
+				this.$http.ScanRfidCodeStockTag({
+					rfidCode: this.rfidCode,
+					checkRfidType: 2,
+				}).then(res => {
+					console.log(res)
+					if(res.code === 0) {
+						this.isReading = false
+						this.data = res.result
+					} else {
+						this.$msg.showToast(res.msg)
+						if(this.isActive) {
+							this.scanRfid()
+						}
+					}
+				})
+			},
+			scanRfid() {
+				this.$pda.uhfScan().then(res => {
+					console.log(res)
+					this.rfidCode = res[0].epc
+					this.getList()
+					console.log(this.rfidCode)
+				}).catch(() => {
+					this.$msg.showToast('未识别到有效RFID标签!')
+					setTimeout(() => {
+						this.$utils.back()
+					}, 1000)
+				})
+			}
+		},
+		onLoad(option) {
+			this.isActive = true
+			this.scanRfid()
+		},
+		onUnload() {
+			this.isActive = false
+			this.$pda.uhfStop()
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.container-wrap {
+	overflow: hidden;
+	.container {
+		padding: 0 60rpx;
+		padding-bottom: 80rpx;
+		height: calc(100vh - var(--status-bar-height) - 44px);
+		overflow: auto;
+		.title {
+			padding: 20rpx 0;
+			font-size: 36rpx;
+			font-weight: bold;
+			text-align: center;
+		}
+		.reading {
+			padding: 40rpx 0;
+		}
+		.info {
+			padding: 20rpx 60rpx;
+			border-radius: 10rpx ;
+			background-color: #FFFFFF;
+			.row {
+				align-items: flex-start;
+				.label {
+					font-size: 32rpx;
+					width: 160rpx;
+				}
+				.value {
+					font-size: 32rpx;
+					flex: 1;
+					overflow: hidden;
+					word-wrap: break-word;
+				}
+			}
+		}
+		.btn {
+			margin-top: 20rpx;
+			.row {
+				padding: 0;
+				padding-bottom: 10rpx;
+				width: 100%;
+				&:last-child {
+					padding-bottom: 0;
+				}
+			}
+		}
+	}
+}
+</style>

+ 154 - 0
pages/warehouse/tag-scan.vue

@@ -0,0 +1,154 @@
+<!-- 新建标签 扫描Rfid -->
+<template>
+	<view class="container-wrap">
+		<uni-nav-bar title="扫描添加" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.back()">
+				<span style="color: #FFFFFF;">返回</span>
+			</view>
+		</uni-nav-bar>
+		<view class="container">
+			<!-- 扫描rfid -->
+			<view class="reading">
+				<view class="title">请扫描新的物料RFID标签</view>
+				<u-image height="300rpx" mode="aspectFit" src="../../static/images/rfid.png"></u-image>
+				<view class="title" v-if="isReading">扫描中...</view>
+				<view class="title" v-if="!isReading">扫描结果</view>
+			</view>
+			<view class="btn" v-if="!isReading">
+				<view class="row">
+					<u-button throttleTime="300" type="primary" style="width: 100%;" @click="bind">绑定并继续</u-button>
+				</view>
+				<view class="row">
+					<u-button throttleTime="300" type="primary" style="width: 100%;" @click="$utils.back(2)">取消</u-button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-PLUS
+	// #endif
+	export default {
+		data() {
+			return {
+				rfidCode: '',
+				isReading: true,
+				option: {}
+			};
+		},
+		methods: {
+			bind() {
+				const v = this
+				this.$http.CreateRfidStockTag({
+					rfidCode: this.rfidCode,
+					bindingRfidWay: 0,
+					...this.option
+				}).then(res => {
+					if(res.code === 0) {
+						this.$msg.showToast('创建成功!', 'success' )
+						// 绑定成功后清除上个页面已选择的数据并返回
+						uni.$emit('clear')
+						uni.getStorage({
+							key: 'reviewDtl',
+							success: function (res) {
+								
+								res.data.checkDetailsInfoList[res.data.index].stockBackDetailsList[res.data.jindex].rfid = v.rfidCode
+								uni.setStorage({
+									key: 'reviewDtl',
+									data: res.data,
+									success: function () {
+										v.$utils.open(`/pages/warehouse/reviewDtl`)
+										v.$msg.showToast('扫描成功!')
+									},fail() {
+										v.$msg.showToast('扫描失败!')
+									}
+								});
+								
+							}
+						});
+					} else {
+						this.isReading = true
+						this.scanRfid()
+					}
+				})
+				
+				
+				
+			},
+			scanRfid () {
+				this.$pda.uhfScan().then(res => {
+					console.log(res)
+					this.isReading = false
+					this.rfidCode = res[0].epc
+					console.log(this.rfidCode)
+				}).catch(() => {
+					this.$msg.showToast('未识别到有效RFID标签!')
+					setTimeout(() => {
+						this.$utils.back()
+					}, 1000)
+				})
+			}
+		},
+		onLoad(option) {
+			this.option = this.$utils.code2Object(option.data)
+			this.scanRfid()
+		},
+		onUnload() {
+			this.$pda.uhfStop()
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.container-wrap {
+	overflow: hidden;
+	.container {
+		padding: 0 60rpx;
+		padding-bottom: 80rpx;
+		height: calc(100vh - var(--status-bar-height) - 44px);
+		overflow: auto;
+		.title {
+			padding: 20rpx 0;
+			font-size: 36rpx;
+			font-weight: bold;
+			text-align: center;
+		}
+		.reading {
+			padding: 40rpx 0;
+		}
+		.info {
+			padding: 20rpx 60rpx;
+			border-radius: 10rpx ;
+			background-color: #FFFFFF;
+			.row {
+				align-items: flex-start;
+				.label {
+					font-size: 32rpx;
+					width: 160rpx;
+				}
+				.value {
+					font-size: 32rpx;
+					flex: 1;
+					overflow: hidden;
+					word-wrap: break-word;
+				}
+			}
+		}
+		.btn {
+			.row {
+				padding: 0;
+				padding-bottom: 10rpx;
+				width: 100%;
+				&:last-child {
+					padding-bottom: 0;
+				}
+			}
+		}
+	}
+}
+</style>

+ 206 - 0
pages/warehouse/tag.vue

@@ -0,0 +1,206 @@
+<!-- 新建标签 -->
+<template>
+	<view class="container-wrap">
+		<uni-nav-bar title="新建标签" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+			</view>
+			<view slot="right" @tap="$utils.back()">
+				<span style="color: #FFFFFF;">返回</span>
+			</view>
+		</uni-nav-bar>
+		<view class="container">
+			<scroll-view
+				scroll-y="true" 
+				style="height: calc(100vh - 150rpx);padding-bottom: 50rpx;">
+				<view class="form">
+					<view class="title">
+						物料信息
+					</view>
+					<view class="row flex-start">
+						<view class="label">物料编号:</view>
+						<view class="value">{{ query.materialId }}</view>
+					</view>
+					<view class="row flex-start">
+						<view class="label">物料名称:</view>
+						<view class="value">{{ query.materialName }}</view>
+					</view>
+					<!-- <view class="row flex-start">
+						<view class="label">物料分类:</view>
+						<view class="value">{{ query.categoryCode }}</view>
+					</view>
+					<view class="row flex-start">
+						<view class="label">门幅:</view>
+						<view class="value">{{ query.width }}</view>
+					</view>
+					<view class="row flex-start">
+						<view class="label">克重:</view>
+						<view class="value">{{ query.unitWeight }}</view>
+					</view> -->
+					<view class="row flex-start">
+						<view class="label">采购合同号:</view>
+						<view class="value">{{ purchaseBillNo }}</view>
+					</view>
+					<view class="row flex-start">
+						<view class="label">批次号:</view>
+						<view class="value">{{ batchNo }}</view>
+					</view>
+					<!-- <view class="btn">
+						<u-button throttleTime="300" type="default" @click="toChoose(query,3)"> + 选择物料</u-button>
+					</view> -->
+					<view class="btn">
+						<u-button throttleTime="300" type="default" @click="toChooseContract()"> + 选择合同批次</u-button>
+					</view>
+			
+					<view class="row" style="margin-top: 40rpx;">
+						<view class="label">物料长度:</view>
+						<u-input v-model="quantity" type="number" :border="true" border-color="#000" placeholder="请输入物料长度"/>
+						<span style="padding: 0 10rpx;">米</span>
+					</view>
+				</view>
+			</scroll-view>
+			<view class="footer">
+				<my-fixed-button text="绑定RFID标签" :customClick="true" @click="bind"></my-fixed-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import DateFormat from '../../js_sdk/xfl-DateFormat/DateFormat.js';
+	export default {
+		data() {
+			return {
+				type: 1, // 当前页面类型 1打印二维码标签 2绑定RFID标签
+				query:[],
+				quantity: '',
+				purchaseBillNo: '',
+				batchNo: ''
+			}
+		},
+		onLoad(option) {
+			const v = this
+			// 获取当前页面类型
+			this.type = option.type || 1
+			// 获取选中的物料
+			uni.getStorage({
+				key: 'reviewDtl',
+				success: function (res) {
+					v.query = res.data.checkDetailsInfoList[res.data.index]
+					v.quantity = res.data.checkDetailsInfoList[res.data.index].stockBackDetailsList[res.data.jindex].materialMeters
+					v.query.code = res.data.checkDetailsInfoList[res.data.index].materialId
+					console.log(v.query)
+				}
+			});
+			uni.$on('materialcfm', res => {
+				console.log(res)
+				this.query = res[0]
+			})
+			uni.$on('clear', res => {
+				// this.query = {}
+				this.quantity = ''
+			})
+			uni.$on('chooseContract', res => {
+				console.log('purchaseBillNo-', this.purchaseBillNo)
+				this.purchaseBillNo = res.purchaseBillNo
+				this.batchNo = res.batchNo
+			})
+		},
+		onUnload() {
+			uni.$off('materialcfm')
+			uni.$off('clear')
+			uni.$off('chooseContract')
+		},
+		onShow() {
+			
+		},
+		methods: {
+			toChooseContract () {
+				if(!this.query.code) {
+					return this.$msg.showToast('请选择物料!')
+				}
+				this.$utils.open(`/pages/store-manage/contract-list/contract-list?materialCode=${this.query.code}`)
+			},
+			bind() {
+				if(!this.query.code) {
+					return this.$msg.showToast('请选择物料!')
+				}
+				if(!(this.purchaseBillNo && this.batchNo)) {
+					return this.$msg.showToast('请选择合同批次!')
+				}
+				if(!this.quantity) {
+					return this.$msg.showToast('请输入物料长度!')
+				}
+				let data = {
+					materialCode: this.query.code,
+					quantity: this.quantity,
+					purchaseBillNo: this.purchaseBillNo,
+					batchNo: this.batchNo
+				}
+				this.$utils.open(`/pages/warehouse/tag-scan?data=${this.$utils.object2Code(data)}`)
+			},
+			// 获取物料
+			toChoose(item,type){
+				let items = JSON.stringify(this.query);
+				// #ifdef H5
+					items = encodeURIComponent(JSON.stringify(this.query));
+				// #endif
+				this.$utils.open(`/pages/material-tree/material-tree?arr=${items}&type=${type}`)
+			},
+			clear(){
+				this.query=[];
+				this.isChoose=[]
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+@import '../../static/css/mycss.scss';
+.container-wrap {
+	background-color: #FFFFFF;
+	.container {
+		.form {
+			padding: 0 50rpx;
+			.title {
+				padding: 30rpx 0;
+				font-size: 36rpx;
+				font-weight: bold;
+				text-align: center;
+			}
+			.row {
+				padding-bottom: 10rpx;
+				position: relative;
+				&:last-child {
+					padding-bottom: 0;
+				}
+				.label {
+					font-size: 28rpx;
+				}
+				.value {
+					flex: 1;
+				}
+				// &.bottom-line {
+				// 	&::after {
+				// 		content: '';
+				// 		display: block;
+				// 		width: 100%;
+				// 		border-bottom: 1px solid #000000;
+				// 	}
+				// }
+			}
+			.btn {
+				padding: 20rpx 0;
+			}
+		}
+	}
+}
+/deep/ .u-select__body__picker-view__item {
+	.u-line-1 {
+		font-size: 36rpx;
+	}
+}
+/deep/ .u-select__header__btn {
+	font-size: 36rpx;
+}
+</style>

+ 146 - 0
pages/warehouse/warehouse-list.vue

@@ -0,0 +1,146 @@
+<template>
+	<div>
+		<uni-nav-bar title="物料接收" :status-bar="true" background-color="#3F92F9" color="#FFF">
+			<view slot="left">
+				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
+				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
+			</view>
+			<view slot="right" @tap="$utils.back()">
+				<span style="color: #FFFFFF;">返回</span>
+			</view>
+		</uni-nav-bar>
+		<view class="ul">
+			<view class="li" v-for="i in dataList" :key="i.id">
+				<view class="line">
+					物料编码:{{i.materialCode}}
+				</view>
+				<view class="line">
+					物料名称:{{i.materialName}}
+				</view>
+				<view class="line">
+					出库时间:{{i.createTime}}
+					<view class="span">
+						数量:<span style="color:red">{{i.changeName}}</span>
+					</view>
+				</view>
+				<view class="line">
+					接收人员:{{i.realName}}
+				</view>
+				<view class="btn-warp">
+					<button @click="operation(4,i.id)">退回</button>
+					<button @click="operation(3,i.id)">确认接收</button>
+				</view>
+			</view>
+		</view>
+		<button class="footer-btn" @click="operation('all')">
+			批量接受物料
+		</button>
+	</div>
+</template>
+
+<script>
+	export default{
+		name:"xx",
+		data(){
+			return{
+				userInfo:this.$storage.getStorageSync('userInfo'),
+				dataList:[],
+			}
+		},
+		created(){
+			setTimeout(()=>{
+				this.getList()
+			},100)
+		},
+		methods:{
+			operation(_type,_id){
+				var idList = []
+				var operation = ''
+				if(_type == 'all'){
+					
+					operation = 3
+					for (var i = 0; i < this.dataList.length; i++) {
+						idList.push(this.dataList[i].id)
+					}
+					
+					
+				}else{
+					operation = _type
+					idList = [_id]
+				}
+				console.log(idList,operation)
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/materialReceive/operation',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: {
+						idList: idList,
+						operation:operation,
+					},
+					success: res => {
+						console.log(res)
+						if(res.data.code == 200){
+							this.$msg.showToast('操作成功!')
+							this.getList()
+						}
+					},
+				});
+			},
+			getList(){
+				const v = this
+				uni.request({
+					url: 'http://120.79.80.64:8050' + '/cloudApi/materialReceive/list',
+					method: 'POST',
+					header:{
+						'Content-Type' : 'application/json',
+					},
+					data: {
+						jobNo: this.userInfo.jobNo
+					},
+					success: res => {
+						console.log(res)
+						this.dataList = res.data.data
+					},
+				});
+			},
+		},
+	}
+</script>
+
+<style scoped lang="less">
+	.ul{
+		padding-bottom: 200rpx;
+	}
+	.li{
+		background-color: #fff;
+		margin: 20rpx 20rpx 0;
+		padding: 20rpx;
+		list-style: none;
+		.line{
+			
+			line-height: 70rpx;
+			border: none;
+			display: flex;
+			padding: 0 20rpx;
+			.span{
+				margin-left: 50rpx;
+			}
+		}
+	}
+	.btn-warp{
+		display: flex;
+		button{
+			width: 48%;
+		}
+	}
+	.footer-btn{
+		position: fixed;
+		bottom: 10rpx;
+		left: 10rpx;
+		right: 10rpx;
+		background-color: red;
+		color: #fff;
+	}
+</style>

BIN
static/images/wljs.png


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/ed9a3e20-1a1d-11ed-b93a-417fa58ede07
+https://ide.dcloud.net.cn/build/download/a6302980-2a01-11ed-a963-0d466e6f65a1

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/cache/apk/cmManifestCache.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/cache/wgt/__UNI__4E49201/app-config-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/cache/wgt/__UNI__4E49201/app-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/cache/wgt/__UNI__4E49201/app-view.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/cache/wgt/__UNI__4E49201/manifest.json


BIN
unpackage/cache/wgt/__UNI__4E49201/static/images/wljs.png


+ 1 - 1
unpackage/debug/.roid.ins

@@ -1 +1 @@
-forceInstall
+installed

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 329 - 1
unpackage/dist/dev/app-plus/app-view.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


BIN
unpackage/dist/dev/app-plus/static/images/wljs.png


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/dist/dev/app-plus/view.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
unpackage/dist/dev/app-plus/view.umd.min.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff