LiGuang 3 anni fa
parent
commit
8c7e2f0232

+ 7 - 7
src/views/system/AttendanceRuleList.vue

@@ -29,10 +29,10 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <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">
+        <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>
@@ -60,13 +60,13 @@
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
-          <a v-if="record.type==2||record.type=='2'" @click="shiftAdd(record)">排班</a>
-          <a-divider type="vertical" v-if="record.type==2||record.type=='2'"/>
-          <a @click="handleEdit(record)">编辑</a>
-          <a-divider type="vertical" />
+          <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">
+            <a-menu slot="overlay" v-has="'UserShift:delete'">
               <a-menu-item>
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>

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

@@ -100,8 +100,8 @@
             <a-row :gutter="24">
 
               <a-col :md="12" :sm="12">
-                <a-form-item label="用户号">
-                  <a-input placeholder="" v-model="queryParam2.username"></a-input>
+                <a-form-item label="用户号">
+                  <a-input placeholder="" v-model="queryParam2.workNo"></a-input>
                 </a-form-item>
               </a-col>
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -275,9 +275,9 @@
             }
           ],
         columns2: [{
-          title: '用户号',
+          title: '用户号',
           align: 'center',
-          dataIndex: 'username',
+          dataIndex: 'workNo',
           width: 120
         },
           {

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

@@ -41,13 +41,13 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button @click="handleAdd" type="primary" icon="plus" v-has="'shift:add'">新增</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" v-has="'shift: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>
@@ -75,12 +75,12 @@
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
+          <a @click="handleEdit(record)" v-has="'shift:edit'">编辑</a>
 
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
+            <a-menu slot="overlay" v-has="'shift:delete'">
               <a-menu-item>
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>

+ 5 - 5
src/views/system/StatutoryLeaveList.vue

@@ -50,14 +50,14 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button @click="handleAdd" type="primary" icon="plus" v-has="'leave:add'">新增</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-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        <a-menu slot="overlay" v-has="'leave: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>
@@ -84,12 +84,12 @@
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
+          <a @click="handleEdit(record)" v-has="'leave:edit'">编辑</a>
 
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
+            <a-menu slot="overlay" v-has="'leave:delete'">
               <a-menu-item>
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>

+ 3 - 1
src/views/system/UserList.vue

@@ -123,9 +123,11 @@
         
         <span slot="categorys" slot-scope="text, record, index">
           <a-tag color="#87d068" v-if="record.category=='101'||record.category==101 ">正式工</a-tag>
-          <a-tag color="#87d068" v-else-if="record.category=='102'||record.category==102 ">合同工</a-tag>
+          <a-tag color="#87d068" v-else-if="record.category=='102'||record.category==102 ">顾问</a-tag>
           <a-tag color="#87d068" v-else-if="record.category=='103'||record.category==103 ">实习生</a-tag>
           <a-tag color="#87d068" v-else-if="record.category=='104'||record.category==104 ">劳务工</a-tag>
+          <a-tag color="#87d068" v-else-if="record.category=='104'||record.category==105 ">劳务外包5+2</a-tag>
+          <a-tag color="#87d068" v-else-if="record.category=='104'||record.category==106 ">劳务外包6+1</a-tag>
         </span>
         
         <span slot="employmentStatuss" slot-scope="text, record, index">

+ 7 - 7
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.username"></a-input>
+              <a-form-item label="用户号">
+                <a-input placeholder="请输入用户工号" v-model="queryParam.workNo"></a-input>
               </a-form-item>
             </a-col>
             <a-col :span="8">
@@ -81,10 +81,10 @@
             }
           },
           {
-            title: '用户号',
+            title: '用户号',
             align: "center",
             width: 100,
-            dataIndex: 'username'
+            dataIndex: 'workNo'
           },
           {
             title: '用户名称',
@@ -108,14 +108,14 @@
             title: '部门',
             align: "center",
             width: 150,
-            dataIndex: 'orgCode'
+            dataIndex: 'orgCodeTxt'
           }
         ],
         columns2: [
           {
-            title: '用户号',
+            title: '用户号',
             align: "center",
-            dataIndex: 'username',
+            dataIndex: 'workNo',
 
           },
           {

+ 43 - 1
src/views/system/modules/UserModal.vue

@@ -121,9 +121,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="102">合同工</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>
         
@@ -149,6 +152,10 @@
           <j-image-upload class="avatar-uploader" text="上传" v-model="fileList" ></j-image-upload>
         </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>
@@ -207,6 +214,19 @@
        <!-- <a-form-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <j-dict-select-tag  v-decorator="['activitiSync', {}]" placeholder="请选择是否同步工作流引擎" :type="'radio'" :triggerChange="true" dictCode="activiti_sync"/>
         </a-form-item> -->
+        <a-form-item label="是否考勤" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-select v-model="isAttendance" placeholder="请选择是否考勤" :getPopupContainer= "(target) => target.parentNode">
+            <a-select-option value="0">是</a-select-option>
+            <a-select-option value="1">否</a-select-option>
+          </a-select>
+        </a-form-item>
+        
+        <a-form-item label="是否算薪" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-select v-model="isSalary" placeholder="请选择是否算薪" :getPopupContainer= "(target) => target.parentNode">
+            <a-select-option value="0">是</a-select-option>
+            <a-select-option value="1">否</a-select-option>
+          </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"/>
@@ -255,6 +275,9 @@
         drawerWidth:700,
         modaltoggleFlag:true,
         sfzCode:"",
+        syFund:"",
+        isSalary:"0",
+        isAttendance:"0",
         confirmDirty: false,
         selectedDepartKeys:[], //保存用户选择部门id
         checkedDepartKeys:[],
@@ -468,6 +491,9 @@
           this.sfzCode="";
           this.realname="";
           this.egName="";
+          this.syFund="";
+          this.isAttendance=0;
+          this.isSalary=0;
       },
       add () {
         this.picUrl = "";
@@ -515,6 +541,18 @@
         this.realname=record.realname;
         this.egName=record.egName;
         this.sfzCode=record.sfzCode;
+        if(record.isAttendance==null||record.isAttendance==""){
+          this.isAttendance="0";
+        }else{
+          this.isAttendance=record.isAttendance;
+        }
+        
+        
+        if(record.isSalary==null||record.isSalary==""){
+          this.isSalary="0";
+        }else{
+        this.isSalary=record.isSalary;
+        }
         //update-end-author:taoyan date:2020710 for:多租户配置
       },
       //
@@ -594,6 +632,10 @@
             }else{
               formData.avatar = null;
             }
+            
+            formData.syFund=this.syFund;
+            formData.isAttendance=this.isAttendance;
+            formData.isSalary=this.isSalary;
             //update-begin-author:taoyan date:2020710 for:多租户配置
             //formData.relTenantIds = this.currentTenant.length>0?this.currentTenant.join(','):''
             //update-end-author:taoyan date:2020710 for:多租户配置

+ 21 - 8
src/views/system/modules/UserShiftModal.vue

@@ -16,9 +16,8 @@
       </div>
       
       <div>
-        <a-table bordered :data-source="dataSource" :columns="columns" :scroll="{ x:900 }"
+        <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;">
@@ -39,14 +38,14 @@
           
           <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="e => e.preventDefault()">{{text}}</a-tag>
-              <a-tag color="#87d068" v-else-if="text!='休息'&&text!=''&&text!=null" @click="e => e.preventDefault()">{{text}}</a-tag>
-              <a-tag color="#FFFFFF" v-else @click="e => e.preventDefault()">吴</a-tag>
+              <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-for="(item,index) in shiftlist" :key="item.id">
+                  <a-menu-item v-if="isShow" v-for="(item,index) in shiftlist" :key="item.id">
                     <a @click="shiftOks(item,d,record,index)">{{item.name}}</a>
                   </a-menu-item>
                   
@@ -128,6 +127,7 @@
         index: null,
         vs: false,
         model: {},
+        isShow:true,
         listData: [],
         confirmLoading: false,
         form: this.$form.createForm(this),
@@ -149,6 +149,20 @@
       this.queryShift()
     },
     methods: {
+      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)
@@ -287,9 +301,8 @@
         moth.setDate(0);
         this.columns.push({
           title: '名称',
-          fixed: 'left',
           dataIndex: 'realname',
-          width: '80px'
+          width: '100px'
         })
         for (var i = 1; i <= moth.getDate(); i++) {
           var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))