From 7c3218e12105b87cab21e9ced57c99c339ffac10 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期二, 26 七月 2022 08:51:58 +0800
Subject: [PATCH] tatolpage

---
 pages/my-application/my-application.vue |   99 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 69 insertions(+), 30 deletions(-)

diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue
index 9088476..dc26f9b 100644
--- a/pages/my-application/my-application.vue
+++ b/pages/my-application/my-application.vue
@@ -1,6 +1,6 @@
 <template>
 	<!-- 鎴戠殑鐢宠 -->
-	<view class="my-application">
+	<view class="my-application" >
 		<!-- 鎼滅储鍖哄煙 -->
 		<view class="searchBox">
 			<view class="topRow">
@@ -20,17 +20,17 @@
 			</view>
 			<!-- 鏃堕棿閫夋嫨鍣� -->
 			<view class="example-body"><uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" /></view>
-			<view class="searchBtn"><u-button type="primary" text="鎼滅储" @click="searchClick"></u-button></view>
+			<view class="searchBtn"><u-button type="primary" text="鎼滅储" @click="searchClick"></u-button> <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button></view>
 		</view>
 
 		<!-- 閫夋嫨鍣� -->
 		<u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" :columns="selectList"></u-picker>
 
 		<!-- 鎴戠殑鐢宠鍗$墖鍖哄煙 -->
-		<u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px">
+		<!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> -->
 			<combination-card v-for="(item, index) in shenqingData" index="index">
 				<template v-slot:top>
-					<u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox>
+					<!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> -->
 					<view>
 						<text>{{ item.title }}</text>
 					</view>
@@ -71,11 +71,11 @@
 								<image src="@/static/home/cehui.png" mode=""></image>
 								<view>鎾ゅ洖</view>
 							</view>
-							<view @click="checkTheScheduleClick" v-if="item.status == 1">
+							<view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
 								<image src="@/static/home/jindu.png" mode=""></image>
 								<view>鏌ョ湅杩涘害</view>
 							</view>
-							<view @click="theFormDataClick" v-if="item.status == 1 || item.status == 2">
+							<view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2">
 								<image src="@/static/home/biaodan.png" mode=""></image>
 								<view>琛ㄥ崟鏁版嵁</view>
 							</view>
@@ -83,11 +83,11 @@
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>閲嶆柊鐢宠</view>
 							</view>
-							<view v-if="item.status == 3">
+							<view v-if="item.status == 3" @click="editMyApplication(item)">
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>缂栬緫</view>
 							</view>
-							<view @click="approvalHistoryClick" v-if="item.status == 2 || item.status == 3">
+							<view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>瀹℃壒鍘嗗彶</view>
 							</view>
@@ -95,7 +95,7 @@
 					</view>
 				</template>
 			</combination-card>
-		</u-checkbox-group>
+		<!-- </u-checkbox-group> -->
 
 		<!-- 鎾ゅ洖妯℃�佹 -->
 		<view class="wodeshenqingMotai">
@@ -115,16 +115,20 @@
 				@cancel="batchDeleteModalCancel"
 			></u-modal>
 		</view>
+		
+		<view class="" style="height:50px;">
+			
+		</view>
 
 		<!-- 搴曢儴鍏ㄩ�� -->
 		<view class="bottomTabbar">
-			<view class="bottomTabbar_checkBox">
-				<u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange">
+			 <view class="bottomTabbar_checkBox">
+				<!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange">
 					<u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox>
-				</u-checkbox-group>
-			</view>
+				</u-checkbox-group> -->
+			</view> 
 			<view class="bottomTabbar_button">
-				<u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="batchDeleteClick"></u-button>
+				<!-- <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="batchDeleteClick"></u-button> -->
 				<u-button type="primary" text="鏂板鐢宠" @click="newApplicationClick"></u-button>
 			</view>
 		</view>
@@ -210,6 +214,7 @@
 		if (this.menuShow == true) {
 			this.$refs.menuRef.menuClick();
 		}
+		this.myApplication.pageNumber = 1;
 		this.init();
 	},
 	// 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗
@@ -246,6 +251,17 @@
 			this.getMoreNews();
 		}, 1000);
 	},
+	// 涓嬫媺鍔犺浇
+	onPullDownRefresh() {
+		console.log('refresh');
+		this.myApplication.pageNumber = 1;
+		this.loadingType = 0;
+		this.shenqingData = [];
+		setTimeout(()=> {
+			uni.stopPullDownRefresh();
+		}, 1000);
+		this.init();
+	},
 	methods: {
 		init() {
 			this.getMoreNews();
@@ -279,7 +295,12 @@
 					return;
 				}
 				// this.myApplication.pageNumber++; // 姣忚Е搴曚竴娆� page +1
-				this.shenqingData = this.shenqingData.concat(response.data.records); //灏嗘暟鎹嫾鎺ュ湪涓�璧�
+				if(this.myApplication.title||this.myApplication.status||this.myApplication.result||this.myApplication.startTime||this.myApplication.endTime){
+					this.shenqingData = response.data.records
+				} else{
+					this.shenqingData = this.shenqingData.concat(response.data.records);
+				}
+				 //灏嗘暟鎹嫾鎺ュ湪涓�璧�
 				this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆
 				uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾
 			});
@@ -307,10 +328,16 @@
 			console.log('maskClick浜嬩欢:', e);
 		},
 		searchClick() {
-			// if(this.myApplication.title || this.myApplication.status || this.myApplication.result ||  this.myApplication.startTime || this.myApplication.endTime){
 			console.log('this.myApplication', this.myApplication);
-			this.getProcessDataList();
-			// }
+			this.myApplication.pageNumber = 1;
+			this.loadingType = 0;
+			this.getMoreNews();
+		},
+		emptyButtonClick(){
+			this.myApplication.title = '';
+			this.selectText = '';
+			this.range = [];
+			this.init();
 		},
 		// 鎾ゅ洖妯℃�佹
 		withDrawClick(id) {
@@ -330,12 +357,12 @@
 						title: res.data,
 						duration: 2000
 					});
-					this.withDrawShow = false;
-					// 鍒濆鍖栫敵璇峰垪琛�
-					this.shenqingData = [];
-					this.myApplication.pageNumber = 1;
-					this.getMoreNews();
 				}
+				this.withDrawShow = false;
+				// 鍒濆鍖栫敵璇峰垪琛�
+				this.myApplication.pageNumber = 1;
+				this.shenqingData = [];
+				this.getMoreNews();
 			});
 
 			console.log(this.withDrawId);
@@ -400,7 +427,7 @@
 							this.form.assignees = ids;
 							this.showAssign = true;
 							// 鑾峰彇琛ㄥ崟鍐呭锛岄噸鏂板垱寤虹敵璇�
-							this.$reqPost('apply',this.form).then(res=>{
+							this.$reqPost('apply',this.form,'form').then(res=>{
 								console.log('閲嶆柊鎻愪氦鐢宠',res);
 								if(res.code == 0){
 									uni.showToast({
@@ -409,6 +436,10 @@
 										duration:2000	
 									});
 								}
+								// 鍒濆鍖栫敵璇峰垪琛�
+								this.myApplication.pageNumber = 1;
+								this.shenqingData = [];
+								this.getMoreNews();
 							})
 						} else {
 							this.form.assignees = [];
@@ -421,6 +452,14 @@
 			});
 			
 			this.modalVisible = true;
+		// }
+		},
+		// 淇敼鐢宠
+		editMyApplication(v){
+			console.log('淇敼鐢宠');
+			uni.navigateTo({
+				url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}`
+			});
 		},
 		// 鎵归噺鍒犻櫎妯℃�佹
 		batchDeleteClick() {
@@ -452,21 +491,21 @@
 			console.log('totalChange', n);
 		},
 		// 鏌ョ湅杩涘害
-		checkTheScheduleClick() {
+		checkTheScheduleClick(v) {
 			uni.navigateTo({
-				url: '/pages/check-the-schedule/check-the-schedule'
+				url: `/pages/check-the-schedule/check-the-schedule?index=${v}`
 			});
 		},
 		// 琛ㄥ崟鏁版嵁
-		theFormDataClick() {
+		theFormDataClick(v) {
 			uni.navigateTo({
-				url: '/pages/the-form-data/the-form-data'
+				url: `/pages/the-form-data/the-form-data?index=${v}`
 			});
 		},
 		// 瀹℃壒鍘嗗彶
-		approvalHistoryClick() {
+		approvalHistoryClick(v) {
 			uni.navigateTo({
-				url: '/pages/approval-history/approval-history'
+				url: `/pages/approval-history/approval-history?index=${v}`
 			});
 		},
 		// 鏂板鐢宠

--
Gitblit v1.9.1