ysh vor 3 Jahren
Ursprung
Commit
e353ab5f03

+ 1 - 1
src/utils/authFilter.js

@@ -106,7 +106,7 @@ function globalDisabledAuth(code){
   }else{
     for (let item2 of permissionList) {
       if(code === item2.action){
-        console.log("全局页面权限解除禁用--Global--生效");
+        // console.log("全局页面权限解除禁用--Global--生效");
         gFlag = false;
       }
     }

+ 1 - 1
src/utils/hasPermission.js

@@ -68,7 +68,7 @@ export function filterNodePermission(el, binding, vnode) {
  * 全局权限控制
  */
 export function filterGlobalPermission(el, binding, vnode) {
-  console.log("全局页面权限--Global--");
+  // console.log("全局页面权限--Global--");
 
   let permissionList = [];
   let allPermissionList = [];

+ 3 - 3
src/views/system/schedulingInformation/AttendanceInformation1.vue

@@ -22,11 +22,11 @@
             />
 
           </template>
-          <div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0">
+            <div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0">
+          <!-- <div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0"> -->
             <h3><span>  加载中,请稍候  </span><a-spin/></h3>
-                
           </div>
-          <div style="margin-top: 24px;" v-else><h3>普通员工暂此权限</h3></div>
+          <div style="margin-top: 24px;" v-else><h3>普通员工暂此权限</h3></div>
         </div>
       </a-card>
     </a-col>

+ 13 - 2
src/views/system/schedulingInformation/BdClockinMonthList.vue

@@ -73,10 +73,13 @@
 
     <!-- 表单区域 -->
     <!-- <ViewClockIn-modal ref="modalForm" @ok="modalFormOk"></ViewClockIn-modal> -->
-    <a-modal v-model="visible" title="关账" @ok="handleOk">
+    <a-modal v-model="visible" title="系统关账后无法取消,请谨慎操作" @ok="handleOk">
+        已关账日期:
+          {{oldCloseDate}}
         <a-form-item label="关账日期">
           <a-month-picker valueFormat="YYYY-MM" placeholder="请输入关账日期" v-model="closeDate"></a-month-picker>
         </a-form-item>
+       
     </a-modal>
     
   </a-card>
@@ -101,6 +104,7 @@
       return {
         visible: false,
         moment,
+        oldCloseDate:'',//原始关账日期
         closeDate:'',//关账日期
         description: '考勤月报',
         // 表头
@@ -158,6 +162,7 @@
           }
         ],
         url: {
+          getCloseDate:'/viewClockIn/bdClockinMonth/getCloseDate',
           closeDateUrl:'/viewClockIn/bdClockinMonth/closeDate',
           list: '/viewClockIn/bdClockinMonth/list',
           syMonthReport: '/viewClockIn/viewClockIn/syMonthReport'
@@ -171,6 +176,12 @@
     },
     methods: {
       showModal() {
+        let that = this;
+        getAction(this.url.getCloseDate, {}).then((res) => {
+          that.oldCloseDate = res;
+        }).finally(() => {
+              
+        })
         this.visible = true;
       },
       handleOk(e) {
@@ -188,7 +199,7 @@
             that.$message.warning(res.message);
           }
         }).finally(() => {
-              
+            that.closeDate = '';
         })
         
       },

+ 18 - 5
src/views/system/schedulingInformation/ViewClockInList.vue

@@ -17,7 +17,10 @@
           </a-col>
           <a-col :md="6" :sm="8">
             <a-form-item label="部门">
-              <a-input placeholder="请输入部门" v-model="queryParam.departNames"></a-input>
+              <!-- <a-input placeholder="请输入部门" v-model="queryParam.departNames"></a-input> -->
+              <j-tree-select v-model="queryParam.departIds" dict="sys_depart,depart_name,id"
+                pid-field="parent_id" placeholder="请选择部门">
+              </j-tree-select>
             </a-form-item>
           </a-col>
           
@@ -40,7 +43,7 @@
                     <a-select-option value="">请选择</a-select-option>
                     <a-select-option value="休息">休息</a-select-option>
                     <a-select-option value="固定上下班">固定上下班</a-select-option>
-                    <a-select-option value="自由上下班">自由上下班</a-select-option>
+                    <!-- <a-select-option value="自由上下班">自由上下班</a-select-option> -->
                     <a-select-option v-for="(item,index) in shiftlist" :value="item.name">{{item.name}} ({{item.startDate}}-{{item.endDate}})
                     </a-select-option>
                   </a-select>
@@ -93,11 +96,11 @@
 
       <a-table class="j-table-force-nowrap" ref="table" size="middle" bordered rowKey="pkId" :columns="columns"
         :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange" :scroll="{ x: 2500, y: 700 }">
+        @change="handleTableChange" :scroll="{ x: 2500, y: 600 }">
 
         <a-badge slot="latetimeState" slot-scope="text, record, index">
           
-          <a-tag color="pink" v-if="record.latetimeS < 0 || record.latetimeX > 0
+         <!-- <a-tag color="pink" v-if="record.latetimeS < 0 || record.latetimeX > 0
           || (record.ifwork !=0 && record.attendanceCount < 2 && record.name != null)
           || (record.ifwork !=0 && record.name != null && record.name != '' && (record.gotoTime == null || record.gotoTime == ''))
           || record.duration != null
@@ -106,7 +109,17 @@
           </a-tag>
           <a-tag color="#87d068" v-else>正常</a-tag>
           <a-icon title="该员工在未排班或休息班打卡" v-if="(record.name == null || record.shiftRealTimeS == null) && record.gotoTime != null && record.gotoTime != '' && (record.setInfo > 0 )" slot="count" type="exclamation" style="color: #f57301" />
-          
+ -->         
+          <a-tag color="pink" v-if="record.showState == '1'">
+            异常
+          </a-tag>
+          <a-tag color="#87d068" v-if="record.showState == '2'">
+           正常
+          </a-tag>
+           <a-icon v-if="record.showState == '2'" title="该员工在未排班或休息班打卡" slot="count" type="clock-circle" style="color: #f57301" />
+          <a-tag color="#87d068" v-if="record.showState == '0'">
+            正常
+          </a-tag>
         </a-badge>
         <span slot="realShiftTime" slot-scope="text, record, index">
           <!-- ruleType 上班类型 1.固定时间上下班,2.按班次上下班,3.自由上下班 -->

+ 90 - 12
src/views/system/schedulingInformation/ViewClockUserInfo.vue

@@ -18,15 +18,44 @@
         <i class="anticon anticon-info-circle ant-alert-icon"></i>
         月份: 
         <!-- <a style="font-weight: 600;margin-right: 6px" @click="onClearSelected">  <  </a> -->
-        <a-month-picker format="YYYY-MM" placeholder="请输入生成月报日期" v-model="headMonth" @change="onDateChange"/>
+        <a-month-picker format="YYYY-MM" placeholder="请输入考勤月份" v-model="headMonth" @change="onDateChange"/>
         <!-- <a style="font-weight: 600;margin-left: 6px" @click="onClearSelected"> > </a> -->
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>
+        <a style="margin-left: 40px" @click="errorInfoShow()">异常打卡</a>
+       <i class="anticon anticon-info-circle ant-alert-icon"></i>
+       <a style="margin-left: 40px" @click="jiaBanInfoShow()">加班打卡</a>
+       <i class="anticon anticon-info-circle ant-alert-icon"></i>
+       <a-dropdown style="margin-left: 40px" v-has="'viewClockUserInfo:more'">
+         <a class="ant-dropdown-link">
+           更多操作 <a-icon type="down"/>
+         </a>
+         <a-menu slot="overlay">
+           <a-menu-item>
+             <a-popconfirm title="确定对所选记录付薪吗?" @confirm="() => handleInfo('1')">
+               <a>付薪</a>
+             </a-popconfirm>
+           </a-menu-item>
+           <a-menu-item>
+             <a-popconfirm title="确定对所选记录累计调休吗?" @confirm="() => handleInfo('2')">
+               <a>累计调休</a>
+             </a-popconfirm>
+           </a-menu-item>
+           <a-menu-item>
+             <a-popconfirm title="确定对所选记录忽略吗?" @confirm="() => handleInfo('3')">
+               <a>忽略</a>
+             </a-popconfirm>
+           </a-menu-item>
+         </a-menu>
+       </a-dropdown>
+       
       </div>
 
       <a-table
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         ref="table"
         size="middle"
         bordered
-        rowKey="id"
+        rowKey="viewDate"
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
@@ -56,18 +85,18 @@
         <a-badge slot="shiftType" slot-scope="text, record, index">
           <!-- ruleType 上班类型 1.固定时间上下班,2.按班次上下班,3.自由上下班 -->
           
-          <a-tag color="pink" v-if="record.latetimeS < 0 || record.latetimeX > 0 
-          || (record.ifwork !=0 && record.attendanceCount < 2 && record.name != null)
-          || (record.ifwork !=0 && record.name != null && record.name != '' && (record.gotoTime == null || record.gotoTime == ''))
-          || record.duration != null
-          && (record.setInfo > 0 ) && (record.errorState != 0 )">
-          异常
+          <a-tag color="pink" v-if="record.showState == '1'">
+            异常
           </a-tag>
-          <a-tag color="#87d068" v-else>正常</a-tag>
-          
-          <a-icon title="该员工在未排班或休息班打卡" v-if="(record.name == null || record.shiftRealTimeS == null) && record.gotoTime != null && record.gotoTime != '' && (record.setInfo > 0 )" slot="count" type="exclamation" style="color: #f57301" />
+          <a-tag color="#87d068" v-if="record.showState == '2'">
+           正常
+          </a-tag>
+           <a-icon v-if="record.showState == '2'" title="该员工在未排班或休息班打卡" slot="count" type="exclamation-circle" style="color: #f52b02" />
           
-          <!-- <a>{{record.setInfo}}</a> -->
+          <a-tag color="#87d068" v-if="record.showState == '0'">
+            正常
+          </a-tag>
+
         </a-badge>
         
         <span slot="action" slot-scope="text, record">
@@ -306,6 +335,7 @@
             width: 120
           }],
         url: {
+          handleInfo: '/viewClockIn/viewClockIn/handleInfo',
           errorInfo: '/viewClockIn/viewClockIn/errorInfo',
           getJiaBan: '/workOvertime/workOvertime/getJiaBan',
           list: '/viewClockIn/viewClockIn/list',
@@ -324,6 +354,54 @@
     },
 
     methods: {
+        handleInfo(st){
+          if(this.selectedRowKeys.length < 1){
+            this.$message.warning("您没有选择任何数据");
+            return;
+          }
+          let that = this;
+          //st:1付薪 2累计调休 3忽略
+          let ids = "";
+          let username = "";
+          let dataSource = this.dataSource;
+          // console.log("-===="+this.dataSource);
+          let userIds = "";
+          this.selectUserRows = [];
+          for (let i = 0, len = dataSource.length; i < len; i++) {
+            if (this.selectedRowKeys.includes(dataSource[i].viewDate)) {
+              
+              if(dataSource[i].duration == null || dataSource[i].duration == ''){
+                this.$message.warning(dataSource[i].viewDate+"该员工当日没有加班申请信息,请勿此操作");
+                return;
+              }
+             username = dataSource[i].username;
+             ids += dataSource[i].viewDate + ",";
+            }
+          }
+
+          putAction(this.url.handleInfo, {viewDate:ids,st:st,username:username}).then((res) => {
+            if (res.success) {
+              that.$message.success("操作成功");
+              that.loadData();
+            } else {
+              that.$message.warning(res.message);
+              that.loadData();
+            }
+          }).finally(() => {
+            that.selectedRowKeys = [];
+          })
+        },
+        errorInfoShow(){
+          this.queryParam.showState=1;
+          this.loadData(1);
+          this.queryParam.showState=null;
+         
+        },
+        jiaBanInfoShow(){
+          this.queryParam.duration=1;
+          this.loadData(1);
+          this.queryParam.duration=null;
+        },
         showModal(record) {
           this.errorViewDate = record.viewDate;
           this.errorUserId = record.userId;