Kaynağa Gözat

Merge branch 'feature_20250626_主管任务暂存' into release

zhujindu 4 ay önce
ebeveyn
işleme
22083a0afe

+ 2 - 2
src/views/week/VisitSummary.vue

@@ -483,12 +483,12 @@ export default {
       if (row.status == '0') {
         this.$router.push({
           path: '/VisitSummaryStorageDetail',
-          query: { userSummaryId: row.userSummaryId },
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummary' },
         });
       } else {
         this.$router.push({
           path: '/VisitSummaryDetail',
-          query: { userSummaryId: row.userSummaryId, source: 'VisitSummary' },
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummary' },
         });
       }
     },

+ 2 - 2
src/views/week/VisitSummaryDetail.vue

@@ -254,7 +254,7 @@ export default {
           if (res.code == 200) {
             this.$toast('操作成功!');
             this.$router.replace({
-              path: '/VisitSummary',
+              path: this.source,
             });
           } else {
             this.$toast(res.msg);
@@ -292,7 +292,7 @@ export default {
           if (res.code == 200) {
             this.$toast('操作成功!');
             this.$router.replace({
-              path: '/VisitSummary',
+              path: this.source,
             });
           } else {
             this.$toast(res.msg);

+ 52 - 22
src/views/week/VisitSummaryMy.vue

@@ -42,20 +42,21 @@
             <div class="cardContent" @click="dailyFn(item)">
               <div class="title">
                 <p class="textLeft">{{ item.nickName }}的{{ item.summaryTaskName }}</p>
+                <div class="approvalStatusBtn" v-if="item.approvalStatus">
+                  <span class="approvalStatusBtn1" v-if="item.approvalStatus == '2'">审批通过</span>
+                  <span class="approvalStatusBtn2" v-if="item.approvalStatus == '1'">
+                    提交待审批
+                  </span>
+                  <span class="approvalStatusBtn3" v-if="item.approvalStatus == '3'">
+                    拒绝待提交
+                  </span>
+                </div>
+                <div class="approvalStatusBtn" v-if="item.status == '0'">
+                  <span class="status0">暂存</span>
+                </div>
               </div>
               <div class="info">提交时间:{{ item.createTime }}</div>
             </div>
-            <div class="approvalStatusBtn" v-if="item.approvalStatus">
-              <van-button type="primary" size="small" v-if="item.approvalStatus == '2'"
-                >审批通过</van-button
-              >
-              <van-button type="info" size="small" v-if="item.approvalStatus == '1'"
-                >提交待审批</van-button
-              >
-              <van-button color="red" size="small" v-if="item.approvalStatus == '3'"
-                >拒绝待提交</van-button
-              >
-            </div>
           </van-cell>
         </div>
         <van-empty v-if="list.length == 0" />
@@ -116,7 +117,7 @@ export default {
     };
   },
 
-  created() {
+  activated() {
     this.userList = [];
     this.formData.startTime = this.getThreeDaysAgo();
     this.strtcurrentDate = new Date(this.getThreeDaysAgo());
@@ -233,13 +234,23 @@ export default {
       return days;
     },
     dailyFn(row) {
-      this.$router.push({
-        path: '/VisitSummaryDetail',
-        query: { userSummaryId: row.userSummaryId },
-      });
+      // 暂存
+      if (row.status == '0') {
+        this.$router.push({
+          path: '/VisitSummaryStorageDetail',
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummaryMy' },
+        });
+      } else {
+        this.$router.push({
+          path: '/VisitSummaryDetail',
+          query: { userSummaryId: row.userSummaryId, source: '/VisitSummaryMy' },
+        });
+      }
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.replace({
+        path: '/My/index',
+      });
     },
     StartTimeClick() {
       this.StartTimeShow = true;
@@ -282,6 +293,8 @@ export default {
   font-weight: bold;
   color: #333;
   line-height: 22px;
+  display: flex;
+  justify-content: space-between;
 }
 
 .cardContent .title p {
@@ -362,12 +375,29 @@ export default {
     position: relative;
   }
   .approvalStatusBtn {
-    position: absolute;
-    bottom: 4px;
-    right: 1px;
-    .van-button {
+    span {
+      color: #fff;
       border-radius: 5px;
-      width: 78px;
+      display: inline-block;
+      padding: 3px 5px;
+      font-size: 14px;
+      width: 80px;
+      text-align: center;
+    }
+    .approvalStatusBtn1 {
+      background-color: #12ea7a;
+    }
+    .approvalStatusBtn2 {
+      background-color: rgb(112, 33, 239);
+    }
+    .approvalStatusBtn3 {
+      background-color: red;
+    }
+    .status1 {
+      background-color: #07c160;
+    }
+    .status0 {
+      background-color: #ff976a;
     }
   }
 }

+ 7 - 5
src/views/week/VisitSummaryStorageDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="info" class="VisitSummaryDetail">
+  <div v-if="info" class="VisitSummaryStorageDetail">
     <div class="navBarTOP">
       <van-nav-bar
         class="navBar"
@@ -209,7 +209,7 @@ export default {
             if (res.code == 200) {
               this.$toast('操作成功!');
               this.$router.replace({
-                path: '/VisitSummary',
+                path: this.source,
               });
             } else {
               this.$toast(res.msg);
@@ -231,7 +231,7 @@ export default {
             if (res.code == 200) {
               this.$toast('操作成功!');
               this.$router.replace({
-                path: '/VisitSummary',
+                path: this.source,
               });
             } else {
               this.$toast(res.msg);
@@ -276,7 +276,9 @@ export default {
             .then((res) => {
               if (res.code == 200) {
                 this.$toast('操作成功!');
-                this.onClickLeft();
+                this.$router.replace({
+                  path: this.source,
+                });
               } else {
                 this.$toast(res.msg);
               }
@@ -443,7 +445,7 @@ export default {
   padding-bottom: 0;
 }
 
-.VisitSummaryDetail {
+.VisitSummaryStorageDetail {
   .tc {
     display: flex;
     justify-content: space-between;