Эх сурвалжийг харах

Signed-off-by: zhaobao <528046418@qq.com>

zhaobao 10 сар өмнө
parent
commit
478ef5d91a

+ 1 - 1
pages/app_views/checkList/form/form.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="wrap">
-		<uni-section :title="point.pointContent" type="line">
+		<uni-section :title="point?point.pointContent:''" type="line">
 			<uni-forms ref="form" :modelValue="formData" :rules="rules" :label-width="300" label-position="top">
 				<uni-forms-item label="检查结果" name="checkResult" required>
 					<view class="uni-data-checkbox-wrap">

+ 29 - 3
pages/app_views/checkList/index/index.vue

@@ -33,7 +33,7 @@
 				<view class="handle-container" v-if="handleVisiable">
 					<view class="handle" @click="handleSubmit(3)">全部通过</view>
 					<view class="handle" @click="handleSubmit(4)">全不通过</view>				
-					<view class="handle submit" @click="handleSubmit(1)">提交</view>
+					<view class="handle submit" @click="handleSubmit(1)" v-if="canSubmit">提交</view>
 	<!-- 				<view class="handle" @click="handleSubmit(2)">撤销</view>	 -->			
 				</view>
 			</template>
@@ -64,7 +64,8 @@
 				checklistId:undefined,
 				handleVisiable:false,
 				type:undefined,
-				status:undefined
+				status:undefined,
+				canSubmit:false
 			}
 		},
 		onLoad({id,recordId,type}) {
@@ -127,7 +128,30 @@
 			handleSubmit(type){
 				let recordId=this.recordId;
 				let checklistId=this.checklistId;
-				if(type===1){//完成			
+				if(type===1){//完成	
+					let points=[]
+					for(let i=0;i<this.itemList.length;i++){
+						if(this.itemList[i].children){
+							itemList[i].children.map(child=>{
+								child.recordList.map(pointitem=>{
+									points.push(pointitem)
+								})
+							})
+						}else{
+							this.itemList[i].recordList.map(pointitem=>{
+									points.push(pointitem)
+							})
+							
+						}						
+					}			
+					let isChecked=points.find(item=>(item.checkResult===-1||item.checkResult===1))	
+					if(!isChecked){
+						uni.showToast({
+							icon:"none",
+							title:"请检查后再提交"
+						})
+						return							
+					}
 					checklistComplete(recordId,checklistId).then(()=>{
 						uni.$emit('type',1)						
 						uni.switchTab({
@@ -155,11 +179,13 @@
 				if(type===3){
 					checklistBatchUpdate(recordId,1).then(()=>{
 						this.getchecklistRecord(checklistId,recordId)
+						this.canSubmit=true
 					})
 				}
 				if(type===4){
 					checklistBatchUpdate(recordId,-1).then(()=>{
 						this.getchecklistRecord(checklistId,recordId)
+						this.canSubmit=true
 					})
 				}			
 			}

+ 7 - 5
pages/app_views/danger/submit/submit.vue

@@ -77,10 +77,10 @@
 				  { value: 3, text: "政府执法" },
 				],
 				dangerLevelRange:[
-				  { value: 1, text: "重大隐患" },
-				  { value: 2, text: "较大隐患" },
+				  { value: 4, text: "一般隐患" },
 				  { value: 3, text: "严重隐患" },
-				  { value: 4, text: "一般隐患" }
+				  { value: 2, text: "较大隐患" },													
+				  { value: 1, text: "重大隐患" }
 				],
 				groupList:[],
 				riskPointRange:[],
@@ -93,7 +93,7 @@
 					dangerTitle: '',
 					dangerSource: 0,
 					dangerDesc: '',
-					dangerLevel: 1,
+					dangerLevel: 4,
 					dangerCatId: undefined,
 					dangerCatTitle: '',
 					riskPointId: undefined,
@@ -282,6 +282,7 @@
 					res.curAccountId = flow.accountId
 					res.curAccountName = flow.accountName
 					res.groupId=this.formData.groupId
+					res.groupName=group.groupName
 					res.formCode= 'submit'
 					res.dangerId=this.flowData.wfInsId
 					res.dangerLocation=this.formData.dangerLocation
@@ -329,8 +330,9 @@
 					targetGroupId:qrcode.groupId,
 					targetGroupName:qrcode.groupName,
 				}
+				debugger
 				let flow=await handleWorkflow({...workflowForm,attachList})
-				let resq=await handleDanger({... this.formData,...qrcode_target,attachList,status:1,riskPointId:qrcode.targetId})
+				let resq=await handleDanger({...res,...qrcode_target,attachList,status:1,riskPointId:qrcode.targetId})
 				uni.showToast({
 					icon:'none',
 					title:"提交成功!",

+ 24 - 2
pages/app_views/hazard/index/index.vue

@@ -22,7 +22,7 @@
 				<view class="handle-container" v-if="handleVisiable">	
 					<view class="handle" @click="handleSubmit(3)">全部通过</view>
 					<view class="handle" @click="handleSubmit(4)">全不通过</view>
-					<view class="handle submit" @click="handleSubmit(1)">提交</view>
+					<view class="handle submit" @click="handleSubmit(1)" v-if="canSubmit">提交</view>
 <!-- 					<view class="more" @mouseenter="hover(1)" @mouseleave="hover">
 						<text class="text">更多</text>
 						<view class="list" v-if="showMore">
@@ -62,7 +62,8 @@
 				showMore:false,
 				submit_bt_state:false,
 				type:undefined,
-				status:undefined
+				status:undefined,
+				canSubmit:false
 			}
 		},
 		filters: {
@@ -145,6 +146,25 @@
 				let recordId=this.recordId;
 				let checklistId=this.checklistId;
 				if(type===1){//完成
+					let isNotChecked=true
+					for(let i=0;i<this.itemList.length;i++){
+						if(this.itemList[i].riskList){
+							this.itemList[i].riskList.map(child=>{
+								child.recordList.map(measure=>{
+									if(measure.checkResult===-1||measure.checkResult===1){
+										isNotChecked=false
+									}
+								})
+							})
+						}						
+					}	
+					if(isNotChecked){
+						uni.showToast({
+							icon:"none",
+							title:"请检查后再提交"
+						})
+						return							
+					}			
 					completeChecklistDoing(recordId,checklistId).then(()=>{					
 						if(this.isAllPass()){
 							uni.$emit('type',4)
@@ -191,11 +211,13 @@
 				if(type===3){
 					batchUpdateChecklistHazardRecordDoing(recordId,1).then(()=>{
 						this.getChecklistHazardRecordViewById(checklistId,recordId)
+						this.canSubmit=true
 					})
 				}
 				if(type===4){
 					batchUpdateChecklistHazardRecordDoing(recordId,-1).then(()=>{
 						this.getChecklistHazardRecordViewById(checklistId,recordId)
+						this.canSubmit=true
 					})
 				}			
 			},

+ 4 - 0
pages/history/detail/detail.vue

@@ -38,6 +38,10 @@
 						<view class="item-row-lable">整改期限</view>
 						<view class="item-row-cont">{{baseInfo.dangerDeadLine}}</view>	
 					</view>
+					<view class="item-row">
+						<view class="item-row-lable">处理说明</view>
+						<view class="item-row-cont">{{flow.actionRemark}}</view>	
+					</view>				
 					<view class="attachList" v-if="flow.attachList&&flow.attachList.length>0">
 						<view class="flow-title">附件</view>
 						<view class="attachList-cont">