LiGuang 3 jaren geleden
bovenliggende
commit
8c19566531

+ 535 - 131
src/views/system/AttendanceRuleList.vue

@@ -11,10 +11,14 @@
               <a-input placeholder="请输入规则名称" v-model="queryParam.name"></a-input>
             </a-form-item>
           </a-col>
-        
+         <a-col :xl="6" :lg="7" :md="8" :sm="24">
+        <a-form-item label="日期">
+          <a-month-picker valueFormat="YYYY-MM-DD HH:mm:ss" format="YYYY-MM" placeholder="请选择日期" v-model="queryParam.ShiftDate" />
+        </a-form-item>
+         </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchQueryst" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
               <a @click="handleToggleSearch" style="margin-left: 8px">
                 {{ toggleSearchStatus ? '收起' : '展开' }}
@@ -22,61 +26,97 @@
               </a>
             </span>
           </a-col>
-
         </a-row>
       </a-form>
     </div>
 
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus" v-has="'UserShift:add'">新增</a-button>
-   
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay" v-has="'UserShift:delete'">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
-    </div>
-
-    <!-- table区域-begin -->
+ 
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <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>
-      </div>
+     
+      <a-button @click="handleAddts()" type="primary" icon="plus" v-has="'UserShift:add'">调整</a-button>
+      <a-tabs default-active-key="1" @change="callback">
+        <a-tab-pane key="1" tab="已排班">
+         <a-table bordered rowKey="id" :data-source="dataSource" :columns="columns" :scroll="{ x:300 }"
+            :pagination="ipagination" @change="handleTableChange"  :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
+            <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
+              <div style="height: 35px;">
+                <div style="text-align: center;margin-top: -10px;">
+                  <p>{{dayobject.day.getDate()}}</p>
+                  <div style="margin-top: -10px;">
+                  <p v-if='dayobject.day.getDay()==0'>日</p>
+                  <p v-else-if='dayobject.day.getDay()==1'>一</p>
+                  <p v-else-if='dayobject.day.getDay()==2'>二</p>
+                  <p v-else-if='dayobject.day.getDay()==3'>三</p>
+                  <p v-else-if='dayobject.day.getDay()==4'>四</p>
+                  <p v-else-if='dayobject.day.getDay()==5'>五</p>
+                  <p v-else-if='dayobject.day.getDay()==6'>六</p>
+                  </div>
+                </div>
+              </div>
+            </template>
+            
+           
+            
+            <span v-for='(d,i) in tpdata' style="margin-left: -6px;" :slot="d" slot-scope="text, record, index">
+              <span v-if="record.type=='1'||record.type=='3'">
+                <a-tag color="blue" v-if="text=='休'" >{{text}}</a-tag>
+                <a-tag color="#87d068" v-else-if="text!=''&&text!=null">{{text}}</a-tag>
+              </span> 
 
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
-
-        <span slot="action" slot-scope="text, record">
-          <a v-if="record.type==2||record.type=='2'" @click="shiftAdd(record)" v-has="'UserShift:pb'">排班</a>
-          <a-divider type="vertical" v-if="record.type==2||record.type=='2'" v-has="'UserShift:pb'"/>
-          <a @click="handleEdit(record)"v-has="'UserShift:edit'">编辑</a>
-          <a-divider type="vertical" v-has="'UserShift:edit'"/>
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay" v-has="'UserShift:delete'">
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-      </a-table>
+              <span v-else style="margin-left: -7px;" > 
+               <a-tag color="blue" v-if="text=='休息'" @click="UserType(d,record)">{{text}}</a-tag>
+                <a-tag color="#87d068" v-else-if="text!=''&&text!=null" @click="UserType(d,record)">{{text}}</a-tag>
+                
+                
+            </span>
+           </span>
+          </a-table>
+        
+        <a-table bordered  :data-source="dataSources"  :columns="columnst" :scroll="{ x:300 }"
+          >
+           <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
+             <div style="height: 35px;">
+               <div style="text-align: center;margin-top: -10px;">
+                 <p>{{dayobject.day.getDate()}}</p>
+                 <div style="margin-top: -10px;">
+                 <p v-if='dayobject.day.getDay()==0'>日</p>
+                 <p v-else-if='dayobject.day.getDay()==1'>一</p>
+                 <p v-else-if='dayobject.day.getDay()==2'>二</p>
+                 <p v-else-if='dayobject.day.getDay()==3'>三</p>
+                 <p v-else-if='dayobject.day.getDay()==4'>四</p>
+                 <p v-else-if='dayobject.day.getDay()==5'>五</p>
+                 <p v-else-if='dayobject.day.getDay()==6'>六</p>
+                 </div>
+               </div>
+             </div>
+           </template>
+           </a-table>
+      </a-tab-pane>
+      <a-tab-pane key="2" tab="未排班" force-render>
+       <a-table bordered :data-source="dataSource" rowKey="id" :columns="columns" :scroll="{ x:300 }"
+         :pagination="ipagination" @change="handleTableChange"  :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChanges}">
+         <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
+           <div style="height: 35px;">
+             <div style="text-align: center;margin-top: -10px;">
+               <p>{{dayobject.day.getDate()}}</p>
+               <div style="margin-top: -10px;">
+               <p v-if='dayobject.day.getDay()==0'>日</p>
+               <p v-else-if='dayobject.day.getDay()==1'>一</p>
+               <p v-else-if='dayobject.day.getDay()==2'>二</p>
+               <p v-else-if='dayobject.day.getDay()==3'>三</p>
+               <p v-else-if='dayobject.day.getDay()==4'>四</p>
+               <p v-else-if='dayobject.day.getDay()==5'>五</p>
+               <p v-else-if='dayobject.day.getDay()==6'>六</p>
+               </div>
+             </div>
+           </div>
+         </template>
+        
+       </a-table>
+      </a-tab-pane>
+     
+    </a-tabs>
+    
     </div>
     <!-- table区域-end -->
 
@@ -88,6 +128,12 @@
 </template>
 
 <script>
+  import {
+    httpAction,
+    getFileAccessHttpUrl,
+    getAction,
+    deleteAction
+  } from '@/api/manage'
   import '@/assets/less/TableExpand.less'
   import AttendanceRuleModal from './modules/AttendanceRuleModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -102,78 +148,43 @@ import moment from "moment"
     },
     data () {
       return {
+        queryParam:{
+          ShiftDate:moment(new Date()).format('yyyy-MM-DD HH:mm:ss'),
+          type:"1"
+        },
         description: '打卡规则管理页面',
+        tts:false,
+        tpdata:[],
+        currentMonth: new Date().getMonth(),
+        currentYear: new Date().getYear(),
+        selectedRowKeys:[],
+        selectionRows:[],
         // 表头
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
-		   {
-            title: '上班类型',
-            align:"center",
-            dataIndex: 'type',
-            customRender:function(t,r,index){
-              if(t=="1"||t==1){
-                 return "固定时间上下班";
-              }else if(t=="2"||t==2){
-                return "按班次上下班";
-              }else{
-                return "自由上下班";
-              }
-             
-            }
-           },
-		   {
-            title: '规则名称',
-            align:"center",
-            dataIndex: 'name'
-           },
-		  
-		   {
-            title: '上班打卡时间',
-            align:"center",
-            dataIndex: 'startDate',
-            customRender:function(t,r,index){
-              if(t!=null&&t!=""&&r.type=="1"){
-            return moment(t).format('HH:mm')
-            }
-            }
-           },
-		   {
-            title: '下班打卡时间',
-            align:"center",
-            dataIndex: 'endDate',
-            customRender:function(t,r,index){
-              if(t!=null&&t!=""&&r.type=="1"){
-            return moment(t).format('HH:mm')
-            }
-            }
-           },
-           {
-                title: '白名单',
-                align:"center",
-                dataIndex: 'userName'
-               },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            scopedSlots: { customRender: 'action' },
-          }
-        ],
+        dataSource: [],
+        dataSources: [],
+        columns: [],
+        columnst:[],
+         days: [],
+         visibles: false,
+         shiftDate: null,
+         show: 1,
+         id: null,
+         shiftname: "",
+         username: "",
+         deptlist: null,
+         shiftlist: null,
+         isShow:true,
+         listData: [],
+         is:"1",
 		url: {
-          list: "/attendanceRule/attendanceRule/list",
-          delete: "/attendanceRule/attendanceRule/delete",
-          deleteBatch: "/attendanceRule/attendanceRule/deleteBatch",
-          exportXlsUrl: "attendanceRule/attendanceRule/exportXls",
-          importExcelUrl: "attendanceRule/attendanceRule/importExcel",
+         add: "/userShift/userShift/addUserShift",
+         userShift: "/userShift/userShift/queryByUser",
+         shift: "/shift/shift/lists",
+         list: "/sys/user/queryMothByUser",
+         moth: "/userShift/userShift/queryMothByUser",
+         deptlist: "/sys/sysDepart/listAll",
+         delUserShift: '/userShift/userShift/delete',
+         lists: "/sys/user/queryMothByCount",
        },
     }
   },
@@ -181,21 +192,414 @@ import moment from "moment"
     importExcelUrl: function(){
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
     }
-  },
+  }, created() {
+     // this.getListData(null)
+      this.initData(null)
+      this.queryShift()
+      this.queryMothByCount();
+    },
     methods: {
-     shiftAdd(e){
-       if(e.ruleType=="2"){
-       this.$refs.userShiftModal.queryParam.deptid=e.dept;
-       this.$refs.userShiftModal.queryParam.usertid=e.userId;
-       }
-       this.$refs.userShiftModal.queryParam.ruleid=e.id;
-       this.$refs.userShiftModal.queryParam.type=e.ruleType;
-       this.$refs.userShiftModal.visible=true;
-       this.$refs.userShiftModal.queryUserShifts();
-     },
+      handleAddts(){
+        if(this.selectedRowKeys.length<1&&this.queryParam.type=="2"){
+          this.$message.warning("请勾选需要排班人员");
+          return;
+        }else if(this.selectedRowKeys.length<1&&this.queryParam.type=="1"){
+          this.$message.warning("请勾选需要变更人员");
+          return;
+        }
+        
+        if(this.selectedRowKeys.length>0&&this.queryParam.type=="2"){
+          this.$refs.modalForm.add(this.selectedRowKeys,this.selectionRows);
+          
+        }else if(this.selectedRowKeys.length>0&&this.queryParam.type=="1"){
+          this.$refs.modalForm.edit(this.selectedRowKeys,this.selectionRows);
+        }
+      },
+      onSelectChanges(selectedRowKeys, selectionRows) {
+        console.log(selectedRowKeys)
+        this.selectedRowKeys = selectedRowKeys;
+        this.selectionRows=selectionRows;
+        
+      },
+    callback(key) {
+      this.queryParam.type=key;
+      this.selectedRowKeys=[];
+      this.selectionRows=[];
+      this.$options.methods.searchQuery.call(this)
+         this.initData(this.queryParam.ShiftDate)
+        },
+     searchQueryst (){
+        this.queryMothByCount()
+        this.$options.methods.searchQuery.call(this)
+        console.log(this.queryParam.ShiftDate)
+        this.initData(this.queryParam.ShiftDate)
+       
+      },
+      UserType(e,a){
+        
+        this.isShow=true;
+        var d = new Date(this.formatDate(this.currentYear, this.currentMonth, e))
+        if(a.category==106){
+          if(d.getDay()==0){
+            this.isShow=false;
+          }
+         
+        }else{
+          if(d.getDay()==0||d.getDay()==6){
+            this.isShow=false;
+          }
+        }
+      
+      },
+      shiftOks(a,b,c,d){
+        console.log(c)
+        console.log(d)
+        var date=this.currentYear + "-" + this.currentMonth + "-" + b + " 00:00:000"; 
+        var name=a.name;
+        if(a==0||a=="0"){
+          name="休息";
+        httpAction(this.url.add, {
+          userId: c.id,
+          shiftId:0,
+          shiftDate: date
+        }, "post").then((res) => {
+          if (res.success) {
+           
+          }
+        })
+        }else{
+          httpAction(this.url.add, {
+            userId: c.id,
+            shiftId:a.id,
+            shiftDate: date
+          }, "post").then((res) => {
+            if (res.success) {
+             
+            }
+          })
+        }
+        
+        
+        if (b==1) {
+          c.a1=name;
+        } else if (b == 2) {             
+          c.a2=name;
+        } else if (b == 3) {             
+         c.a3=name;
+        } else if (b == 4) {             
+         c.a4=name;
+        } else if (b == 5) {             
+         c.a5=name;
+        } else if (b == 6) {           
+         c.a6=name;
+        } else if (b == 7) {             
+         c.a7=name;
+        } else if (b== 8) {             
+          c.a8=name;
+        } else if (b== 9) {            
+          c.a9=name;
+        } else if (b== 10) {             
+          c.a10=name;
+        } else if (b == 11) {            
+          c.a11=name;
+        } else if (b == 12) {            
+         c.a12=name;
+        } else if (b == 13) {              
+          c.a13=name;
+        } else if (b == 14) {              
+         c.a14=name;
+        } else if (b == 15) {              
+          c.a15=name;
+        } else if (b == 16) {             
+          c.a16=name;
+        } else if (b== 17) {              
+          c.a17=name;
+        } else if (b== 18) {              
+          c.a18=name;
+        } else if (b == 19) {             
+          c.a19=name;
+        } else if (b == 20) {             
+         c.a20=name;
+        } else if (b == 21) {              
+          c.a21=name;
+        } else if (b == 22) {             
+          c.a22=name;
+        } else if (b == 23) {             
+          c.a23=name;
+        } else if (b == 24) {            
+         c.a24=name;
+        } else if (b== 25) {              
+          c.a25=name;
+        } else if (b == 26) {              
+          c.a26=name;
+        } else if (b == 27) {             
+          c.a27=name;
+        } else if (b == 28) {              
+          c.a28=name;
+        } else if (b == 29) {              
+          c.a29=name;
+        } else if (b == 30) {             
+         c.a30=name;
+        } else if (b == 31) {
+          c.a31=name;
+        }
+       
+       
+      },
+      initData: function(cur) {
+        this.columns = [];
+        this.columnst = [];
+        // this.this.days=[];
+        var date
+        if (cur) {
+          date = new Date(cur)
+        } else {
+          var now = new Date()
+          date = now;
+        }
+        this.currentDay = date.getDate()
+        this.currentYear = date.getFullYear()
+        this.currentMonth = date.getMonth() + 1
+  
+      
+        var str = this.formatDate(
+          this.currentYear,
+          this.currentMonth,
+          this.currentDay
+        )
+        this.days.length = 0
+        var moth = new Date(str);
+        moth.setDate(28)
+      
+        moth.setMonth(moth.getMonth() + 1);
+        moth.setDate(0);
+        this.columns.push({
+          title: '名称',
+          dataIndex: 'realname',
+          width: '100px',
+          fixed: 'left'
+        })
+        this.columnst.push({
+          title: '班次名称',
+          dataIndex: 'name',
+          width: '100px',
+          fixed: 'left'
+        })
+        this.columns.push({
+          title: '部门',
+          dataIndex: 'deptName',
+          width: '100px',
+          fixed: 'left'
+        })
+        if(this.queryParam.type=="1"){
+        this.columns.push({
+          title: '类型',
+          dataIndex: 'type',
+          width: '100px',
+          fixed: 'left',
+          customRender:function(t,r,index){
+            var name="";
+            if(t==1||t=="1"){
+              name="固定时间上下班";
+            }else if(t==2||t=="2"){
+               name="按班次上下班";
+            }else if(t==3||t=="3"){
+               name="自由时间上下班";
+            }
+            return name;
+          }
+        })
+        
+        for (var i = 1; i <= moth.getDate(); i++) {
+          var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
+          this.tpdata.push(i)
+          var dayobjectSelf = {
+            width: '49px',
+            slots: {
+              title: d.getDate()
+            },
+            dataIndex: "a" + d.getDate(),
+            scopedSlots: {customRender:i},
+            
+          } // 用一个对象包装Date对象  以便为以后预定功能添加属性
+          
+          var dayobjectSelfs = {
+            width: '49px',
+            slots: {
+              title: d.getDate()
+            },
+            dataIndex: "b" + d.getDate(),
+          }
+          var dat = {};
+          dat.day = d;
+          
+          this.days.push(dat)
+          this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
+          this.columnst.push(dayobjectSelfs)
+        }
+        }else{
+          for (var i = 1; i <= moth.getDate(); i++) {
+            var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
+            this.tpdata.push(i)
+            var dayobjectSelf = {
+              width: '49px',
+              slots: {
+                title: d.getDate()
+              },
+              dataIndex: "a" + d.getDate(),
+              
+            } // 用一个对象包装Date对象  以便为以后预定功能添加属性
+            var dat = {};
+            dat.day = d;
+            
+            this.days.push(dat)
+            this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
+          }
+        }
+       
+      },
+      queryShift() {
+        httpAction(this.url.shift, "", "get").then((res) => {
+          if (res.success) {
+            this.shiftlist = res.result;
+          }
+        }).finally(() => {
+      
+        })
+      
+      },
+      queryMothByCount() {
+        httpAction(this.url.lists,{shiftDate:moment(this.queryParam.ShiftDate).format('yyyy-MM-DD HH:mm:ss')}, "post").then((res) => {
+          if (res.success) {
+            this.dataSources=res.result;
+            console.log(res)
+          }
+        }).finally(() => {
+      
+        })
+      
+      },
+      // 返回 类似 2016-01-02 格式的字符串
+      formatDate: function(year, month, day) {
+        var y = year
+        if (month > 12) {
+          y = y + 1;
+          month = 1;
+        };
+        var m = month
+        if (m < 10) m = '0' + m
+        var d = day
+        if (d < 10) d = '0' + d
+        return y + '-' + m + '-' + d
+      }
+    
     }
   }
 </script>
 <style scoped>
   @import '~@assets/less/common.less';
+  
+  .month {
+    width: 100%;
+    color: #333333;
+    background: #ffffff;
+    margin-top: -20px;
+  }
+  
+  .month ul {
+    margin: 0;
+    padding: 0;
+    display: flex;
+    justify-content: space-between;
+    height: 30px;
+    list-style-type: none;
+  }
+  
+  .year-month {
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    margin-top: 10px;
+  }
+  
+  .choose-month {
+    text-align: center;
+    font-size: 12px;
+  }
+  
+  .arrow {
+    padding: 15px;
+    color: #999999;
+  }
+  
+  .month ul li {
+    font-size: 12px;
+    text-transform: uppercase;
+    letter-spacing: 3px;
+  }
+  
+  
+  .weekdays {
+    margin: 0;
+    padding: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    color: #999;
+    justify-content: space-around;
+    background: #ffffff;
+  }
+  
+  .weekdays li {
+    display: inline-block;
+    width: 13.6%;
+    text-align: center;
+  }
+  
+  .days {
+    padding: 10px;
+    background: #ffffff;
+    margin: 0;
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .ts {
+    padding: 20px;
+    background: #ffffff;
+    margin: 0;
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .days li {
+    list-style-type: none;
+    display: inline-block;
+    width: 14.2%;
+    text-align: center;
+    padding-bottom: 4px;
+    padding-top: 5px;
+    font-size: 13px;
+    color: #000;
+    height: 40px;
+  }
+  
+  .days li .active {
+    padding: 8px 10px;
+    border-radius: 5%;
+    background: #00b8ec;
+    color: #fff;
+  
+  }
+  
+  .days li .other-month {
+    padding: 5px;
+    color: gainsboro;
+  }
+  
+  .days li:hover .act {
+    padding: 6px 10px;
+    border-radius: 50%;
+    background: #e1e1e1;
+    color: #fff;
+  }
 </style>

+ 1 - 1
src/views/system/DepartList.vue

@@ -86,7 +86,7 @@
                   style="width:100%"
                   :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
                   :treeData="treeData"
-                  :disabled="disable"
+                  
                   v-model="model.parentId"
                   placeholder="无">
                 </a-tree-select>

+ 1 - 1
src/views/system/DepartUserList.vue

@@ -35,7 +35,7 @@
           <a-tab-pane tab="基本信息" key="1" forceRender>
             <Dept-Base-Info ref="DeptBaseInfo"></Dept-Base-Info>
           </a-tab-pane>
-          <a-tab-pane tab="用户信息" key="2">
+          <a-tab-pane tab="员工信息" key="2">
             <Dept-User-Info ref="DeptUserInfo" @clearSelectedDepartKeys="clearSelectedDepartKeys"></Dept-User-Info>
           </a-tab-pane>
          <!-- <a-tab-pane tab="部门角色" key="3" forceRender>

+ 88 - 79
src/views/system/MakeUpCardList.vue

@@ -5,23 +5,36 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-
+          
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="审批编号">
-              <a-input placeholder="请输入审批编号" v-model="queryParam.code"></a-input>
+            <a-form-item label="员工姓名">
+              <a-input placeholder="请输入员工姓名" v-model="queryParam.userId"></a-input>
             </a-form-item>
           </a-col>
+          
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="用户姓名">
-              <a-input placeholder="请输入用户姓名" v-model="queryParam.userId"></a-input>
+            <a-form-item label="部门">
+              <a-input placeholder="请输入部门" v-model="queryParam.dept"></a-input>
+            </a-form-item>
+          </a-col>
+          
+          <a-col :md="6" :sm="8">
+            <a-form-item label="补卡日期">
+              <a-date-picker
+                style="width: 100%"
+                placeholder="请选择补卡日期"
+                v-model="queryParam.time"
+                valueFormat="YYYY-MM-DD HH:mm:ss'" 
+                :getCalendarContainer="node => node.parentNode"/>
+                
             </a-form-item>
           </a-col>
-       
+          
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-             
+
             </span>
           </a-col>
 
@@ -31,44 +44,39 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-     <!-- <a-button type="primary" icon="download" @click="handleExportXls('补卡信息')">导出</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('补卡信息')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
       </a-upload> -->
       <a-dropdown v-if="selectedRowKeys.length > 0">
-       <!-- <a-menu slot="overlay">
+        <!-- <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
         </a-menu> -->
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+        <a-button style="margin-left: 8px"> 批量操作
+          <a-icon type="down" />
+        </a-button>
       </a-dropdown>
     </div>
 
     <!-- table区域-begin -->
     <div>
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <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>
       </div>
 
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
+      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+        :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange">
 
         <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 class="ant-dropdown-link">更多
+              <a-icon type="down" />
+            </a>
             <a-menu slot="overlay">
               <a-menu-item>
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@@ -83,88 +91,89 @@
     </div>
     <!-- table区域-end -->
 
-   
+
   </a-card>
 </template>
 
 <script>
   import '@/assets/less/TableExpand.less'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
 
   export default {
     name: "MakeUpCardList",
-    mixins:[JeecgListMixin],
-    data () {
+    mixins: [JeecgListMixin],
+    data() {
       return {
         description: '补卡信息管理页面',
         // 表头
         columns: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          //  },
           {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
-		   {
-            title: '审批编号',
-            align:"center",
-            dataIndex: 'code'
-           },
-		   {
-            title: '提交时间',
-            align:"center",
-            dataIndex: 'commitDate'
-           },
-		   {
-            title: '异常状态',
-            align:"center",
-            dataIndex: 'state'
-           },
-		   {
-            title: '补卡时间',
-            align:"center",
-            dataIndex: 'time'
-           },
-		   {
-            title: '用户姓名',
-            align:"center",
+            title: '员工姓名',
+            align: "center",
             dataIndex: 'userId'
-           },
-		   {
+          },
+          {
             title: '部门',
-            align:"center",
+            align: "center",
             dataIndex: 'dept'
-           },
-		   {
+          },
+          {
+            title: '补卡时间',
+            align: "center",
+            dataIndex: 'time'
+          },
+          {
+            title: '异常状态',
+            align: "center",
+            dataIndex: 'state'
+          },
+          {
             title: '补卡事由',
-            align:"center",
+            align: "center",
             dataIndex: 'demo'
-           },
-         
+          },
+          {
+            title: '提交时间',
+            align: "center",
+            dataIndex: 'commitDate'
+          },
+          {
+            title: '审批编号',
+            align: "center",
+            dataIndex: 'code'
+          },
         ],
-		url: {
+        url: {
           list: "/makeUpCard/makeUpCard/list",
           delete: "/makeUpCard/makeUpCard/delete",
           deleteBatch: "/makeUpCard/makeUpCard/deleteBatch",
           exportXlsUrl: "makeUpCard/makeUpCard/exportXls",
           importExcelUrl: "makeUpCard/makeUpCard/importExcel",
-       },
-    }
-  },
-  computed: {
-    importExcelUrl: function(){
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-    }
-  },
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function() {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
     methods: {
-     
+
     }
   }
 </script>
 <style scoped>
   @import '~@assets/less/common.less';
-</style>
+</style>

+ 12 - 12
src/views/system/RoleUserList.vue

@@ -60,7 +60,7 @@
             :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
             @change="handleTableChange">
           <span slot="action" slot-scope="text, record">
-            <a @click="handleOpen(record)" v-has='"role:user"'>用户</a>
+            <a @click="handleOpen(record)" v-has='"role:user"'>员工</a>
             <a-divider type="vertical"/>
 
             <a-dropdown v-has='"role:more"'>
@@ -100,7 +100,7 @@
             <a-row :gutter="24">
 
               <a-col :md="12" :sm="12">
-                <a-form-item label="用户工号">
+                <a-form-item label="工号">
                   <a-input placeholder="" v-model="queryParam2.workNo"></a-input>
                 </a-form-item>
               </a-col>
@@ -116,9 +116,9 @@
         </div>
         <!-- 操作按钮区域 -->
         <div class="table-operator" :md="24" :sm="24">
-          <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增用户</a-button>
+          <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增员工</a-button>
           <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
-          <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>
+          <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有员工</a-button>
 
           <a-dropdown v-if="selectedRowKeys2.length > 0">
             <a-menu slot="overlay">
@@ -275,23 +275,23 @@
             }
           ],
         columns2: [{
-          title: '用户工号',
+          title: '工号',
           align: 'center',
           dataIndex: 'workNo',
           width: 120
         },
           {
-            title: '用户名称',
+            title: '员工姓名',
             align: 'center',
             width: 100,
             dataIndex: 'realname'
           },
-          {
-            title: '状态',
-            align: 'center',
-            width: 80,
-            dataIndex: 'status_dictText'
-          },
+          // {
+          //   title: '状态',
+          //   align: 'center',
+          //   width: 80,
+          //   dataIndex: 'status_dictText'
+          // },
 
           {
             title: '操作',

+ 10 - 10
src/views/system/Shift.vue

@@ -123,16 +123,16 @@ import moment from "moment"
         description: '班次档案管理页面',
         // 表头
         columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          //  },
 		   {
             title: '班次名称',
             align:"center",

+ 22 - 11
src/views/system/StatutoryLeaveList.vue

@@ -80,7 +80,6 @@
         :pagination="ipagination"
         :loading="loading"
         class="j-table-force-nowrap"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
@@ -124,21 +123,33 @@ import moment from "moment"
         description: '法定假期管理页面',
         // 表头
         columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          //  },
 		   {
             title: '假期名称',
             align:"center",
             dataIndex: 'name'
            },
+           {
+                title: '类型',
+                align:"center",
+                dataIndex: 'type',
+                customRender:function(t,r,index){
+                  var name="休";
+                  if(t!=null&&t=="1"){
+                    name="班"
+                  }
+                  return name;
+                }
+               },
 		   {
             title: '假期开始时间',
             align:"center",

+ 56 - 44
src/views/system/UserList.vue

@@ -7,27 +7,35 @@
         <a-row :gutter="24">
 
           <a-col :md="6" :sm="12">
-            <a-form-item label="工号">
-              <a-input placeholder="请输入工号查询" v-model="queryParam.workNo"></a-input>
-            
+            <a-form-item label="真实名字">
+              <a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
             </a-form-item>
+            
           </a-col>
 
           <a-col :md="6" :sm="8">
-            <a-form-item label="性别">
-              <a-select v-model="queryParam.sex" placeholder="请选择性别">
-                <a-select-option value="">请选择</a-select-option>
-                <a-select-option value="1">男</a-select-option>
-                <a-select-option value="2">女</a-select-option>
-              </a-select>
+            <a-form-item label="工号">
+              <a-input placeholder="请输入工号查询" v-model="queryParam.workNo"></a-input>
+            
             </a-form-item>
+            
           </a-col>
 
 
           <template v-if="toggleSearchStatus">
             <a-col :md="6" :sm="8">
-              <a-form-item label="真实名字">
-                <a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
+              <a-form-item label="部门名称">
+                <a-input placeholder="请输入部门名称查询" v-model="queryParam.orgCodeTxt"></a-input>
+              </a-form-item>
+            </a-col>
+            
+            <a-col :md="6" :sm="8">
+              <a-form-item label="性别">
+                <a-select v-model="queryParam.sex" placeholder="请选择性别">
+                  <a-select-option value="">请选择</a-select-option>
+                  <a-select-option value="1">男</a-select-option>
+                  <a-select-option value="2">女</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
 
@@ -66,7 +74,8 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="border-top: 5px">
-      <a-button @click="handleAdd()" type="primary" icon="plus" v-has="'user:add'" >添加用户</a-button>
+      <a-button @click="handleAdd()" type="primary" icon="plus" v-has="'user:add'" >添加员工</a-button>
+      <a-button @click="handleExportXltx()"type="primary" icon="plus" v-has="'user:add'" >模板</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('用户信息')" v-has='"user:export"'>导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-has='"user:import"'>
         <a-button type="primary" icon="import">导入</a-button>
@@ -93,7 +102,7 @@
           <a-icon type="down"/>
         </a-button>
       </a-dropdown>
-      <j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery" v-has='"user:query"'/>
+      <!-- <j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery" v-has='"user:query"'/> -->
     </div>
 
     <!-- table区域-begin -->
@@ -160,17 +169,17 @@
                 </a-popconfirm>
               </a-menu-item>
 
-              <a-menu-item v-if="record.status==1" v-has='"user:frozen"'>
+             <!-- <a-menu-item v-if="record.status==1" v-has='"user:frozen"'>
                 <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
                   <a>冻结</a>
                 </a-popconfirm>
-              </a-menu-item>
+              </a-menu-item> -->
 
-              <a-menu-item v-if="record.status==2" v-has='"user:thaw"'>
+              <!-- <a-menu-item v-if="record.status==2" v-has='"user:thaw"'>
                 <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
                   <a>解冻</a>
                 </a-popconfirm>
-              </a-menu-item>
+              </a-menu-item> -->
             </a-menu>
           </a-dropdown>
         </span>
@@ -231,34 +240,23 @@
             }
           },*/
           {
-            title: '工号',
-            align: "center",
-            dataIndex: 'workNo',
-            width: 100,
-            sorter: true,
-            fixed: 'left',
-          },
-          {
-            title: '用户姓名',
+            title: '员工姓名',
             align: "center",
             width: 100,
             dataIndex: 'realname',
-            fixed: 'left',
-          },
-          {
-            title: '头像',
-            align: "center",
-            width: 100,
-            dataIndex: 'avatar',
-            scopedSlots: {customRender: "avatarslot"}
           },
-
           {
             title: '性别',
             align: "center",
             width: 80,
             dataIndex: 'sex_dictText',
-            sorter: true
+           
+          },
+          {
+            title: '工号',
+            align: "center",
+            dataIndex: 'workNo',
+            width: 100,
           },
           {
             title: '生日',
@@ -270,7 +268,17 @@
             title: '手机号码',
             align: "center",
             width: 120,
-            dataIndex: 'phone'
+            dataIndex: 'phone',
+            customRender:function (t,r,index) {
+              if(t!=null&&t!=""){
+                var a=t.slice(0,3);
+                var b=t.slice(8,11);
+                return a+"****"+b;
+              }else{
+                return"";
+              }
+              
+            }
           },
           {
             title: '邮箱',
@@ -306,12 +314,12 @@
             scopedSlots: {customRender: "employmentStatuss"},
             
           },
-          {
-            title: '状态',
-            align: "center",
-            width: 80,
-            dataIndex: 'status_dictText'
-          },
+          // {
+          //   title: '状态',
+          //   align: "center",
+          //   width: 80,
+          //   dataIndex: 'status_dictText'
+          // },
           {
             title: '操作',
             dataIndex: 'action',
@@ -343,7 +351,11 @@
       }
     },
     methods: {
-     
+      handleExportXltx(){
+        this.queryParam.orgCodeTxt="导入的空白模板";
+        this.$options.methods.handleExportXls.call(this)
+        this.queryParam.orgCodeTxt="";
+      },
       getAvatarView: function (avatar) {
         return getFileAccessHttpUrl(avatar)
       },

+ 747 - 416
src/views/system/modules/AttendanceRuleModal.vue

@@ -1,161 +1,163 @@
 <template>
-  <a-drawer :title="title" :maskClosable="true" :width="drawerWidth" placement="right" :closable="true"
-    @close="handleCancel" :visible="visible" style="height: 100%;overflow: auto;padding-bottom: 53px;">
-
-    <template slot="title">
-      <div style="width: 100%;">
-        <span>{{ title }}</span>
-        <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
-          <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button>
-        </span>
-      </div>
-
-    </template>
+  <j-modal title="排班" :width="1000" :visible="visible" @ok="save()" switchFullscreen @cancel="handleCancel">
 
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*规则名称">
-          <a-input placeholder="请输入规则名称" v-model="name" />
-        </a-form-item>
-
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*上班类型">
-          <a-radio-group v-model="type">
+          <a-radio-group v-model="types">
             <a-radio value="1">固定时间上下班</a-radio>
             <a-radio value="2">按班次上下班</a-radio>
             <a-radio value="3">自由上下班</a-radio>
           </a-radio-group>
         </a-form-item>
-        
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*定制类型">
-          <a-radio-group v-model="ruletype" >
-            <a-radio value="1">人员</a-radio>
-            <a-radio value="2">部门</a-radio>
-          </a-radio-group>
-        </a-form-item>
-        <a-form-item v-if="ruletype=='1'" label="*打卡人员" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input-search placeholder="点击选择参与打卡人员" v-model="selectedUserName" readOnly @search="onSearch2">
-            <a-button slot="enterButton" icon="search">选择</a-button>
-          </a-input-search>
-        </a-form-item>
-        <!--部门分配-->
-        <a-form-item v-if="ruletype=='2'" label="*打卡部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
-          <a-input-search placeholder="点击选择部门" v-model="checkedDepartNameString" readOnly @search="onSearch">
-            <a-button slot="enterButton" icon="search">选择</a-button>
-          </a-input-search>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*上班时间" v-if="type==1">
+
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*上班时间" v-if="types==1">
           <a-time-picker showTime format='HH:mm:ss' v-model="startDate" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*下班时间" v-if="type==1">
+
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*下班时间" v-if="types==1">
           <a-time-picker showTime format='HH:mm:ss' v-model="endDate" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="*工作日"  v-if="type!=2">
-          <a-checkbox-group
-                v-model="values"
-                name="checkboxgroup"
-                @change="onChangets"
-              >
-            <a-checkbox value="1">星期一</a-checkbox>
-            <a-checkbox value="2">星期二</a-checkbox>
-            <a-checkbox value="3">星期三</a-checkbox>
-            <a-checkbox value="4">星期四</a-checkbox>
-            <a-checkbox value="5">星期五</a-checkbox>
-            </br>
-            <a-checkbox value="6">星期六</a-checkbox>
-            <a-checkbox value="0">星期日</a-checkbox>
-          </a-checkbox-group>
-        </a-form-item>
-        <a-form-item v-if="ruletype=='2'" label="白名单" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input-search placeholder="点击选择不参与打卡人员" v-model="checkeUserName" readOnly @search="onSearch2">
-            <a-button slot="enterButton" icon="search">选择</a-button>
-          </a-input-search>
-        </a-form-item>
       </a-form>
+      <a-form-item v-if="types!=2" label="*打卡人员" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        <a-tag v-for='(user,i) in selectUsers' :key="user.id" closable @close="tagBtnCloseFunc(user)">{{user.realname}}
+        </a-tag>
+
+      </a-form-item>
+
+      <div v-if="types=='2'">
+        <div class='month'>
+          <ul>
+            <!--点击会触发pickpre函数,重新刷新当前日期 @click(vue v-on:click缩写) -->
+            <li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
+            <li class='year-month'>
+              <span class='choose-year'>{{ currentYear }}年</span>
+              <span class='choose-month'>{{ currentMonth }}月</span>
+            </li>
+            <li class='arrow' @click='pickNext(currentYear,currentMonth)'>下个月</li>
+          </ul>
+          <br>
+        </div>
+
+        <div>
+          <a-table bordered :data-source="dataSource" :columns="columns" :scroll="{ x:300 }" :pagination="ipagination"
+            @change="handleTableChange">
+            <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
+              <div style="height: 35px;">
+                <div style="text-align: center;margin-top: -10px;">
+                  <p>{{dayobject.day.getDate()}}</p>
+                  <div style="margin-top: -10px;">
+                    <p v-if='dayobject.day.getDay()==0'>日</p>
+                    <p v-else-if='dayobject.day.getDay()==1'>一</p>
+                    <p v-else-if='dayobject.day.getDay()==2'>二</p>
+                    <p v-else-if='dayobject.day.getDay()==3'>三</p>
+                    <p v-else-if='dayobject.day.getDay()==4'>四</p>
+                    <p v-else-if='dayobject.day.getDay()==5'>五</p>
+                    <p v-else-if='dayobject.day.getDay()==6'>六</p>
+                  </div>
+                </div>
+              </div>
+            </template>
+
+
+            <span v-for='(d,i) in tpdata' style="margin-left: -11px;" :slot="d" slot-scope="text, record, index">
+              <a-dropdown :trigger="['click']">
+                <a-tag color="blue" v-if="text=='休息'" @click="UserType(d,record)">{{text}}</a-tag>
+                <a-tag color="#87d068" v-else-if="text!='休息'&&text!=''&&text!=null" @click="UserType(d,record)">{{text}}
+                </a-tag>
+                <a-tag color="#FFFFFF" v-else @click="UserType(d,record)" style="width: 40px;">.</a-tag>
+                <a-menu slot="overlay">
+                  <a-menu-item key="0">
+                    <a @click="shiftOks(0,d,record,index)">休息</a>
+                  </a-menu-item>
+                  <a-menu-item v-if="isShow" v-for="(item,index) in shiftlist" :key="item.id">
+                    <a @click="shiftOks(item,d,record,index)">{{item.name}} ({{item.startDate}} - {{item.endDate}})</a>
+                  </a-menu-item>
+
+                </a-menu>
+              </a-dropdown>
+
+
+            </span>
+
+          </a-table>
+        </div>
+
+        </a-calendar>
+        <a-modal v-model="visibles" title="班次" @ok="shiftOk()">
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+              <a-row :gutter="24">
+
+                <a-col :xl="10" :lg="10" :md="8" :sm="24">
+                  <a-form-item label="班次名称">
+                    <a-select v-model="shiftname" placeholder="请选择班次">
+                      <a-select-option value="">请选择</a-select-option>
+                      <a-select-option value="a">休息</a-select-option>
+                      <a-select-option v-for="(item,index) in shiftlist" :value="item.id">{{item.name}}
+                      </a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+
+              </a-row>
+            </a-form>
+          </div>
+        </a-modal>
+      </div>
     </a-spin>
-    <depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
-    <user-shift-list-modal ref="userShiftListModal" @ok="modalFormOk2"></user-shift-list-modal>
-    <div class="drawer-bootom-button" v-show="!disableSubmit">
-      <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
-      </a-popconfirm>
-      <a-button @click="handleSubmits()" type="primary" :loading="confirmLoading">提交</a-button>
-    </div>
-  </a-drawer>
+  </j-modal>
 </template>
 
 <script>
-  import pick from 'lodash.pick'
-  import moment from 'moment'
-  import Vue from 'vue'
-  // 引入搜索部门弹出框的组件
-  import departWindow from './DepartWindow'
-  import userShiftListModal from './UserShiftListModal'
-  import JSelectPosition from '@/components/jeecgbiz/JSelectPosition'
-  import {
-    ACCESS_TOKEN
-  } from "@/store/mutation-types"
   import {
+    httpAction,
+    getFileAccessHttpUrl,
     getAction,
-    httpAction
+    deleteAction
   } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
   import {
-    disabledAuthFilter
-  } from "@/utils/authFilter"
-  import {
-    duplicateCheck
-  } from '@/api/api'
-  import JImageUpload from '../../../components/jeecg/JImageUpload'
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import '@/assets/less/TableExpand.less'
 
   export default {
-    name: "AttendanceRuleModal",
-    components: {
-      departWindow,
-      userShiftListModal
-    },
+    name: "UserShiftModal",
+    mixins: [JeecgListMixin],
     data() {
       return {
-        values:[],
-        ruletype:"1",
-        work:"2",
-        workday:"",
-        type: "1",
-        id: null,
-        name: "",
+        tts: false,
+        tpdata: [],
+        dataSource: [],
+        columns: [],
+        queryParam: {
+          shiftDate: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+          type: "1"
+        },
+        types: "1",
+        currentMonth: new Date().getMonth(),
+        currentYear: new Date().getYear(),
+        days: [],
+        selectUsers: [],
+        checkUserIds:"",
+        visibles: false,
+        shiftDate: null,
         startDate: "",
         endDate: "",
-        deptids: "",
-        checkeUserids: [],
-        checkeUserNames: [],
-        checkeUserid: "",
-        checkeUserName: "",
-        selectedUserids: [],
-        selectedUserNames: [],
-        selectedUserid: "",
-        selectedUserName: "",
-        departDisabled: false, //是否是我的部门调用该页面
-        modalWidth: 800,
-        drawerWidth: 700,
-        modaltoggleFlag: true,
-        confirmDirty: false,
-        selectedDepartKeys: [], //保存用户选择部门id
-        checkedDepartKeys: [],
-        checkedDepartNames: [], // 保存部门的名称 =>title
-        checkedDepartNameString: "", // 保存部门的名称 =>title
-        resultDepartOptions: [],
-        userId: "", //保存用户id
-        disableSubmit: false,
-        userDepartModel: {
-          userId: '',
-          departIdList: []
-        }, // 保存SysUserDepart的用户部门中间表数据需要的对象
-        dateFormat: "YYYY-MM-DD",
-        validatorRules: {},
-        departIdShow: false,
+        show: 1,
+        id: null,
+        shiftname: "",
+        username: "",
+        deptlist: null,
+        shiftlist: null,
         title: "操作",
         visible: false,
+        key: null,
+        index: null,
+        vs: false,
         model: {},
-        roleList: [],
-        selectedRole: [],
         labelCol: {
           xs: {
             span: 24
@@ -172,148 +174,539 @@
             span: 16
           },
         },
-        uploadLoading: false,
+        isShow: true,
+        listData: [],
         confirmLoading: false,
-        headers: {},
         form: this.$form.createForm(this),
-
+        validatorRules: {},
         url: {
           add: "/attendanceRule/attendanceRule/add",
-          edit: "/attendanceRule/attendanceRule/edit",
-          users:"/userRule/userRule/lists",
-          usersids:"/sys/user/queryUsersByIds"
+          userShift: "/userShift/userShift/queryMothByUser",
+          shift: "/shift/shift/lists",
+          list: "/sys/user/queryMothByUsers",
+          moth: "/userShift/userShift/queryMothByUser",
+          deptlist: "/sys/sysDepart/listAll",
+          delUserShift: '/userShift/userShift/delete',
+          edit:'/attendanceRule/attendanceRule/edit'
         },
       }
     },
     created() {
+      this.initData(null)
+      this.queryShift()
+    },
+    methods: {
+      tagBtnCloseFunc(e) {
+        const tags = this.selectUsers.filter(tag => tag !== e);
+        this.selectUsers = tags;
+      },
+      UserType(e, a) {
+        this.isShow = true;
+        var d = new Date(this.formatDate(this.currentYear, this.currentMonth, e))
+        if (a.category == 106) {
+          if (d.getDay() == 0) {
+            this.isShow = false;
+          }
 
+        } else {
+          if (d.getDay() == 0 || d.getDay() == 6) {
+            this.isShow = false;
+          }
+        }
+      },
+      shiftOks(a, b, c, d) {
+        var date = this.currentYear + "-" + this.currentMonth + "-" + b + " 00:00:000";
+        var name = a.name;
+        var shift=a.id;
+        if (a == 0 || a == "0") {
+          name = "休息";
+          shift="0";
+        }
 
-    },
-    computed: {
 
-    },
-    methods: {
-      queryuserName(e){
-        getAction(this.url.users, {
-            ruleId:e
-          }).then((res) => {
+        if (b == 1) {
+          c.a1 = name;
+          c.shiftid1=shift;
+        } else if (b == 2) {
+          c.a2 = name;
+          c.shiftid2=shift;
+        } else if (b == 3) {
+          c.a3 = name;
+          c.shiftid3=shift;
+        } else if (b == 4) {
+          c.a4 = name;
+          c.shiftid4=shift;
+        } else if (b == 5) {
+          c.a5 = name;
+          c.shiftid5=shift;
+        } else if (b == 6) {
+          c.a6 = name;
+          c.shiftid6=shift;
+        } else if (b == 7) {
+          c.a7 = name;
+          c.shiftid7=shift;
+        } else if (b == 8) {
+          c.a8 = name;
+          c.shiftid8=shift;
+        } else if (b == 9) {
+          c.a9 = name;
+          c.shiftid9=shift;
+        } else if (b == 10) {
+          c.a10 = name;
+          c.shiftid10=shift;
+        } else if (b == 11) {
+          c.a11 = name;
+          c.shiftid11=shift;
+        } else if (b == 12) {
+          c.a12 = name;
+          c.shiftid12=shift;
+        } else if (b == 13) {
+          c.a13 = name;
+          c.shiftid13=shift;
+        } else if (b == 14) {
+          c.a14 = name;
+          c.shiftid14=shift;
+        } else if (b == 15) {
+          c.a15 = name;
+          c.shiftid15=shift;
+        } else if (b == 16) {
+          c.a16 = name;
+          c.shiftid16=shift;
+        } else if (b == 17) {
+          c.a17 = name;
+          c.shiftid17=shift;
+        } else if (b == 18) {
+          c.a18 = name;
+          c.shiftid18=shift;
+        } else if (b == 19) {
+          c.a19 = name;
+          c.shiftid19=shift;
+        } else if (b == 20) {
+          c.a20 = name;
+          c.shiftid20=shift;
+        } else if (b == 21) {
+          c.a21 = name;
+          c.shiftid21=shift;
+        } else if (b == 22) {
+          c.a22 = name;
+          c.shiftid22=shift;
+        } else if (b == 23) {
+          c.a23 = name;
+          c.shiftid23=shift;
+        } else if (b == 24) {
+          c.a24 = name;
+          c.shiftid24=shift;
+        } else if (b == 25) {
+          c.a25 = name;
+          c.shiftid25=shift;
+        } else if (b == 26) {
+          c.a26 = name;
+          c.shiftid26=shift;
+        } else if (b == 27) {
+          c.a27 = name;
+          c.shiftid27=shift;
+        } else if (b == 28) {
+          c.a28 = name;
+          c.shiftid28=shift;
+        } else if (b == 29) {
+          c.a29 = name;
+          c.shiftid29=shift;
+        } else if (b == 30) {
+          c.a30 = name;
+          c.shiftid30=shift;
+        } else if (b == 31) {
+          c.a31 = name;
+          c.shiftid31=shift;
+        }
+
+
+      },
+
+      pickPre: function(year, month) {
+        var d = new Date(this.formatDate(year, month, 1))
+        d.setDate(0)
+        this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+        this.queryParam.shiftDate = this.formatDate(d.getFullYear(), d.getMonth() + 1, 1) + " 00:00:000";
+        this.$options.methods.searchQuery.call(this)
+      },
+
+      pickNext: function(year, month) {
+        var d = new Date(this.formatDate(year, month + 1, 1))
+        this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+        this.queryParam.shiftDate = this.formatDate(d.getFullYear(), d.getMonth() + 1, 1) + " 00:00:000";
+        this.$options.methods.searchQuery.call(this)
+      },
+
+      initData: function(cur) {
+        this.columns = [];
+        var date
+        if (cur) {
+          date = new Date(cur)
+        } else {
+          var now = new Date()
+          date = now;
+        }
+        this.currentDay = date.getDate()
+        this.currentYear = date.getFullYear()
+        this.currentMonth = date.getMonth() + 1
+        this.currentWeek = date.getDay() // 1...6,0
+
+        var str = this.formatDate(
+          this.currentYear,
+          this.currentMonth,
+          this.currentDay
+        )
+        this.days.length = 0
+        var moth = new Date(str);
+        moth.setDate(28)
+
+        moth.setMonth(moth.getMonth() + 1);
+        moth.setDate(0);
+        this.columns.push({
+          title: '名称',
+          dataIndex: 'realname',
+          width: '100px'
+        })
+        for (var i = 1; i <= moth.getDate(); i++) {
+          var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
+          this.tpdata.push(i)
+          var dayobjectSelf = {
+            width: '49px',
+            slots: {
+              title: d.getDate()
+            },
+            dataIndex: "a" + d.getDate(),
+            scopedSlots: {
+              customRender: i
+            },
+
+          } // 用一个对象包装Date对象  以便为以后预定功能添加属性
+          var dat = {};
+          dat.day = d;
+
+          this.days.push(dat)
+          this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
+        }
+      },
+
+      // 返回 类似 2016-01-02 格式的字符串
+      formatDate: function(year, month, day) {
+        var y = year
+        if (month > 12) {
+          y = y + 1;
+          month = 1;
+        };
+        var m = month
+        if (m < 10) m = '0' + m
+        var d = day
+        if (d < 10) d = '0' + d
+        return y + '-' + m + '-' + d
+      },
+
+      delUserShift(e) {
+        this.vs = true;
+        console.log(e)
+        deleteAction(this.url.delUserShift, {
+          id: e
+        }).then((res) => {
           if (res.success) {
-            if(res.result.length>0){
-              for(var i=0;i<res.result.length;i++){
-                this.selectedUserids.push(res.result[i].id);
-                this.selectedUserNames.push(res.result[i].realname);
-                this.selectedUserid=this.selectedUserids.join(",");
-                this.selectedUserName=this.selectedUserNames.join(",");
-              }
-            }
-          } 
+            this.$message.success(res.message);
+
+          } else {
+            this.$message.warning(res.message);
+          }
+        }).finally(() => {
+          this.vs = false;
+          this.getListData(moment(this.queryParam.entryDate).format('YYYY-MM-DD HH:mm:ss'));
         })
       },
-     queryUsersids(e){
-       getAction(this.url.usersids, {
-           id:e
-         }).then((res) => {
-         if (res.success) {
-           if(res.result.length>0){
-             var selectedUserids=[];
-             var selectedUserNames=[];
-             var selectedUserid="";
-             var selectedUserName="";
-             for(var i=0;i<res.result.length;i++){
-              selectedUserids.push(res.result[i].id);
-               selectedUserNames.push(res.result[i].realname);
-               selectedUserid=selectedUserids.join(",");
-               selectedUserName=selectedUserNames.join(",");
-             }
-            if(this.ruletype=="1"||this.ruletype==1){
-            this.selectedUserids=selectedUserids;
-            this.selectedUserNames=selectedUserNames;
-            this.selectedUserid=selectedUserid;
-            this.selectedUserName=selectedUserName;
-             }else if(this.ruletype=="2"||this.ruletype==2){
-               this.checkeUserids=selectedUserids;
-               this.checkeUserNames=selectedUserNames;
-               this.checkeUserid=selectedUserid;
-               this.checkeUserName=selectedUserName;
-             }
-           }
-         } 
-       })
-     },
-      onChangets(checkedValues) {
-            console.log('checked = ', checkedValues);
-            this.values=checkedValues;
-          },
-      handleSubmits() {
-        if(this.name==null||this.name==""){
-          this.$message.warning("请输入规则名称!");
-          return;
-        }if(this.ruletype=="2"){
-          if (this.checkedDepartKeys == null || this.checkedDepartKeys.length == 0) {
-            this.$message.warning("请选择打卡部门!");
+      queryUserShifts() {
+        this.queryParam.shiftDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
+        this.$options.methods.searchQuery.call(this);
+
+      },
+
+     
+
+      close() {
+        this.selectedRowKeys = [];
+        this.queryParam = {};
+        this.shiftname = "";
+        this.id = null;
+        this.$emit('close');
+        this.dataSource = [];
+        this.visible = false;
+        this.selectUsers=[];
+        this.startDate="";
+        this.endDate="";
+        
+      },
+      queryShift() {
+        httpAction(this.url.shift, "", "get").then((res) => {
+          if (res.success) {
+            this.shiftlist = res.result;
+          }
+        }).finally(() => {
+
+        })
+
+      },
+
+      handleCancel() {
+        this.close()
+      },
+      save() {
+        var userid = "";
+        var startDate = "";
+        var endDate = "";
+        var workDay = "";
+        var obj="";
+        var year=this.currentYear+"-"+this.currentMonth;
+        if (this.types != '2' && this.types != 2) {
+          if (this.selectUsers == [] || this.selectUsers.length < 1) {
+            this.$message.warning('人员不能为空');
             return;
+          } else if (this.types == '1' || this.types == 1) {
+            if (this.startDate == null || this.startDate == "") {
+              this.$message.warning('请选择上班时间');
+              return;
+            } else if (this.endDate == null || this.endDate == "") {
+              this.$message.warning('请选择下班时间');
+              return;
+            }
+            startDate = moment(this.startDate).format('YYYY-MM-DD HH:mm:ss');
+            endDate = moment(this.endDate).format('YYYY-MM-DD HH:mm:ss');
           }
+          var ids = [];
+          for (var i = 0; i < this.selectUsers.length; i++) {
+            ids.push(this.selectUsers[i].id);
+          }
+          userid = ids.join(',');
+          workDay = "1,2,3,4,5";
+        } else if (this.types == '2' || this.types == 2) {
+          var data=[];
+          var uids=[];
+          userid=this.checkUserIds;
+          for(var i=0;i<this.dataSource.length;i++){
+            uids.push(this.dataSource[i].id);
+            if(this.dataSource[i].shiftid1!=""&&this.dataSource[i].shiftid1!=null){
+              var str={
+              userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid1,
+              date:year+"-1 00:00:00"
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid2!=""&&this.dataSource[i].shiftid2!=null){
+                var str={
+                  userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid2,
+              date:year+"-2 00:00:00"
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid3!=""&&this.dataSource[i].shiftid3!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid3,
+              date:year+"-3 00:00:00",
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid4!=""&&this.dataSource[i].shiftid4!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid4,
+              date:year+"-4 00:00:00"
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid5!=""&&this.dataSource[i].shiftid5!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid5,
+              date:year+"-5 00:00:00",
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid6!=""&&this.dataSource[i].shiftid6!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid6,
+              date:year+"-6 00:00:00",
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid7!=""&&this.dataSource[i].shiftid7!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid7,
+              date:year+"-7 00:00:00"
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid8!=""&&this.dataSource[i].shiftid8!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid8,
+              date:year+"-8 00:00:00"
+              };
+              data.push(str)
+            }if(this.dataSource[i].shiftid9!=""&&this.dataSource[i].shiftid9!=null){
+              var str={
+                userid:this.dataSource[i].id,
+             shiftid:this.dataSource[i].shiftid9,
+              date:year+"-9 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid10!=""&&this.dataSource[i].shiftid10!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid10,
+              date:year+"-10 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid11!=""&&this.dataSource[i].shiftid11!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid11,
+              date:year+"-11 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid12!=""&&this.dataSource[i].shiftid12!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid12,
+              date:year+"-12 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid13!=""&&this.dataSource[i].shiftid13!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid13,
+              date:year+"-13 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid14!=""&&this.dataSource[i].shiftid14!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid14,
+              date:year+"-14 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid15!=""&&this.dataSource[i].shiftid15!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid15,
+              date:year+"-15 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid16!=""&&this.dataSource[i].shiftid16!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid16,
+              date:year+"-16 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid17!=""&&this.dataSource[i].shiftid17!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid17,
+              date:year+"-17 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid18!=""&&this.dataSource[i].shiftid18!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid18,
+              date:year+"-18 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid19!=""&&this.dataSource[i].shiftid19!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid19,
+              date:year+"-19 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid20!=""&&this.dataSource[i].shiftid20!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid20,
+              date:year+"-20 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid21!=""&&this.dataSource[i].shiftid21!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid21,
+              date:year+"-21 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid22!=""&&this.dataSource[i].shiftid22!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid22,
+              date:year+"-22 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid23!=""&&this.dataSource[i].shiftid23!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid23,
+              date:year+"-23 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid24!=""&&this.dataSource[i].shiftid24!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid24,
+             date:year+"-24 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid25!=""&&this.dataSource[i].shiftid25!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid25,
+              date:year+"-25 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid26!=""&&this.dataSource[i].shiftid26!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid26,
+              date:year+"-26 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid27!=""&&this.dataSource[i].shiftid27!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid27,
+              date:year+"-27 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid28!=""&&this.dataSource[i].shiftid28!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid28,
+              date:year+"-28 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid29!=""&&this.dataSource[i].shiftid29!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid29,
+              date:year+"-29 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid30!=""&&this.dataSource[i].shiftid30!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid30,
+              date:year+"-30 00:00:00"};
+              data.push(str)
+            }if(this.dataSource[i].shiftid31!=""&&this.dataSource[i].shiftid31!=null){
+              var str={
+                userid:this.dataSource[i].id,
+              shiftid:this.dataSource[i].shiftid31,
+              date:year+"-31 00:00:00"};
+              data.push(str)
+            }
+            
+          }
+          obj =JSON.stringify(data);
+          userid=uids.join(",");
         }
-        if (this.type == "1" && this.startDate == null) {
-          this.$message.warning("请选择上班时间!");
-          return;
-        }
-        if (this.type == "1" && this.endDate == null) {
-          this.$message.warning("请选择下班时间!");
-          return;
-        }if(this.type != "2"&&this.values.length==0){
-          this.$message.warning("请选择工作日!");
-          return;
-        }if(this.ruletype=="1"&&this.selectedUserid==""){
-          this.$message.warning("请选择打卡人员!");
-          return;
-        }
-          
         
         var url = this.url.add;
-        var types="post"
-        if (this.id!=null&&this.id!="") {
+        var typet = "post"
+        if (this.id != null && this.id != "") {
           url = this.url.edit;
-          types="put";
+          typet = "put";
         }
-        var adate=null;
-        var edate=null;
-        var workday="";
-        var dept="";
-        var deptName="";
-        var userId="";
-        var userName="";
-        if(this.type == "1"&&this.startDate != null&&this.startDate!=""){
-          adate=moment(this.startDate).format('YYYY-MM-DD HH:mm:ss');
-        }if(this.type == "1"&&this.endDate != null&&this.endDate!=""){
-          edate=moment(this.endDate).format('YYYY-MM-DD HH:mm:ss');
-        } if(this.type!="2"){
-          workday=this.values.join(",");
-        }if(this.ruletype=="1"){
-          userId=this.selectedUserid
-        }if(this.ruletype=="2"){
-          dept=this.deptids;
-          deptName=this.checkedDepartNameString;
-          userId=this.checkeUserid;
-          userName=this.checkeUserName;
-        }
-        
-       
         this.confirmLoading=true;
         httpAction(url, {
             id: this.id,
-            type: this.type,
-            name: this.name,
-            dept:dept ,
-            startDate: adate,
-            endDate: edate,
-            deptName:deptName ,
-            userId:userId,
-            userName:userName,
-            workDay:workday,
-            ruleType:this.ruletype
+            type: this.types,
+            startDate: startDate,
+            endDate: endDate,
+            userId: userid,
+            workDay: workDay,
+            ruleType:obj
           },
-          types).then((res) => {
+          typet).then((res) => {
           if (res.success) {
             this.$message.success(res.message);
             this.$emit('ok');
@@ -325,196 +718,134 @@
           this.close();
         })
       },
-      //窗口最大化切换
-      toggleScreen() {
-        if (this.modaltoggleFlag) {
-          this.modalWidth = window.innerWidth;
-        } else {
-          this.modalWidth = 800;
-        }
-        this.modaltoggleFlag = !this.modaltoggleFlag;
-      },
-      add() {
-        this.refresh();
+      add(e, a) {
         this.visible = true;
+        this.queryParam.usertid = e.join(",");
+        this.checkUserIds=e.join(",");
+        this.selectUsers = a;
+        this.queryParam.shiftDate=moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
+        this.queryParam.type="1";
+         this.$options.methods.searchQuery.call(this)
       },
-      edit(record) {
-        console.log(record)
+      edit(e,a){
         this.visible = true;
-        this.name = record.name;
-        this.type = record.type;
-        this.checkedDepartNameString = record.deptName;
-        this.deptids = record.dept;
-        this.id = record.id;
-        this.ruletype=record.ruleType;
-        this.checkeUserid=record.userId;
-        this.checkeUserids=record.userId.split(",");
-        this.checkeUserName=record.userName;
-        //时间格式化
-        if(record.type=="1"){
-        this.startDate = record.startDate ? moment(record.startDate).format('YYYY-MM-DD HH:mm:ss') : null
-        this.endDate = record.endDate ? moment(record.endDate).format('YYYY-MM-DD HH:mm:ss') : null
-        }
-        if(record.dept!=null&&record.dept!=""){
-         this.checkedDepartKeys= record.dept.split(",");
-        }if(record.workDay!=null&&record.workDay!=""){
-          this.values=record.workDay.split(",");
-        }if(record.ruleType=="1"){
-          this.queryuserName(record.id);
-        }
+        this.queryParam.usertid = e.join(",");
+        this.checkUserIds=e.join(",");
+        this.selectUsers = a;
+        this.types=a[0].type;
+        this.id=a[0].id;
+        this.queryParam.shiftDate=moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
+        this.queryParam.type="2";
+         this.$options.methods.searchQuery.call(this)
+      }
 
 
-      },
-      onSearch2() {
-        var dept="";
-        if(this.ruletype=="2"){
-        if(this.deptids==null||this.deptids==""){
-          this.$message.warning("请先选择部门!");
-          return;
-        }
-        dept=this.deptids;
-        this.$refs.userShiftListModal.selectedKeys=this.checkeUserids;
-        }else{
-          this.$refs.userShiftListModal.selectedKeys=this.selectedUserids;
-        }
-        this.$refs.userShiftListModal.add(dept);
-        
-      },
-      // 搜索用户对应的部门API
-      onSearch() {
-        console.log(this.checkedDepartKeys)
-        
-        this.$refs.departWindow.add(this.checkedDepartKeys, "","2");
-        departWindow.data.departList = this.checkedDepartKeys;
-        
-      },
-      
-      modalFormOk2(e) {
-        this.checkeUserids=[];
-        this.checkeUserNames=[];
-        this.checkeUserid= "";
-        this.checkeUserName="";
-        this.selectedUserids= [];
-        this.selectedUserNames=[];
-        this.selectedUserid="";
-        this.selectedUserName= "";
-        if(e!=null&&e.length>0){
-          var ids=e.join(",");
-          this.queryUsersids(ids)
-        }
-      },
-      // 获取用户对应部门弹出框提交给返回的数据
-      modalFormOk(formData) {
-        console.log(formData)
-        this.checkedDepartNames = [];
-        this.selectedDepartKeys = [];
-        this.checkedDepartNameString = '';
-        this.userId = formData.userId;
-        this.userDepartModel.userId = formData.userId;
-        this.departIds = [];
-        this.checkedDepartKeys = [];
-        this.deptids = "";
-        this.resultDepartOptions = [];
-        var depart = [];
-        if (formData.departIdList != null && formData.departIdList.length > 0) {
-          for (let i = 0; i < formData.departIdList.length; i++) {
-            this.selectedDepartKeys.push(formData.departIdList[i].key);
-            this.checkedDepartNames.push(formData.departIdList[i].title);
-            this.checkedDepartNameString = this.checkedDepartNames.join(",");
-            this.deptids = this.selectedDepartKeys.join(",");
-            //新增部门选择,如果上面部门选择后不为空直接付给负责部门
-            depart.push({
-              key: formData.departIdList[i].key,
-              title: formData.departIdList[i].title
-            })
-            this.departIds.push(formData.departIdList[i].key)
-          }
-          this.resultDepartOptions = depart;
-          this.userDepartModel.departIdList = this.selectedDepartKeys;
-          this.checkedDepartKeys = this.selectedDepartKeys //更新当前的选择keys
-        }
-        this.$refs.departWindow.close();
-        
-
-      },
-      // 根据屏幕变化,设置抽屉尺寸
-      resetScreenSize() {
-        let screenWidth = document.body.clientWidth;
-        if (screenWidth < 500) {
-          this.drawerWidth = screenWidth;
-        } else {
-          this.drawerWidth = 700;
-        }
-      },
-      handleCancel() {
-        this.close()
-      },
-      refresh() {
-        this.selectedDepartKeys = [];
-        this.checkedDepartKeys = [];
-        this.checkedDepartNames = [];
-        this.checkedDepartNameString = "";
-        this.userId = ""
-        this.resultDepartOptions = [];
-        this.departId = [];
-        this.departIdShow = false;
-        this.currentTenant = []
-        this.type = "1";
-        this.name = "";
-        this.startDate = null;
-        this.endDate = null;
-        this.id = null;
-        this.checkeUserName="";
-        this.checkeUserNames=[];
-        this.checkeUserid="";
-        this.checkeUserids=[];
-        this.deptids="";
-        this.values=[];
-        this.ruletype="1";
-        this.selectedUserids=[];
-        this.selectedUserNames=[];
-        this.selectedUserid="";
-        this.selectedUserName="";
-      },
-      close() {
-        this.$emit('close');
-        this.visible = false;
-        this.refresh();
-      },
     }
   }
 </script>
 
-<style scoped>
-  .avatar-uploader>.ant-upload {
-    width: 104px;
-    height: 104px;
+<style lang="less" scoped>
+  .month {
+    width: 100%;
+    color: #333333;
+    background: #ffffff;
+    margin-top: -20px;
+  }
+
+  .month ul {
+    margin: 0;
+    padding: 0;
+    display: flex;
+    justify-content: space-between;
+    height: 30px;
+    list-style-type: none;
+  }
+
+  .year-month {
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    margin-top: 10px;
+  }
+
+  .choose-month {
+    text-align: center;
+    font-size: 12px;
   }
 
-  .ant-upload-select-picture-card i {
-    font-size: 49px;
+  .arrow {
+    padding: 15px;
+    color: #999999;
+  }
+
+  .month ul li {
+    font-size: 12px;
+    text-transform: uppercase;
+    letter-spacing: 3px;
+  }
+
+
+  .weekdays {
+    margin: 0;
+    padding: 10px;
+    display: flex;
+    flex-wrap: wrap;
     color: #999;
+    justify-content: space-around;
+    background: #ffffff;
   }
 
-  .ant-upload-select-picture-card .ant-upload-text {
-    margin-top: 8px;
-    color: #666;
+  .weekdays li {
+    display: inline-block;
+    width: 13.6%;
+    text-align: center;
   }
 
-  .ant-table-tbody .ant-table-row td {
-    padding-top: 10px;
-    padding-bottom: 10px;
+  .days {
+    padding: 10px;
+    background: #ffffff;
+    margin: 0;
+    display: flex;
+    flex-wrap: wrap;
   }
 
-  .drawer-bootom-button {
-    position: absolute;
-    bottom: -8px;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: right;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
+  .ts {
+    padding: 20px;
+    background: #ffffff;
+    margin: 0;
+    display: flex;
+    flex-wrap: wrap;
+  }
+
+  .days li {
+    list-style-type: none;
+    display: inline-block;
+    width: 14.2%;
+    text-align: center;
+    padding-bottom: 4px;
+    padding-top: 5px;
+    font-size: 13px;
+    color: #000;
+    height: 40px;
+  }
+
+  .days li .active {
+    padding: 8px 10px;
+    border-radius: 5%;
+    background: #00b8ec;
+    color: #fff;
+
+  }
+
+  .days li .other-month {
+    padding: 5px;
+    color: gainsboro;
+  }
+
+  .days li:hover .act {
+    padding: 6px 10px;
+    border-radius: 50%;
+    background: #e1e1e1;
+    color: #fff;
   }
 </style>

+ 8 - 8
src/views/system/modules/DeptUserInfo.vue

@@ -6,8 +6,8 @@
       <a-form layout="inline">
         <a-row :gutter="10">
           <a-col :md="10" :sm="12">
-            <a-form-item label="用户工号" style="margin-left:8px">
-              <a-input placeholder="请输入用户工号" v-model="queryParam.workNo"></a-input>
+            <a-form-item label="工号" style="margin-left:8px">
+              <a-input placeholder="请输入工号" v-model="queryParam.workNo"></a-input>
             </a-form-item>
           </a-col>
           <!--<a-col :md="8" :sm="8">-->
@@ -79,9 +79,9 @@
                 <a href="javascript:;" @click="handleDeptRole(record)">分配部门角色</a>
               </a-menu-item> -->
 
-              <a-menu-item>
-                <a href="javascript:;" @click="handleDetail(record)">用户详情</a>
-              </a-menu-item>
+             <!-- <a-menu-item>
+                <a href="javascript:;" @click="handleDetail(record)">员工详情</a>
+              </a-menu-item> -->
 
               <a-menu-item>
                 <a-popconfirm title="确定取消与选中部门关联吗?" @confirm="() => handleDelete(record.id)">
@@ -121,16 +121,16 @@
     },
     data() {
       return {
-        description: '用户信息',
+        description: '员工信息',
         currentDeptId: '',
         // 表头
         columns: [{
-            title: '用户工号',
+            title: '工号',
             align: "center",
             dataIndex: 'workNo'
           },
           {
-            title: '用户名称',
+            title: '员工姓名',
             align: "center",
             dataIndex: 'realname'
           },

+ 18 - 18
src/views/system/modules/SelectUserModal.vue

@@ -16,8 +16,8 @@
           <a-row :gutter="24">
 
             <a-col :span="10">
-              <a-form-item label="用户工号">
-                <a-input placeholder="请输入用户工号" v-model="queryParam.workNo"></a-input>
+              <a-form-item label="工号">
+                <a-input placeholder="请输入工号" v-model="queryParam.workNo"></a-input>
               </a-form-item>
             </a-col>
             <a-col :span="8">
@@ -40,7 +40,7 @@
           :dataSource="dataSource1"
           :pagination="ipagination"
           :loading="loading"
-          :scroll="{ y: 240 }"
+          :scroll="{ y: 400 }"
           :rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"
           @change="handleTableChange">
 
@@ -61,7 +61,7 @@
     name: "SelectUserModal",
     data() {
       return {
-        title: "添加已有用户",
+        title: "添加已有员工",
         names: [],
         visible: false,
         placement: 'right',
@@ -70,24 +70,24 @@
         queryParam: {},
         // 表头
         columns1: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key: 'rowIndex',
+          //   width: 50,
+          //   align: "center",
+          //   customRender: function (t, r, index) {
+          //     return parseInt(index) + 1;
+          //   }
+          // },
           {
-            title: '#',
-            dataIndex: '',
-            key: 'rowIndex',
-            width: 50,
-            align: "center",
-            customRender: function (t, r, index) {
-              return parseInt(index) + 1;
-            }
-          },
-          {
-            title: '用户工号',
+            title: '工号',
             align: "center",
             width: 100,
             dataIndex: 'workNo'
           },
           {
-            title: '用户名称',
+            title: '员工姓名',
             align: "center",
             width: 100,
             dataIndex: 'realname'
@@ -113,13 +113,13 @@
         ],
         columns2: [
           {
-            title: '用户工号',
+            title: '工号',
             align: "center",
             dataIndex: 'workNo',
 
           },
           {
-            title: '用户名称',
+            title: '员工姓名',
             align: "center",
             dataIndex: 'realname',
           },

+ 16 - 8
src/views/system/modules/StatutoryLeaveModal.vue

@@ -18,6 +18,15 @@
           label="假期名称">
           <a-input placeholder="请输入假期名称" v-decorator="['name', validatorRules.name]" style="width: 180px;"/>
         </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="假期类型">
+          <a-select  placeholder="请选择假期类型" v-model="type" :getPopupContainer= "(target) => target.parentNode">
+            <a-select-option value="1">班</a-select-option>
+            <a-select-option value="2">休</a-select-option>
+          </a-select>
+        </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
@@ -34,7 +43,7 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="日薪资倍数">
-          <a-input-number id="inputNumber" :min="1" placeholder="请输入日薪资倍数" v-decorator="['sum', validatorRules.sum]" style="width: 180px;"/>
+          <a-input-number id="inputNumber" :min="1" placeholder="请输入日薪资倍数" v-decorator="['sum',{}]" style="width: 180px;"/>
         </a-form-item>
 		
       </a-form>
@@ -53,6 +62,7 @@
       return {
         title:"操作",
         visible: false,
+        type:"2",
         model: {},
         labelCol: {
           xs: { span: 24 },
@@ -80,13 +90,9 @@
             rules: [{
               required: true, message: '请选择结束时间!'
             }]
-          },
-          sum:{
-            rules: [{
-              required: true, message: '请输入日薪资倍数!'
-            }]
           }
-        },
+          },
+          
         url: {
           add: "/statutoryleave/statutoryLeave/add",
           edit: "/statutoryleave/statutoryLeave/edit",
@@ -101,6 +107,7 @@
       },
       edit (record) {
         this.form.resetFields();
+        this.type=record.type;
         this.model = Object.assign({}, record);
         this.visible = true;
         this.$nextTick(() => {
@@ -114,6 +121,7 @@
       close () {
         this.$emit('close');
         this.visible = false;
+        this.type="2";
       },
       handleOk () {
         const that = this;
@@ -134,7 +142,7 @@
             //时间格式化
             formData.startDate = formData.startDate?formData.startDate.format('YYYY-MM-DD HH:mm:ss'):null;
             formData.endDate = formData.endDate?formData.endDate.format('YYYY-MM-DD HH:mm:ss'):null;
-            
+            formData.type=this.type;
             console.log(formData)
             httpAction(httpurl,formData,method).then((res)=>{
               if(res.success){

+ 224 - 98
src/views/system/modules/UserModal.vue

@@ -1,5 +1,13 @@
 <template>
-  <a-drawer
+  <a-modal
+    :width="1000"
+    title="员工信息"
+    :visible="visible"
+    @ok="handleSubmit()"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+ <!-- <a-drawer
     :title="title"
     :maskClosable="true"
     :width="drawerWidth"
@@ -7,7 +15,7 @@
     :closable="true"
     @close="handleCancel"
     :visible="visible"
-    style="height: 100%;overflow: auto;padding-bottom: 53px;">
+    style="height: 100%;overflow: auto;padding-bottom: 53px;"> -->
 
     <template slot="title">
       <div style="width: 100%;">
@@ -36,20 +44,176 @@
           </a-form-item>
         </template>
  -->
-        <a-form-item label="*用户姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
-          <a-input placeholder="请输入用户姓名" v-model="realname" />
+      <a-row>
+         <a-col :md="6" :sm="8" :lg="12">
+           <a-form-item label="*员工姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+             <a-input placeholder="请输入员工姓名" v-model="realname" />
+           </a-form-item>
+            </a-col>
+           <a-col :md="6" :sm="8" :lg="12">
+             <a-form-item label="*英文名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+               <a-input placeholder="请输入英文名" v-model="egName"/>
+             </a-form-item>
+         </a-col>
+      </a-row>
+      
+      <a-row>
+         <a-col :md="6" :sm="8" :lg="12">
+          <a-form-item label="*邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-input placeholder="请输入邮箱" v-model="email" />
+          </a-form-item>
+            </a-col>
+           <a-col :md="6" :sm="8" :lg="12">
+             <a-form-item label="*身份证号码" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+               <a-input placeholder="请输入身份证号码" v-model="sfzCode" @mouseleave="getBirth"/>
+             </a-form-item>
+         </a-col>
+      </a-row>
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+           <a-form-item label="*性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
+             <a-select v-decorator="[ 'sex']" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
+               <a-select-option :value="1">男</a-select-option>
+               <a-select-option :value="2">女</a-select-option>
+             </a-select>
+           </a-form-item>
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+              <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-date-picker
+                  style="width: 100%"
+                  placeholder="请选择生日"
+                  v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"
+                  :getCalendarContainer="node => node.parentNode"/>
+              </a-form-item>
+          </a-col>
+       </a-row>
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+            <a-form-item label="*手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-input placeholder="请输入手机号码" v-model="phone" />
+            </a-form-item>
+          
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+              <a-form-item label="公积金账号" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+                <a-input placeholder="请输入公积金账号" v-model="syFund" @mouseleave="getBirth"/>
+              </a-form-item>
+          </a-col>
+       </a-row>
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+            <a-form-item label="银行账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-input placeholder="请输入银行账号"  v-model="bankCard"/>
+            </a-form-item>
+          
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+              <a-form-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" >
+                <a-input placeholder="请输入开户行" v-model="bankAddr" />
+              </a-form-item>
+          </a-col>
+       </a-row>
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+           <a-form-item label="入职日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+             <a-date-picker
+               style="width: 100%"
+               placeholder="请选择入职日期"
+               v-decorator="['entryDate', {initialValue:!model.entryDate?moment(new Date(),dateFormat):moment(model.entryDate,dateFormat)}]"
+               :getCalendarContainer="node => node.parentNode"/>
+           </a-form-item>
+          
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+             <a-form-item label="*部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
+               <a-input-search
+                 placeholder="点击选择部门"
+                 v-model="checkedDepartNameString" 
+                 readOnly
+                 @search="onSearch" >
+                 <a-button slot="enterButton" icon="search">选择</a-button>
+               </a-input-search>
+             </a-form-item>
+          </a-col>
+       </a-row>
+       
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+          <a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                       <j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>
+                     </a-form-item>
+          
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+             <a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
+               <a-radio-group
+                 v-model="identity"
+                 @change="identityChange">
+                 <a-radio value="1">普通用户</a-radio>
+                 <a-radio value="2">上级</a-radio>
+               </a-radio-group>
+             </a-form-item>
+          </a-col>
+       </a-row>
+       
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+        <a-form-item label="紧急联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-input placeholder="请输入紧急联系人" v-decorator="[ 'urgentName', validatorRules.urgentName]" />
         </a-form-item>
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+             <a-form-item label="联系人电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
+               <a-input placeholder="请输入紧急联系人电话" v-decorator="[ 'urgentPhone', validatorRules.urgentPhone]" />
+             </a-form-item>
+          </a-col>
+       </a-row>
+       
+       <a-row>
+          <a-col :md="6" :sm="8" :lg="12">
+       <a-form-item label="人员类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
+         <a-select v-decorator="[ 'category', {initialValue:101}]" placeholder="请选择人员类别" :getPopupContainer= "(target) => target.parentNode">
+           <a-select-option :value="101">正式工</a-select-option>
+           <a-select-option :value="103">实习生</a-select-option>
+           <a-select-option :value="104">劳务工</a-select-option>
+           <a-select-option :value="105">劳务外包5+2</a-select-option>
+           <a-select-option :value="106">劳务外包6+1</a-select-option>
+           <a-select-option :value="102">顾问</a-select-option>
+         </a-select>
+       </a-form-item>
+             </a-col>
+            <a-col :md="6" :sm="8" :lg="12">
+            <a-form-item label="雇佣状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-select v-decorator="[ 'employmentStatus', {initialValue:10}]" placeholder="请选择雇佣状态" :getPopupContainer= "(target) => target.parentNode">
+                <a-select-option :value="10">在职</a-select-option>
+                <a-select-option :value="20">离退</a-select-option>
+                <a-select-option :value="30">离职</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+       </a-row>
+       
+       <a-row>
+          <a-col  :lg="15">
+      <a-form-item label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        <j-dict-select-tag  v-decorator="['infoSy', {initialValue:3}]" placeholder="请选择同步" :type="'radio'" :triggerChange="true" dictCode="info_sy"/>
+      </a-form-item>
+      </a-col>
+       </a-row>
 
-        <a-form-item label="*用户英文名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
-          <a-input placeholder="请输入用户英文名" v-model="egName"/>
-        </a-form-item>
+        
         <!-- <a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入工号" v-decorator.trim="[ 'workNo', validatorRules.workNo]" />
         </a-form-item> -->
 
-        <a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>
-        </a-form-item>
+        
 
         <!-- <a-form-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
           <a-select
@@ -67,15 +231,7 @@
         </a-form-item> -->
 
         <!--部门分配-->
-        <a-form-item label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
-          <a-input-search
-            placeholder="点击选择部门"
-            v-model="checkedDepartNameString" 
-            readOnly
-            @search="onSearch" >
-            <a-button slot="enterButton" icon="search">选择</a-button>
-          </a-input-search>
-        </a-form-item>
+        
 
         <!--租户分配-->
         <!-- <a-form-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
@@ -93,14 +249,7 @@
         </a-form-item> -->
 
        <!-- update--begin--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
-        <a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-radio-group
-            v-model="identity"
-            @change="identityChange">
-            <a-radio value="1">普通用户</a-radio>
-            <a-radio value="2">上级</a-radio>
-          </a-radio-group>
-        </a-form-item>
+        
         <!-- <a-form-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol"  v-if="departIdShow==true">
           <a-select
             mode="multiple"
@@ -118,25 +267,9 @@
         </a-form-item> -->
         <!-- update--end--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
         
-        <a-form-item label="人员类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-select v-decorator="[ 'category', {initialValue:101}]" placeholder="请选择人员类别" :getPopupContainer= "(target) => target.parentNode">
-            <a-select-option :value="101">正式工</a-select-option>
-            <a-select-option :value="103">实习生</a-select-option>
-            <a-select-option :value="104">劳务工</a-select-option>
-            <a-select-option :value="105">劳务外包5+2</a-select-option>
-            <a-select-option :value="106">劳务外包6+1</a-select-option>
-            <a-select-option :value="102">顾问</a-select-option>
-           
-          </a-select>
-        </a-form-item>
         
-        <a-form-item label="雇佣状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-select v-decorator="[ 'employmentStatus', {initialValue:10}]" placeholder="请选择雇佣状态" :getPopupContainer= "(target) => target.parentNode">
-            <a-select-option :value="10">在职</a-select-option>
-            <a-select-option :value="20">离退</a-select-option>
-            <a-select-option :value="30">离职</a-select-option>
-          </a-select>
-        </a-form-item>
+        
+        
         
         
         <!-- <a-form-item label="年假天数" :labelCol="labelCol" :wrapperCol="wrapperCol" >
@@ -147,34 +280,18 @@
         <a-form-item label="年假剩余天数" :labelCol="labelCol" :wrapperCol="wrapperCol" >
           <a-input placeholder="请输入年假剩余天数" v-decorator.trim="[ 'yearCount',validatorRules.yearCount ]" />
         </a-form-item> -->
-        
+      <!--  
         <a-form-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <j-image-upload class="avatar-uploader" text="上传" v-model="fileList" ></j-image-upload>
-        </a-form-item>
+        </a-form-item> -->
+        
+       
+        
+        
         
-        <a-form-item label="公积金账号" :labelCol="labelCol" :wrapperCol="wrapperCol" >
-          <a-input placeholder="请输入公积金账号" v-model="syFund" @mouseleave="getBirth"/>
-        </a-form-item>
         
-        <a-form-item label="*身份证号码" :labelCol="labelCol" :wrapperCol="wrapperCol" >
-          <a-input placeholder="请输入身份证号码" v-model="sfzCode" @mouseleave="getBirth"/>
-        </a-form-item>
         
-        <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-date-picker
-            style="width: 100%"
-            placeholder="请选择生日"
-            v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"
-            :getCalendarContainer="node => node.parentNode"/>
-        </a-form-item>
         
-        <a-form-item label="入职日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-date-picker
-            style="width: 100%"
-            placeholder="请选择入职日期"
-            v-decorator="['entryDate', {initialValue:!model.entryDate?moment(new Date(),dateFormat):moment(model.entryDate,dateFormat)}]"
-            :getCalendarContainer="node => node.parentNode"/>
-        </a-form-item>
         
        <!-- <a-form-item label="离职日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-date-picker
@@ -184,32 +301,19 @@
             :getCalendarContainer="node => node.parentNode"/>
         </a-form-item> -->
 
-        <a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-select v-decorator="[ 'sex']" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
-            <a-select-option :value="1">男</a-select-option>
-            <a-select-option :value="2">女</a-select-option>
-          </a-select>
-        </a-form-item>
+       
         
-        <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input placeholder="请输入邮箱" v-decorator="[ 'email', validatorRules.email]" />
-        </a-form-item>
+       
 
-        <a-form-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input placeholder="请输入手机号码" v-decorator="[ 'phone', validatorRules.phone]" />
-        </a-form-item>
+       
 
        <!-- <a-form-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入座机" v-decorator="[ 'telephone', validatorRules.telephone]"/>
         </a-form-item> -->
         
-        <a-form-item label="紧急联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input placeholder="请输入紧急联系人" v-decorator="[ 'urgentName', validatorRules.urgentName]" />
-        </a-form-item>
         
-        <a-form-item label="紧急联系人电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-input placeholder="请输入紧急联系人电话" v-decorator="[ 'urgentPhone', validatorRules.urgentPhone]" />
-        </a-form-item>
+        
+       
 
        <!-- <a-form-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <j-dict-select-tag  v-decorator="['activitiSync', {}]" placeholder="请选择是否同步工作流引擎" :type="'radio'" :triggerChange="true" dictCode="activiti_sync"/>
@@ -228,22 +332,20 @@
           </a-select>
         </a-form-item> -->
         
-        <a-form-item label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <j-dict-select-tag  v-decorator="['infoSy', {initialValue:3}]" placeholder="请选择同步" :type="'radio'" :triggerChange="true" dictCode="info_sy"/>
-        </a-form-item>
-        
+       
 
       </a-form>
     </a-spin>
     <depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
 
-    <div class="drawer-bootom-button" v-show="!disableSubmit">
+    <!-- <div class="drawer-bootom-button" v-show="!disableSubmit">
       <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
        
       </a-popconfirm>
       <a-button @click="handleSubmit()" type="primary" :loading="confirmLoading">提交</a-button>
-    </div>
-  </a-drawer>
+    </div> -->
+    </a-modal>
+  <!-- </a-drawer> -->
 </template>
 
 <script>
@@ -273,10 +375,15 @@
         roleDisabled: false, //是否是角色维护调用该页面
         modalWidth:800,
         drawerWidth:700,
+        titles:"新增员工",
         modaltoggleFlag:true,
         sfzCode:"",
+        bankCard:"",
+        bankAddr:"",
         syFund:"",
+        phone:"",
         isSalary:"0",
+        email:"",
         isAttendance:"0",
         confirmDirty: false,
         selectedDepartKeys:[], //保存用户选择部门id
@@ -311,13 +418,9 @@
           //     validator: this.compareToFirstPassword,
           //   }],
           // },
-          phone:{rules: [{ required: true, message: '请输入手机号!' },{validator: this.validatePhone}]},
+          phone:{},
           email:{
-            rules: [
-               { required: true, message: '请输入邮箱' },
-              {
-              validator: this.validateEmail
-            }],
+            
           },
           roles:{},
           //  sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))}
@@ -494,6 +597,10 @@
           this.syFund="";
           this.isAttendance=0;
           this.isSalary=0;
+          this.bankAddr="";
+          this.bankCard="";
+          this.phone="";
+          this.email="";
       },
       add () {
         this.picUrl = "";
@@ -502,10 +609,15 @@
         this.edit({activitiSync:'1'});
       },
       edit (record) {
+        if(record.id!=null&&record.id!=""){
+          this.titles="编辑员工";
+        }
         this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
         let that = this;
         //that.initialRoleList();
         that.checkedDepartNameString = "";
+        this.bankAddr=record.bankAddr;
+        this.bankCard=record.bankCard;
         that.form.resetFields();
         if(record.hasOwnProperty("id")){
           that.loadUserRoles(record.id);
@@ -515,6 +627,8 @@
         }
         that.userId = record.id;
         that.visible = true;
+        this.phone=record.phone;
+        this.email=record.email;
         that.model = Object.assign({}, record);
         that.$nextTick(() => {
           that.form.setFieldsValue(pick(this.model,'sex','email','phone','post','urgentName','urgentPhone','infoSy','category','employmentStatus'))
@@ -603,6 +717,9 @@
         this.departIdShow=false;
         this.identity="1";
         this.fileList=[];
+        this.bankAddr="";
+        this.bankCard="";
+        this.syFund="";
       },
       moment,
       handleSubmit () {
@@ -615,6 +732,12 @@
         }else if(this.sfzCode==""||this.sfzCode==null){
           this.$message.warning('请输入身份证号码');
           return;
+        }else if(this.phone==""||this.phone==null){
+          this.$message.warning('请输入手机号');
+          return;
+        }else if(this.email==""||this.email==null){
+          this.$message.warning('请输入邮箱');
+          return;
         }
         const that = this;
         // 触发表单验证
@@ -636,6 +759,8 @@
             formData.syFund=this.syFund;
             formData.isAttendance=this.isAttendance;
             formData.isSalary=this.isSalary;
+            formData.bankCard=this.bankCard;
+            formData.bankAddr=this.bankAddr;
             //update-begin-author:taoyan date:2020710 for:多租户配置
             //formData.relTenantIds = this.currentTenant.length>0?this.currentTenant.join(','):''
             //update-end-author:taoyan date:2020710 for:多租户配置
@@ -643,6 +768,7 @@
             //formData.selectedroles = this.selectedRole.length>0?this.selectedRole.join(","):'';
             formData.selecteddeparts = this.userDepartModel.departIdList.length>0?this.userDepartModel.departIdList.join(","):'';
             formData.userIdentity=this.identity; 
+            formData.departIds=this.userDepartModel.departIdList.join(",");
             //如果是上级择传入departIds,否则为空
             if(this.identity==="2"){
               formData.departIds=this.departIds.join(",");

+ 2 - 3
src/views/system/modules/UserRecycleBinModal.vue

@@ -43,7 +43,7 @@
       </template>
 
       <span slot="action" slot-scope="text, record">
-        <a @click="handleRevert([record.id])"><a-icon type="redo"/> 还原用户</a>
+        <a @click="handleRevert([record.id])"><a-icon type="redo"/> 还原员工</a>
         <a-divider type="vertical"/>
         <a @click="handleDelete([record.id])"><a-icon type="delete"/> 彻底删除</a>
       </span>
@@ -89,9 +89,8 @@
         dataSource: [],
         columns: [
           { title: '#', align: 'center', key: 'rowIndex', width: 80, customRender: (t, r, i) => i + 1 },
-          { title: '账号', align: 'center', dataIndex: 'username' },
+          { title: '工号', align: 'center', dataIndex: 'workNo' },
           { title: '姓名', align: 'center', dataIndex: 'realname', },
-          { title: '头像', align: 'center', dataIndex: 'avatar', scopedSlots: { customRender: 'avatarslot' } },
           { title: '部门', align: 'center', dataIndex: 'orgCode' },
           { title: '操作', align: 'center', dataIndex: 'action', width: 200, scopedSlots: { customRender: 'action' } }
         ],

+ 40 - 23
src/views/system/schedulingInformation/BdWorkOverTimeList.vue

@@ -12,8 +12,24 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="审批编号">
-              <a-input placeholder="请输入审批编号" v-model="queryParam.code"></a-input>
+            <a-form-item label="开始日期">
+              <a-date-picker
+                style="width: 100%"
+                placeholder="请选择开始日期"
+                v-model="queryParam.beginDate"
+                valueFormat="YYYY-MM-DD HH:mm:ss'" 
+                :getCalendarContainer="node => node.parentNode"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="结束日期">
+              <a-date-picker
+                style="width: 100%"
+                placeholder="请选择结束日期"
+                v-model="queryParam.endDate"
+                valueFormat="YYYY-MM-DD HH:mm:ss'" 
+                :getCalendarContainer="node => node.parentNode"/>
+                
             </a-form-item>
           </a-col>
           
@@ -40,7 +56,6 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
@@ -83,31 +98,21 @@
         description: '加班信息',
         // 表头
         columns: [
-          {
-            title: '行号',
-            dataIndex: '',
-            key: 'rowIndex',
-            width: 60,
-            align: 'center',
-            customRender: function (t, r, index) {
-              return parseInt(index) + 1
-            }
-          },
+          // {
+          //   title: '行号',
+          //   dataIndex: '',
+          //   key: 'rowIndex',
+          //   width: 60,
+          //   align: 'center',
+          //   customRender: function (t, r, index) {
+          //     return parseInt(index) + 1
+          //   }
+          // },
           {
             title: '加班人员',
             align: 'center',
             dataIndex: 'person'
           },
-          {
-            title: '审批编号',
-            align: 'center',
-            dataIndex: 'code'
-          },
-          {
-            title: '提交时间',
-            align: 'center',
-            dataIndex: 'commitDate'
-          },
           {
             title: '申请人部门',
             align: 'center',
@@ -118,6 +123,7 @@
             align: 'center',
             dataIndex: 'demo'
           },
+          
           {
             title: '开始时间',
             align: 'center',
@@ -132,7 +138,18 @@
             title: '加班时长',
             align: 'center',
             dataIndex: 'duration'
+          },
+          {
+            title: '提交时间',
+            align: 'center',
+            dataIndex: 'commitDate'
+          },
+          {
+            title: '审批编号',
+            align: 'center',
+            dataIndex: 'code'
           }
+          
         ],
         url: {
           list: '/workOvertime/workOvertime/lists'