Quellcode durchsuchen

正北公司项目财务审核新增撤销功能

lxy_01 vor 1 Monat
Ursprung
Commit
94e5b7c0d7

+ 22 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinancialAuditController.java

@@ -94,5 +94,27 @@ public class FinancialAuditController {
         financialAuditService.updateById(item);
         return httpRespMsg;
     }
+
+
+    /*
+    * 撤销
+    * */
+    @RequestMapping("/undo")
+    public HttpRespMsg undo(Integer id, HttpServletRequest request) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        System.out.println("------------------删除的id是"+ id);
+        String token = request.getHeader("Token");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+        User user = userMapper.selectById(token);
+//                financialAuditService.update().eq("id", id).set("review_status", 2).set("reviewer_id", user.getId()).set("reviewer_name", user.getName());
+        FinancialAudit item = new FinancialAudit();
+        item.setId(id);
+        item.setReviewStatus(1);
+        item.setReviewerId(null);
+        item.setReviewerName(null);
+        item.setReviewTime(null);
+        financialAuditService.updateById(item);
+        return httpRespMsg;
+    }
 }
 

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -209,6 +209,7 @@
     "approvalProcess": "Approval process",
     "project": "project",
     "waitForTheProjectReviewer": "Waiting for project reviewers",
+    "undo": "undo",
     "audit": "review",
     "projectAuditor": "project reviewer",
     "projectReviwer": "secondary reviewer",
@@ -487,6 +488,7 @@
   "listofsubitems": "list of subprojects",
   "nameofthetask": "mission name",
   "names": "name",
+  "department":"department",
   "taskstage": "mission phase",
   "wan-cheng": "Finish",
   "zhi-hang-ren": "executor",
@@ -1710,6 +1712,7 @@
   "zhiFuFangShi": "Payment method",
   "caiWuShenHeTiShi": "Financial audit prompt",
   "nianYue": "years:",
+  "ninQueDingYaoCheXiao": "Are you sure you want to withdraw the review",
   "ninQueDingYaoShenHeTongGuo": "Are you sure you want to pass the review",
   "riBaoNianYue": "Daily Report Year Month",
   "shenHeChengGong": "Review successful!",
@@ -1955,7 +1958,9 @@
   "riBaoShenHeMoShi": "Daily report review mode",
   "ruXuXiuGaiWeiQiTaShenHeMoShiQingLianXiKeFu": "If you need to modify to other review modes, please contact customer service",
   "teShuJieJiaRiLieBiao": "List of Special Holidays",
+  "tehuSRenYuanRiQiLieBiao": "List of Special personnel dates",
   "teShuJieJiaRiSheZhi": "Special holiday settings",
+  "teShuRenYuanRiQiSheZhi": "Special personnel date settings",
   "tiXing": "remind",
   "tianBaoRiBaoShiFouYinCangJieDuan": "Is the stage hidden when filling out daily reports",
   "tianBaoRiBaoShiFouYinCangRenWu": "Is the task hidden when filling out the daily report",

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -209,6 +209,7 @@
     "approvalProcess": "审批流程",
     "project": "项目",
     "waitForTheProjectReviewer": "待项目审核人",
+    "undo": "撤销",
     "audit": "审核",
     "projectAuditor": "项目审核人",
     "projectReviwer": "项目复审人",
@@ -489,6 +490,7 @@
   "zhong-qi": "重启",
   "listofsubitems": "子项目列表",
   "names": "名称",
+  "department":"部门",
   "bian-ji": "编辑",
   "addsubitems": "新增子项目",
   "taskdefinition": "任务内容",
@@ -1719,6 +1721,7 @@
   "weiShenHe": "未审核",
   "yiShenHe": "已审核",
   "caiWuShenHeTiShi": "财务审核提示",
+  "ninQueDingYaoCheXiao": "您确定要撤销",
   "ninQueDingYaoShenHeTongGuo": "您确定要审核通过",
   "yueDeGongShiBaoGaoMa": "月的工时报告吗?",
   "shenHeChengGong": "审核成功!",
@@ -1957,12 +1960,14 @@
   "tianBaoRiBaoShiFouYinCangRenWu": "填报日报是否隐藏任务",
   "renWuShiFouBiTian": "任务是否必填",
   "teShuJieJiaRiLieBiao": "特殊节假日列表",
+  "tehuSRenYuanRiQiLieBiao": "特殊人员日期列表",
   "youXiaoFanWei": "有效范围",
   "youXiaoBuMen": "有效部门",
   "quanGongSi": "全公司",
   "buFenChengYuan": "指定部门",
   "youXiaoRenYuan": "有效人员",
   "teShuJieJiaRiSheZhi": "特殊节假日设置",
+  "teShuRenYuanRiQiSheZhi": "特殊人员日期设置",
   "qingShuRuMingZiSouSuo": "请输入名字搜索",
   "fenZuFuZeRenShenHe": "分组负责人审核",
   "xianFenZuFuZeRenShenHeZaiXiangMuJingLiShenHe": "先分组负责人审核再项目经理审核",

+ 17 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/financeAudit/financeAudit.vue

@@ -37,6 +37,7 @@
                 </el-table-column>
                 <el-table-column :label="$t('operation')" align="center" fixed="right">
                     <template slot-scope="scope">
+                        <el-button @click="undo(scope.row)" type="text" v-if="scope.row.reviewStatus == 2" style="color: red;">{{ $t('other.undo') }}</el-button>
                         <el-button @click="audit(scope.row)" type="text" v-if="scope.row.reviewStatus == 1">{{ $t('other.audit') }}</el-button>
                         <el-button type="text" @click="toDetail(scope.row)">{{ $t('Checkthedetails') }}</el-button>
                     </template>
@@ -99,6 +100,22 @@ export default {
                 }
             })
         },
+        
+        undo(item) {
+            this.$confirm(`${this.$t('ninQueDingYaoCheXiao')}${item.reportYrmnth} ${this.$t('yueDeGongShiBaoGaoMa')}`, this.$t('caiWuShenHeTiShi'), {
+                confirmButtonText: this.$t('btn.determine'),
+                cancelButtonText: this.$t('btn.cancel'),
+                type: 'warning'
+            }).then(() => {
+                this.postData('/financial-audit/undo', { id: item.id }).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: this.$t('shenHeChengGong')
+                    });
+                    this.getFinanceAuditTableData();
+                });
+            }).catch(() => {});
+        },
         audit(item) {
             this.$confirm(`${this.$t('ninQueDingYaoShenHeTongGuo')}${item.reportYrmnth} ${this.$t('yueDeGongShiBaoGaoMa')}`, this.$t('caiWuShenHeTiShi'), {
                 confirmButtonText: this.$t('btn.determine'),