LiGuang il y a 3 ans
Parent
commit
9519541270

+ 2 - 2
src/components/tools/UserMenu.vue

@@ -61,7 +61,7 @@
         <a-menu-item key="5" @click="updateCurrentDepart">
           <a-icon type="cluster"/>
           <span>切换部门</span>
-        </a-menu-item> 
+        </a-menu-item>
         <a-menu-item key="6" @click="clearCache">
           <a-icon type="sync"/>
           <span>清理缓存</span>
@@ -188,7 +188,7 @@
               if(type==2||type=="2"){
                 that.$router.push({ path: '/user/login' });
               }else{
-                  window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr.gksports.net.cn&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
+                  window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr3.gksports.net.cn:8081&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
               }
               //that.$router.push({ path: '/user/login' });
               // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面

+ 2 - 2
src/components/tools/UserPassword.vue

@@ -11,12 +11,12 @@
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
 
-        <a-form-item
+        <!-- <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="旧密码">
           <a-input type="password" placeholder="请输入旧密码" v-decorator="[ 'oldpassword', validatorRules.oldpassword]" />
-        </a-form-item>
+        </a-form-item> -->
 
         <a-form-item
           :labelCol="labelCol"

+ 15 - 8
src/utils/request.js

@@ -63,18 +63,25 @@ const err = (error) => {
                    // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
                   var type= Vue.ls.get('TYPE');
                    if(type==2||type=="2"){
-                     that.$router.push({ path: '/user/login' });
+                     window.location.reload();
                    }else{
-                  window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr.gksports.net.cn&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
+                  window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr3.gksports.net.cn:8081&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
                  }
                  //window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwd372e7740b9b586f&redirect_uri=geke.g.dr1997.com&response_type=code&scope=snsapi_userinfo&agentid=1000004&state=STATE#wechat_redirect";
+                  }else if(path=="/"){
+                    var type= Vue.ls.get('TYPE');
+                      if(type==2||type=="2"){
+                        window.location.reload();
+                      }else{
+                     window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr3.gksports.net.cn:8081&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
+                    }
                   }
                 }catch (e) {
                   var type= Vue.ls.get('TYPE');
                     if(type==2||type=="2"){
-                      that.$router.push({ path: '/user/login' });
+                      window.location.reload();
                     }else{
-                   window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr.gksports.net.cn&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
+                   window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr3.gksports.net.cn:8081&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
                   }
                 //window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwd372e7740b9b586f&redirect_uri=geke.g.dr1997.com&response_type=code&scope=snsapi_userinfo&agentid=1000004&state=STATE#wechat_redirect";
                 }
@@ -104,9 +111,9 @@ const err = (error) => {
             // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
            var type= Vue.ls.get('TYPE');
              if(type==2||type=="2"){
-               that.$router.push({ path: '/user/login' });
+               window.location.reload();
              }else{
-            window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr.gksports.net.cn&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
+            window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr3.gksports.net.cn:8081&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
            }
            //window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwd372e7740b9b586f&redirect_uri=geke.g.dr1997.com&response_type=code&scope=snsapi_userinfo&agentid=1000004&state=STATE#wechat_redirect";
             }, 1500)
@@ -193,9 +200,9 @@ function blobToJson(data) {
                 // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
                   var type= Vue.ls.get('TYPE');
                     if(type==2||type=="2"){
-                      that.$router.push({ path: '/user/login' });
+                      window.location.reload();
                     }else{
-                   window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr.gksports.net.cn&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
+                   window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww7c43b4b5f33945ad&redirect_uri=http://hr3.gksports.net.cn:8081&response_type=code&scope=snsapi_userinfo&agentid=1000009&state=STATE#wechat_redirect"
                   }
              //window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwd372e7740b9b586f&redirect_uri=geke.g.dr1997.com&response_type=code&scope=snsapi_userinfo&agentid=1000004&state=STATE#wechat_redirect";
               })

+ 22 - 20
src/views/system/AttendanceRuleList.vue

@@ -28,7 +28,7 @@
           <a-col :xl="6" :lg="6" :md="6" :sm="6">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <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-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> -->
             </span>
           </a-col>
         </a-row>
@@ -360,23 +360,23 @@
           fixed: 'left'
         })
         if (this.queryParam.type == "1" || this.queryParam.type == "2" || this.queryParam.type == "3") {
-          this.columns.push({
-            title: '类型',
-            dataIndex: 'type',
-            width: '117px',
-            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;
-            }
-          })
+          // this.columns.push({
+          //   title: '类型',
+          //   dataIndex: 'type',
+          //   width: '117px',
+          //   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;
+          //   }
+          // })
           if(this.queryParam.type == "1"){
             this.columns.push({
               title: '上班时间',
@@ -490,10 +490,12 @@
 
       },
       queryMothByCount() {
-        httpAction(this.url.lists, {
+        getAction(this.url.lists, {
           shiftDate: moment(this.queryParam.ShiftDate).format('yyyy-MM-DD HH:mm:ss'),
           userId:this.ipaginations.current,
-          shiftId: this.ipaginations.pageSize
+          shiftId: this.ipaginations.pageSize,
+          realname:this.queryParam.name,
+          deptid:this.queryParam.dept
         }, "post").then((res) => {
           if (res.success) {
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------

+ 5 - 0
src/views/system/DictItemList.vue

@@ -100,6 +100,11 @@
             align: "center",
             dataIndex: 'itemValue',
           },
+          {
+            title: '排序号',
+            align: "center",
+            dataIndex: 'sortOrder',
+          },
           {
             title: '操作',
             dataIndex: 'action',

+ 11 - 10
src/views/system/MakeUpCardList.vue

@@ -48,31 +48,31 @@
     </div>
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <!-- <a-button type="primary" icon="download" @click="handleExportXls('补卡信息')">导出</a-button>
+    <!-- <div class="table-operator">
+      <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-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-menu>
         <a-button style="margin-left: 8px"> 批量操作
           <a-icon type="down" />
         </a-button>
       </a-dropdown>
-    </div>
+    </div> -->
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <!-- <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>
+      </div> -->
 
       <a-table ref="table"  size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange">
+        :pagination="ipagination" :scroll="{ y: 600 }" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
@@ -157,7 +157,8 @@
           {
             title: '补卡事由',
             align: "center",
-            dataIndex: 'demo'
+            dataIndex: 'demo',
+            ellipsis: true,
           },
           {
             title: '提交时间',

+ 3 - 0
src/views/system/RoleUserList.vue

@@ -492,10 +492,13 @@
       },
 
       handleAddUserRole() {
+        console.log(this.currentRoleId)
         if (this.currentRoleId == '') {
           this.$message.error('请选择一个角色!')
         } else {
           this.$refs.selectUserModal.visible = true
+          this.$refs.selectUserModal.queryParam.del5=this.currentRoleId;
+          this.$refs.selectUserModal.loadData(1);
         }
       },
       handleOpen(record) {

+ 6 - 6
src/views/system/UserList.vue

@@ -85,8 +85,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="handleExportXltx()"type="primary" icon="plus"  v-has="'user:mb'" >员工模板</a-button>
-      <a-button @click="handleExportXls3('薪资模板')"type="primary" icon="plus"  v-has="'user:mb'" >薪资模板</a-button>
+      <a-button @click="handleExportXltx()"type="primary" icon="plus"  v-has="'user:usermb'" >员工模板</a-button>
+      <a-button @click="handleExportXls3('薪资模板')"type="primary" icon="plus"  v-has="'user:changemb'" >薪资模板</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>
@@ -159,14 +159,14 @@
          <a-tag color="#87d068" v-if="record.employmentStatus=='10'||record.employmentStatus==10 ">在职</a-tag>
          <a-tag color="#cd201f" v-else-if="record.employmentStatus=='20'||record.employmentStatus==20 ">离退</a-tag>
          <a-tag color="#cd201f" v-else-if="record.employmentStatus=='30'||record.employmentStatus==30 ">离职</a-tag>
-         <a-tag color="#cd201f" v-else-if="record.employmentStatus=='40'||record.employmentStatus==40 ">待入职</a-tag>
+         <a-tag color="blue" v-else-if="record.employmentStatus=='40'||record.employmentStatus==40 ">待入职</a-tag>
         </span>
 
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)" v-has='"user:edit"'>编辑</a>
-
-         <!-- <a-divider type="vertical"/>
- -->
+         
+         <a-divider type="vertical"/>
+ <a @click="handleChangePassword(record.username)" v-has='"user:edit"'>修改密码</a>
           <!-- <a-dropdown v-has='"user:more"'>
             <a class="ant-dropdown-link">
               更多 <a-icon type="down"/>

+ 3 - 2
src/views/system/UserPrizeList.vue

@@ -167,7 +167,8 @@
           {
             title: '备注',
             align: "center",
-            dataIndex: 'demo'
+            dataIndex: 'demo',
+            ellipsis: true,
           },
           {
             title: '日期',
@@ -180,7 +181,7 @@
           {
             title: '操作员',
             align: "center",
-            dataIndex: 'createBy'
+            dataIndex: 'createBy_dictText'
           },
           {
             title: '操作',

+ 176 - 18
src/views/system/modules/AttendanceRuleModal.vue

@@ -1,5 +1,5 @@
 <template>
-  <j-modal title="排班" :width="1000" :visible="visible" @ok="save()" switchFullscreen @cancel="handleCancel">
+  <j-modal title="排班" :width="1000" :visible="visible" @ok="saves()" :fullscreen="true" switchFullscreen @cancel="handleCancel">
 
     <a-spin :spinning="confirmLoading">
       <!-- <a-form :form="form">
@@ -54,13 +54,25 @@
       <div v-if="types=='2'">
         <div class='month'>
           <ul>
-            <!--点击会触发pickpre函数,重新刷新当前日期 @click(vue v-on:click缩写) -->
-            <li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
+            <!--点击会触发pickpre函数,重新刷新当前日期 @click(vue v-on:click缩写) --> 
+            <li class='arrow'>
+              <a-popconfirm title="是否保存?" ok-text="是" cancel-text="否"
+              @confirm="yes(1)"
+              @cancel="no(1)"
+              >
+            <a-button type="primary" >上个月</a-button></a-popconfirm>
+            </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>
+            <li class='arrow'>
+              <a-popconfirm  title="是否保存?" ok-text="是" cancel-text="否"
+              @confirm="yes(2)"
+              @cancel="no(2)"
+              >
+              <a-button type="primary">下个月</a-button></a-popconfirm>
+              </li>
           </ul>
           <br>
         </div>
@@ -70,7 +82,7 @@
             @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;">
+                <div style="text-align: center;margin-top: -10px;margin-left: 10px;">
                   <p>{{dayobject.day.getDate()}}</p>
                   <div style="margin-top: -10px;">
                     <p v-if='dayobject.day.getDay()==0'>日</p>
@@ -88,23 +100,21 @@
 
             <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,index)">{{text}}</a-tag>
-                <a-tag color="#87d068" v-else-if="text!='休息'&&text!=''&&text!=null" @click="UserType(d,record,index)">
+                <a-tag closable @close="(e) => log(e,d,record)" color="blue" v-if="text=='休息'" @click="UserType(d,record,index)">{{text}}</a-tag>
+                <a-tag closable @close="(e) => log(e,d,record)" color="#87d068" v-else-if="text!='休息'&&text!=''&&text!=null" @click="UserType(d,record,index)">
                   {{text}}
                 </a-tag>
-                <a-tag color="#FFFFFF" v-else @click="UserType(d,record,index)" style="width: 40px;">.</a-tag>
+                <a-tag color="#FFFFFF" v-else @click="UserType(d,record,index)" style="width: 60px;height: 22px;"> </a-tag>
                 <a-menu slot="overlay" v-if="record.isColse">
-                  <a-menu-item key="0">
+                  <a-menu-item key="0" v-if="isShows">
                     <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>
@@ -158,6 +168,7 @@
         tts: false,
         tpdata: [],
         dataSource: [],
+        savef:true,
         columns: [],
         queryParam: {
           shiftDate: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
@@ -185,6 +196,7 @@
         shiftlist: null,
         title: "操作",
         visible: false,
+        isSave:false,
         key: null,
         index: null,
         vs: false,
@@ -206,6 +218,7 @@
           },
         },
         isShow: true,
+        isShows: true,
         listData: [],
         confirmLoading: false,
         form: this.$form.createForm(this),
@@ -228,16 +241,146 @@
       this.queryShift()
     },
     methods: {
+      log(e,b,c){
+      e.preventDefault();
+      if(!c.isColse){
+        this.$message.warning("当月已关账无法操作!");
+        return;
+      }
+        var name="";
+        var shift="";
+        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;
+        }
+        
+      },
+      saves(){
+        this.savef=true;
+        this.save()
+      },
+      yes(e){
+        this.savef=false;
+        this.save();
+        if(e==1){
+          this.pickPre(this.currentYear,this.currentMonth)
+        }else if(e==2){
+          this.pickNext(this.currentYear,this.currentMonth);
+        }
+      },
+      no(e){
+       if(e==1){
+         this.pickPre(this.currentYear,this.currentMonth)
+       }else if(e==2){
+         this.pickNext(this.currentYear,this.currentMonth);
+       }
+      },
       tagBtnCloseFunc(e) {
         const tags = this.selectUsers.filter(tag => tag !== e);
         this.selectUsers = tags;
       },
       UserType(e, a, index) {
+        if(!a.isColse){
+          this.$message.warning("当月已关账无法操作!");
+          return;
+        }
         this.isShow = true;
+        this.isShows = true;
         var d = new Date(this.formatDate(this.currentYear, this.currentMonth, e))
         var obj = this.dataSource[index];
         var list = [];
         var sum=0;
+        var xsum=0;
         var f=false;
         if (d.getDay() == 1) {
           list.push(this.getDays(0, d));
@@ -306,8 +449,10 @@
               }
               ).then((res) => {
               if (res.success) {
-                if(res.result!=0||res.result!='0'){
+                if(res.result!=0&&res.result!='0'){
                   sum++;
+                }else if(res.result==0||res.result=='0'){
+                  xsum++;
                 }
               } 
             }).finally(() => {
@@ -319,13 +464,17 @@
         for (var o = 0; o< list.length; o++) {
           for (var t in obj) { //用javascript的for/in循环遍历对象的属性
             if (t == "shiftid" + list[o].split("-")[2]&&list[o].split("-")[2]==e) {
-              if(obj[t]!=0){
+              if(obj[t]!=0&&obj[t]!="0"){
                 sum++;
                 f=true;
+              } if(obj[t]!=""&&obj[t]=="0"){
+                xsum++;
               }
             }else if(t == "shiftid" + list[o].split("-")[2]){
-              if(obj[t]!=0){
+              if(obj[t]!=0&&obj[t]!="0"){
                 sum++;
+              } if(obj[t]!=""&&obj[t]=="0"){
+                xsum++;
               }
             }
           }
@@ -340,6 +489,8 @@
         } else{
           if (sum==5&&f==false) {
             this.isShow = false;
+          }else if(xsum==2){
+            this.isShows = false;
           }
         }
       },
@@ -513,13 +664,14 @@
         this.columns.push({
           title: '名称',
           dataIndex: 'realname',
-          width: '100px'
+          width: '80px',
+          fixed: 'left'
         })
         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',
+            width: '70px',
             slots: {
               title: d.getDate()
             },
@@ -896,7 +1048,7 @@
         if (this.id != null && this.id != "") {
           url = this.url.edit;
           typet = "put";
-        }
+        }if(data!=null&&data.length>0){
         this.confirmLoading = true;
         httpAction(url, {
             id: this.id,
@@ -916,8 +1068,14 @@
           }
         }).finally(() => {
           this.confirmLoading = false;
-          this.close();
+          if(this.savef){
+            this.close();
+          }
+          this.savef=true;
         })
+        }if(this.savef){
+          this.close();
+        }
       },
       add(e, a) {
         this.visible = true;

+ 3 - 3
src/views/system/modules/PasswordModal.vue

@@ -12,9 +12,9 @@
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
 
-        <a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        <!-- <a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入用户账号" v-decorator="[ 'username', {}]" :readOnly="true"/>
-        </a-form-item>
+        </a-form-item> -->
 
         <a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
           <a-input type="password" placeholder="请输入登录密码" v-decorator="[ 'password', validatorRules.password]" />
@@ -43,7 +43,7 @@
           password:{
             rules: [{
               required: true,
-              pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
+              /* pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, */
               message: '密码由8位数字、大小写字母和特殊符号组成!'
             }, {
               validator: this.validateToNextPassword,

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

@@ -28,7 +28,7 @@
             <a-col :span="8">
                     <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>
+                      <!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> -->
                     </span>
             </a-col>
 
@@ -159,7 +159,7 @@
         selectedRowKeys: [],
         selectedRows: [],
         url: {
-          list: "/sys/user/list",
+          list: "/sys/user/roleUser",
         }
       }
     },

+ 207 - 24
src/views/system/modules/UserDetailModal.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-modal footer="" :width="1000" :dialogStyle="dialogStyle" title="员工信息详情" :visible="visible" @cancel="handleCancel"
+  <a-modal footer="" :width="1370" :dialogStyle="dialogStyle" title="员工信息详情" :visible="visible" @cancel="handleCancel"
     cancelText="关闭">
 
     <template slot="title">
@@ -12,7 +12,7 @@
     </template>
 
     <a-spin :spinning="confirmLoading">
-      <a-form :form="form" style="overflow-y: auto;height: 650px;">
+      <a-form :form="form" style="overflow-y: auto;height: 700px;">
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -77,7 +77,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="年龄" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input-number disabled min="0" max="999999" style="width: 210px;" v-decorator="['age', {}]" />
+              <a-input disabled   v-decorator="['age', {}]" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -130,7 +130,7 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="工资" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input-number disabled min="0" max="999999" id="inputNumber" style="width: 210px;"
+              <a-input disabled 
                 v-decorator="['wagesOne']" />
             </a-form-item>
           </a-col>
@@ -156,7 +156,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="缴交基数" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input-number min="0" max="10" disabled controls="false" style="width: 210px;"
+              <a-input disabled controls="false" 
                 v-decorator="['wagesBase', {}]" />
             </a-form-item>
           </a-col>
@@ -217,12 +217,13 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="分摊部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input v-decorator="['shareDept', {}]" disabled />
+              <j-dict-select-tag disabled v-decorator="['shareDept', {}]" :triggerChange="true" 
+                dictCode="share_dept" />
             </a-form-item>
           </a-col>
 
         </a-row>
-        <a-row>
+        <!-- <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="合同一" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <a-date-picker style="width: 100%" disabled v-decorator="['contractDate']"
@@ -242,7 +243,7 @@
             </a-form-item>
           </a-col>
 
-        </a-row>
+        </a-row> -->
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="是否打卡" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -271,29 +272,72 @@
           </a-col>
         </a-row>
         <a-row>
-          <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-textarea v-decorator="[ 'remarks', {}]" disabled />
-            </a-form-item>
-          </a-col>
+         
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <a-button icon="search" @click="uploads()" style="width: 210px;">查看</a-button>
             </a-form-item>
           </a-col>
-          <a-col :lg="8">
-            <a-form-item label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <a-col :md="6" :sm="8" :lg="8" v-if="isQuit">
+            <a-form-item label="预计离职日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-date-picker style="width: 100%" disabled v-decorator="['endDate']"
+                :getCalendarContainer="node => node.parentNode" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8" :lg="8" v-if="isQuit">
+            <a-form-item label="实际离职日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-date-picker style="width: 100%" disabled v-decorator="['newDate']"
+                :getCalendarContainer="node => node.parentNode" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :lg="24">
+            <a-form-item style="margin-left: -230px;" label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <j-dict-select-tag v-decorator="['infoSy']" :type="'radio'" disabled :triggerChange="true"
                 dictCode="info_sy" />
             </a-form-item>
           </a-col>
-        </a-row>
+          </a-row>
+        <a-row>
+         <a-col :md="6" :sm="8" :lg="24" v-if="isQuit">
+           <a-form-item style="margin-left: -230px;" label="离职原因" :labelCol="labelCol" :wrapperCol="wrapperCol">
+             <a-textarea style="height: 100px;" v-decorator="['demo']" disabled />
+           </a-form-item>
+         </a-col>
+          </a-row>
+        
+          <a-row>
+           <a-col :md="6" :sm="8" :lg="24">
+             <a-form-item style="margin-left: -230px;" label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
+               <a-textarea style="height: 100px;" v-decorator="[ 'remarks', {}]" disabled />
+             </a-form-item>
+           </a-col>
+            </a-row>
         <a-row>
-          <a-table rowKey="id" bordered :data-source="dataSources" :columns="columnst" :pagination="ipaginations"
-            @change="handleTableChanges">
+          
+          <a-table  rowKey="id" bordered v-if="dataSources.length>0" :data-source="dataSources" :columns="columnst" :pagination="false"
+            >
           </a-table>
         </a-row>
-
+       
+          <a-row style="top: 20px;">
+          <a-table  rowKey="id" bordered v-if="dataContract.length>0" :pagination="false" :data-source="dataContract" :columns="columnst2" 
+          >
+          </a-table>
+        </a-row>
+        
+        <a-row style="top: 40px;">
+          <a-table rowKey="id" bordered v-if="dataSources2.length>0" :pagination="false" :data-source="dataSources2" :columns="columnst3" 
+            >
+            <span slot="changeType" slot-scope="text, record" >
+              <a-tag  color="blue" v-if="text=='未审核'" >{{text}}</a-tag>
+              <a-tag  color="#87d068" v-if="text=='同意'" >{{text}}</a-tag>
+              <a-tag  color="#cd201f" v-if="text=='拒绝'" >{{text}}</a-tag>
+              </span>
+          </a-table>
+        </a-row>
+        
       </a-form>
     </a-spin>
     <depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
@@ -353,7 +397,9 @@
     data() {
       return {
         selectedRowKeys: [],
+        dataContract:[],
         selectionRows: [],
+        dataSources2:[],
         departDisabled: false, //是否是我的部门调用该页面
         roleDisabled: false, //是否是角色维护调用该页面
         modalWidth: 800,
@@ -378,6 +424,7 @@
         wkDate: new Date,
         wkMoth: 6,
         wkEndDate: null,
+        isQuit:false,
         moth: 0,
         ipaginations: {
           current: 1,
@@ -482,12 +529,17 @@
           }
         },
         columnst: [{
+          title: '奖惩列表',
+              children: [
+          {
             title: '类型',
+            align: "center",
             dataIndex: 'type_dictText',
            
           }, {
             title: '备注',
             dataIndex: 'demo',
+            ellipsis: true,
           },
           {
             title: '日期',
@@ -499,8 +551,97 @@
           },
           {
               title: '操作员',
-              dataIndex: 'createBy',
+              align: "center",
+              dataIndex: 'createBy_dictText',
             },
+            ]}
+        ],
+        columnst2: [
+          {
+            title: '合同列表',
+                children: [
+          {
+            title: '合同类型',
+            align: "center",
+            dataIndex: 'contractType_dictText',
+           
+          }, {
+            title: '开始日期',
+            dataIndex: 'startDate',
+            align: "center",
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '结束日期',
+            align: "center",
+            dataIndex: 'endDate',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+              title: '操作员',
+              dataIndex: 'createBy_dictText',
+            },
+            ]}
+        ],
+        columnst3: [
+          {
+            title: '人事变动列表',
+                children: [
+          {
+            title: '变动类型',
+            align: "center",
+            dataIndex: 'type',
+           
+          }, {
+            title: '原部门',
+            align: "center",
+            dataIndex: 'deptName',
+           
+          }, {
+            title: '新部门',
+            align: "center",
+            dataIndex: 'newDeptName',
+           
+          }, {
+            title: '原职位',
+            align: "center",
+            dataIndex: 'startPost',
+           
+          },{
+            title: '新职位',
+            align: "center",
+            dataIndex: 'endPost',
+           
+          },{
+            title: '原薪资',
+            align: "center",
+            dataIndex: 'startWages',
+           
+          }, {
+            title: '调整后薪资',
+            align: "center",
+            dataIndex: 'endWages',
+           
+          },
+          {
+            title: '状态',
+            align: "center",
+            dataIndex: 'state_dictText',
+            scopedSlots: {
+              customRender: 'changeType'
+            }
+           
+          },
+          {
+              title: '操作员',
+              align: "center",
+              dataIndex:'conmitId_dictText',
+            },
+            ]}
         ],
         departIdShow: false,
         departIds: [], //负责部门id
@@ -545,7 +686,10 @@
           sysFile: '/sysFile/sysFile/queryByUserId',
           delSysFile: '/sysFile/sysFile/deleteById',
           post: '/sys/position/listByDept',
-          Prize: '/userPrize/userPrize/list'
+          Prize: '/userPrize/userPrize/list',
+          quitlist:"/userquit/userQuit/lists",
+          changelist:"/userchange/userChage/lists",
+          userCont:"/usercontract/userContract/lists"
         },
         identity: "1",
         fileList: [],
@@ -606,7 +750,41 @@
           }
         }).finally(() => {});
       },
-
+      
+      /* queryUserQuit() {
+        getAction(this.url.quitlist, {
+          userId: this.userId
+        }).then((res) => {
+          if (res.success) {
+            this.dataSources2 = res.result.userChage;
+           var data=res.result.userQuit;
+           this.dataContract=res.result.userContract;
+           
+           
+          }
+        }).finally(() => {});
+      }, */
+      queryuserCont() {
+        getAction(this.url.userCont, {
+          userId: this.userId
+        }).then((res) => {
+          if (res.success) {
+           this.dataContract=res.result.records;
+          }
+        }).finally(() => {});
+      },
+      queryChange() {
+        getAction(this.url.changelist, {
+          userId: this.userId
+        }).then((res) => {
+          if (res.success) {
+            this.dataSources2 = res.result.records;
+           
+          }
+        }).finally(() => {});
+      },
+      
+      
       handleRemove(file) {
         if (this.userId != null && this.userId != "") {
           deleteAction(this.url.delSysFile, {
@@ -807,6 +985,8 @@
         }
         if (record.entryDate != null) {
           this.moth = this.countMoth(record.entryDate)
+        }if(record.employmentStatus==30||record.employmentStatus=='30'){
+          this.isQuit=true;
         }
         that.visible = true;
         that.model = Object.assign({}, record);
@@ -817,9 +997,9 @@
         that.$nextTick(() => {
           that.form.setFieldsValue(pick(this.model, 'sex', 'email', 'phone', 'urgentName', 'urgentPhone',
             'bankAddr', 'bankCard', 'realname', 'egName', 'age', 'sfzCode', 'isAttendance', 'remarks', 'addr',
-            'nationality', 'trialMoth', 'trialEndDate', 'workMoth', 'divisionMoth',
+            'nationality', 'trialMoth','entryDate', 'trialEndDate', 'workMoth', 'divisionMoth',
             'infoSy', 'syFund', 'category', 'employmentStatus', 'wagesOne', 'wagesTwo', 'security', 'wagesBase',
-            'homeAddr', 'education', 'school', 'contractDate', 'contractDate2', 'type', 'contractDate3',
+            'homeAddr', 'education','endDate','newDate','demo', 'school', 'contractDate', 'contractDate2', 'type', 'contractDate3',
             'shareDept'))
         });
         //身份为上级显示负责部门,否则不显示
@@ -849,6 +1029,9 @@
         if (this.userId != null && this.userId != "") {
           this.queryFiles(this.userId)
           this.queryPrize();
+          /* this.queryUserQuit(); */
+          this.queryChange();
+          this.queryuserCont()
         }
       },
       countMoth(e) {

+ 143 - 95
src/views/system/modules/UserModal.vue

@@ -26,7 +26,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="英文名" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入英文名" v-decorator="[ 'egName', validatorRules.egName]" />
+              <a-input :maxLength="10" placeholder="请输入英文名" v-decorator="[ 'egName', validatorRules.egName]" />
             </a-form-item>
           </a-col>
 
@@ -83,7 +83,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="年龄" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="3" placeholder="请输入年龄" v-decorator="['age', {}]" />
+              <a-input :maxLength="3" placeholder="请输入年龄" v-model="age" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -112,7 +112,7 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="银行卡" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入银行卡号" v-decorator="['bankCard', validatorRules.bankCard]" />
+              <a-input :maxLength="19" placeholder="请输入银行卡号" v-decorator="['bankCard', validatorRules.bankCard]" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -138,7 +138,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入手机号码" v-decorator="[ 'phone', validatorRules.phone]" />
+              <a-input :maxLength="11" placeholder="请输入手机号码" v-decorator="[ 'phone', validatorRules.phone]" />
             </a-form-item>
           </a-col>
 
@@ -160,17 +160,19 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="公积金" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入公积金账号" v-decorator="['syFund',validatorRules.syFund]" />
+              <a-input :maxLength="20" placeholder="请输入公积金账号" v-model="syFund"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="缴交基数" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="2" :disabled="personType" placeholder="请输入缴交基数" v-decorator="['wagesBase', {}]" />
+              <a-input :maxLength="3" :disabled="personType" v-model="wagesBase" placeholder="请输入缴交基数"  />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <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),rules: [{ required: true, message: '请选择入职时间'},{validator: this.validateentryDate}]}]" :getCalendarContainer="node => node.parentNode" />
+              <a-date-picker style="width: 100%" placeholder="请选择入职日期"
+                v-decorator="['entryDate',{initialValue:!model.entryDate?moment(new Date(),dateFormat):moment(model.entryDate,dateFormat),rules: [{ required: true, message: '请选择入职时间'},{validator: this.validateentryDate}]}]"
+                :getCalendarContainer="node => node.parentNode" />
             </a-form-item>
           </a-col>
 
@@ -192,7 +194,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="工龄" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="5" placeholder="请输入工龄" suffix="月" v-decorator="['workMoth']" />
+              <a-input :maxLength="5" placeholder="请输入工龄" suffix="月" v-model="workMoth"  />
             </a-form-item>
           </a-col>
 
@@ -206,19 +208,19 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入紧急联系人" v-decorator="[ 'urgentName',{}]" />
+              <a-input :maxLength="10" placeholder="请输入紧急联系人" v-decorator="[ 'urgentName',{}]" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入紧急联系人电话" v-decorator="[ 'urgentPhone', {}]" />
+              <a-input :maxLength="11" placeholder="请输入紧急联系人电话" v-model="urgentPhone" />
             </a-form-item>
           </a-col>
         </a-row>
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="户口地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="200" placeholder="请输入户口地址" v-decorator="[ 'homeAddr', {}]" />
+              <a-input :maxLength="100" placeholder="请输入户口地址" v-decorator="[ 'homeAddr', {}]" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -228,29 +230,13 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="分摊部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="20" placeholder="请输入分摊部门" v-decorator="['shareDept', {}]" />
-            </a-form-item>
-          </a-col>
-
-        </a-row>
-        <a-row>
-          <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="合同一" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-date-picker style="width: 100%" placeholder="请选择合同日期" v-decorator="['contractDate']" :getCalendarContainer="node => node.parentNode" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="合同二" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-date-picker style="width: 100%" placeholder="请选择合同日期" v-decorator="['contractDate2']" :getCalendarContainer="node => node.parentNode" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="合同三" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-date-picker style="width: 100%" placeholder="请选择合同日期" v-decorator="['contractDate3']" :getCalendarContainer="node => node.parentNode" />
+              <j-dict-select-tag v-decorator="['shareDept', {}]" :triggerChange="true" placeholder="请选择分摊部门"
+                dictCode="share_dept" />
             </a-form-item>
           </a-col>
 
         </a-row>
+       
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="是否打卡" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -282,34 +268,28 @@
           </a-col>
         </a-row>
         <a-row>
-          <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-textarea :maxLength="255" placeholder="请输备注" v-decorator="[ 'remarks', {}]" />
-            </a-form-item>
-          </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <a-button icon="search" @click="uploads()" style="width: 210px;">选择</a-button>
             </a-form-item>
           </a-col>
-          <a-col :lg="8">
-            <a-form-item label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        </a-row>
+        <a-row>
+          <a-col :lg="24">
+            <a-form-item style="margin-left: -195px;" 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-row>
-          <a-col :lg="8">
-            <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-row>
+          <a-col :md="6" :sm="8" :lg="24">
+            <a-form-item style="margin-left: -195px;" label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-textarea :maxLength="255" placeholder="请输备注" v-decorator="[ 'remarks', {}]" style="height: 100px;"/>
             </a-form-item>
           </a-col>
-          
-        </a-row> -->
-
+        </a-row>
+        
 
       </a-form>
     </a-spin>
@@ -388,7 +368,8 @@
         personType: false,
         dataSources: [],
         modaltoggleFlag: true,
-        moth:0,
+        moth: 0,
+        age:"",
         sfzCode: "",
         bankCard: "",
         bankAddr: "",
@@ -396,10 +377,13 @@
         visiblet: false,
         phone: "",
         isSalary: "0",
+        wagesBase:"",
+        workMoth:"",
         email: "",
         isAttendance: "0",
         zwName: "",
         zwCode: "",
+        urgentPhone:"",
         sfzType: "0",
         ipaginations: {
           current: 1,
@@ -510,8 +494,8 @@
               },
               {
                 validator: this.validatewages
-             }
- 
+              }
+
             ]
           },
 
@@ -581,12 +565,31 @@
       this.initTenantList()
 
     },
-
+    watch:{
+      syFund(newVal,oldVal){
+        this.syFund=newVal.replace(/[^0-9]/ig,"");
+      },
+      workMoth(newVal,oldVal){
+        this.workMoth=newVal.replace(/[^0-9]/ig,"");
+      },
+      moth(newVal,oldVal){
+        this.moth=newVal.replace(/[^0-9]/ig,"");
+      },
+      urgentPhone(newVal,oldVal){
+        this.urgentPhone=newVal.replace(/[^0-9]/ig,"");
+      },
+      wagesBase(newVal,oldVal){
+        this.wagesBase=newVal.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '');
+      },
+      age(newVal,oldVal){
+        this.age=newVal.replace(/[^0-9]/ig,"");
+      }
+    },
     computed: {
       uploadAction: function() {
         return this.url.fileUpload;
       }
-    },
+     },
     methods: {
       zwOk() {
         console.log(this.selectedRowKeys)
@@ -685,6 +688,13 @@
       isDisabledAuth(code) {
         return disabledAuthFilter(code);
       },
+      ages(e){
+        let birthdays = new Date(e);
+         let d = new Date();
+        let age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() ==
+          birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0);
+        return age;
+      },
       getBirth(idCard) {
         var birthday = "";
         if (idCard != null && idCard != "") {
@@ -701,10 +711,8 @@
           let d = new Date();
           let age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() ==
             birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0);
-
-          this.form.setFieldsValue({
-            age: age
-          })
+            this.age=age;
+          
           this.form.setFieldsValue({
             birthday: birthday.replace(/(.{4})(.{2})/, "$1-$2-")
           })
@@ -827,16 +835,24 @@
         });
         var date = new Date();
         date.setMonth(date.getMonth() + 6)
-        this.wkEndDate = date;
-        this.wkMoth=6;
-        this.wkDate=new Date();
+        this.wkEndDate = moment(date).subtract(1, "days");
+        this.wkMoth = 6;
+        this.wkDate = new Date();
       },
       edit(record) {
         this.realname = record.realname;
         this.egName = record.egName;
+        this.syFund=record.syFund;
+        this.urgentPhone=record.urgentPhone;
+        this.workMoth=record.workMoth;
+        this.wagesBase=record.wagesBase;
         this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
         let that = this;
-
+        if(record.birthday!=null&&record.birthday!=""){
+           var age=this.ages(record.birthday)
+            record.age=age;
+            this.age=age;
+        }
         //that.initialRoleList();
         that.checkedDepartNameString = "";
         that.form.resetFields();
@@ -848,8 +864,9 @@
         }
         if (record.sfzType != null && record.sfzType != "") {
           this.sfzType = record.sfzType;
-        }if(record.entryDate!=null){
-            this.moth=this.countMoth(record.entryDate)
+        }
+        if (record.entryDate != null) {
+          this.moth = this.countMoth(record.entryDate)
         }
         that.visible = true;
         that.model = Object.assign({}, record);
@@ -860,9 +877,10 @@
         that.$nextTick(() => {
           that.form.setFieldsValue(pick(this.model, 'sex', 'email', 'phone', 'urgentName', 'urgentPhone',
             'bankAddr', 'bankCard', 'realname', 'egName', 'age', 'sfzCode', 'isAttendance', 'remarks', 'addr',
-            'nationality', 'trialMoth', 'trialEndDate', 'workMoth', 'divisionMoth',
+            'nationality', 'trialMoth', 'entryDate', 'trialEndDate', 'workMoth', 'divisionMoth',
             'infoSy', 'syFund', 'category', 'employmentStatus', 'wagesOne', 'wagesTwo', 'security', 'wagesBase',
-            'homeAddr', 'education', 'school','contractDate','contractDate2','type','contractDate3','shareDept'))
+            'homeAddr', 'education', 'school', 'contractDate', 'contractDate2', 'type', 'contractDate3',
+            'shareDept'))
         });
         //身份为上级显示负责部门,否则不显示
         if (this.model.userIdentity == "2") {
@@ -958,6 +976,10 @@
         this.zwName = "";
         this.selectedRowKeys = [];
         this.selectionRows = [];
+        this.syFund="";
+        this.urgentPhone="";
+        this.wagesBase="";
+        this.age="";
       },
       moment,
       handleSubmit() {
@@ -1000,7 +1022,11 @@
               .departIdList.join(",") : '';
             formData.userIdentity = this.identity;
             formData.departIds = this.userDepartModel.departIdList.join(",");
-
+            formData.syFund=this.syFund;
+            formData.workMoth=this.workMoth;
+            formData.urgentPhone=this.urgentPhone;
+            formData.wagesBase=this.wagesBase;
+            formData.age=this.age;
             //如果是上级择传入departIds,否则为空
             // if (this.identity === "2") {
             //   formData.departIds = this.departIds.join(",");
@@ -1061,7 +1087,9 @@
           callback()
         } else {
           if (!RegExp(/^[0-9]*$/).test(value)) {
-            callback("请输入数字!");
+            this.form.setFieldsValue({
+              trialMoth: value.replace(/[^0-9]/ig,"")
+            })
           } else {
             this.wkMoth = value - 0;
             console.log(this.wkDate)
@@ -1069,7 +1097,7 @@
               var date = new Date(this.wkDate)
               var num = value - 0;
               date.setMonth(date.getMonth() + num)
-              var d = moment(date).format('YYYY-MM-DD');
+              var d = moment(date).subtract(1, "days");
               this.form.setFieldsValue({
                 trialEndDate: d
               })
@@ -1079,7 +1107,7 @@
           callback()
         }
       },
-      countMoth(e){
+      countMoth(e) {
         var date = new Date(e)
         var newDate = new Date();
         var seconds = Math.floor((newDate.getTime() - date.getTime()) / 1000);
@@ -1097,13 +1125,13 @@
         if (!value) {
           callback()
         } else {
-          var date=new Date(value);
+          var date = new Date(value);
           this.wkDate = value;
-          this.moth=this.countMoth(value);
+          this.moth = this.countMoth(value);
           console.log(this.wkMoth)
           if (this.wkMoth != null && this.wkMoth != "") {
             date.setMonth(date.getMonth() + this.wkMoth)
-            var d = moment(date).format('YYYY-MM-DD');
+            var d = moment(date).subtract(1, "days");
             this.form.setFieldsValue({
               trialEndDate: d
             })
@@ -1124,7 +1152,6 @@
             } else {
               callback("请输入正确格式的身份证号码!");
             }
-
           }
           callback()
         }
@@ -1134,7 +1161,10 @@
           callback()
         } else {
           if (!RegExp(/^[0-9]*$/).test(value)) {
-            callback("请输入数字!");
+            this.form.setFieldsValue({
+              wagesOne: value.replace(/[^0-9]/ig,"")
+            })
+            
           }
           callback()
         }
@@ -1158,9 +1188,15 @@
         if (!value) {
           callback()
         } else {
+          
+            this.form.setFieldsValue({
+              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()
         }
       },
@@ -1168,6 +1204,11 @@
         if (!value) {
           callback()
         } else {
+          if (!RegExp(/^[0-9]*$/).test(value)) {
+            this.form.setFieldsValue({
+              phone: value.replace(/[^0-9]/ig,"")
+            })
+          }else{
           //update-begin--Author:kangxiaolin  Date:20190826 for:[05] 手机号不支持199号码段--------------------
           if (new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)) {
             //update-end--Author:kangxiaolin  Date:20190826 for:[05] 手机号不支持199号码段--------------------
@@ -1188,13 +1229,20 @@
             callback("请输入正确格式的手机号码!");
           }
         }
+        }
       },
       validatebankCard(rule, value, callback) {
         if (!value) {
           callback()
         } else {
-          if (value.length != 19 && value.length != 17 && value.length != 16) {
-            callback('请输入正确格式的银行卡账号');
+          if (!RegExp(/^[0-9]*$/).test(value)) {
+            this.form.setFieldsValue({
+              bankCard: value.replace(/[^0-9]/ig,"")
+            })
+          }else{
+          if (value.length != 19 && value.length != 16) {
+            callback('请输入16位或19位银行卡账号');
+          }
           }
           callback()
         }
@@ -1282,28 +1330,28 @@
         this.selectionRows = [];
         this.selectedRowKeys = [];
         var depart = [];
-        var depName="";
-        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.form.setFieldsValue({
-            checkedDepartNameString:this.checkedDepartNames.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.zwCode = "";
-        this.zwName = "";
+        var depName = "";
+        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.form.setFieldsValue({
+              checkedDepartNameString: this.checkedDepartNames.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.zwCode = "";
+          this.zwName = "";
         }
-       
-        
+
+
       },
       // 根据屏幕变化,设置抽屉尺寸
       resetScreenSize() {

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

@@ -134,7 +134,6 @@
             formData.date = formData.date?formData.date.format('YYYY-MM-DD HH:mm:ss'):null;
             formData.userId=this.userid;
             formData.deptId=this.deptid;
-            console.log(formData)
             httpAction(httpurl,formData,method).then((res)=>{
               if(res.success){
                 that.$message.success(res.message);
@@ -166,13 +165,13 @@
               }
               this.deptid=deptids.join(",");
               this.form.setFieldsValue({
-                deptname:deptname.join(",")
+                deptNames:deptname.join(",")
               })
             }else{
               this.userid="";
               this.deptid="";
               this.form.setFieldsValue({
-                deptname:""
+                deptNames:""
               })
             }