ysh 3 年之前
父節點
當前提交
381acd84ee

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

@@ -140,11 +140,11 @@
         if (node.children && node.children.length > 0) {
           this.iExpandedKeys.push(node.key)
           //下方代码放开注释则默认展开所有节点
-          /**
-          for (let a = 0; a < node.children.length; a++) {
-            this.setThisExpandedKeys(node.children[a])
-          }
-          */
+          
+          // for (let a = 0; a < node.children.length; a++) {
+          //   this.setThisExpandedKeys(node.children[1])
+          // }
+          
         }
       },
       refresh(viewDate) {

+ 37 - 6
src/views/system/schedulingInformation/BdClockinMonthList.vue

@@ -44,7 +44,11 @@
 
             </span>
           </a-col>
-
+          <a-col :md="6" :sm="8">
+            <a-button type="danger" @click="showModal">
+              关账
+            </a-button>
+           </a-col>
         </a-row>
 
       </a-form>
@@ -56,7 +60,7 @@
 
       <a-table class="j-table-force-nowrap" ref="table" size="middle" bordered rowKey="id" :columns="columns"
         :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
+        @change="handleTableChange" :scroll="{ x: 1200, y: 700 }">
 
         <span slot="syU8" slot-scope="text, record, index">
           <a v-if="record.syU8 == 1 ">是</a>
@@ -69,6 +73,12 @@
 
     <!-- 表单区域 -->
     <!-- <ViewClockIn-modal ref="modalForm" @ok="modalFormOk"></ViewClockIn-modal> -->
+    <a-modal v-model="visible" title="关账" @ok="handleOk">
+        <a-form-item label="关账日期">
+          <a-month-picker valueFormat="YYYY-MM" placeholder="请输入关账日期" v-model="closeDate"></a-month-picker>
+        </a-form-item>
+    </a-modal>
+    
   </a-card>
 </template>
 
@@ -89,7 +99,9 @@
     },
     data() {
       return {
+        visible: false,
         moment,
+        closeDate:'',//关账日期
         description: '考勤月报',
         // 表头
         columns: [
@@ -146,6 +158,7 @@
           }
         ],
         url: {
+          closeDateUrl:'/viewClockIn/bdClockinMonth/closeDate',
           list: '/viewClockIn/bdClockinMonth/list',
           syMonthReport: '/viewClockIn/viewClockIn/syMonthReport'
         },
@@ -157,6 +170,28 @@
       }
     },
     methods: {
+      showModal() {
+        this.visible = true;
+      },
+      handleOk(e) {
+        if(this.closeDate == '' || this.closeDate == null){
+          this.$message.warning("请选择关账日期");
+          return;
+        }
+        let that = this;
+        this.visible = false;
+        putAction(that.url.closeDateUrl, {closeDate:this.closeDate}).then((res) => {
+          if (res.success) {
+            that.$message.success("关账成功");
+            that.loadData();
+          }else{
+            that.$message.warning(res.message);
+          }
+        }).finally(() => {
+              
+        })
+        
+      },
       onChange(date, dateString) {
             console.log(date, dateString);
             // this.value = "2021-01-01"
@@ -198,10 +233,6 @@
            }
         });
        
-       
-       
-       
-
       }
     }
   }

+ 10 - 9
src/views/system/schedulingInformation/ViewClockInList.vue

@@ -93,11 +93,9 @@
 
       <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: 3000 }">
+        @change="handleTableChange" :scroll="{ x: 2500, y: 700 }">
 
-        <span slot="latetimeState" slot-scope="text, record, index">
-          <!-- <a-tag color="pink" v-if="record.latetimeX > 0 || record.latetimeS > 0 ">异常</a-tag>
-          <a-tag color="#87d068" v-if="record.latetimeX <= 0 && record.latetimeS <= 0 ">正常</a-tag> -->
+        <a-badge slot="latetimeState" slot-scope="text, record, index">
           
           <a-tag color="pink" v-if="record.latetimeS < 0 || record.latetimeX > 0
           || (record.ifwork !=0 && record.attendanceCount < 2 && record.name != null)
@@ -107,7 +105,9 @@
           异常
           </a-tag>
           <a-tag color="#87d068" v-else>正常</a-tag>
-        </span>
+          <a-icon title="该员工在未排班或休息班打卡" v-if="(record.name == null || record.shiftRealTimeS == null) && record.gotoTime != null && record.gotoTime != '' " slot="count" v-else type="exclamation" style="color: #f57301" />
+          
+        </a-badge>
         <span slot="realShiftTime" slot-scope="text, record, index">
           <!-- ruleType 上班类型 1.固定时间上下班,2.按班次上下班,3.自由上下班 -->
           <span v-if="record.ruleType == '2' ">
@@ -180,12 +180,13 @@
             title: '人员',
             align: 'center',
             dataIndex: 'realname', fixed: 'left', width: 100
-          },{
-            title: '部门',
-            align: 'center',
-            dataIndex: 'departNames', fixed: 'left', width: 200
           },
           // {
+          //   title: '部门',
+          //   align: 'center',
+          //   dataIndex: 'departNames', fixed: 'left', width: 200
+          // },
+          // {
           //   title: '工号',
           //   align: 'center',
           //   dataIndex: 'workNo'

+ 175 - 85
src/views/system/schedulingInformation/ViewClockUserInfo.vue

@@ -31,7 +31,7 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        @change="handleTableChange">
+        @change="handleTableChange" :scroll="{ x: 1000, y: 650 }">
 
         <span slot="ShiftTime" slot-scope="text, record, index">
            {{record.shiftRealTimeS}} - {{record.shiftRealTimeX}}
@@ -41,29 +41,42 @@
         </span>
         
         <span slot="customDuration" slot-scope="text, record, index">
-          <a-tag @click="workInfo(record)" color="pink" v-if="record.workOvertime != null && record.workOvertime > 0 ">
+          <!-- <a-tag @click="workInfo(record)" color="pink" v-if="record.workOvertime != null && record.workOvertime > 0 ">
           {{text}}
           </a-tag>
-          <a @click="workInfo(record)" v-else>{{text}}</a>
+          <a @click="workInfo(record)" v-else>{{text}}</a> -->
+          <span v-if="record.setInfo > 0 ">
+            <a-tag title="点击查看加班详情" @click="workInfo(record)" color="pink" >{{text}}</a-tag> 
+          </span>
+          <span v-if="record.setInfo == 0 ">
+            <a-tag title="点击查看加班详情" @click="workInfo(record)" color="#87d068" >{{text}}</a-tag> 
+          </span>
         </span>
         
-        <span slot="shiftType" slot-scope="text, record, index">
+        <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 == '' || record.setInfo == null)">
+          && (record.setInfo > 0 ) && (record.errorState != 0 )">
           异常
           </a-tag>
           <a-tag color="#87d068" v-else>正常</a-tag>
-          <a>{{record.setInfo}}</a>
-        </span>
+          
+          <a-icon title="该员工在未排班或休息班打卡" v-if="(record.name == null || record.shiftRealTimeS == null) && record.gotoTime != null && record.gotoTime != '' && (record.setInfo > 0 )" slot="count" v-else type="exclamation" style="color: #f57301" />
+          
+          <!-- <a>{{record.setInfo}}</a> -->
+        </a-badge>
         
         <span slot="action" slot-scope="text, record">
-          <a v-has="'viewClockUserInfo:jiaozhun'" @click="handleEdit(record)">校准</a>
-
+          <!-- <a v-has="'viewClockUserInfo:jiaozhun'" @click="handleEdit(record)">校准</a> -->
+          <a v-has="'viewClockUserInfo:jiaozhun'" @click="showModal(record)">校准</a>
+         <!-- <a-popconfirm v-has="'viewClockUserInfo:jiaozhun'"  title="确定忽略此异常吗?" @confirm="() => errorInfo(record)">
+            <a>校准</a>
+          </a-popconfirm>-->
+          
           <a-divider type="vertical"/>
 
           <a-dropdown v-has="'viewClockUserInfo:more'">
@@ -73,17 +86,17 @@
             </a>
             <a-menu slot="overlay">
               <a-menu-item>
-                <a-popconfirm title="确定付薪吗?" @confirm="() => fuXinInfo('1',record)">
+                <a-popconfirm title="确定付薪吗?" @confirm="() => fuXinInfo('2','1',record)">
                   <a>付薪</a>
                 </a-popconfirm>
               </a-menu-item>
               <a-menu-item>
-                <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('2',record)">
+                <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('2','2',record)">
                   <a>累计调休</a>
                 </a-popconfirm>
               </a-menu-item>
               <a-menu-item>
-                <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('3',record)">
+                <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('2','3',record)">
                   <a>忽略</a>
                 </a-popconfirm>
               </a-menu-item>
@@ -103,19 +116,52 @@
     <a-modal width="1200px"
           v-model="modal2Visible" title="加班信息详情" :footer="null"
           centered @ok="() => (modal2Visible = false)" >
-          <!-- <p>加班申请时间 : {{durationCommitDate}}</p>
-          <p>加班开始时间 : {{durationBeginDate}}</p>
-          <p>加班结束时间 : {{durationEndDate}}</p>
-          <p>加班时长 : {{duration}}</p>
-          <p>加班事由 : {{demo}}</p> -->
-           <a-table :columns="columns2" :data-source="data" rowKey="id"></a-table>
+           <a-table :columns="columns2" :data-source="data" rowKey="id">
+             
+             <span slot="action" slot-scope="text, record">
+             
+               <a-dropdown 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="() => fuXinInfo('1','1',record)">
+                       <a>付薪</a>
+                     </a-popconfirm>
+                   </a-menu-item>
+                   <a-menu-item>
+                     <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('1','2',record)">
+                       <a>累计调休</a>
+                     </a-popconfirm>
+                   </a-menu-item>
+                   <a-menu-item>
+                     <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('1','3',record)">
+                       <a>忽略</a>
+                     </a-popconfirm>
+                   </a-menu-item>
+                 </a-menu>
+               </a-dropdown>
+             </span>
+           </a-table>
+    </a-modal>
+    
+    <a-modal
+          title="校准忽略本次异常"
+          :visible="visible"
+          :confirm-loading="confirmLoading"
+          @ok="handleOk"
+          @cancel="handleCancel"
+        >
+          <a-input placeholder="请填写忽略原因" v-model="errorText"></a-input>
     </a-modal>
   </a-card>
 </template>
 
 <script>
   import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import {getAction, postAction, deleteAction} from '@/api/manage'
+  import {getAction, postAction, deleteAction,putAction} from '@/api/manage'
   import SelectUserModal from '../modules/SelectUserModal'
   import JiaoZhunModal from './JiaoZhunModal'
   import DeptRoleUserModal from '../modules/DeptRoleUserModal'
@@ -125,32 +171,6 @@
     fuXinInfo
   } from '@/api/api'
   
-  const data = [
-    {
-      key: '1',
-      durationCommitDate: 'John Brown',
-      durationBeginDate: 32,
-      durationEndDate: 'New York No. 1 Lake Park',
-      duration: ['nice', 'developer'],
-      demo:'11111111'
-    },
-    {
-      key: '2',
-      durationCommitDate: 'John Brown',
-      durationBeginDate: 32,
-      durationEndDate: 'New York No. 1 Lake Park',
-      duration: ['nice', 'developer'],
-      demo:'11111111'
-    },{
-      key: '3',
-      durationCommitDate: 'John Brown',
-      durationBeginDate: 32,
-      durationEndDate: 'New York No. 1 Lake Park',
-      duration: ['nice', 'developer'],
-      demo:'11111111'
-    },
-  ];
-  
   export default {
     name: "DeptUserInfo",
     mixins: [JeecgListMixin],
@@ -161,6 +181,12 @@
     },
     data() {
       return {
+        errorViewDate:'',
+        errorSt:'',
+        errorUserId:'',
+        errorText: '',//校准弹框属性
+        visible: false,//校准弹框属性
+        confirmLoading: false,//校准弹框属性
         durationCommitDate:'',//加班申请时间
         durationBeginDate:'',//加班开始时间
         durationEndDate:'',//加班结束时间
@@ -175,28 +201,19 @@
         headMonth:'',//标题选择月份
         newMonth:'',//更改时选择的月份
         currentDeptId: '',
-        data : [
-          {
-            key: '1',
-            durationCommitDate: '2022-01-02 11:00:21',
-            durationBeginDate: '2022-01-02 11:00:21',
-            durationEndDate: '2022-01-02 21:00:21',
-            duration: '10',
-            demo:'测试'
-          }
-        ],
+        data : [],//加班信息弹框
         columns2:[{
           title: '加班申请时间',
           align: "center",
-          dataIndex: 'durationCommitDate'
+          dataIndex: 'commitDate'
         },{
           title: '加班开始时间',
           align: "center",
-          dataIndex: 'durationBeginDate'
+          dataIndex: 'beginDate'
         },{
           title: '加班结束时间',
           align: "center",
-          dataIndex: 'durationEndDate'
+          dataIndex: 'endDate'
         },{
           title: '加班时长',
           align: "center",
@@ -205,7 +222,18 @@
           title: '加班事由',
           align: "center",
           dataIndex: 'demo'
-        }],
+        },{
+          title: '处理方式',
+          align: "center",
+          dataIndex: 'setInfo'
+        },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            scopedSlots: {customRender: 'action'},
+            align: "center",
+            width: 120
+          }],
         // 表头
         columns: [{
             title: '日期',
@@ -255,12 +283,12 @@
             align: "center",
             dataIndex: 'attendanceCount'
           },  
-          {
-            title: '加班申请',
-            align: "center",
-            dataIndex: 'demo',
-            width: 200
-          },
+          // {
+          //   title: '加班申请',
+          //   align: "center",
+          //   dataIndex: 'demo',
+          //   width: 200
+          // },
           {
             title: '加班时间',
             align: "center",
@@ -278,6 +306,8 @@
             width: 120
           }],
         url: {
+          errorInfo: '/viewClockIn/viewClockIn/errorInfo',
+          getJiaBan: '/workOvertime/workOvertime/getJiaBan',
           list: '/viewClockIn/viewClockIn/list',
           // list: "/sys/user/departUserList",
           edit: "/sys/user/editSysDepartWithUser",
@@ -294,6 +324,41 @@
     },
 
     methods: {
+        showModal(record) {
+          this.errorViewDate = record.viewDate;
+          this.errorUserId = record.userId;
+          this.errorSt = record.errorState;
+          this.errorText = record.errorText;
+          this.visible = true;
+        },
+        handleOk(e) {
+          if(this.errorSt == 0){
+             this.$message.warning("已校准过,无需再次校准");
+             return;
+          }
+          if(this.errorText == null || this.errorText == ''){
+             this.$message.warning("请填写忽略原因");
+             return;
+          }
+          let that = this;
+          this.confirmLoading = true;
+          putAction(this.url.errorInfo, {viewDate:this.errorViewDate,userId:this.errorUserId,errorText:this.errorText}).then((res) => {
+            if (res.success) {
+              that.$message.success("操作成功");
+              that.loadData();
+            } else {
+              that.$message.warning(res.message);
+              that.loadData();
+            }
+          }).finally(() => {
+            this.confirmLoading = false;
+            this.visible = false;
+          })
+        },
+        handleCancel(e) {
+          console.log('Clicked cancel button');
+          this.visible = false;
+        },
       onDateChange: function (value, dateString) {
         this.newMonth = dateString;
         this.$emit('clearSelectedDepartKeys');
@@ -482,35 +547,60 @@
           }
         })
       },
-      fuXinInfo(st,record){
-          // 1付薪,2累计调休,3忽略
-          if(record.setInfo != '' && record.setInfo != null){
-             this.$message.warning("已设置过,不能再次设置");
-             return;
-          }
-          if(record.demo == '' || record.demo == null){
-             this.$message.warning("该员工当日没有加班申请信息");
-             return;
+      errorInfo(record){//校准
+        if(record.errorState == 0){
+           this.$message.warning("已校准过,无需再次校准");
+           return;
+        }
+        let that = this;
+        putAction(this.url.errorInfo, {viewDate:record.viewDate,userId:record.userId}).then((res) => {
+          if (res.success) {
+            that.$message.success("操作成功");
+            that.loadData();
+          } else {
+            that.$message.warning(res.message);
+            that.loadData();
           }
+        }).finally(() => {
+              
+        })
+        
+      },
+      fuXinInfo(w,st,record){//薪资操作
+      
+          // w  1:弹框中方法,2列表中方法
+          // st 1付薪,2累计调休,3忽略
+          // if(record.setInfo != '' && record.setInfo != null){
+          //    this.$message.warning("已设置过,不能再次设置");
+          //    return;
+          // }
+          // if(record.demo == '' || record.demo == null){
+          //    this.$message.warning("该员工当日没有加班申请信息");
+          //    return;
+          // }
+          
           let that = this;
-          fuXinInfo({viewDate:record.viewDate,userId:record.userId,st:st}).then((res) => {
-            if (res == 'true') {
+          fuXinInfo({viewDate:record.viewDate,viewDate1:record.beginDate,userId:record.userId,pkId:record.id,st:st,w:w}).then((res) => {
+            if (res.success) {
               that.$message.success("已成功设置");
               that.loadData();
             } else {
-              that.$message.warning(res);
+              that.$message.warning(res.message);
               that.loadData();
             }
           });
-               
+          that.modal2Visible = false;
       },
-      workInfo(record){
-         this.modal2Visible = true;
-         this.durationCommitDate = record.commitDate;//加班申请时间
-         this.durationBeginDate = record.durationBeginDate;//加班开始时间
-         this.durationEndDate = record.durationEndDate;//加班结束时间
-         this.duration = record.duration;//加班时长
-         this.demo = record.demo;//加班事由   
+      workInfo(record){//点击加班时间事件
+      
+        let that = this;
+        
+        putAction(this.url.getJiaBan, {viewDate:record.viewDate,username:record.username}).then((res) => {
+          that.data = res;
+        }).finally(() => {
+           that.modal2Visible = true;
+        })
+     
       }
     }
   }