gjy 3 tahun lalu
induk
melakukan
5b350dc92a
2 mengubah file dengan 235 tambahan dan 30 penghapusan
  1. 156 6
      pages/erpbusiness/edit_quality_testing.vue
  2. 79 24
      pages/erpbusiness/quality_testing.vue

+ 156 - 6
pages/erpbusiness/edit_quality_testing.vue

@@ -24,18 +24,121 @@
 				<view class="title">车牌号</view>
 				<view class="con-list">
 					<input v-model='gridList.carNumber' placeholder="请输入车牌号"
-						placeholder-style="font-size: 12px;" name="input"></input>
+						 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">扣重比</view>
+				<view class="con-list">
+					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
+						 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">购粮性质</view>
+				<view class="con-list">
+					<input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
+						 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">仓位号</view>
+				<view class="con-list">
+					<view @click='show=true'>{{gridList.binNumber}}</view>
+					<u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)' v-model="show" mode="selector" >
+					</u-picker>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">囤位号</view>
+				<view class="con-list">
+					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号"
+						 name="input"></input>
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">货名</view>
 				<view class="con-list">
-					<input v-model='gridList.goodsName' placeholder="请输入货名,如玉米"
-						placeholder-style="font-size: 12px;" disabled name="input"></input>
+					{{gridList.goodsName}}
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">类型</view>
+				<view class="con-list">
+					{{gridList.type}}
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="title">净重单价(元/公斤)</view>
+				<view class="con-list">
+					{{gridList.tidalGrainPrice}}
 				</view>
 			</view>
 		</view>
-		
+		<view style='margin-bottom:100px;' class='wrap'>
+			<view class='title'>化验信息</view>
+
+			<view class="c-row b-b">
+				<view class="title">等级</view>
+				<view class="con-list">
+					<view @click='show1=true'>{{gridList.grade}}</view>
+					<u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1" mode="selector" >
+					</u-picker>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">水分(%)</view>
+				<view class="con-list">
+					<input v-model='gridList.waterContent' placeholder="请输入水分占比"
+					 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">容重(克/升)</view>
+				<view class="con-list">
+					<input v-model='gridList.bulkDensity' placeholder="请输入容重"
+					 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">不完善粒(%)</view>
+				<view class="con-list">
+					<input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
+						 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">杂质(%)</view>
+				<view class="con-list">
+					<input v-model='gridList.impurity' placeholder="请输入杂质占比"
+					 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">霉变粒(%)</view>
+				<view class="con-list">
+					<input v-model='gridList.impurity' placeholder="请输入霉变粒占比"
+					 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">热损伤(%)</view>
+				<view class="con-list">
+					<input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
+					 name="input"></input>
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">不完善粒(%)<=</view>
+				<view class="con-list">
+					<input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
+					 name="input"></input>
+				</view>
+			</view>
+		</view>
+		<view class="footer">
+			<view class="button">提交</view>
+		</view>
 	</view>
 </template>
 
@@ -58,6 +161,9 @@
 				mycarStyle: '',
 				feild: undefined,
 				id:0,
+				show:false,
+				selector:[],
+				show1:false,
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
@@ -78,9 +184,17 @@
 				gridList: {},
 				managementType:'',
 				warehouseName: '',
+				warehouseList:[],
 				showTran: true,
 				companyId: 1,
-				current: 4
+				current: 4,
+				gradeList:[
+					{key:1,value:'一等品'},
+					{key:2,value:'二等品'},
+					{key:3,value:'三等品'},
+					{key:4,value:'等外'},
+				],
+				cangid:''
 			}
 		},
 		
@@ -120,6 +234,7 @@
 		onLoad(options){
 			console.log(options)
 			this.id=options.id
+			this.cangid=options.cangid
 		},
 		onShow() {
 			var that = this
@@ -129,10 +244,24 @@
 					if(res.data.data){
 						let data = res.data.data
 						that.gridList =data
+						that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',{
+							id:this.cangid
+						}).then(res => {
+							that.warehouseList=res.data.data.warehousePositionInfoList
+						})
 					}
 				})
 		},
 		methods: {
+			gradepicker(e){
+				console.log(e)
+				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
+				this.gridList.grade=this.gradeList[e[0]].value
+				this.gridList.gradeKey=this.gradeList[e[0]].key
+			},
+			binNumberpicker(e){
+				this.gridList.binNumber=this.warehouseList[e[0]].binNumber
+			},
 			del(item){
 				this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
 					id:item.id
@@ -292,10 +421,14 @@
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
-		font-size: 12px;
 	}
 	.wrap{
+		padding-bottom:10px;
+		font-size:14px;
 		background:#fff;margin:10px;border-radius:10px;
+		input{
+			font-size:14px;
+		}
 		>.title{
 			padding:10px 16px;
 		}
@@ -303,6 +436,23 @@
 			border-bottom:1px solid #eee;
 		}
 	}
+	.footer{
+		background:#fff;
+		position:fixed;
+		bottom:0;
+		width:100%;
+		padding:20px 10px;
+		z-index:10;
+		.button{
+			background:#22C572;
+			width:90%;
+			margin:0 auto;
+			padding:10px;
+			color:#fff;
+			text-align:center;
+			border-radius: 30px;
+		}
+	}
 </style>
 
 

+ 79 - 24
pages/erpbusiness/quality_testing.vue

@@ -1,15 +1,24 @@
 <template>
 	<view>
-		<view style='background:#fff;display:flex;' class="cu-bar search">
-			<view style='flex:6;' class="search-form round Medium">
-				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
-					@input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
+		<view class="header">
+			<view style='background:#fff;display:flex;' class="cu-bar search">
+				<view style='flex:6;' class="search-form round Medium">
+					<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
+					<input v-if='managementType==1' type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
+						 placeholder="输入编号、客户名、车牌号" confirm-type="search"></input>
+					<input v-if='managementType==3' type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
+						 placeholder="输入合同编号、车牌号" confirm-type="search"></input>
+				</view>
+				<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
+				<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
+				<!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
+			</view>
+			<view class='changewarehouse'>
+				<view @click='show=true'>{{warehouseName}}<text class='cuIcon-unfold'></text></view>
+				<u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show"  :range="selector"></u-picker>
 			</view>
-			<view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
-			<u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
-			<!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
 		</view>
+		
 		<view class='wrap' v-for='item in gridList'>
 			<view class='flex justify-between'>
 				<view v-if='item.status=="已质检"'>
@@ -40,6 +49,9 @@
 				<view v-if='item.status=="已称毛重"&&managementType==3' class='button'>质检</view>
 			</view>
 		</view>
+		<view v-show="isContent">
+			<uni-load-more :status="loadStatus"></uni-load-more>
+		</view>
 	</view>
 </template>
 <script>
@@ -60,6 +72,9 @@
 				modalName: '',
 				mycarStyle: '',
 				feild: undefined,
+				params:{},
+				isContent:false,
+				loadStatus:'noMore',
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
@@ -71,26 +86,23 @@
 				inputStatus: 'none',
 				carInfo: [],
 				gridCol: 4,
+				show:false,
 				pageSize:10,
 				currentPage:1,
 				gridBorder: false,
 				headUrl:"../../static/img/myimg/YongHu@3x.png",
 				userphone:"",
 				username:"请更改昵称",
-				gridList: [
-					
-				],
-				gridList1: [
-					
-				],
+				gridList: [],
 				managementType:'',
 				warehouseName: '',
 				showTran: true,
 				companyId: 1,
-				current: 4
+				current: 4,
+				cangid:''
+				
 			}
 		},
-		
 		onLoad() {
 			
 		},
@@ -125,20 +137,50 @@
 			}
 		},
 		onLoad(options){
-			console.log(options)
 			this.managementType=options.managementType
 		},
 		onShow() {
-			var that = this
+			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf',{
+				compId:'',
+				personCharge:this.userInfo.phone
+			}).then(res => {
+				if(res.data.data){
+					this.warehouseName=res.data.data[0].warehouseName
+					this.cangid=res.data.data[0].id
+					this.selector=res.data.data
+					this.getList()
+				}
+			})
+		},
+		methods: {
+			emptysearch(){
+				this.searchKeyWord=''
+				this.gridList=[]
+				this.currentPage=1
+				this.getList()
+			},
+			doSearch(){
+				this.gridList=[]
+				this.currentPage=1
+				this.getList()
+			},
+			warehousechange(e){
+				this.warehouseName=this.selector[e[0]].warehouseName
+				this.cangid=this.selector[e[0]].id
+				this.getList()
+				console.log(e)
+			},
+			getList(){
+				var that = this
 				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
 					searchKeyWord: this.searchKeyWord,
 					searchType: this.searchType,
 					managementType:this.managementType,
-					warehouseName: '测试库',
+					warehouseName: this.warehouseName,
 					compId:'2710b21efc1e4393930c5dc800010dc4',
-					pcFlag:1
+					// pcFlag:1
 				}).then(res => {
 					if(res.data.data){
 						let data = res.data.data.records
@@ -146,16 +188,18 @@
 						if (data.length > 0) {
 								that.gridList = that.gridList.concat(data)
 						}else{
-							
+							if(this.currentPage==1){
+								that.gridList=[]
+							}
+							this.isContent=true
 						}
 					}
 					console.log(that.gridList)
 				})
-		},
-		methods: {
+			},
 			edit(item){
 				uni.navigateTo({
-					url:'/pages/erpbusiness/edit_quality_testing?id='+item.id+'&managementType='+this.managementType
+					url:'/pages/erpbusiness/edit_quality_testing?id='+item.id+'&managementType='+this.managementType+'&cangid='+this.cangid
 				})
 			},
 			del(item){
@@ -366,6 +410,10 @@
 		border-radius: 10upx;
 	}
 
+.cuIcon {
+		position: absolute;
+		right: 80px;
+	}
 	.grid-item-box {
 		flex: 1;
 		/* position: relative;
@@ -704,5 +752,12 @@
 		border-radius:15px;
 		margin:0 10px;
 	}
+	.changewarehouse{
+		padding:10px 20px;
+	}
+	.header{
+		background:#fff;
+		border-radius:0px 0px 16px 16px;
+	}
 </style>