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-have-todo/my-have-todo.vue |  285 +++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 177 insertions(+), 108 deletions(-)

diff --git a/pages/my-have-todo/my-have-todo.vue b/pages/my-have-todo/my-have-todo.vue
index ab81089..edf4aca 100644
--- a/pages/my-have-todo/my-have-todo.vue
+++ b/pages/my-have-todo/my-have-todo.vue
@@ -1,25 +1,36 @@
 <template>
 	<view class="my-have-todo">
 		<!-- 鎼滅储鍖哄煙 -->
+		<view class="searchContainer">
+			
+		
 		<view class="searchBox">
 			<view class="search">
-				<u-search @clickIcon="searchIconClick" :clearabled="false" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" v-model="searchData" shape="square"></u-search>
+				<u-search :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" v-model="haveTodoParams.title" shape="square"></u-search>
 			</view>
 			<!-- 鐘舵�侀�夋嫨鍣� -->
-			<view class="data-selet" @click="statusSeletShow = true">
+			<!-- <view class="data-selet" @click="statusSeletShow = true">
 				<view class="content">
 					<text>{{ dataSeletText }}</text>
 				</view>
 				<view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view>
+			</view> -->
+			<view class="search">
+				<u-search  :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="haveTodoParams.name" shape="square"></u-search>
 			</view>
 		</view>
 
 		<!-- 鏃堕棿鎼滅储鍖哄煙 -->
 		<view class="timeContiner">
-			<uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="createTime" @change="startDateChange" placeholder="寮�濮嬫椂闂�" />
-			<uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="endTime" @change="endDateChange" placeholder="缁撴潫鏃堕棿" />
+			<uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.startDate" @change="startDateChange" placeholder="寮�濮嬫椂闂�" />
+			<uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.endDate" @change="endDateChange" placeholder="缁撴潫鏃堕棿" />
 		</view>
-
+		
+		<view class="searchButton">
+			<u-button type="primary" text="鎼滅储" @click="searchButtonClick"></u-button>
+			<u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button>
+		</view>
+</view>
 		<!-- 鎴戠殑宸插姙鍗$墖鍖哄煙 -->
 		<u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px">
 		<combination-card v-for="(item, index) in yibanData" index="index">
@@ -70,11 +81,11 @@
 				<view class="bottom-container">
 					<!-- 宸插姙鎸夐挳 -->
 					<view class="bottom-content__item">
-						<view @click="theFormDataClick">
+						<view @click="theFormDataClick(item.tableId)">
 							<image src="@/static/home/biaodan.png" mode=""></image>
 							<view>琛ㄥ崟鏁版嵁</view>
 						</view>
-						<view @click="approvalHistoryClick">
+						<view @click="approvalHistoryClick(item.procInstId)">
 							<image src="@/static/home/history.png" mode=""></image>
 							<view>瀹℃壒鍘嗗彶</view>
 						</view>
@@ -94,7 +105,7 @@
 				<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>
 			<view class="bottomTabbar_button">
-				<u-button :plain="true" type="primary"  text="鎵归噺鍒犻櫎" @click="deleteApplicationClick()"></u-button>
+				<u-button :plain="true" type="primary"  text="鎵归噺鍒犻櫎" @click="deleteApplicationClickAll()"></u-button>
 			</view>
 		</view>
 		
@@ -111,7 +122,7 @@
 		</view>
 
 		<!-- 閫夋嫨鍣� -->
-		<u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
+		<!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> -->
 		
 		<!-- 鑿滃崟鏍� -->
 		<popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
@@ -125,19 +136,31 @@
 	data() {
 		return {
 			// 鏉′欢鎼滅储
-			searchData: '',
-			dataSeletText: '璇烽�夋嫨鐘舵��',
+			// searchData: '',
+			// dataSeletText: '璇烽�夋嫨鐘舵��',
 			// 鏃堕棿閫夋嫨
-			createTime: '',
-			endTime: '',
+			// createTime: '',
+			// endTime: '',
 			// 澶嶉�夋
 			checkBoxValue:[],
 			totalSelectValue:[],
 			// 閫夋嫨鍣�
-			statusSeletShow: false,
-			statusList: [['涓浗', '缇庡浗', '鏃ユ湰']],
+			// statusSeletShow: false,
+			// statusList: [['涓浗', '缇庡浗', '鏃ユ湰']],
+			yibanData: [],
+			// 鍒犻櫎鐢宠
+			deleteIds:'',
 			deleteApplicationModalShow:false,
-			yibanData: []
+			haveTodoParams:{
+				name: '',
+				pageNumber: 1,
+				pageSize: 10,
+				sort: 'createTime',
+				order: 'desc',
+				title: '',
+				startDate: '',
+				endDate: ''
+			}
 		};
 	},
 	onShow(){
@@ -161,46 +184,76 @@
 		},
 		// 宸插姙
 		doneList() {
+			uni.showLoading({
+				title:'鍔犺浇涓�...'
+			})
 			this.$reqGet('doneList', this.haveTodoParams).then(res => {
+				uni.hideLoading();
 				if (res.code === 0) {
 					// console.log('宸插姙', res);
 					this.yibanData = res.data.content;
 				}
 			});
 		},
+		// 鎼滅储
+		searchButtonClick(){
+			this.init();
+		},
+		// 娓呯┖
+		emptyButtonClick(){
+			this.haveTodoParams.name = '';
+			this.haveTodoParams.title = '';
+			this.haveTodoParams.startDate = '';
+			this.haveTodoParams.endDate = '';
+			this.init();
+		},
 		menushow(e){
 			this.menuShow = e
 		},
 		deleteApplicationClick(id){
+			this.deleteIds = id;
+			this.deleteApplicationModalShow = true;
+		},
+		deleteApplicationClickAll(){
 			if(this.checkBoxValue.length > 0){
+				this.deleteIds = this.checkBoxValue.toString(',');
 				this.deleteApplicationModalShow = true;
+			} else{
+				this.$u.toast('鏈�変腑鐢宠')
 			}
 		},
 		// 鍒犻櫎鐢宠妯℃�佹
 		deleteApplicationModalConfirm() {
 			this.deleteApplicationModalShow = false;
+			this.$reqPost('deleteHistoric',{ids:this.deleteIds},'form').then(res=>{
+				if(res.code == 0){
+					this.$nextTick(()=>{
+						this.$u.toast('鎿嶄綔鎴愬姛锛�')
+					})
+					this.yibanData = [];
+					this.init();
+				} else {
+					this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�')
+				}	
+			})
 		},
 		deleteApplicationModalCancel() {
 			this.deleteApplicationModalShow = false;
 		},
 		// 鏃堕棿閫夋嫨鍣�
 		startDateChange() {
-			this.queryRealTimeShippingData.startDate = '';
-			this.$nextTick(() => {
-				console.log(this.queryRealTimeShippingData);
-				this.realTimeShipping();
-			});
+			// this.queryRealTimeShippingData.startDate = '';
+			// this.$nextTick(() => {
+			// 	console.log(this.queryRealTimeShippingData);
+			// 	this.realTimeShipping();
+			// });
 		},
 		endDateChange() {
-			this.queryRealTimeShippingData.endDate = '';
-			this.$nextTick(() => {
-				console.log(this.queryRealTimeShippingData);
-				this.realTimeShipping();
-			});
-		},
-		// 鎼滅储
-		searchIconClick() {
-			console.log(1111, this.searchData);
+			// this.queryRealTimeShippingData.endDate = '';
+			// this.$nextTick(() => {
+			// 	console.log(this.queryRealTimeShippingData);
+			// 	this.realTimeShipping();
+			// });
 		},
 		// 澶嶉�夋
 		checkboxChange(n){
@@ -217,20 +270,20 @@
 			}
 		},
 		// 鐘舵��
-		statusConfirm(a){
-			this.statusSeletShow = false
-			console.log(a)
-		},
+		// statusConfirm(a){
+		// 	this.statusSeletShow = false
+		// 	console.log(a)
+		// },
 		// 琛ㄥ崟鏁版嵁
-		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}`
 			});
 		}
 	}
@@ -240,87 +293,103 @@
 <style lang="scss" scoped>
 ::v-deep.my-have-todo {
 	// 鎼滅储鍖哄煙
-	.searchBox {
-		width: 91%;
-		display: flex;
-		justify-content: space-between;
-		margin: vww(16) auto;
-		.search {
-			width: vww(160);
-			border: 1px solid #d1d1d1;
-			border-radius: vww(4);
-			.u-search {
-				.u-search__content {
-					height: 40px;
-					background-color: #ffffff !important;
-					.u-search__content__icon {
-						width: 10px;
-						height: 5.5px;
-					}
-					.u-search__content__input {
-						background-color: #ffffff !important;
-						.uni-input-placeholder{
-							color:#CCCCCC!important;
-						}
-					}
-				}
-			}
-		}
-		// 涓嬫媺鑿滃崟
-		.data-selet {
-			border: 1px solid #d1d1d1;
-			border-radius: 4px;
-			width: vww(160);
-			// width: 100%;
-			height: 40px;
+	.searchContainer{
+		
+		.searchButton{
+			width: 91%;
+			margin: vww(16) auto;
 			display: flex;
-			align-items: center;
-			font-size: 13px;
-			color: #CCCCCC;
-			.uni-select__icon {
-				display: flex;
-				align-content: center;
-				margin: 0 10px;
-				image {
-					width: 10px;
-					height: 5.5px;
-				}
-			}
-			.content {
-				margin-left: vww(8);
-				width: vww(150);
+			.u-button{
+				width:30%;
 			}
 		}
-	}
-
-	// 鏃堕棿鎼滅储
-	.timeContiner {
-		width: 91%;
-		margin: 0 auto vww(16);
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		.uni-date {
-			width: vww(160);
-			.uni-date-editor {
-				.uni-date-editor--x  {
-					.uni-date-x {
-						.uni-date__x-input {
-							.uni-input-wrapper{
-								.uni-input-placeholder{
-									color:#CCCCCC;
-									font-size: vww(13);
-								}
+		
+		.searchBox {
+			width: 91%;
+			display: flex;
+			justify-content: space-between;
+			margin: vww(16) auto;
+			.search {
+				width: vww(160);
+				border: 1px solid #d1d1d1;
+				border-radius: vww(4);
+				.u-search {
+					.u-search__content {
+						height: 40px;
+						background-color: #ffffff !important;
+						.u-search__content__icon {
+							width: 10px;
+							height: 5.5px;
+						}
+						.u-search__content__input {
+							background-color: #ffffff !important;
+							.uni-input-placeholder{
+								color:#CCCCCC!important;
 							}
 						}
 					}
 				}
-				.uni-date-x--border{
-					border: 1px solid #d1d1d1!important;
+			}
+			// 涓嬫媺鑿滃崟
+			.data-selet {
+				border: 1px solid #d1d1d1;
+				border-radius: 4px;
+				width: vww(160);
+				// width: 100%;
+				height: 40px;
+				display: flex;
+				align-items: center;
+				font-size: 13px;
+				color: #CCCCCC;
+				.uni-select__icon {
+					display: flex;
+					align-content: center;
+					margin: 0 10px;
+					image {
+						width: 10px;
+						height: 5.5px;
+					}
+				}
+				.content {
+					margin-left: vww(8);
+					width: vww(150);
 				}
 			}
 		}
+		
+		// 鏃堕棿鎼滅储
+		.timeContiner {
+			width: 91%;
+			margin: 0 auto vww(16);
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+			.uni-date {
+				width: vww(160);
+				.uni-date-editor {
+					.uni-date-editor--x  {
+						.uni-date-x {
+							.uni-date__x-input {
+								.uni-input-wrapper{
+									.uni-input-placeholder{
+										color:#CCCCCC;
+										font-size: vww(13);
+									}
+								}
+							}
+						}
+					}
+					.uni-date-x--border{
+						border: 1px solid #d1d1d1!important;
+					}
+				}
+			}
+		}
+		
 	}
+	
+
+	
 
 	// 鍗$墖涓棿
 	.center-container {

--
Gitblit v1.9.1