liuhj месяцев назад: 9
Родитель
Сommit
1e9c3fd42c
2 измененных файлов с 73 добавлено и 96 удалено
  1. 44 87
      src/components/child/Generalindex.vue
  2. 29 9
      src/components/system/User.vue

+ 44 - 87
src/components/child/Generalindex.vue

@@ -139,6 +139,9 @@
                 </div>
             </div>
         </div>
+        <div class="skip-text">
+            <div v-if="userId==21" class="text-go">有{{wshcount}}条未审核日常付款申请&nbsp;&nbsp;<span @click="shortcutlink('/DailyFeePayment')" style="color:#409eff;cursor: pointer;">前往审核</span></div>
+        </div>
     </div>
 </template>
 
@@ -156,91 +159,7 @@ export default {
     data() {
         return {
             groupData: [
-                {
-                    date: '2016-05-03',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-02',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-04',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-01',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-08',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-06',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-07',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-06',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-07',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-06',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-07',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-06',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-07',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-06',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-07',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-06',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }, 
-                {
-                    date: '2016-05-07',
-                    name: '王小虎',
-                    address: '上海市普陀区金沙江路 1518 弄'
-                }
+                
             ],
             groupDatas:[],
             currentPage: 1, // 当前页码
@@ -298,7 +217,9 @@ export default {
                 eventRemove:
                 */
             },
-            input: ''
+            input: '',
+            wshcount:0,
+            userId:'',
         }
     },
     methods:{
@@ -352,6 +273,9 @@ export default {
         },
         //快捷跳转
         shortcutlink(val){
+            if(val=='/DailyFeePayment'){
+                localStorage.setItem("Permissions",JSON.stringify([{"funid":1,"functionCode":"F00001","functionName":"查看"},{"funid":2,"functionCode":"F00002","functionName":"删除"},{"funid":3,"functionCode":"F00003","functionName":"编辑"},{"funid":4,"functionCode":"F00004","functionName":"下载"},{"funid":5,"functionCode":"F00005","functionName":"上传"},{"funid":11,"functionCode":"F00010","functionName":"添加"},{"funid":12,"functionCode":"F00006","functionName":"审核"}]))
+            }
             this.$router.push({ path: "/home" + val });
         },
 
@@ -415,6 +339,22 @@ export default {
                 }
             })
         },
+        //获取张总未审核条数
+        DailyPaymentGMUnAudited(){
+            var url="/api/Financial/DailyPaymentGMUnAudited"
+            var that=this
+            this.$axios({
+                method: 'GET',
+                url:url,
+                headers:{
+                    Authorization:'Bearer '+that.token
+                },
+            }).then(function(res){
+                if(res.data.code==200){
+                    that.wshcount=res.data.data;
+                }
+            })
+        },
         Inquireclick() {
             var newarr = [];
             if (this.input == "") {
@@ -446,7 +386,9 @@ export default {
         },
     },
     mounted(){
-        this.Grouplist()
+        this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.Grouplist();
+        this.DailyPaymentGMUnAudited();
         // this.calendarOptions.events.push({
         // color: '#ff9900', 
         // title: "kljkl",
@@ -642,6 +584,21 @@ export default {
     .fc .fc-toolbar.fc-header-toolbar{
         margin-bottom: 0.1em;
     }
+    .skip-text{
+        display: flex;
+        justify-content: end;
+        margin-top: 20px;
+        color: #606266;
+        font-size:16px ;
+    }
+    .text-go{
+        padding: 20px;
+        box-shadow: 0 0 10px #0005;
+        background-color:#fff;
+        border-radius: 5px;
+        width: 20%;
+        text-align: center;
+    }
     @media screen and (max-width: 1600px) {
         .tabular-all{
             display: inline-block;

+ 29 - 9
src/components/system/User.vue

@@ -37,14 +37,15 @@
                             <span v-if="hrAudit.row.hrAudit == 1">审核通过</span>
                             <span v-else-if="hrAudit.row.hrAudit == 2">审核未通过</span>
                             <span v-else>
-                                <a style="color: cornflowerblue;" @click="hrAuditBtn(hrAudit.row.id, 1)">通过</a>
-                                <a style="color: red;" @click="hrAuditBtn(hrAudit.row.id, 2)">拒绝</a>
+                                <a v-if="examine" style="color: cornflowerblue;" @click="hrAuditBtn(hrAudit.row.id, 1)">通过</a>
+                                <a v-if="examine" style="color: red;" @click="hrAuditBtn(hrAudit.row.id, 2)">拒绝</a>
+                                <span v-else>未审核</span>
                             </span>
                         </template>
                     </el-table-column>
                     <el-table-column label="操作" width="180">
                         <template slot-scope="scope">
-                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
+                            <el-button v-if="examine" size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
                             <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
                         </template>
                     </el-table-column>
@@ -149,7 +150,8 @@ export default {
                 JobPostId: 0,
                 Ext: '',
                 UsePeriod: '',
-                HrAudit: 0
+                HrAudit: 0,
+                currUserId:0
             },
             HrAuditSelect: [{
                 value: 0,
@@ -162,7 +164,9 @@ export default {
             {
                 value: 2,
                 label: '已拒绝'
-            },]
+            },],
+            Permissions:[],
+            examine:false
         }
     },
     methods: {
@@ -350,6 +354,17 @@ export default {
                                 message: '修改成功',
                                 type: 'success'
                             });
+
+
+
+
+
+
+
+
+
+
+                            
                             that.upUserVisible = false;
                             that.user();
                         } else {
@@ -453,13 +468,18 @@ export default {
 
     },
     mounted() {
-
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
-        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
-        console.log(this.token)
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.upData.currUserId=this.userId;
+        this.Permissions = JSON.parse(localStorage.getItem('Permissions'));
+        console.log(this.Permissions)
+        for(let k=0;k<this.Permissions.length;k++){
+            if(this.Permissions[k].funid==12){
+                this.examine=true;
+            }
+        }
         this.Department(0);
         this.company();
-        //this.Job();
         this.user();
     }
 }