Sfoglia il codice sorgente

审批人关闭-关闭理由非必填;申请人关闭-关闭理由必填

cxmo 1 anno fa
parent
commit
80dfcd917f

+ 10 - 0
pages-approve/businessTrip/closeReason.vue

@@ -18,11 +18,14 @@
 			return {
 				reason: '',
 				id:null,
+				shouldCheck:false
 			}
 		},
 		onLoad(options) {
 			this.id=options.id
+            this.shouldCheck = options.shouldCheck
 		},
+
 		methods: {
 			async handleSubmit() {
 				// if(!this.reason){
@@ -32,6 +35,13 @@
 				// 	})
 				// 	return
 				// }
+				if(this.shouldCheck=='true'&&!this.reason){
+					uni.showToast({
+						title:'请填写理由',
+						icon:"none"
+					})
+					return
+				}
 				const res=await apiCloseApply({
 					BusinessApplyId:Number(this.id),
 					CloseReason:this.reason

+ 2 - 1
pages-approve/businessTrip/detail.vue

@@ -250,8 +250,9 @@ export default {
 
         // 审批关闭
         handleClose(){
+            const url = `./closeReason?id=${this.id}&shouldCheck=${this.adminId===this.info.ApplyAdminId}`
             uni.navigateTo({
-				url:"./closeReason?id="+this.id
+				url:url
 			})
         },