ysh 3 năm trước cách đây
mục cha
commit
2760a6a1c6

+ 4 - 0
src/api/api.js

@@ -11,6 +11,8 @@ const queryall = (params)=>getAction("/sys/role/queryall",params);
 //考勤日报生成考勤月报
 const monthReport =  (params)=>putAction("/viewClockIn/viewClockIn/monthReport",params);
 const jiaozhun =  (params)=>putAction("/viewClockIn/viewClockIn/jiaozhun",params);
+const fuXinInfo =  (params)=>putAction("/viewClockIn/viewClockIn/fuXinInfo",params);//人员考勤页面,1付薪,2累计调休,3忽略
+const queryTreeList2 = (params)=>getAction("/sys/sysDepart/queryTreeList2",params);
 
 //用户管理
 const addUser = (params)=>postAction("/sys/user/add",params);
@@ -124,6 +126,8 @@ export {
   queryall,
   monthReport,
   jiaozhun,
+  fuXinInfo,
+  queryTreeList2,
   frozenBatch,
   checkOnlyUser,
   changePassword,

+ 1 - 0
src/mixins/JeecgListMixin.js

@@ -73,6 +73,7 @@ export const JeecgListMixin = {
   },
   methods:{
     loadData(arg) {
+      console.log("============="+arg);
       if(!this.url.list){
         this.$message.error("请设置url.list属性!")
         return

+ 494 - 0
src/views/system/schedulingInformation/AttendanceInformation.vue

@@ -0,0 +1,494 @@
+<template xmlns:background-color="http://www.w3.org/1999/xhtml">
+  <a-row :gutter="10">
+    <a-col :md="6" :sm="12">
+      <a-card :bordered="false">
+
+        <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
+          <a-alert type="info" :showIcon="true">
+            <div slot="message">
+              当前选择:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
+            </div>
+          </a-alert>
+          <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
+          <!-- 树-->
+          <a-col :md="10" :sm="24">
+            <template>
+              <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
+               <span style="user-select: none">
+            <a-tree
+              multiple
+              @select="onSelect"
+              @check="onCheck"
+              @rightClick="rightHandle"
+              :selectedKeys="selectedKeys"
+              :checkedKeys="checkedKeys"
+              :treeData="departTree"
+              :checkStrictly="checkStrictly"
+              :expandedKeys="iExpandedKeys"
+              :autoExpandParent="autoExpandParent"
+              @expand="onExpand"/>
+                </span>
+                <!--新增右键点击事件,和增加添加和删除功能-->
+                <!-- <a-menu slot="overlay">
+                  <a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>
+                  <a-menu-item @click="handleDelete" key="2">删除</a-menu-item>
+                  <a-menu-item @click="closeDrop" key="3">取消</a-menu-item>
+                </a-menu> -->
+              </a-dropdown>
+            </template>
+          </a-col>
+        </div>
+      </a-card>
+      <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+   
+      <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+    </a-col>
+    <a-col :md="18" :sm="24">
+      <a-tabs defaultActiveKey="1"> 
+        <a-tab-pane tab="基本信息" key="1" >
+          <!-- <a-card :bordered="false" v-if="selectedKeys.length>0"> -->
+          
+            <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" >
+            
+            </a-table>
+            
+        <!-- </a-card>
+          <a-card v-else >
+            <a-empty>
+              <span slot="description"> 请先选择一个人员! </span>
+            </a-empty>
+          </a-card> -->
+        </a-tab-pane> 
+      
+      </a-tabs>
+
+    </a-col>
+    <!-- <depart-modal ref="departModal" @ok="loadTree"></depart-modal> -->
+  </a-row>
+</template>
+<script>
+  import DepartModal from '../modules/DepartModal'
+  import pick from 'lodash.pick'
+  import {queryTreeList2, searchByKeywords, deleteByDepartId} from '@/api/api'
+  import moment from 'moment'
+  import {httpAction, deleteAction} from '@/api/manage'
+  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+  import DepartAuthModal from '../modules/DepartAuthModal'
+  // 表头
+  const columns = [
+    {
+      title: '日期',
+      align: 'center',
+      dataIndex: 'viewDate', width: 100
+    },
+    {
+      title: '人员',
+      align: 'center',
+      dataIndex: 'realname',  width: 100
+    }
+  ]
+  export default {
+    name: 'DepartList',
+    mixins: [JeecgListMixin],
+    components: {
+      // DepartAuthModal,
+      // DepartModal
+    },
+    data() {
+      return {
+        iExpandedKeys: [],
+        loading: false,
+        autoExpandParent: true,
+        currFlowId: '',
+        currFlowName: '',
+        disable: true,
+        treeData: [],
+        visible: false,
+        departTree: [],
+        rightClickSelectedKey: '',
+        rightClickSelectedOrgCode: '',
+        hiding: true,
+        model: {},
+        dropTrigger: '',
+        depart: {},
+        columns: columns,
+        disableSubmit: false,
+        checkedKeys: [],
+        selectedKeys: [],
+        autoIncr: 1,
+        currSelected: {},
+
+        allTreeKeys:[],
+        checkStrictly: true,
+
+        // form: this.$form.createForm(this),
+        labelCol: {
+          xs: {span: 24},
+          sm: {span: 5}
+        },
+        wrapperCol: {
+          xs: {span: 24},
+          sm: {span: 16}
+        },
+        graphDatasource: {
+          nodes: [],
+          edges: []
+        },
+        url: {
+          list: '/viewClockIn/viewClockIn/list',
+          delete: '/sys/sysDepart/delete',
+          edit: '/sys/sysDepart/edit',
+          deleteBatch: '/sys/sysDepart/deleteBatch',
+          exportXlsUrl: "sys/sysDepart/exportXls",
+          importExcelUrl: "sys/sysDepart/importExcel",
+        },
+        orgCategoryDisabled:false,
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      loadData() {
+        this.refresh();
+      },
+      loadTree() {
+        var that = this
+        that.treeData = []
+        that.departTree = []
+        queryTreeList2().then((res) => {
+          if (res.success) {
+            //部门全选后,再添加部门,选中数量增多
+            this.allTreeKeys = [];
+            for (let i = 0; i < res.result.length; i++) {
+              let temp = res.result[i]
+              that.treeData.push(temp)
+              that.departTree.push(temp)
+              that.setThisExpandedKeys(temp)
+              that.getAllKeys(temp);
+              // console.log(temp.id)
+            }
+            this.loading = false
+          }
+        })
+      },
+      setThisExpandedKeys(node) {
+        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])
+          }
+        }
+      },
+      refresh() {
+        this.loading = true
+        this.loadTree()
+      },
+      // 右键操作方法
+      rightHandle(node) {
+        this.dropTrigger = 'contextmenu'
+        console.log(node.node.eventKey)
+        this.rightClickSelectedKey = node.node.eventKey
+        this.rightClickSelectedOrgCode = node.node.dataRef.orgCode
+      },
+      onExpand(expandedKeys) {
+        console.log('onExpand', expandedKeys)
+        // if not set autoExpandParent to false, if children expanded, parent can not collapse.
+        // or, you can remove all expanded children keys.
+        this.iExpandedKeys = expandedKeys
+        this.autoExpandParent = false
+      },
+      backFlowList() {
+        this.$router.back(-1)
+      },
+      // 右键点击下拉框改变事件
+      dropStatus(visible) {
+        if (visible == false) {
+          this.dropTrigger = ''
+        }
+      },
+      // 右键店家下拉关闭下拉框
+      closeDrop() {
+        this.dropTrigger = ''
+      },
+      addRootNode() {
+        this.$refs.nodeModal.add(this.currFlowId, '')
+      },
+      batchDel: function () {
+        console.log(this.checkedKeys)
+        if (this.checkedKeys.length <= 0) {
+          this.$message.warning('请选择一条记录!')
+        } else {
+          var ids = ''
+          for (var a = 0; a < this.checkedKeys.length; a++) {
+            ids += this.checkedKeys[a] + ','
+          }
+          var that = this
+          this.$confirm({
+            title: '确认删除',
+            content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
+            onOk: function () {
+              deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message)
+                  that.loadTree()
+                  that.onClearSelected()
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+            }
+          })
+        }
+      },
+      onSearch(value) {
+        let that = this
+        if (value) {
+          searchByKeywords({keyWord: value}).then((res) => {
+            if (res.success) {
+              that.departTree = []
+              for (let i = 0; i < res.result.length; i++) {
+                let temp = res.result[i]
+                that.departTree.push(temp)
+              }
+            } else {
+              that.$message.warning(res.message)
+            }
+          })
+        } else {
+          that.loadTree()
+        }
+
+      },
+      nodeModalOk() {
+        this.loadTree()
+      },
+      nodeModalClose() {
+      },
+      hide() {
+        console.log(111)
+        this.visible = false
+      },
+      onCheck(checkedKeys, info) {
+        console.log('onCheck', checkedKeys, info)
+        this.hiding = false
+        //this.checkedKeys = checkedKeys.checked
+        // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+        if(this.checkStrictly){
+          this.checkedKeys = checkedKeys.checked;
+        }else{
+          this.checkedKeys = checkedKeys
+        }
+        // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+      },
+      onSelect(selectedKeys, e) {
+        console.log('selected', selectedKeys, e)
+        // this.hiding = false
+        // let record = e.node.dataRef
+        // console.log('onSelect-record', record)
+        // this.currSelected = Object.assign({}, record)
+        // this.model = this.currSelected
+        // this.selectedKeys = [record.key]
+        // this.model.parentId = record.parentId
+        // this.setValuesToForm(record)
+        // this.$refs.departAuth.show(record.id);
+
+      },
+      // 触发onSelect事件时,为部门树右侧的form表单赋值
+      setValuesToForm(record) {
+        if(record.orgCategory == '1'){
+          this.orgCategoryDisabled = true;
+        }else{
+          this.orgCategoryDisabled = false;
+        }
+        this.$nextTick(() => {
+          this.form.getFieldDecorator('fax', {initialValue: ''})
+          this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
+        })
+      },
+      getCurrSelectedTitle() {
+        return !this.currSelected.title ? '' : this.currSelected.title
+      },
+      onClearSelected() {
+        this.hiding = true
+        this.checkedKeys = []
+        this.currSelected = {}
+        this.form.resetFields()
+        this.selectedKeys = []
+        this.$refs.departAuth.departId = ''
+      },
+      handleNodeTypeChange(val) {
+        this.currSelected.nodeType = val
+      },
+      notifyTriggerTypeChange(value) {
+        this.currSelected.notifyTriggerType = value
+      },
+      receiptTriggerTypeChange(value) {
+        this.currSelected.receiptTriggerType = value
+      },
+      submitCurrForm() {
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            if (!this.currSelected.id) {
+              this.$message.warning('请点击选择要修改部门!')
+              return
+            }
+
+            let formData = Object.assign(this.currSelected, values)
+            console.log('Received values of form: ', formData)
+            httpAction(this.url.edit, formData, 'put').then((res) => {
+              if (res.success) {
+                this.$message.success('保存成功!')
+                this.loadTree()
+              } else {
+                this.$message.error(res.message)
+              }
+            })
+          }
+        })
+      },
+      emptyCurrForm() {
+        this.form.resetFields()
+      },
+      nodeSettingFormSubmit() {
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            console.log('Received values of form: ', values)
+          }
+        })
+      },
+      openSelect() {
+        this.$refs.sysDirectiveModal.show()
+      },
+      selectDirectiveOk(record) {
+        console.log('选中指令数据', record)
+        this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode})
+        this.currSelected.sysCode = record.sysCode
+      },
+      getFlowGraphData(node) {
+        this.graphDatasource.nodes.push({
+          id: node.id,
+          text: node.flowNodeName
+        })
+        if (node.children.length > 0) {
+          for (let a = 0; a < node.children.length; a++) {
+            let temp = node.children[a]
+            this.graphDatasource.edges.push({
+              source: node.id,
+              target: temp.id
+            })
+            this.getFlowGraphData(temp)
+          }
+        }
+      },
+     // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+      expandAll () {
+        this.iExpandedKeys = this.allTreeKeys
+      },
+      closeAll () {
+        this.iExpandedKeys = []
+      },
+      checkALL () {
+        this.checkStriccheckStrictlytly = false
+        this.checkedKeys = this.allTreeKeys
+      },
+      cancelCheckALL () {
+        //this.checkedKeys = this.defaultCheckedKeys
+        this.checkedKeys = []
+      },
+      switchCheckStrictly (v) {
+        if(v==1){
+          this.checkStrictly = false
+        }else if(v==2){
+          this.checkStrictly = true
+        }
+      },
+      getAllKeys(node) {
+        // console.log('node',node);
+        this.allTreeKeys.push(node.key)
+        if (node.children && node.children.length > 0) {
+          for (let a = 0; a < node.children.length; a++) {
+            this.getAllKeys(node.children[a])
+          }
+        }
+      }
+      // <!---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------>
+      
+    },
+    created() {
+      this.currFlowId = this.$route.params.id
+      this.currFlowName = this.$route.params.name
+      // this.loadTree()
+    },
+
+  }
+</script>
+<style scoped>
+  
+  @import '~@assets/less/common.less'
+    
+  .ant-card-body .table-operator {
+    margin: 15px;
+  }
+
+  .anty-form-btn {
+    width: 100%;
+    text-align: center;
+  }
+
+  .anty-form-btn button {
+    margin: 0 5px;
+  }
+
+  .anty-node-layout .ant-layout-header {
+    padding-right: 0
+  }
+
+  .header {
+    padding: 0 8px;
+  }
+
+  .header button {
+    margin: 0 3px
+  }
+
+  .ant-modal-cust-warp {
+    height: 100%
+  }
+
+  .ant-modal-cust-warp .ant-modal-body {
+    height: calc(100% - 110px) !important;
+    overflow-y: auto
+  }
+
+  .ant-modal-cust-warp .ant-modal-content {
+    height: 90% !important;
+    overflow-y: hidden
+  }
+
+  #app .desktop {
+    height: auto !important;
+  }
+
+  /** Button按钮间距 */
+  .ant-btn {
+    margin-left: 3px
+  }
+
+  .drawer-bootom-button {
+    /*position: absolute;*/
+    bottom: 0;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: left;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 224 - 0
src/views/system/schedulingInformation/AttendanceInformation1.vue

@@ -0,0 +1,224 @@
+<template>
+  <a-row :gutter="10">
+    <a-col :md="4" :sm="12">
+      <a-card :bordered="false">
+        <div style="background: #fff;height: 100%; margin-top: 5px">
+          <a-input-search @search="onSearch" style="width:100%" placeholder="请输入部门名称"/>
+          <!-- 树-->
+
+          <template v-if="userIdentity === '2' && departTree.length>0">
+
+            <!--组织机构-->
+            <a-tree
+              showLine
+              :selectedKeys="selectedKeys"
+              :checkStrictly="true"
+              @select="onSelect"
+              :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
+              :treeData="departTree"
+              :autoExpandParent="autoExpandParent"
+              :expandedKeys="iExpandedKeys"
+              @expand="onExpand"
+            />
+
+          </template>
+          <div style="margin-top: 24px;" v-else-if="userIdentity === '2' && departTree.length==0">
+            <h3><span>您的部门下暂无有效部门信息</span></h3>
+          </div>
+          <div style="margin-top: 24px;" v-else><h3>普通员工暂此权限</h3></div>
+        </div>
+      </a-card>
+    </a-col>
+    <a-col :md="20" :sm="24">
+      <a-card :bordered="false">
+        <a-tabs defaultActiveKey="2" @change="callback">
+          <!-- <a-tab-pane tab="基本信息" key="1" forceRender>
+            <Dept-Base-Info ref="DeptBaseInfo"></Dept-Base-Info>
+          </a-tab-pane> -->
+          <a-tab-pane tab="员工考勤信息" key="2">
+            <View-Clock-User-Info ref="ViewClockUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></View-Clock-User-Info>
+          </a-tab-pane>
+         
+        </a-tabs>
+      </a-card>
+    </a-col>
+  </a-row>
+</template>
+<script>
+  import DeptBaseInfo from '../modules/DeptBaseInfo'
+  import ViewClockUserInfo from './ViewClockUserInfo'
+  import {queryTreeList2,queryMyDepartTreeList, searchByKeywords} from '@/api/api'
+  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+  import DeptRoleInfo from '../modules/DeptRoleInfo'
+  import DeptUserInfo from '../modules/DeptUserInfo'
+
+  export default {
+    name: 'DepartUserList',
+    mixins: [JeecgListMixin],
+    components: {
+      DeptRoleInfo,
+      DeptBaseInfo,
+      ViewClockUserInfo,
+      DeptUserInfo
+    },
+    data() {
+      return {
+        currentDeptId: '',
+        iExpandedKeys: [],
+        loading: false,
+        autoExpandParent: true,
+        currFlowId: '',
+        currFlowName: '',
+        disable: true,
+        treeData: [],
+        visible: false,
+        departTree: [],
+        rightClickSelectedKey: '',
+        hiding: true,
+        model: {},
+        dropTrigger: '',
+        depart: {},
+        disableSubmit: false,
+        checkedKeys: [],
+        selectedKeys: [],
+        autoIncr: 1,
+        currSelected: {},
+        form: this.$form.createForm(this),
+        labelCol: {
+          xs: {span: 24},
+          sm: {span: 5}
+        },
+        wrapperCol: {
+          xs: {span: 24},
+          sm: {span: 16}
+        },
+        graphDatasource: {
+          nodes: [],
+          edges: []
+        },
+        userIdentity:"",
+      }
+    },
+    methods: {
+      callback(key) {
+        //console.log(key)
+      },
+      loadData() {
+        this.refresh();
+      },
+      clearSelectedDepartKeys() {
+        this.checkedKeys = [];
+        this.selectedKeys = [];
+        this.currentDeptId = '';
+        this.$refs.ViewClockUserInfo.currentDeptId='';
+        this.$refs.ViewClockUserInfo.currentDeptId='';
+      },
+      loadTree() {
+        var that = this
+        that.treeData = []
+        that.departTree = []
+        queryTreeList2().then((res) => {
+          if (res.success) {
+            for (let i = 0; i < res.result.length; i++) {
+              let temp = res.result[i]
+              that.treeData.push(temp)
+              that.departTree.push(temp)
+              that.setThisExpandedKeys(temp)
+              // console.log(temp.id)
+            }
+            this.loading = false
+          }
+          that.userIdentity = res.message
+        })
+      },
+      setThisExpandedKeys(node) {
+        //只展开一级目录
+        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])
+          }
+          */
+        }
+      },
+      refresh() {
+        this.loading = true
+        this.loadTree()
+      },
+
+      onExpand(expandedKeys) {
+        // console.log('onExpand', expandedKeys)
+        // if not set autoExpandParent to false, if children expanded, parent can not collapse.
+        // or, you can remove all expanded children keys.
+        this.iExpandedKeys = expandedKeys
+        this.autoExpandParent = false
+      },
+
+      onSearch(value) {
+        let that = this
+        if (value) {
+          searchByKeywords({keyWord: value,myDeptSearch:'1'}).then((res) => {
+            if (res.success) {
+              that.departTree = []
+              for (let i = 0; i < res.result.length; i++) {
+                let temp = res.result[i]
+                that.departTree.push(temp)
+              }
+            } else {
+              that.$message.warning(res.message)
+            }
+          })
+        } else {
+          that.loadTree()
+        }
+
+      },
+      onCheck(checkedKeys, e) {
+        let record = e.node.dataRef;
+        console.log('111111onCheck', checkedKeys, e);
+        this.checkedKeys = [];
+        // if (e.checked === true) {
+        this.currentDeptId = record.id;
+        this.checkedKeys.push(record.id);
+
+        this.$refs.DeptBaseInfo.open(record);
+        this.$refs.ViewClockUserInfo.open(record);
+        this.$refs.DeptRoleInfo.open(record);
+        // }
+        // else {
+        //   this.checkedKeys = [];
+        //   this.$refs.DeptBaseInfo.clearForm();
+        //   this.$refs.DeptUserInfo.clearList();
+        // }
+
+        this.hiding = false;
+        // this.checkedKeys = checkedKeys.checked
+      },
+      onSelect(selectedKeys, e) {
+        // console.log(e.node.$parent.title);
+        // console.log("sssssssss"+selectedKeys[0]);
+        // console.log("qqqqqqq"+e.node.dataRef.orgType);
+        // if (this.selectedKeys[0] !== selectedKeys[0]) {
+        //   this.selectedKeys = [selectedKeys[0]];
+        // }
+        // let record = e.node.dataRef;
+        // this.checkedKeys.push(record.id);
+        // this.$refs.DeptBaseInfo.open(record);
+        // this.$refs.ViewClockUserInfo.onClearSelected();
+        this.$refs.ViewClockUserInfo.open(selectedKeys, e);
+        // this.$refs.DeptRoleInfo.onClearSelected();
+        // this.$refs.DeptRoleInfo.open(record);
+      },
+    },
+    created() {
+      this.currFlowId = this.$route.params.id
+      this.currFlowName = this.$route.params.name
+      // this.loadTree()
+    },
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 163 - 0
src/views/system/schedulingInformation/JiaoZhunModal.vue

@@ -0,0 +1,163 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="最早打卡时间">
+          <!-- <a-date-picker  format='YYYY-MM-DD HH:mm:ss' v-model="startDate" /> -->
+          <a-date-picker
+                :mode="mode1" v-model="startDate" :allowClear="false"
+                show-time
+                @openChange="handleOpenChange1"
+                @panelChange="handlePanelChange1"
+              />
+        </a-form-item>
+        
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="最迟打卡时间">
+          <!-- <a-date-picker  format='YYYY-MM-DD HH:mm:ss' v-model="endDate" /> -->
+          <a-date-picker
+                :mode="mode1" v-model="endDate" :allowClear="false"
+                show-time
+                @openChange="handleOpenChange1"
+                @panelChange="handlePanelChange1"
+              />
+        </a-form-item>
+       
+      </a-form>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+  import {
+    jiaozhun
+  } from '@/api/api'
+  
+  export default {
+    name: "StatutoryLeaveModal",
+    data () {
+      return {
+        mode1: 'time',
+        startDate:"",
+        endDate:"",
+        viewDate:"",
+        username:"",
+        title:"操作",
+        visible: false,
+        type:"2",
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        url: {
+          add: "/statutoryleave/statutoryLeave/add",
+          edit: "/statutoryleave/statutoryLeave/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      handleOpenChange1(open) {
+            if (open) {
+              this.mode1 = 'time';
+            }
+        },
+        handlePanelChange1(value, mode) {
+          this.mode1 = mode;
+        },
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'name','sum'))
+		  //时间格式化
+          this.form.setFieldsValue({startDate:this.model.startDate?moment(this.model.startDate):null})
+          this.form.setFieldsValue({endDate:this.model.endDate?moment(this.model.endDate):null})
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+            // that.confirmLoading = true;
+            // let httpurl = '';
+            // let method = '';
+            // if(!this.model.id){
+            //   httpurl+=this.url.add;
+            //   method = 'post';
+            // }else{
+            //   httpurl+=this.url.edit;
+            //    method = 'put';
+            // }
+            //时间格式化
+            
+            jiaozhun({shiftTimeS:this.startDate,shiftTimeX:this.endDate,viewDate:this.viewDate,username:this.username}).then((res) => {
+              if (res == 'true') {
+                that.$message.success("已成功校准");
+                that.loadData();
+              } else {
+                that.$message.warning(res);
+                 that.$emit('ok');
+              }
+            });
+            // httpAction(httpurl,formData,method).then((res)=>{
+            //   if(res.success){
+            //     that.$message.success(res.message);
+            //     that.$emit('ok');
+            //   }else{
+            //     that.$message.warning(res.message);
+            //   }
+            // }).finally(() => {
+            //   that.confirmLoading = false;
+              that.close();
+            // })
+
+
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 100 - 27
src/views/system/schedulingInformation/ViewClockInList.vue

@@ -12,21 +12,59 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="班次">
-              <a-input placeholder="请输入班次" v-model="queryParam.name"></a-input>
+            <a-form-item label="部门">
+              <a-input placeholder="请输入部门" v-model="queryParam.departNames"></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="号">
-              <a-input placeholder="请输入账号" v-model="queryParam.username"></a-input>
+            <a-form-item label="号">
+              <a-input placeholder="请输入工号" v-model="queryParam.workNo"></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
+            <a-form-item label="班次">
+              <a-input placeholder="请输入班次" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="5" :sm="8">
+            <a-form-item label="操作类型" style="left: 10px">
+              <j-search-select-tag
+                      placeholder="请做出你的选择"
+                      v-model="selectValue"
+                      :dictOptions="dictOptions"> 
+                       <a-col :span="12">多选组合</a-col>
+                       </j-search-select-tag>
+             <!-- <j-dict-select-tag v-model="queryParam.name" placeholder="请选择用户名称" 
+                                 dictCode="geke_shift,name,name"/> -->
+            </a-form-item>
+          </a-col>
+          
+          <a-col :md="5" :sm="8">
+            <a-form-item label="异步加载" style="width: 300px">
+                  <j-search-select-tag
+                    placeholder="请做出你的选择"
+                    v-model="asyncSelectValue"
+                    dict="geke_shift,name,name"
+                    :async="true">
+                  </j-search-select-tag>
+                </a-form-item>
+          </a-col>
+          <!-- <a-col :md="6" :sm="8">
             <a-form-item label="日期">
               <a-date-picker valueFormat="YYYY-MM-DD"  @change="onChange" placeholder="请输入日期" v-model="queryParam.viewDate"></a-date-picker>
             </a-form-item>
+          </a-col> -->
+          <a-col :md="6" :sm="10">
+            <a-form-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-range-picker
+                style="width: 210px"
+                format="YYYY-MM-DD"
+                :placeholder="['开始时间', '结束时间']"
+                @change="onDateChange"
+                @ok="onDateOk"
+              />
+            </a-form-item>
           </a-col>
-
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@@ -61,14 +99,22 @@
 
       <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: 3000 }">
 
         <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>
         </span>
+        <span slot="realShiftTime" slot-scope="text, record, index">
+          <!-- ruleType 上班类型 1.固定时间上下班,2.按班次上下班,3.自由上下班 -->
+          <span v-if="record.ruleType == '2' ">
+            {{record.name}} {{record.shiftRealTimeS}}-{{record.shiftRealTimeX}}
+          </span>
+          <span v-else>{{record.name}}</span>
+        </span>
+
 
-      <span slot="action" slot-scope="text, record">
+        <span slot="action" slot-scope="text, record">
           <a @click="jiaozhun(record)">校准</a>
           
         </span>
@@ -85,6 +131,7 @@
   import {
     JeecgListMixin
   } from '@/mixins/JeecgListMixin'
+  import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
   import JDictSelectTag from '@/components/dict/JDictSelectTag'
   import {
     monthReport,jiaozhun
@@ -102,8 +149,19 @@
       return {
         moment,
         description: '考勤日报',
+        dictOptions:[{
+          text:"选项一",
+          value:"1"
+        },{
+          text:"选项二",
+          value:"2"
+        },{
+          text:"选项三",
+          value:"3"
+        }],
         // 表头
-        columns: [{
+        columns: [
+          /* {
             title: '行号',
             dataIndex: '',
             key: 'rowIndex',
@@ -112,26 +170,29 @@
             customRender: function(t, r, index) {
               return parseInt(index) + 1
             }
-          },
+          }, */
           {
             title: '日期',
             align: 'center',
-            dataIndex: 'viewDate'
+            dataIndex: 'viewDate', fixed: 'left', width: 100
           },
           {
             title: '人员',
             align: 'center',
-            dataIndex: 'realname'
-          },
-          {
-            title: '账号',
-            align: 'center',
-            dataIndex: 'username'
+            dataIndex: 'realname', fixed: 'left', width: 100
           },
+          // {
+          //   title: '工号',
+          //   align: 'center',
+          //   dataIndex: 'workNo'
+          // },
           {
             title: '班次',
             align: 'center',
-            dataIndex: 'name'
+            fixed: 'left', width: 160,
+            scopedSlots: {
+              customRender: 'realShiftTime'
+            }
           },
           {
             title: '上班时间',
@@ -139,14 +200,14 @@
             dataIndex: 'shiftTimeS'
           },
           {
-            title: '下班时间',
+            title: '上班打卡时间',
             align: 'center',
-            dataIndex: 'shiftTimeX'
+            dataIndex: 'gotoTime'
           },
           {
-            title: '上班打卡时间',
+            title: '下班时间',
             align: 'center',
-            dataIndex: 'gotoTime'
+            dataIndex: 'shiftTimeX'
           },
           {
             title: '下班打卡时间',
@@ -227,13 +288,14 @@
             title: '请假类型',
             align: 'center',
             dataIndex: 'holidayType'
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: { customRender: 'action' },
           }
+          // ,
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align: 'center',
+          //   scopedSlots: { customRender: 'action' },
+          // }
         ],
         url: {
           list: '/viewClockIn/viewClockIn/list'
@@ -245,7 +307,18 @@
         return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
       }
     },
+    created() {    //实例被创建时候执行
+// alert(1);
+    },
     methods: {
+      onDateChange: function (value, dateString) {
+        console.log(dateString[0],dateString[1]);
+        this.queryParam.beginViewDate=dateString[0];
+        this.queryParam.endViewDate=dateString[1];
+      },
+      onDateOk(value) {
+        console.log(value);
+      },
       onChange(date, dateString) {
             console.log(date, dateString);
             // this.value = "2021-01-01"

+ 398 - 0
src/views/system/schedulingInformation/ViewClockUserInfo.vue

@@ -0,0 +1,398 @@
+<template>
+  <a-card :bordered="false">
+    <!-- table区域-begin -->
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 10px;margin-top: -40px;">
+        <!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 
+        已选择 <a style="font-weight: 600">{{selectedRowKeys.length }}</a>项
+         <a style="margin-left: 24px" @click="onClearSelected">清空</a> -->
+       
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>
+        姓名: <a style="margin-right: 40px"> {{userName }}</a>
+        
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>
+        部门: <a style="margin-right: 40px">{{deptName}}</a>
+        
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>
+        员工类型: <a style="margin-right: 40px">{{userType}}</a>
+        
+        <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 style="font-weight: 600;margin-left: 6px" @click="onClearSelected"> > </a> -->
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="ShiftTime" slot-scope="text, record, index">
+           {{record.shiftRealTimeS}} - {{record.shiftRealTimeX}}
+        </span>
+        
+        <span slot="shiftType" slot-scope="text, record, index">
+          <!-- ruleType 上班类型 1.固定时间上下班,2.按班次上下班,3.自由上下班 -->
+          <span v-if="record.latetimeS < 0 ">
+            上班打卡异常 <a>{{record.setInfo}}</a>
+          </span>
+          <span v-if="record.latetimeX > 0 ">
+            下班打卡异常 <a>{{record.setInfo}}</a>
+          </span>
+          <span v-if="record.demo != '' && record.demo != null">
+            异常 <a>{{record.setInfo}}</a>
+          </span>
+          <span v-if="record.name == '' || record.name == null">
+            异常 <a>{{record.setInfo}}</a>
+          </span>
+          <span v-else>正常 <a>{{record.setInfo}}</a></span>
+        </span>
+        
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">校准</a>
+
+          <a-divider type="vertical"/>
+
+          <a-dropdown>
+            
+            <a class="ant-dropdown-link">
+              更多 <a-icon type="down"/>
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定付薪吗?" @confirm="() => fuXinInfo('1',record)">
+                  <a>付薪</a>
+                </a-popconfirm>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('2',record)">
+                  <a>累计调休</a>
+                </a-popconfirm>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('3',record)">
+                  <a>忽略</a>
+                </a-popconfirm>
+              </a-menu-item>
+          
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+
+      </a-table>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <Jiao-Zhun-Modal ref="modalForm" @ok="modalFormOk"></Jiao-Zhun-Modal>
+    <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>
+    <dept-role-user-modal ref="deptRoleUser"></dept-role-user-modal>
+  </a-card>
+</template>
+
+<script>
+  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+  import {getAction, postAction, deleteAction} from '@/api/manage'
+  import SelectUserModal from '../modules/SelectUserModal'
+  import JiaoZhunModal from './JiaoZhunModal'
+  import DeptRoleUserModal from '../modules/DeptRoleUserModal'
+  import moment from 'moment';
+  import 'moment/locale/zh-cn';
+  import {
+    fuXinInfo
+  } from '@/api/api'
+  export default {
+    name: "DeptUserInfo",
+    mixins: [JeecgListMixin],
+    components: {
+      DeptRoleUserModal,
+      SelectUserModal,
+      JiaoZhunModal
+    },
+    data() {
+      return {
+        moment,
+        description: '员工考勤信息',
+        userName:'',//标题员工姓名
+        deptName:'',//标题员工部门
+        userType:'',//标题员工类型
+        headMonth:'',//标题选择月份
+        currentDeptId: '',
+        // 表头
+        columns: [{
+            title: '日期',
+            align: "center",
+            dataIndex: 'viewDate'
+          },
+          {
+            title: '星期',
+            align: "center",
+            dataIndex: 'weekDate'
+          },
+          {
+            title: '班次类型',
+            align: "center",
+            dataIndex: 'name'
+          },
+          {
+            title: '班次时间',
+            align: "center",
+            scopedSlots: {
+              customRender: 'ShiftTime'
+            }
+          },
+          {
+            title: '状态',
+            align: "center",
+            scopedSlots: {customRender: 'shiftType'},
+          },
+          {
+            title: '最早打卡时间',
+            align: "center",
+            dataIndex: 'gotoTime'
+          },
+          {
+            title: '最迟打卡时间',
+            align: "center",
+            dataIndex: 'closingTime'
+          },
+          {
+            title: '加班申请',
+            align: "center",
+            dataIndex: 'demo'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            scopedSlots: {customRender: 'action'},
+            align: "center",
+            width: 150
+          }],
+        url: {
+          list: '/viewClockIn/viewClockIn/list',
+          // list: "/sys/user/departUserList",
+          edit: "/sys/user/editSysDepartWithUser",
+          delete: "/sys/user/deleteUserInDepart",
+          deleteBatch: "/sys/user/deleteUserInDepartBatch",
+        }
+      }
+    },
+    created() {
+      let yy = new Date().getFullYear();
+      let mm = new Date().getMonth()+1;
+      // let dd = new Date().getDate();
+      this.headMonth = yy+"-"+mm;
+    },
+
+    methods: {
+      onDateChange: function (value, dateString) {
+        // this.userName = e.node.dataRef.title;
+        this.queryParam.mDate=dateString;
+        this.loadData(1);
+        // console.log(value+"------------"+dateString);
+       
+      },
+      searchReset() {
+        this.queryParam = {}
+        this.loadData(1);
+      },
+      loadData(arg) {
+        if (!this.url.list) {
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        
+        if (!this.userName) {
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        //if (this.currentDeptId === '') return;
+        let params = this.getQueryParams();//查询条件
+        
+        params.depId = this.currentDeptId;
+        // params = {'endViewDate':'userName'}
+        //  console.log("============="+params.userName);
+        getAction(this.url.list, params).then((res) => {
+          if (res.success && res.result) {
+            this.dataSource = res.result.records;
+            this.ipagination.total = res.result.total;
+          }
+        })
+      },
+      batchDel: function () {
+
+        if (!this.url.deleteBatch) {
+          this.$message.error("请设置url.deleteBatch属性!")
+          return
+        }
+        if (!this.currentDeptId) {
+          this.$message.error("未选中任何部门,无法取消部门与用户的关联!")
+          return
+        }
+
+        if (this.selectedRowKeys.length <= 0) {
+          this.$message.warning('请选择一条记录!');
+          return;
+        } else {
+          var ids = "";
+          for (var a = 0; a < this.selectedRowKeys.length; a++) {
+            ids += this.selectedRowKeys[a] + ",";
+          }
+          var that = this;
+          console.log(this.currentDeptId);
+          this.$confirm({
+            title: "确认取消",
+            content: "是否取消用户与选中部门的关联?",
+            onOk: function () {
+              deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
+                if (res.success) {
+                  that.$message.success("删除用户与选中部门关系成功!");
+                  that.loadData();
+                  that.onClearSelected();
+                } else {
+                  that.$message.warning(res.message);
+                }
+              });
+            }
+          });
+        }
+      },
+      handleDelete: function (id) {
+        if (!this.url.delete) {
+          this.$message.error("请设置url.delete属性!")
+          return
+        }
+        if (!this.currentDeptId) {
+          this.$message.error("未选中任何部门,无法取消部门与用户的关联!")
+          return
+        }
+
+        var that = this;
+        deleteAction(that.url.delete, {depId: this.currentDeptId, userId: id}).then((res) => {
+          if (res.success) {
+            that.$message.success("删除用户与选中部门关系成功!");
+            if (this.selectedRowKeys.length>0){
+               for(let i =0; i<this.selectedRowKeys.length;i++){
+                   if (this.selectedRowKeys[i] == id){
+                     this.selectedRowKeys.splice(i,1);
+                     break;
+                   }
+               }
+            }
+            that.loadData();
+          } else {
+            that.$message.warning(res.message);
+          }
+        });
+      },
+      open(selectedKeys, e) {
+        this.queryParam = {}
+        this.userName = e.node.dataRef.title;
+        this.deptName = e.node.$parent.title;
+        this.userType = e.node.dataRef.orgType;
+        this.queryParam.userName=e.node.dataRef.title;
+        this.queryParam.mDate=moment(this.headMonth).format('YYYY-MM');
+        this.loadData(1);
+      },
+      clearList() {
+        this.currentDeptId = '';
+        this.dataSource = [];
+      },
+      hasSelectDept() {
+        if (this.currentDeptId == '') {
+          this.$message.error("请选择一个部门!")
+          return false;
+        }
+        return true;
+      },
+      handleAddUserDepart() {
+        if (this.currentDeptId == '' ) {
+          this.$message.error("请选择一个部门!")
+        } else {
+          this.$refs.selectUserModal.visible = true;
+        }
+      },
+      handleEdit: function (record) {
+        this.$refs.modalForm.title = "校准";
+        this.$refs.modalForm.departDisabled = true;
+        this.$refs.modalForm.disableSubmit = false;
+        this.$refs.modalForm.startDate = record.gotoTime;
+        this.$refs.modalForm.endDate = record.closingTime;
+        this.$refs.modalForm.viewDate = record.viewDate;
+        this.$refs.modalForm.username = record.userId;
+        this.$refs.modalForm.add(record);
+      },
+      handleAdd: function () {
+        if (this.currentDeptId == '') {
+          this.$message.error("请选择一个部门!")
+        } else {
+          this.$refs.modalForm.departDisabled = true;
+          this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId];  //传入一个部门id
+          this.$refs.modalForm.add();
+          this.$refs.modalForm.title = "新增";
+        }
+      },
+      selectOK(data) {
+        let params = {};
+        params.depId = this.currentDeptId;
+        params.userIdList = [];
+        for (var a = 0; a < data.length; a++) {
+          params.userIdList.push(data[a]);
+        }
+       
+        postAction(this.url.edit, params).then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+      },
+      fuXinInfo(st,record){
+          // 1付薪,2累计调休,3忽略
+          if(record.setInfo != '' && record.setInfo != null){
+             this.$message.warning("已设置过,不能再次设置");
+             return;
+          }
+          
+          let that = this;
+          fuXinInfo({viewDate:record.viewDate,userId:record.userId,st:st}).then((res) => {
+            if (res == 'true') {
+              that.$message.success("已成功设置");
+              that.loadData(1);
+            } else {
+              that.$message.warning(res);
+            }
+          });
+               
+      }
+    }
+  }
+</script>
+<style scoped>
+  /** Button按钮间距 */
+  .ant-btn {
+    margin-left: 3px
+  }
+
+  .ant-card {
+    margin-left: -30px;
+    margin-right: -30px;
+  }
+
+  .table-page-search-wrapper {
+    margin-top: -16px;
+    margin-bottom: 16px;
+  }
+</style>