LiGuang 3 years ago
parent
commit
7fa6263002

+ 1 - 1
src/mixins/JeecgListMixin.js

@@ -20,7 +20,7 @@ export const JeecgListMixin = {
       /* 分页参数 */
       /* 分页参数 */
       ipagination:{
       ipagination:{
         current: 1,
         current: 1,
-        pageSize: 20,
+        pageSize: 10,
         pageSizeOptions: ['10', '20', '30'],
         pageSizeOptions: ['10', '20', '30'],
         showTotal: (total, range) => {
         showTotal: (total, range) => {
           return range[0] + "-" + range[1] + " 共" + total + "条"
           return range[0] + "-" + range[1] + " 共" + total + "条"

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

@@ -41,7 +41,7 @@
       <a-button @click="handleAddts()" type="primary" icon="plus" v-has="'UserShift:add'" v-if="isColse">调整</a-button>
       <a-button @click="handleAddts()" type="primary" icon="plus" v-has="'UserShift:add'" v-if="isColse">调整</a-button>
       <a-tabs default-active-key="2" @change="callback">
       <a-tabs default-active-key="2" @change="callback">
         <a-tab-pane key="2" tab="按班次上下班">
         <a-tab-pane key="2" tab="按班次上下班">
-          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns" :scroll="{ x:300,y:600}"
+          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns" :scroll="{ x:300,y:400}"
             :pagination="ipagination" @change="handleTableChange"
             :pagination="ipagination" @change="handleTableChange"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">

+ 16 - 1
src/views/system/UserChange.vue

@@ -23,12 +23,27 @@
                dictCode="state" />
                dictCode="state" />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
+            
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
             <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="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" style="margin-left: 30px;" icon="download" @click="handleExportXls('离职信息')">导出</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
             </span>
             </span>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
+        <template v-if="toggleSearchStatus">
+          <a-row>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="离职日期">
+              <a-date-picker valueFormat="YYYY-MM-DD HH:mm:ss"  showTime format='YYYY-MM-DD' v-model="queryParam.newDate"/>
+            </a-form-item>
+          </a-col>
+          </a-row>
+        </template>
         <a-row :gutter="24" v-if="isShow==2||isShow=='2'">
         <a-row :gutter="24" v-if="isShow==2||isShow=='2'">
           <a-col :xl="6" :lg="7" :md="8" :sm="24" >
           <a-col :xl="6" :lg="7" :md="8" :sm="24" >
             <a-form-item label="姓名">
             <a-form-item label="姓名">
@@ -320,7 +335,7 @@
           list2: "/userchange/userChage/list",
           list2: "/userchange/userChage/list",
           delete: "/usercontract/userContract/delete",
           delete: "/usercontract/userContract/delete",
           deleteBatch: "/usercontract/userContract/deleteBatch",
           deleteBatch: "/usercontract/userContract/deleteBatch",
-          exportXlsUrl: "usercontract/userContract/exportXls",
+          exportXlsUrl: "userquit/userQuit/exportXls",
           importExcelUrl: "usercontract/userContract/importExcel",
           importExcelUrl: "usercontract/userContract/importExcel",
           update:"/userquit/userQuit/edit",
           update:"/userquit/userQuit/edit",
           updateChage:"/userchange/userChage/edit"
           updateChage:"/userchange/userChage/edit"

+ 31 - 43
src/views/system/UserList.vue

@@ -7,18 +7,16 @@
         <a-row :gutter="24">
         <a-row :gutter="24">
           <a-col :md="6" :sm="12">
           <a-col :md="6" :sm="12">
             <a-form-item label="真实名字">
             <a-form-item label="真实名字">
-              <a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
+              <a-input @change="clearSpace" placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
 
 
           <a-col :md="6" :sm="8">
           <a-col :md="6" :sm="8">
             <a-form-item label="工号">
             <a-form-item label="工号">
-              <a-input placeholder="请输入工号查询" v-model="queryParam.workNo"></a-input>
+              <a-input @change="clearSpaces" placeholder="请输入工号查询" v-model="queryParam.workNo"></a-input>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
-
-          <template v-if="toggleSearchStatus">
-            <a-col :md="6" :sm="8">
+          <a-col :md="6" :sm="8">
               <a-form-item label="部门名称">
               <a-form-item label="部门名称">
                 <j-tree-select
                 <j-tree-select
                         style="width: 200px"
                         style="width: 200px"
@@ -28,43 +26,6 @@
                       </j-tree-select>
                       </j-tree-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </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>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="人员类别">
-                <j-dict-select-tag v-model="queryParam.category" placeholder="请选择人员类别"
-                  dictCode="category"/>
-                
-              </a-form-item>
-              <!-- <a-form-item label="手机号码">
-                <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
-              </a-form-item> -->
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="雇佣状态">
-                <j-multi-select-tag
-                        v-model="queryParam.empStatus"
-                        dictCode="employmentStatus"
-                        placeholder="请选择雇佣状态">
-                      </j-multi-select-tag>
-                  
-                <!-- <j-dict-select-tag v-model="queryParam.employmentStatus" placeholder="请选择人员类别"
-                  dictCode="employmentStatus"/> -->
-                
-              </a-form-item>
-            </a-col>
-          </template>
-
           <a-col :md="6" :sm="8">
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
             <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="searchQuery" icon="search">查询</a-button>
@@ -75,8 +36,29 @@
               </a>
               </a>
             </span>
             </span>
           </a-col>
           </a-col>
-
         </a-row>
         </a-row>
+        <template v-if="toggleSearchStatus">
+          <a-row :gutter="24">
+          <a-col :md="6" :sm="12" style="width: 50%;">
+            <a-form-item label="人员类别">
+              <j-multi-select-tag
+              v-model="queryParam.category" placeholder="请选择人员类别"
+                dictCode="category"/>
+                </j-multi-select-tag>
+            </a-form-item>
+          </a-col>
+        
+          <a-col :md="6" :sm="12" style="width: 50%;">
+            <a-form-item label="雇佣状态">
+              <j-multi-select-tag 
+                      v-model="queryParam.empStatus"
+                      dictCode="employmentStatus"
+                      placeholder="请选择雇佣状态">
+                    </j-multi-select-tag>
+            </a-form-item>
+          </a-col>
+          </a-row>
+        </template>
       </a-form>
       </a-form>
     </div>
     </div>
 
 
@@ -407,6 +389,12 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
       getAvatarView: function (avatar) {
       getAvatarView: function (avatar) {
         return getFileAccessHttpUrl(avatar)
         return getFileAccessHttpUrl(avatar)
       },
       },
+      clearSpace(e) {
+        this.queryParam.realname = e.target.value.replace(/\s+/g, '')
+      },
+      clearSpaces(e) {
+        this.queryParam.workNo = e.target.value.replace(/\s+/g, '')
+      },
       batchrz(){
       batchrz(){
         if (this.selectedRowKeys.length<=0) {
         if (this.selectedRowKeys.length<=0) {
           this.$message.warning('请选择一条记录!');
           this.$message.warning('请选择一条记录!');

+ 2 - 1
src/views/system/modules/AttendanceRuleModal.vue

@@ -463,6 +463,7 @@
 
 
         for (var o = 0; o< list.length; o++) {
         for (var o = 0; o< list.length; o++) {
           for (var t in obj) { //用javascript的for/in循环遍历对象的属性
           for (var t in obj) { //用javascript的for/in循环遍历对象的属性
+            if(this.currentYear==list[o].split("-")[0]&&this.currentMonth==list[o].split("-")[1]){
             if (t == "shiftid" + list[o].split("-")[2]&&list[o].split("-")[2]==e) {
             if (t == "shiftid" + list[o].split("-")[2]&&list[o].split("-")[2]==e) {
               if(obj[t]!=0&&obj[t]!="0"){
               if(obj[t]!=0&&obj[t]!="0"){
                 sum++;
                 sum++;
@@ -478,7 +479,7 @@
               }
               }
             }
             }
           }
           }
-
+          }
         }
         }
 
 
         if (a.category == 106) {
         if (a.category == 106) {

+ 108 - 42
src/views/system/modules/UserModal.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <a-modal :width="1150" :dialogStyle="dialogStyle" title="员工信息" :visible="visible" @ok="handleSubmit()"
+  <a-modal :width="1380" :dialogStyle="dialogStyle" title="员工信息" :visible="visible" @ok="handleSubmit()"
     @cancel="handleCancel" cancelText="关闭">
     @cancel="handleCancel" cancelText="关闭">
 
 
     <template slot="title">
     <template slot="title">
@@ -26,13 +26,13 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="英文名" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-form-item label="英文名" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="10" placeholder="请输入英文名" v-decorator="[ 'egName', validatorRules.egName]" />
+              <a-input  :maxLength="10" placeholder="请输入英文名" v-decorator="[ 'egName', validatorRules.egName]" />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
 
 
           <a-col :md="6" :sm="8" :lg="8">
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="30" placeholder="请输入邮箱" v-decorator="[ 'email', validatorRules.email]" />
+              <a-input :disabled="isEdit" :maxLength="30" placeholder="请输入邮箱" v-decorator="[ 'email', validatorRules.email]" />
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
           <a-col :md="6" :sm="8" :lg="8">
@@ -235,7 +235,7 @@
         <a-row>
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="是否打卡" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-form-item label="是否打卡" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select v-decorator="[ 'isAttendance', {initialValue:'0'}]" placeholder="请选择"
+              <a-select @change="isAttes" v-decorator="['isAttendance',{initialValue:'0'}]" placeholder="请选择"
                 :getPopupContainer="(target) => target.parentNode">
                 :getPopupContainer="(target) => target.parentNode">
                 <a-select-option value="0">是</a-select-option>
                 <a-select-option value="0">是</a-select-option>
                 <a-select-option value="1">否</a-select-option>
                 <a-select-option value="1">否</a-select-option>
@@ -243,7 +243,7 @@
             </a-form-item>
             </a-form-item>
 
 
           </a-col>
           </a-col>
-          <a-col :md="6" :sm="8" :lg="8">
+          <a-col :md="6" :sm="8" :lg="8" v-if="isAttendance=='0'||isAttendance==0">
             <a-form-item label="上班类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-form-item label="上班类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <j-dict-select-tag v-decorator="['type', {initialValue:2,rules: [{ required: true, message: '请选择类型'}]}]" :triggerChange="true" placeholder="请选择上班类型"
               <j-dict-select-tag v-decorator="['type', {initialValue:2,rules: [{ required: true, message: '请选择类型'}]}]" :triggerChange="true" placeholder="请选择上班类型"
                 dictCode="type" />
                 dictCode="type" />
@@ -262,14 +262,27 @@
           <a-col :md="6" :sm="8" :lg="8">
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-badge :count="fileLists.length" show-zero :number-style="{ backgroundColor: '#52c41a' }">
              <a-badge :count="fileLists.length" show-zero :number-style="{ backgroundColor: '#52c41a' }">
-               <a-button icon="search" @click="uploads()" style="width: 210px;">选择</a-button>
+               <a-button icon="search" @click="uploads()" style="width: 290px;">选择</a-button>
              </a-badge>
              </a-badge>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
+          <a-col :md="6" :sm="8" :lg="8">
+            <a-form-item label="合同类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
+             <j-dict-select-tag :disabled="isEdit" v-decorator="['contractType',{rules: [{ required: true, message: '请选择入合同类型'}]}]" :triggerChange="true" placeholder="请选择合同类型"
+               dictCode="contract_type" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8" :lg="8">
+            <a-form-item label="合同结束日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+             <a-date-picker :disabled="isEdit" style="width: 100%" placeholder="请选择试合同结束日期"
+               v-model="cEndDate"
+               />
+            </a-form-item>
+          </a-col>
         </a-row>
         </a-row>
         <a-row>
         <a-row>
           <a-col :lg="24">
           <a-col :lg="24">
-            <a-form-item style="margin-left: -195px;" label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-item style="margin-left: -235px;" label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <j-dict-select-tag v-decorator="['infoSy', {initialValue:3}]" placeholder="请选择同步" :type="'radio'"
               <j-dict-select-tag v-decorator="['infoSy', {initialValue:3}]" placeholder="请选择同步" :type="'radio'"
                 :triggerChange="true" dictCode="info_sy" />
                 :triggerChange="true" dictCode="info_sy" />
             </a-form-item>
             </a-form-item>
@@ -277,7 +290,7 @@
         </a-row>
         </a-row>
         <a-row>
         <a-row>
           <a-col :md="6" :sm="8" :lg="24">
           <a-col :md="6" :sm="8" :lg="24">
-            <a-form-item style="margin-left: -195px;" label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-item style="margin-left: -240px;" label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <a-textarea :maxLength="255" placeholder="请输备注" v-decorator="[ 'remarks', {}]" style="height: 100px;"/>
               <a-textarea :maxLength="255" placeholder="请输备注" v-decorator="[ 'remarks', {}]" style="height: 100px;"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
@@ -358,7 +371,9 @@
         drawerWidth: 700,
         drawerWidth: 700,
         titles: "新增员工",
         titles: "新增员工",
         visibles: false,
         visibles: false,
+        isEdit:false,
         personType: false,
         personType: false,
+        cEndDate:null,
         dataSources: [],
         dataSources: [],
         modaltoggleFlag: true,
         modaltoggleFlag: true,
         moth: 0,
         moth: 0,
@@ -371,9 +386,9 @@
         phone: "",
         phone: "",
         isSalary: "0",
         isSalary: "0",
         wagesBase:"",
         wagesBase:"",
-        workMoth:"",
+        workMoth:0,
         email: "",
         email: "",
-        isAttendance: "0",
+        isAttendance:"0",
         zwName: "",
         zwName: "",
         zwCode: "",
         zwCode: "",
         urgentPhone:"",
         urgentPhone:"",
@@ -544,7 +559,8 @@
           xzupload: '/sys/common/static',
           xzupload: '/sys/common/static',
           sysFile: '/sysFile/sysFile/queryByUserId',
           sysFile: '/sysFile/sysFile/queryByUserId',
           delSysFile: '/sysFile/sysFile/deleteById',
           delSysFile: '/sysFile/sysFile/deleteById',
-          post: '/sys/position/listByDept'
+          post: '/sys/position/listByDept',
+          emails:'/sys/user/emails'
         },
         },
         identity: "1",
         identity: "1",
         fileList: [],
         fileList: [],
@@ -586,6 +602,14 @@
       }
       }
      },
      },
     methods: {
     methods: {
+      isAttes(e){
+        this.isAttendance=e;
+        if(e==0){
+          this.form.setFieldsValue({
+            type: 2
+          })
+        }
+      },
       zwOk() {
       zwOk() {
         console.log(this.selectedRowKeys)
         console.log(this.selectedRowKeys)
         if (this.selectionRows != null && this.selectionRows.length > 0) {
         if (this.selectionRows != null && this.selectionRows.length > 0) {
@@ -820,26 +844,30 @@
         this.zwName = "";
         this.zwName = "";
         this.selectedRowKeys = [];
         this.selectedRowKeys = [];
         this.selectionRows = [];
         this.selectionRows = [];
+        this.isEdit=false;
       },
       },
       add() {
       add() {
         this.picUrl = "";
         this.picUrl = "";
         this.refresh();
         this.refresh();
-
+        
         this.edit({
         this.edit({
           activitiSync: '1'
           activitiSync: '1'
         });
         });
-        var date = new Date();
-        date.setMonth(date.getMonth() + 6)
-        this.wkEndDate = moment(date).subtract(1, "days");
-        this.wkMoth = 6;
-        this.wkDate = new Date();
+       var date = new Date();
+       date.setMonth(date.getMonth() + 6)
+       this.wkEndDate = moment(date).subtract(1, "days");
+       this.wkMoth = 6;
+       this.wkDate = new Date();
       },
       },
       edit(record) {
       edit(record) {
+        var da=new Date();
+        da.setFullYear(da.getFullYear()+3)
+        this.cEndDate=moment(da).subtract(1, "days");
+        
         this.realname = record.realname;
         this.realname = record.realname;
         this.egName = record.egName;
         this.egName = record.egName;
         this.syFund=record.syFund;
         this.syFund=record.syFund;
         this.urgentPhone=record.urgentPhone;
         this.urgentPhone=record.urgentPhone;
-        this.workMoth=record.workMoth;
         this.wagesBase=record.wagesBase;
         this.wagesBase=record.wagesBase;
         this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
         this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
         let that = this;
         let that = this;
@@ -862,20 +890,29 @@
         }
         }
         if (record.entryDate != null) {
         if (record.entryDate != null) {
           this.moth = this.countMoth(record.entryDate)
           this.moth = this.countMoth(record.entryDate)
+        }if(record.cendDate!=null){
+            var d=new Date(record.cendDate)
+            this.cEndDate=moment(d).format('YYYY-MM-DD');
+        }if(record.isAttendance!=null&& record.isAttendance != ""){
+            this.isAttendance=record.isAttendance;
+        }if(record.workMoth!=null&&record.workMoth!=""){
+          this.workMoth=record.workMoth - 0+this.moth - 0;
         }
         }
+        
         that.visible = true;
         that.visible = true;
         that.model = Object.assign({}, record);
         that.model = Object.assign({}, record);
         this.zwCode = record.post;
         this.zwCode = record.post;
         this.zwName = record.post_dictText;
         this.zwName = record.post_dictText;
         this.wkDate = record.entryDate;
         this.wkDate = record.entryDate;
         this.wkMoth = record.trialMoth - 0;
         this.wkMoth = record.trialMoth - 0;
+        
         that.$nextTick(() => {
         that.$nextTick(() => {
           that.form.setFieldsValue(pick(this.model, 'sex', 'email', 'phone', 'urgentName', 'urgentPhone',
           that.form.setFieldsValue(pick(this.model, 'sex', 'email', 'phone', 'urgentName', 'urgentPhone',
             'bankAddr', 'bankCard', 'realname', 'egName', 'age', 'sfzCode', 'isAttendance', 'remarks', 'addr',
             'bankAddr', 'bankCard', 'realname', 'egName', 'age', 'sfzCode', 'isAttendance', 'remarks', 'addr',
             'nationality', 'trialMoth', 'entryDate', 'trialEndDate', 'workMoth', 'divisionMoth',
             'nationality', 'trialMoth', 'entryDate', 'trialEndDate', 'workMoth', 'divisionMoth',
             'infoSy', 'syFund', 'category', 'employmentStatus', 'wagesOne', 'wagesTwo', 'security', 'wagesBase',
             'infoSy', 'syFund', 'category', 'employmentStatus', 'wagesOne', 'wagesTwo', 'security', 'wagesBase',
             'homeAddr', 'education', 'school', 'contractDate', 'contractDate2', 'type', 'contractDate3',
             'homeAddr', 'education', 'school', 'contractDate', 'contractDate2', 'type', 'contractDate3',
-            'shareDept'))
+            'shareDept','contractType'))
         });
         });
         //身份为上级显示负责部门,否则不显示
         //身份为上级显示负责部门,否则不显示
         if (this.model.userIdentity == "2") {
         if (this.model.userIdentity == "2") {
@@ -895,6 +932,7 @@
 
 
         if (record.id != null && record.id != "") {
         if (record.id != null && record.id != "") {
           this.userId = record.id;
           this.userId = record.id;
+          this.isEdit=true;
           this.queryFiles(record.id)
           this.queryFiles(record.id)
         }
         }
 
 
@@ -975,6 +1013,8 @@
         this.urgentPhone="";
         this.urgentPhone="";
         this.wagesBase="";
         this.wagesBase="";
         this.age="";
         this.age="";
+        this.workMoth=0;
+        this.moth=0;
       },
       },
       moment,
       moment,
       handleSubmit() {
       handleSubmit() {
@@ -1010,6 +1050,8 @@
             }
             }
             if (formData.trialEndDate != null) {
             if (formData.trialEndDate != null) {
               formData.trialEndDate = moment(formData.trialEndDate).format('YYYY-MM-DD');
               formData.trialEndDate = moment(formData.trialEndDate).format('YYYY-MM-DD');
+            }if(formData.isAttendance==1||formData.isAttendance=='1'){
+              formData.type="";
             }
             }
             formData.post = this.zwCode;
             formData.post = this.zwCode;
             //formData.selectedroles = this.selectedRole.length>0?this.selectedRole.join(","):'';
             //formData.selectedroles = this.selectedRole.length>0?this.selectedRole.join(","):'';
@@ -1022,6 +1064,8 @@
             formData.urgentPhone=this.urgentPhone;
             formData.urgentPhone=this.urgentPhone;
             formData.wagesBase=this.wagesBase;
             formData.wagesBase=this.wagesBase;
             formData.age=this.age;
             formData.age=this.age;
+            formData.cEndDate=this.cEndDate;
+            
             //如果是上级择传入departIds,否则为空
             //如果是上级择传入departIds,否则为空
             // if (this.identity === "2") {
             // if (this.identity === "2") {
             //   formData.departIds = this.departIds.join(",");
             //   formData.departIds = this.departIds.join(",");
@@ -1070,9 +1114,22 @@
           if (this.egName != null && this.egName != "") {
           if (this.egName != null && this.egName != "") {
             var emil = "@gksports.com.cn";
             var emil = "@gksports.com.cn";
             var name = py.chineseToPinYin(value.substr(0, 1))
             var name = py.chineseToPinYin(value.substr(0, 1))
-            this.form.setFieldsValue({
-              email: this.egName + "." + name + emil
+            var emils=this.egName + "." + name + emil;
+            getAction(this.url.emails, {
+             email:emils,
+             userid:this.userId
+            }).then((res) => {
+              if(res!=null&&res!=""){
+               this.form.setFieldsValue({
+                 email: res
+               }) 
+              }else{
+                this.form.setFieldsValue({
+                  email: emils
+                }) 
+              }
             })
             })
+           
           }
           }
           callback()
           callback()
         }
         }
@@ -1121,6 +1178,9 @@
           callback()
           callback()
         } else {
         } else {
           var date = new Date(value);
           var date = new Date(value);
+          var da=new Date(value);
+          da.setFullYear(da.getFullYear()+3)
+          this.cEndDate=moment(da).subtract(1, "days");
           this.wkDate = value;
           this.wkDate = value;
           this.moth = this.countMoth(value);
           this.moth = this.countMoth(value);
           console.log(this.wkMoth)
           console.log(this.wkMoth)
@@ -1172,9 +1232,23 @@
           if (this.realname != null && this.realname != "") {
           if (this.realname != null && this.realname != "") {
             var emil = "@gksports.com.cn";
             var emil = "@gksports.com.cn";
             var name = py.chineseToPinYin(this.realname.substr(0, 1))
             var name = py.chineseToPinYin(this.realname.substr(0, 1))
-            this.form.setFieldsValue({
-              email: this.egName + "." + name + emil
+            var emils=this.egName + "." + name + emil;
+            getAction(this.url.emails, {
+             email:emils,
+             userid:this.userId
+            }).then((res) => {
+             if(res!=null&&res!=""){
+              this.form.setFieldsValue({
+                email: res
+              }) 
+             }else{
+                this.form.setFieldsValue({
+                  email: emils
+                }) 
+              }
+              
             })
             })
+             
           }
           }
           callback()
           callback()
         }
         }
@@ -1183,15 +1257,9 @@
         if (!value) {
         if (!value) {
           callback()
           callback()
         } else {
         } else {
-          
             this.form.setFieldsValue({
             this.form.setFieldsValue({
               syFund: value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')
               syFund: value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')
             })
             })
-          /* else{
-          if (value.length != 9 && value.length != 12) {
-            callback('请输入正确格式的公积金账号');
-          }
-          } */
           callback()
           callback()
         }
         }
       },
       },
@@ -1249,19 +1317,17 @@
           if (new RegExp(
           if (new RegExp(
               /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
               /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
             ).test(value)) {
             ).test(value)) {
-            var params = {
-              tableName: 'sys_user',
-              fieldName: 'email',
-              fieldVal: value,
-              dataId: this.userId
-            };
-            duplicateCheck(params).then((res) => {
-              if (res.success) {
-                callback()
-              } else {
-                callback("邮箱已存在!")
-              }
-            })
+             /* getAction(this.url.emails, {
+               email:value,
+               userid:this.userId
+              }).then((res) => {
+               if(res!=null&&res!=""){
+                this.form.setFieldsValue({
+                  email: res
+                }) 
+               }
+              }) */
+              callback()
           } else {
           } else {
             callback("请输入正确格式的邮箱!")
             callback("请输入正确格式的邮箱!")
           }
           }