From 8fc8838a441ae3d3b1616f4fc003b16292978b54 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期一, 19 十二月 2022 11:19:45 +0800
Subject: [PATCH] 注册,登录,主页,日计划的修改

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

diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue
index 2efb3c6..1a486b0 100644
--- a/pages/my-application/my-application.vue
+++ b/pages/my-application/my-application.vue
@@ -61,7 +61,7 @@
               <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text>
             </view>
             <view class="">
-              <text>瀹℃壒鐜妭锛歿{ item.currTaskName == null ? '' : item.currTaskName }}</text>
+              <text>瀹℃壒鐜妭锛歿{ item.currTaskName ||'' }}</text>
             </view>
           </view>
           <view class="center-content__two center-margin">
@@ -86,7 +86,7 @@
         <view class="bottom-container">
           <!-- 鎸夐挳鍖哄煙 -->
           <view class="bottom-content__chulizhong bottom-content__item">
-            <view @click="withDrawClick(item.id)" v-if="item.status == 1">
+            <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
               <image src="@/static/home/cehui.png" mode=""></image>
               <view>鎾ゅ洖</view>
             </view>
@@ -94,15 +94,15 @@
               <image src="@/static/home/jindu.png" mode=""></image>
               <view>鏌ョ湅杩涘害</view>
             </view>
-            <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 )&& (item.procDefId == 'WAY_BILL:4:87504')">
+            <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 || item.status == 3 ) && (item.processName == '鍙戣繍閫氱煡鍗�')">
               <image src="@/static/home/biaodan.png" mode=""></image>
               <view>鐢宠璇︽儏</view>
             </view>
-            <view v-if="item.status == 3" @click="apply(item)">
+            <!-- <view v-if="item.status == 3" @click="apply(item)">
               <image src="@/static/home/history.png" mode=""></image>
               <view>閲嶆柊鐢宠</view>
-            </view>
-            <view v-if="item.status == 3" @click="editMyApplication(item)">
+            </view> -->
+            <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
               <image src="@/static/home/history.png" mode=""></image>
               <view>缂栬緫</view>
             </view>
@@ -110,6 +110,10 @@
               <image src="@/static/home/history.png" mode=""></image>
               <view>瀹℃壒鍘嗗彶</view>
             </view>
+						<view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
+							<image src="@/static/home/delete.png" mode=""></image>
+							<view>鍒犻櫎</view>
+						</view>
           </view>
         </view>
       </template>
@@ -118,10 +122,11 @@
 
     <!-- 鎾ゅ洖妯℃�佹 -->
     <view class="wodeshenqingMotai">
-      <u-modal width="684rpx" :show="withDrawShow" title="鎾ゅ洖鍘熷洜" :showCancelButton="true" @confirm="withDrawConfirm"
+      <u-modal width="684rpx" :show="withDrawShow" title="鎻愮ず" :showCancelButton="true" @confirm="withDrawConfirm"
                @cancel="withDrawCancel">
         <view class="slot-content">
-          <u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea>
+          <!-- <u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea> -->
+					<text>纭鎾ゅ洖璇ョ敵璇峰悧锛�</text>
         </view>
       </u-modal>
     </view>
@@ -143,7 +148,7 @@
       <u-back-top :scroll-top="scrollTop" style="position:fixed;bottom:100px;right:100px;"></u-back-top>
     </view>
 
-    <view class="" style="height:50px;">
+    <view class="empty-placeH">
 
     </view>
 
@@ -193,8 +198,8 @@
       // 鎾ゅ洖妯℃�佹
       withDrawShow: false,
       withDrawData: {
-        reason: '',
-        id: '', // 鎾ゅ洖鐢宠ID
+        // reason: '',
+        // id: '', // 鎾ゅ洖鐢宠ID
         procInstId: ''
       },
       // 閲嶆柊鐢宠
@@ -403,17 +408,12 @@
       this.init();
     },
     // 鎾ゅ洖妯℃�佹
-    withDrawClick(id) {
+    withDrawClick(procInstId) {
       this.withDrawShow = true;
-      this.withDrawData.id = id;
+      this.withDrawData.procInstId = procInstId;
     },
     withDrawConfirm() {
-      this.shenqingData.forEach(i => {
-        if (i.id == this.withDrawData.id) {
-          this.withDrawData.procInstId = i.procInstId;
-        }
-      });
-      this.$reqPost('withDraw', this.withDrawData, 'form').then(res => {
+      this.$reqPost('cancel', this.withDrawData).then(res => {
         console.log('res', res);
         if (res.code == 0) {
           uni.showToast({
@@ -428,95 +428,86 @@
         this.getMoreNews();
       });
 
-      console.log(this.withDrawId);
-      if (this.withDrawData.reason.length >= 2) {
-        console.log(this.withDrawData.reason);
-      } else {
-        uni.showToast({
-          title: '璇疯鑼冭緭鍏�',
-          duration: 2000
-        });
-      }
     },
     withDrawCancel() {
       this.withDrawShow = false;
     },
-    apply(v) {
-      if (!v.procDefId || v.procDefId == 'null') {
-        this.$u.toast('娴佺▼瀹氫箟涓虹┖');
-        return;
-      }
-      this.form.id = v.id;
-      this.form.procDefId = v.procDefId;
-      this.form.title = v.title;
-      // 鍔犺浇瀹℃壒浜�
-      // this.userLoading = true;
-      uni.showLoading({
-        title: '瀹℃壒浜哄姞杞戒腑'
-      });
-      // getFirstNode(v.procDefId).then((res) => {
-      this.$reqGet('getFirstNode', {}, v.procDefId).then(res => {
-        // this.userLoading = false;
-        console.log('瀹℃壒浜�', res);
-        uni.hideLoading();
-        if (res.data) {
-          this.error = '';
-          if (res.data.type == 3 || res.data.type == 4) {
-            this.isGateway = true;
-            this.form.firstGateway = true;
-            this.showAssign = false;
-            this.isCustom = false;
-            return;
-          }
-          if (res.data.type == 5) {
-            this.isCustom = true;
-            this.isGateway = false;
-            this.form.firstGateway = false;
-            this.showAssign = false;
-            return;
-          }
-          if (res.data.type == 1) {
-            this.showAssign = true;
-            this.isGateway = false;
-            this.form.firstGateway = false;
-            this.isCustom = false;
-            if (res.data.users && res.data.users.length > 0) {
-              this.assigneeList = res.data.users;
-              // 榛樿鍕鹃��
-              let ids = [];
-              res.data.users.forEach(e => {
-                ids.push(e.userId);
-              });
-              this.form.assignees = ids;
-              this.showAssign = true;
-              // 鑾峰彇琛ㄥ崟鍐呭锛岄噸鏂板垱寤虹敵璇�
-              this.$reqPost('apply', this.form, 'form').then(res => {
-                console.log('閲嶆柊鎻愪氦鐢宠', res);
-                if (res.code == 0) {
-                  uni.showToast({
-                    title: res.data,
-                    icon: 'success',
-                    duration: 2000
-                  });
-                }
-                // 鍒濆鍖栫敵璇峰垪琛�
-                this.myApplication.pageNumber = 1;
-                this.shenqingData = [];
-                this.getMoreNews();
-              })
-            } else {
-              this.form.assignees = [];
-              this.showAssign = true;
-              this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�';
-            }
-          }
-        }
-        console.log(this.form);
-      });
+    // apply(v) {
+    //   if (!v.procDefId || v.procDefId == 'null') {
+    //     this.$u.toast('娴佺▼瀹氫箟涓虹┖');
+    //     return;
+    //   }
+    //   this.form.id = v.id;
+    //   this.form.procDefId = v.procDefId;
+    //   this.form.title = v.title;
+    //   // 鍔犺浇瀹℃壒浜�
+    //   // this.userLoading = true;
+    //   uni.showLoading({
+    //     title: '瀹℃壒浜哄姞杞戒腑'
+    //   });
+    //   // getFirstNode(v.procDefId).then((res) => {
+    //   this.$reqGet('getFirstNode', {}, v.procDefId).then(res => {
+    //     // this.userLoading = false;
+    //     console.log('瀹℃壒浜�', res);
+    //     uni.hideLoading();
+    //     if (res.data) {
+    //       this.error = '';
+    //       if (res.data.type == 3 || res.data.type == 4) {
+    //         this.isGateway = true;
+    //         this.form.firstGateway = true;
+    //         this.showAssign = false;
+    //         this.isCustom = false;
+    //         return;
+    //       }
+    //       if (res.data.type == 5) {
+    //         this.isCustom = true;
+    //         this.isGateway = false;
+    //         this.form.firstGateway = false;
+    //         this.showAssign = false;
+    //         return;
+    //       }
+    //       if (res.data.type == 1) {
+    //         this.showAssign = true;
+    //         this.isGateway = false;
+    //         this.form.firstGateway = false;
+    //         this.isCustom = false;
+    //         if (res.data.users && res.data.users.length > 0) {
+    //           this.assigneeList = res.data.users;
+    //           // 榛樿鍕鹃��
+    //           let ids = [];
+    //           res.data.users.forEach(e => {
+    //             ids.push(e.userId);
+    //           });
+    //           this.form.assignees = ids;
+    //           this.showAssign = true;
+    //           // 鑾峰彇琛ㄥ崟鍐呭锛岄噸鏂板垱寤虹敵璇�
+    //           this.$reqPost('apply', this.form, 'form').then(res => {
+    //             console.log('閲嶆柊鎻愪氦鐢宠', res);
+    //             if (res.code == 0) {
+    //               uni.showToast({
+    //                 title: res.data,
+    //                 icon: 'success',
+    //                 duration: 2000
+    //               });
+    //             }
+    //             // 鍒濆鍖栫敵璇峰垪琛�
+    //             this.myApplication.pageNumber = 1;
+    //             this.shenqingData = [];
+    //             this.getMoreNews();
+    //           })
+    //         } else {
+    //           this.form.assignees = [];
+    //           this.showAssign = true;
+    //           this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�';
+    //         }
+    //       }
+    //     }
+    //     console.log(this.form);
+    //   });
 
-      this.modalVisible = true;
-      // }
-    },
+    //   this.modalVisible = true;
+    //   // }
+    // },
     // 淇敼鐢宠
     editMyApplication(v) {
       console.log('淇敼鐢宠');
@@ -796,6 +787,11 @@
       right:vww(20)!important;
     }
   }
+	
+	// 搴曢儴鍗犱綅
+	.empty-placeH{
+		height:vww(50);
+	}
 
 
   // 搴曢儴

--
Gitblit v1.9.1