Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

achao 2 years ago
parent
commit
b7a8bcc350

+ 1 - 1
pages.json

@@ -1570,7 +1570,7 @@
 						{
 						"color": "#000",
 						"fontSize": "28rpx",
-						"text": "发"
+						"text": "发"
 						}
 						]
 				    }

+ 29 - 5
pages/erpbusiness/add_quality_testing.vue

@@ -746,6 +746,7 @@
 					},
 				],
 				cangid: '',
+				
 				inType:""//入库类型
 			}
 		},
@@ -827,8 +828,8 @@
 
 			// 	this.gridList.customerNumberCard = _customerInfo.customerNumberCard
 			// }
-			this.gridList.grade = this.gradeList[0].value
-			this.gridList.gradeKey = this.gradeList[0].key
+			this.gridList.grade = this.gradeList[1].value
+			this.gridList.gradeKey = this.gradeList[1].key
 			
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
 				warehouseId: this.cangid
@@ -1083,6 +1084,8 @@
 					// number = number.substring(number.length - 4, number.length)
 					// this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
 				}
+				this.gridList.grade = this.gradeList[1].value
+				this.gridList.gradeKey = this.gradeList[1].key
 				this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
 					flag: this.flag,
 					warehouseName: this.gridList.warehouseName
@@ -1155,8 +1158,16 @@
 					this.gridList.goodsName = this.taskNolist[e[0]].goodsName
 					if (this.taskNolist[e[0]].goodsName.indexOf("潮粮") != -1) { //收购从合同中带出货名  单价等信息  用货名是否带有潮粮字符来判断干潮类型
 						this.gridList.type = "潮粮"
+						this.gridList.imperfectGrain=8
+						this.gridList.impurity=1
+						this.gridList.mildewGrain=2
+						this.gridList.jiaorenli=0
 					} else {
 						this.gridList.type = "干粮"
+						this.gridList.imperfectGrain=8
+						this.gridList.impurity=1
+						this.gridList.mildewGrain=2
+						this.gridList.jiaorenli=1
 					}
 				}
 				if (this.taskNolist[e[0]].contractNo) {
@@ -1205,6 +1216,10 @@
 							this.gridList.goodsName = this.contractNolist.goodsName
 							if (this.gridList.goodsName == '玉米') {
 								this.gridList.type = '干粮'
+								this.gridList.imperfectGrain=8
+								this.gridList.impurity=1
+								this.gridList.mildewGrain=2
+								this.gridList.jiaorenli=1
 								if (this.contractNolist.priceType != '随行就市') {
 									this.gridList.dryGrainPrice = this.contractNolist.contractPrice
 								}
@@ -1216,9 +1231,16 @@
 									this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
 									this.tidalGrainPrice = this.contractNolist.contractPrice
 								}
-
+								this.gridList.imperfectGrain=8
+								this.gridList.impurity=1
+								this.gridList.mildewGrain=2
+								this.gridList.jiaorenli=0
 							} else {
 								this.gridList.type = '干粮'
+								this.gridList.imperfectGrain=8
+								this.gridList.impurity=1
+								this.gridList.mildewGrain=2
+								this.gridList.jiaorenli=1
 								this.edit = false
 								if (this.contractNolist.priceType != '随行就市') {
 									this.gridList.dryGrainPrice = this.contractNolist.contractPrice
@@ -1226,7 +1248,9 @@
 							}
 						}
 						this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
-						this.gridList.grade = this.contractNolist.grade
+						this.gridList.grade = this.gradeList[1].value
+						this.gridList.gradeKey = this.gradeList[1].key
+						// this.gridList.grade = this.contractNolist.grade
 						this.gridList.inOutType = this.contractNolist.inOutType
 						
 						if (this.gridList.inOutType == '采购入库') {
@@ -1544,7 +1568,7 @@
 							}
 						}
 
-						if (!this.gridList.jiaorenli) {
+						if (!this.gridList.jiaorenli&&this.gridList.jiaorenli!=0) {
 							this.$api.msg('热损伤不能为空')
 							return
 						}

+ 124 - 13
pages/task/audit/universalityAudit.vue

@@ -1,5 +1,23 @@
 <template>
-	<view style='margin-bottom:180rpx;'>
+	<view :style='{"margin-bottom":dataobj.taskId?"280rpx":"180rpx"}'>
+		<view class="topInfo">
+			<view class="topInfo-item">
+				<view class="flex info">
+					<view class="logo">
+						<image src="../../../static/img/reject.png" mode="" v-if="dataobj.status == '已驳回'"
+							style="height: 40rpx;"></image><!-- 驳回 -->
+						<image src="../../../static/img/tongguo.png" mode="" v-if="dataobj.status == '已通过'"
+							style="height: 40rpx;"></image><!-- 通过 -->
+						<!-- v-if="status == '审核中' || status == '待决策人审核'" -->
+						<image src="../../../static/img/daishenhe.png" mode="" style="height: 40rpx;"></image>
+						<!-- 待审核 -->
+					</view>
+					<!-- {{auditList.length > 0 ?auditList[auditList.length - 1].operatorMajorRoleName:""}} -->
+					<view class="infoText">{{dataobj.approveStatus?dataobj.approveStatus:dataobj.status}}</view>
+				</view>
+				<view class="infoData">{{dataobj.updateDate}}</view>
+			</view>
+		</view>
 		<view>
 			<u-form :model="dataobj" ref="uForm">
 				<u-form-item label="类型"><view style='text-align:right;width:100%;color:#AFB3BF;'>{{dataobj.businessType}}</view></u-form-item>
@@ -185,7 +203,7 @@
 						confirmText: '确定',
 						success: function(res) {
 							if (res.confirm) {
-								that.audit(that.list[0], 0, false, true, that.auditMind)
+								that.audit(that.dataobj, 0, false, true, that.auditMind)
 							}
 						}
 					})
@@ -205,7 +223,7 @@
 						confirmText: '确定',
 						success: function(res) {
 							if (res.confirm) {
-								that.audit(that.list[0], 0, true, 2, that.auditMind)
+								that.audit(that.dataobj, 0, true, 2, that.auditMind)
 							}
 						}
 					})
@@ -217,7 +235,6 @@
 					title: "审核中"
 				})
 				let that = this
-				if (this.list) {
 					this.$api.doRequest('post', '/newWorkflow/api/handle', {
 						taskId: list.taskId,
 						approved: status,
@@ -230,18 +247,17 @@
 							this.$api.msg('驳回成功')
 						}
 						setTimeout(function() {
-							if (that.everyCheck) {
-								helper.setAudit(that.list[0])
-							} else {
-								uni.navigateBack()
-							}
+
+															uni.navigateBack()
 						}, 1000);
 					})
-				}
 			},
 			fanHui() {
 				uni.navigateBack()
 			},
+			close() {
+				this.show = false
+			},
 			getList(){
 				var that =this
 				this.$api.doRequest('get', '/generalAuditInfo/getGeneralAuditInfo', {
@@ -375,11 +391,11 @@
 								}
 							}
 							this.auditList = response.data.data
-							var time2 = new Date(this.list.createDate).getTime()
+							var time2 = new Date(this.dataobj.createDate).getTime()
 							var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
 							this.auditList.unshift({
-								operatorTitle: this.list.creater.substring(0, 2),
-								operatorName: this.list.creater,
+								operatorTitle: this.dataobj.creater.substring(0, 2),
+								operatorName: this.dataobj.creater,
 								updateDate: time3,
 								auditMind: '',
 								desc: '发起申请',
@@ -642,4 +658,99 @@
 			text-align: right;
 		}
 	}
+	.shade {
+		position: fixed;
+		top: 0;
+		left: 0;
+		height: 100%;
+		width: 100%;
+		background: rgba(0, 0, 0, 0.4);
+		z-index: 3;
+	
+		.wrap {
+			position: absolute;
+			left: 0;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			margin: auto;
+			background: #fff;
+			width: calc(100% - 198rpx);
+			height: 700rpx;
+			border-radius: 20rpx;
+	
+			.alert-top {
+				padding: 33rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				position: relative;
+			}
+	
+			.title {
+				font-size: 32rpx;
+				font-weight: 600;
+				color: #333333;
+			}
+	
+			.close {
+				position: absolute;
+				right: 33rpx;
+			}
+		}
+	}
+	
+	.cancel,
+	.confirm {
+		position: absolute;
+		display: inline-block;
+		width: 50%;
+		text-align: center;
+		bottom: 0;
+		padding: 10px;
+		border-top: 1px solid #eee;
+		font-size: 34rpx;
+	}
+	
+	.cancel {
+		left: 0;
+		border-right: 1px solid #eee;
+		color: #AFB3BF;
+	}
+	
+	.confirm {
+		right: 0;
+		color: #22C572;
+	}
+	.topInfo {
+		height: 210rpx;
+		background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
+		padding: 30rpx;
+	
+		.topInfo-item {
+			height: 150rpx;
+			background-color: #FFFFFF;
+			border-radius: 20rpx;
+			padding: 40rpx;
+	
+			.logo {
+				width: 40rpx;
+				height: 40rpx;
+				margin-top: 8rpx;
+			}
+	
+			.infoText {
+				font-size: 36rpx;
+				font-weight: 600;
+				margin-left: 20rpx;
+			}
+	
+			.infoData {
+				color: #878C9C;
+				font-size: 26rpx;
+				margin-top: 10rpx;
+			}
+		}
+	}
+	
 </style>

+ 54 - 15
pages/universalityAudit/list.vue

@@ -1,22 +1,25 @@
 <template>
 	<view>
-		<view class='wrap' v-for='item in datalist' @click='lookdetails(item)'>
-			<view style='display:flex;justify-content: space-between;'>
-				<view class='title'>
-					{{item.businessType}}
-				</view>
-				<view v-if='item.approveStatus' style='color:#FD714F;'>
-					{{item.approveStatus?item.approveStatus:item.status}}
-				</view>
-				<view v-if='item.status=="已驳回"' style='color:#FF4E4E;'>
-					{{item.approveStatus?item.approveStatus:item.status}}
-				</view>
-				<view v-if='item.status=="已通过"' style='color:#22C572;'>
-					{{item.approveStatus?item.approveStatus:item.status}}
+		<view v-if='datalist.length>0'>
+			<view class='wrap' v-for='item in datalist' @click='lookdetails(item)'>
+				<view style='display:flex;justify-content: space-between;'>
+					<view class='title'>
+						{{item.businessType}}
+					</view>
+					<view v-if='item.approveStatus' style='color:#FD714F;'>
+						{{item.approveStatus?item.approveStatus:item.status}}
+					</view>
+					<view v-if='item.status=="已驳回"' style='color:#FF4E4E;'>
+						{{item.approveStatus?item.approveStatus:item.status}}
+					</view>
+					<view v-if='item.status=="已通过"' style='color:#22C572;'>
+						{{item.approveStatus?item.approveStatus:item.status}}
+					</view>
 				</view>
+				<view>{{item.createDate}}</view>
 			</view>
-			<view>{{item.createDate}}</view>
 		</view>
+		<view v-if='show' style='text-align:center;background:#F2F6FA;'>暂无更多数据</view>
 	</view>
 </template>
 
@@ -26,12 +29,22 @@
 			return {
 				datalist:[],
 				currentPage:1,
+				show:false,
 				pageSize:10
 			}
 		},
 		onShow(){
 			this.getList()
 		},
+		onReachBottom() { //上拉触底函数
+			// if (this.statusFlag == 3) {
+				if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+					this.pageSize += 1
+					this.currentPage += 1
+					this.getList()
+				}
+			// }
+		},
 		methods: {
 			lookdetails(row){
 				uni.navigateTo({
@@ -44,6 +57,9 @@
 			    })
 			  },
 			getList(){
+				uni.showLoading({
+					title: "正在加载"
+				})
 				this.$api.doRequest('get', '/generalAuditInfo/selectGeneralAuditInfo', {
 					startDate: '',
 					endDate: '',
@@ -53,7 +69,30 @@
 					searchType: '',
 					businessType: ''
 				}).then(res => {
-					this.datalist=res.data.data.records
+					if(res.data.code==200){
+						uni.hideLoading()
+						if(res.data.data.records.length>0){
+							this.show=false
+							if(this.currentPage==1){
+								this.datalist=res.data.data.records
+							}else{
+								this.datalist=this.datalist.concat(res.data.data.records)
+							}
+						}else{
+							this.show=true
+							if(this.currentPage==1){
+								this.datalist=[]
+							}
+						}
+					}else{
+						uni.hideLoading()
+						uni.showToast({
+							title: "系统异常,请联系管理员",
+							icon: 'none',
+							duration: 2000
+						})
+					}
+					
 				})
 			}
 		}