瀏覽代碼

2022.7.26

ggooalice 2 年之前
父節點
當前提交
f0226c6248

+ 38 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -629,7 +629,7 @@
 
         <!-- 项目级别管理 -->
         <el-dialog title="项目级别管理" show-header="false" v-if="projectLevelDialog" :visible.sync="projectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
-            <el-table :data="levelList" highlight-current-row  height="400" style="width: 100%;">
+            <el-table :data="levelList" highlight-current-row  height="400" style="width: 100%;" >
                 <el-table-column type="index" width="60" label="序号">
                     <template slot-scope="scope" >
                             {{scope.$index+1+(page-1)*size}}
@@ -1140,6 +1140,43 @@ a {
                     }
                 }
             },
+            deleteProjectLevel(row) {
+                this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除项目级别", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                })
+                .then(() => {
+                    this.listLoading = true;
+                    this.http.post('/project-level/delete',{ 
+                        id: row.id 
+                    },
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "删除成功",
+                                type: "success"
+                            });
+                            this.getProjectLevel();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                })
+                .catch(() => {});
+            },
             submitLevelPro(){
                 this.http.post('/project-level/addOrMod',this.addLevelForm,
                     res => {

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -3487,11 +3487,12 @@
                 if(sessionStorage.from != 1){
                     let nowmonth = new Date().getMonth() + 1
                     let nowd = new Date().getFullYear() + '-' + (nowmonth < 10 ? '0' + nowmonth : nowmonth)
+                    let nowdate = new Date().getDate()
                     if(nowd == this.date){
                         
                         if(e && sessionStorage.msg){
                         }else{
-                            sessionStorage.msg = this.date + '-' + (nowday < 10 ? '0' + nowday : nowday)
+                            sessionStorage.msg = this.date + '-' + (nowdate < 10 ? '0' + nowdate : nowdate)
                         }
                         let nowday = new Date(sessionStorage.msg).getDate()
                         this.choseDay = nowday - 1