QuYueTing 4 日 前
コミット
b38355e520

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_mld/src/components/taskComponent.vue

@@ -464,7 +464,7 @@
         
         <template>
             <el-button type="primary" @click="submitInsert(0)" :loading="addLoading" v-if="!showMmeiLaiDeData.taskStatus || showMmeiLaiDeData.taskStatus == 2 || showMmeiLaiDeData.taskStatus == 5">
-                保存
+                {{addForm.taskStatus == 2?'保存并提交':'保存'}}
             </el-button>
             <!--对于需要审核的情况-->
             <!-- <el-button type="primary" @click="submitInsert(1)" :loading="addLoading" v-if="selectType.needAudit && (showMmeiLaiDeData.taskStatus == 2 || showMmeiLaiDeData.taskStatus == 5 || showMmeiLaiDeData.taskStatus == 6)">

+ 30 - 5
fhKeeper/formulahousekeeper/timesheet_mld/src/views/task/list.vue

@@ -10,6 +10,7 @@
                             <el-option :label="$t('state.completed')" value="1" @click.native="hiddens()"></el-option>
                             <el-option label="待审核" value="2" @click.native="hiddens()"></el-option>
                             <el-option label="已驳回" value="3" @click.native="hiddens()"></el-option>
+                            <el-option label="已撤销" value="4" @click.native="hiddens()"></el-option>
                         </el-select>
                     </div>
                 </el-form-item>
@@ -203,6 +204,7 @@
                             <span style="display: inline-block;margin-right: 55px">
                                 <span  :class="judgedate(scope.row.endDate) && searchField == '0' && scope.row.taskStatus == 0 ? 'redwarningspan autodatespan' : 'autodatespan'">{{scope.row.endDate}}</span>
                             </span>
+                            <el-button v-if="searchField == 0 && scope.row.secondAuditorId && scope.row.secondAuditorId.indexOf(user.id) != -1" size="small" type="primary" @click="cancelTask(scope.row)">撤销</el-button>
                             <el-button v-if="searchField == 0" size="small" type="primary" @click="completes(scope.row.id, 0, scope.row)">{{ $t('wan-cheng') }}</el-button>
                             <el-button v-if="searchField == 1" size="small" type="warning" @click="completes(scope.row.id, 1, scope.row)">{{ $t('zhong-qi') }}</el-button>
                             <el-button v-if="idx == 3" size="small" type="primary" @click="handleAuditTask(scope.row, true)">通过</el-button>
@@ -1758,11 +1760,34 @@ import { getThemeColor } from '@/utils/commonMethod.js'
                 }
                 // console.log(this.searchField)
                 this.page = 1
-                if([3].includes(this.idx)) {
-                    this.getFilesAwaitingReview()
-                } else {
-                    this.getList()
-                }
+                this.getList()
+            },
+            //进行中的,撤销操作
+            cancelTask(item) {
+                this.$confirm('您确定要撤销该任务吗?', this.$t('other.prompts'), {
+                    //type: 'warning'
+                }).then(() => {
+                    this.isDeleting = true;
+                    this.http.post('/task/cancelByManager',{id: item.id},
+                    res => {
+                        this.isDeleting = false;
+                        if (res.code == "ok") {
+                            this.getList();
+                        } else {
+                            this.$message({
+                            message: res.msg,
+                            type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.isDeleting = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                });
             },
             // 完成
             completes(e, el, obj) {