zhongtianhaoyuan il y a 2 ans
Parent
commit
556c4443b9
1 fichiers modifiés avec 183 ajouts et 148 suppressions
  1. 183 148
      pages/task/audit/universalityAudit.vue

+ 183 - 148
pages/task/audit/universalityAudit.vue

@@ -9,7 +9,8 @@
 						<image src="../../../static/img/tongguo.png" mode="" v-if="dataobj.status == '已通过'"
 							style="height: 40rpx;"></image><!-- 通过 -->
 						<!-- v-if="status == '审核中' || status == '待决策人审核'" -->
-						<image v-if='dataobj.approveStatus' src="../../../static/img/daishenhe.png" mode="" style="height: 40rpx;"></image>
+						<image v-if='dataobj.approveStatus' src="../../../static/img/daishenhe.png" mode=""
+							style="height: 40rpx;"></image>
 						<!-- 待审核 -->
 					</view>
 					<!-- {{auditList.length > 0 ?auditList[auditList.length - 1].operatorMajorRoleName:""}} -->
@@ -20,48 +21,47 @@
 		</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>
+				<u-form-item label="类型">
+					<view style='text-align:right;width:100%;color:#AFB3BF;'>{{dataobj.businessType}}</view>
+				</u-form-item>
 				<u-form-item :border-bottom='false' :label-position='"top"' label="备注">
 					<view class="u-textarea-style">
 						<view class="right-bottom">
 							{{dataobj.remark?dataobj.remark.length:0}}/2000个字
 						</view>
-						<textarea style='font-size:12px;' disabled maxlength="2000" v-model='dataobj.remark' placeholder="请输入备注信息" name="" id="" cols="30" rows="11"></textarea>
+						<textarea style='font-size:12px;' disabled maxlength="2000" v-model='dataobj.remark'
+							placeholder="请输入备注信息" name="" id="" cols="30" rows="11"></textarea>
 					</view>
 				</u-form-item>
 			</u-form>
 			<u-form :label-position='"top"' ref="uForm">
 				<u-form-item :border-bottom='false' :label="'共'+imglist.length+'个附件'">
-				<view style='width:100%;border-top:1px solid #EEEEEE;' v-if='imglist.length>0'>
-					<view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
-						<view class="img_item">
-							<view class="" style="width: 16%;">
-								<image
-									v-if="item.type == 'pdf'"
-									class="imgsign" src="../../../static/img/oa_office/pdf3.png"
-									mode=""></image>
-								<image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
-									class="imgsign" src="../../../static/img/oa_office/excle3.png"
-									mode=""></image>
-								<image v-else-if="item.type == 'doc'||item.type == 'docx'"
-									class="imgsign" src="../../../static/img/oa_office/word3.png"
-									mode=""></image>
-								<image v-else class="imgsign" :src="item.appendixPath" mode="">
-								</image>
-							</view>
-							<view class="" style="width: 70%;">
-								<view class="char_css">{{item.appendixName}}</view>
-								<view class="img_size">{{item.appendixSize}}</view>
-							</view>
-							<view style="color: #22C572;" class="img_dowload" @click="openDownload(item)">
-								下载
+					<view style='width:100%;border-top:1px solid #EEEEEE;' v-if='imglist.length>0'>
+						<view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
+							<view class="img_item">
+								<view class="" style="width: 16%;">
+									<image v-if="item.type == 'pdf'" mode="aspectFill" class="imgsign"
+										src="../../../static/img/oa_office/pdf3.png"></image>
+									<image v-else-if="item.type == 'xls'||item.type == 'xlsx'" mode="aspectFill"
+										class="imgsign" src="../../../static/img/oa_office/excle3.png"></image>
+									<image v-else-if="item.type == 'doc'||item.type == 'docx'" mode="aspectFill"
+										class="imgsign" src="../../../static/img/oa_office/word3.png"></image>
+									<image v-else class="imgsign" :src="item.appendixPath" mode="" mode="aspectFill">
+									</image>
+								</view>
+								<view class="" style="width: 70%;">
+									<view class="char_css">{{item.appendixName}}</view>
+									<view class="img_size">{{item.appendixSize}}</view>
+								</view>
+								<view style="color: #22C572;" class="img_dowload" @click="openDownload(item)">
+									下载
+								</view>
 							</view>
+
+							<!-- <u-icon name="attach" ></u-icon> -->
+							<!-- <image style='width: 200rpx;height: 200rpx;' :src="item" mode=""></image> -->
 						</view>
-						
-						<!-- <u-icon name="attach" ></u-icon> -->
-						<!-- <image style='width: 200rpx;height: 200rpx;' :src="item" mode=""></image> -->
 					</view>
-				</view>
 				</u-form-item>
 			</u-form>
 			<u-form style='padding-bottom: 80rpx;' ref="uForm">
@@ -91,17 +91,20 @@
 										<!-- <view class='time'>{{item.updateDate}}</view> -->
 										<view v-if="item.status=='success'" class="status success">
 											{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
-												v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
+												v-if='!item.commonStaffs1&&index!=0'>已审核</text>
+										</view>
 										<view v-if="item.status=='error'" class="status error">
 											{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
 												v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
 										</view>
 										<view v-if="item.status=='question'" class="status question">
 											{{item.commonStaffs1?item.staffscontent:''}}<text
-												v-if='!item.commonStaffs1'>未审核</text></view>
+												v-if='!item.commonStaffs1'>未审核</text>
+										</view>
 										<!-- <view  class="status success">吕波(已审核)</view> -->
 									</view>
-									<view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
+									<view
+										v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
 										class='time'>
 										{{item.updateDate}}
 									</view>
@@ -111,12 +114,14 @@
 								</view>
 								<view class="flex audit_img">
 									<view v-for="(items,indexs) in item.fileUrl" class="url_css">
-										<image :src="items" mode="aspectFill" class="url_img" @click="auditFile(items)"></image>
+										<image :src="items" mode="aspectFill" class="url_img" @click="auditFile(items)">
+										</image>
 									</view>
 								</view>
 							</view>
 							<view v-if='item.commonStaffs1' class="right">
-								<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
+								<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'"
+									size="28">
 								</u-icon>
 							</view>
 						</view>
@@ -150,25 +155,28 @@
 					</view>
 					<!-- <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
 						maxlength="1000" /> -->
-						<textarea maxlength="1000" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30" rows="11"></textarea>
+					<textarea maxlength="1000" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30"
+						rows="11"></textarea>
 				</view>
 				<view class="upload_css">
 					上传附件
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="99"
-						:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
-						@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
+					<upload class="upload" :width="140" ref="upload" :action="action" :max-size="maxSize"
+						:max-count="99" :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
+						@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
+						@on-progress="onProgress"></upload>
 				</view>
 				<view class="audit_btn">
 					<view @click='close()' class="cancel">取消</view>
 					<view @click='passSubmit()' class="confirm">确定</view>
 				</view>
-				
+
 			</view>
 		</view>
 		<view style='padding:10px;' class='flex bottom-btn'>
 			<u-button v-if='dataobj.taskId' @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
 			<u-button v-if='dataobj.taskId' @click='pass' type="success" class="btn2">通过</u-button>
-			<u-button v-if='!dataobj.taskId' @click="fanHui" type="success" class="btn1" hover-class='none'>返回</u-button>
+			<u-button v-if='!dataobj.taskId' @click="fanHui" type="success" class="btn1" hover-class='none'>返回
+			</u-button>
 		</view>
 	</view>
 </template>
@@ -181,30 +189,30 @@
 		},
 		data() {
 			return {
-				id:'',
-				dataobj:{},
-				show:false,
-				auditMind:'',
-				title:'',
-				imglist:[],
-				auditList:[],
+				id: '',
+				dataobj: {},
+				show: false,
+				auditMind: '',
+				title: '',
+				imglist: [],
+				auditList: [],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M,
-				fileUrl:[]
+				fileUrl: []
 			}
 		},
-		onLoad(options){
-			this.id=options.id
+		onLoad(options) {
+			this.id = options.id
 			console.log(options.id)
 		},
-		onShow(){
+		onShow() {
 			// this.$nextTick(()=>{
-				this.getList()
+			this.getList()
 			// })
-			
+
 		},
 		methods: {
-			openDownload(item){
+			openDownload(item) {
 				uni.downloadFile({
 					url: item.appendixPath,
 					success: function(res) {
@@ -218,7 +226,7 @@
 						});
 					}
 				});
-				
+
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -287,7 +295,7 @@
 						}
 					})
 				}
-			
+
 			},
 			//通过
 			passSubmit() {
@@ -319,22 +327,21 @@
 				if (that.fileUrl.length > 0) {
 					info = that.auditMind + "##" + that.fileUrl.toString()
 				}
-					this.$api.doRequest('post', '/newWorkflow/api/handle', {
-						taskId: list.taskId,
-						approved: status,
-						auditMind: info?info:"",
-						needReapply: status2 != undefined ? true : false,
-					}).then(res => {
-						if (status == true) {
-							this.$api.msg('通过成功')
-						} else if (status == false) {
-							this.$api.msg('驳回成功')
-						}
-						setTimeout(function() {
-
-															uni.navigateBack()
-						}, 1000);
-					})
+				this.$api.doRequest('post', '/newWorkflow/api/handle', {
+					taskId: list.taskId,
+					approved: status,
+					auditMind: info ? info : "",
+					needReapply: status2 != undefined ? true : false,
+				}).then(res => {
+					if (status == true) {
+						this.$api.msg('通过成功')
+					} else if (status == false) {
+						this.$api.msg('驳回成功')
+					}
+					setTimeout(function() {
+						uni.navigateBack()
+					}, 1000);
+				})
 			},
 			fanHui() {
 				uni.navigateBack()
@@ -342,20 +349,20 @@
 			close() {
 				this.show = false
 			},
-			getList(){
-				var that =this
+			getList() {
+				var that = this
 				this.$api.doRequest('get', '/generalAuditInfo/getGeneralAuditInfo', {
-					id:this.id
+					id: this.id
 				}).then(res => {
-					this.dataobj=res.data.data
+					this.dataobj = res.data.data
 					this.$api.doRequest('get', '/appendix/query/getFileList', {
 						appendixIds: that.dataobj.addressUrl
 					}).then(res1 => {
 						that.imglist = res1.data.data
-						for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+						for (let i = 0; i < that.imglist.length; i++) { //获取后缀
 							if (that.imglist[i].appendixName) {
-								let index = that.imglist[i].appendixName.lastIndexOf(".") 
-								that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
+								let index = that.imglist[i].appendixName.lastIndexOf(".")
+								that.imglist[i].type = that.imglist[i].appendixName.substring(index + 1)
 							}
 						}
 					})
@@ -367,7 +374,7 @@
 						this.$api.doRequest('get', '/commonUser/getHis', {
 							workflowId: res1.data.data[0].id,
 							businessKey: this.id,
-							branch:that.dataobj.businessType?that.dataobj.businessType:'zt'
+							branch: that.dataobj.businessType ? that.dataobj.businessType : 'zt'
 						}).then(response => {
 							uni.hideLoading()
 							for (let i = 0; i < response.data.data.length; i++) {
@@ -433,18 +440,26 @@
 										response.data.data[i].operatorName = response.data
 											.data[i].workflowHistoricTasks[len].operatorName
 										var time = new Date(response.data.data[i]
-											.workflowHistoricTasks[len].claimTime)
-										.getTime()
+												.workflowHistoricTasks[len].claimTime)
+											.getTime()
 										response.data.data[i].updateDate = this.$u.timeFormat(
 											time, 'mm.dd hh:MM')
 										// response.data.data[i].auditMind = response.data.data[i]
 										// 	.workflowHistoricTasks[len].auditMind
-											if (response.data.data[i].workflowHistoricTasks[len].auditMind && response.data.data[i].workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
-												response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[0]
-												response.data.data[i].fileUrl = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
-											}else{
-												response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind
-											}
+										if (response.data.data[i].workflowHistoricTasks[len]
+											.auditMind && response.data.data[i]
+											.workflowHistoricTasks[len].auditMind.indexOf("##") !=
+											-1) {
+											response.data.data[i].auditMind = response.data.data[i]
+												.workflowHistoricTasks[len].auditMind.split("##")[
+													0]
+											response.data.data[i].fileUrl = response.data.data[i]
+												.workflowHistoricTasks[len].auditMind.split("##")[
+													1].split(",")
+										} else {
+											response.data.data[i].auditMind = response.data.data[i]
+												.workflowHistoricTasks[len].auditMind
+										}
 									} else {
 										this.$set(response.data.data[i], 'status', 'question')
 										// response.data.data[i].status='question'
@@ -456,7 +471,7 @@
 											response.data.data[i].operatorTitle = response.data
 												.data[i].desc.substring(0, 2)
 										}
-					
+
 										response.data.data[i].operatorName = response.data
 											.data[i].desc
 										var time1 = new Date(response.data.data[i].updateDate)
@@ -466,17 +481,17 @@
 										response.data.data[i].auditMind = ''
 									}
 								}
-					
+
 							}
 							console.log(response.data.data)
-							for(let i = 0 ;i<response.data.data.length;i++){
-								if(response.data.data[i].status == "error"){
+							for (let i = 0; i < response.data.data.length; i++) {
+								if (response.data.data[i].status == "error") {
 									this.auditCheck = "error"
 									break;
-								}else if(response.data.data[i].status == "question"){
+								} else if (response.data.data[i].status == "question") {
 									this.auditCheck = "question"
 									break;
-								}else{ 
+								} else {
 									this.auditCheck = "success"
 								}
 							}
@@ -513,35 +528,36 @@
 		left: 0;
 		background-color: #f8f8f8;
 		flex-direction: column;
-	
+
 		.btn1,
 		.btn2 {
 			width: 100%;
 			margin-bottom: 26rpx;
 			border-radius: 90rpx;
 		}
-	
+
 		.btn1 {
 			background: white;
 			color: #00C265;
 		}
 	}
-.content2 {
+
+	.content2 {
 		background: white;
 		margin: 20rpx 0;
 		border-radius: 20rpx;
 		padding: 20rpx;
-	
+
 		.row {
 			display: flex;
-	
+
 			.left {
 				display: flex;
-	// 			align-items: center;
-	
+				// 			align-items: center;
+
 				.item1 {
 					position: relative;
-	
+
 					.item-content {
 						background: #617AE0;
 						width: 44px;
@@ -552,7 +568,7 @@
 						font-size: 15px;
 						color: #fff;
 					}
-	
+
 					.status {
 						text-align: center;
 						position: relative;
@@ -565,27 +581,27 @@
 						top: -16px;
 						background: #fff;
 					}
-	
+
 					.status.success {
 						border: 1px solid rgb(60, 156, 255);
 					}
-	
+
 					.status.error {
 						border: 1px solid rgb(245, 108, 108);
 					}
-	
+
 					.status.question {
 						border: 1px solid #f9ae3d;
 					}
 				}
-	
+
 			}
-	
+
 			.right {
 				width: 80%;
 				// color: #B0B1B5;
 				margin-top: 10px;
-	
+
 				.right-content {
 					background: #F2F3F7;
 					margin-left: 10px;
@@ -594,43 +610,44 @@
 					border-radius: 5px;
 					color: #B0B1B5;
 				}
-	
+
 				.right-item {
 					display: flex;
 					justify-content: space-between;
-	
+
 					.time {
 						color: #999;
 					}
-	
+
 					.item2 {
 						margin-left: 20rpx;
 						margin-top: -7px;
-	
+
 						.name {
 							font-size: 28rpx;
 							font-weight: 800;
 							margin-bottom: 4px;
 						}
-	
+
 						.status.success {
 							color: #6CC48C;
 						}
-	
+
 						.status.error {
 							color: rgb(245, 108, 108);
 						}
-	
+
 						.status.question {
 							color: #f9ae3d;
 						}
 					}
 				}
+
 				.audit_img {
 					flex-wrap: wrap;
 					// margin: 0 10rpx;
 					margin-left: 20rpx;
-				
+
 					.url_css {
 						border: 1px solid #999999;
 						border-radius: 10px;
@@ -639,6 +656,7 @@
 						overflow: hidden;
 						width: 73px;
 						height: 73px;
+
 						.url_img {
 							width: 73px;
 							height: 73px;
@@ -648,10 +666,10 @@
 				}
 			}
 		}
-	
+
 		.row2 {
 			display: flex;
-	
+
 			.item-content {
 				background: #22C572;
 				width: 30px;
@@ -664,38 +682,40 @@
 				padding: 0 2px;
 				margin: 0 auto;
 			}
-	
+
 			.status {
 				position: absolute;
 				top: 0;
 				right: 0;
 			}
 		}
-	
+
 		.row-line {
 			width: 1px;
 			height: 30px;
 			background: #F2F2F2;
 			margin: 10rpx 50rpx;
-	
+
 		}
-	
+
 		.audit {
 			margin-top: 20rpx;
 		}
 	}
-.u-form {
+
+	.u-form {
 		margin: 20rpx;
 		background: #fff;
 		border-radius: 10px;
 		padding: 30rpx 10px;
-	
+
 		.u-form-item {
 			line-height: 30px;
 			padding: 0px 0;
 			font-size: 26rpx;
 		}
 	}
+
 	.u-textarea-style {
 		margin: 20rpx;
 		background: #F9F9FA;
@@ -703,10 +723,12 @@
 		border: 1px solid #EEEEEE;
 		padding: 10rpx 20rpx;
 		position: relative;
-		height:165px;
-		/deep/.uni-textarea-textarea{
+		height: 165px;
+
+		/deep/.uni-textarea-textarea {
 			width: 80%;
 		}
+
 		.right-bottom {
 			position: absolute;
 			right: 20rpx;
@@ -714,7 +736,8 @@
 			color: #AFB3BF;
 		}
 	}
-.form_top {
+
+	.form_top {
 		border-bottom: 1px solid #F5F6FA;
 		padding-bottom: 10px;
 		margin-bottom: 18rpx;
@@ -722,7 +745,7 @@
 		font-weight: 600;
 	}
 
-	.form_view{
+	.form_view {
 		margin: 20rpx 0;
 		border-radius: 20rpx;
 		background: #F9F9FA;
@@ -738,16 +761,19 @@
 	.input_css {
 		font-size: 20rpx;
 	}
+
 	.img_item {
 		display: flex;
 		width: 100%;
 		margin: 10px 0;
 		padding: 0 10rpx;
-		.imgsign{
+
+		.imgsign {
 			width: 25px;
 			height: 25px;
-			margin-top: 6px;
+			margin-top: 10px;
 		}
+
 		.char_css {
 			font-size: 28rpx;
 			font-weight: 600;
@@ -760,18 +786,20 @@
 			text-overflow: ellipsis;
 			word-break: break-all;
 		}
-		.img_size{
+
+		.img_size {
 			color: #B0B3BF;
 			font-size: 12px;
 			margin-top: 5px;
 		}
-	
+
 		.img_dowload {
 			width: 14%;
 			color: #22C572;
 			text-align: right;
 		}
 	}
+
 	.shade {
 		position: fixed;
 		top: 0;
@@ -781,7 +809,7 @@
 		background: rgba(0, 0, 0, 0.4);
 		z-index: 3;
 		overflow-y: scroll;
-	
+
 		.wrap {
 			position: absolute;
 			left: 0;
@@ -791,11 +819,11 @@
 			margin: auto;
 			background: #fff;
 			width: calc(100% - 198rpx);
-			height: 840rpx;
+			height: 770rpx;
 			overflow-y: scroll;
 			// overflow: hidden;
 			border-radius: 20rpx;
-	
+
 			.alert-top {
 				padding: 33rpx;
 				display: flex;
@@ -803,27 +831,34 @@
 				align-items: center;
 				position: relative;
 			}
-	
+
 			.title {
 				font-size: 32rpx;
 				font-weight: 600;
 				color: #333333;
 			}
-	
+
 			.close {
 				position: absolute;
 				right: 33rpx;
 			}
+
 			.upload_css {
 				margin-left: 20rpx;
+
+				.upload {
+					// width: 80px;
+					// height: 80px;
+				}
 			}
 		}
 	}
-	.audit_btn{
+
+	.audit_btn {
 		display: flex;
 		top: 0px;
 	}
-	
+
 	.cancel,
 	.confirm {
 		// position: absolute;
@@ -836,40 +871,41 @@
 		font-size: 34rpx;
 		margin: auto;
 	}
-	
+
 	.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;
@@ -877,5 +913,4 @@
 			}
 		}
 	}
-	
 </style>