LiGuang 3 år sedan
förälder
incheckning
dba637ad6a

+ 3 - 3
src/components/jeecgbiz/JSelectUserByDep.vue

@@ -2,11 +2,11 @@
   <div>
     <a-input-search
       v-model="userNames"
-      placeholder="请先选择用户"
+      placeholder="请先选择员工"
       readOnly
       unselectable="on"
       @search="onSearchDepUser">
-      <a-button slot="enterButton" :disabled="disabled">选择用户</a-button>
+      <a-button slot="enterButton" :disabled="disabled">选择员工</a-button>
     </a-input-search>
     <j-select-user-by-dep-modal ref="selectModal" :modal-width="modalWidth" :multi="multi" @ok="selectOK" :user-ids="value" @initComp="initComp"/>
   </div>
@@ -35,7 +35,7 @@
       },
       multi: {
         type: Boolean,
-        default: true,
+        default: false,
         required: false
       },
       backUser: {

+ 28 - 14
src/components/jeecgbiz/modal/JSelectUserByDepModal.vue

@@ -28,14 +28,24 @@
       </a-col>
       <a-col :md="18" :sm="24">
         <a-card :bordered="false">
-          用户账号:
-          <a-input-search
+          <span>
+          工号:
+          <a-input
             :style="{width:'150px',marginBottom:'15px'}"
-            placeholder="请输入账号"
-            v-model="queryParam.username"
-            @search="onSearch"
-          ></a-input-search>
-          <a-button @click="searchReset(1)" style="margin-left: 20px" icon="redo">重置</a-button>
+            placeholder="请输入工号"
+            v-model="queryParam.workNo"
+          ></a-input>
+          </span>
+          <span style="margin-left: 30px;">
+          姓名:
+          <a-input
+            :style="{width:'150px',marginBottom:'15px'}"
+            placeholder="请输入姓名"
+            v-model="queryParam.realname"
+          ></a-input>
+          </span>
+          <a-button type="primary" style="margin-left: 30px;" @click="onSearch" icon="search">查询</a-button>
+          <!-- <a-button @click="searchReset(1)" style="margin-left: 20px" icon="redo">重置</a-button> -->
           <!--用户列表-->
           <a-table
             ref="table"
@@ -66,16 +76,18 @@
     data() {
       return {
         queryParam: {
-          username: "",
+          workNo: "",
+          empStatus:"10",
+          realname:""
         },
         columns: [
           {
-            title: '用户账号',
+            title: '号',
             align: 'center',
             dataIndex: 'username'
           },
           {
-            title: '用户姓名',
+            title: '姓名',
             align: 'center',
             dataIndex: 'realname'
           },
@@ -109,7 +121,7 @@
         selectedRowKeys: [],
         selectUserRows: [],
         selectUserIds: [],
-        title: '根据部门选择用户',
+        title: '根据部门选择员工',
         ipagination: {
           current: 1,
           pageSize: 10,
@@ -156,9 +168,9 @@
       initUserNames() {
         if (this.userIds) {
           // 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
-          let values = this.userIds.split(',') + ','
+          let values = this.userIds;
           getUserList({
-            username: values,
+            workNo: values,
             pageNo: 1,
             pageSize: values.length
           }).then((res) => {
@@ -175,6 +187,7 @@
           })
         } else {
           // JSelectUserByDep组件bug issues/I16634
+
           this.$emit('initComp', '')
         }
       },
@@ -253,6 +266,7 @@
       handleSubmit() {
         let that = this;
         this.getSelectUserRows();
+        this.selectedRowKeys=[];
         that.$emit('ok', that.selectUserRows, that.selectUserIds);
         that.searchReset(0)
         that.close();
@@ -289,7 +303,7 @@
       // 根据选择的id来查询用户信息
       initQueryUserByDepId(selectedDepIds) {
         this.loading = true
-        return queryUserByDepId({id: selectedDepIds.toString()}).then((res) => {
+        return queryUserByDepId({id: selectedDepIds.toString(),workNo:this.queryParam.workNo,realname:this.queryParam.realname}).then((res) => {
           if (res.success) {
             this.dataSource = res.result;
             this.ipagination.total = res.result.length;

+ 81 - 57
src/views/system/AttendanceRuleList.vue

@@ -13,10 +13,11 @@
           </a-col>
           <a-col :xl="6" :lg="6" :md="6" :sm="6">
             <a-form-item label="部门名称">
-              <j-tree-select style="width: 200px" v-model="queryParam.dept" dict="sys_depart,depart_name,id"
-                pid-field="parent_id" placeholder="请选择部门">
-              </j-tree-select>
-              
+              <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly>
+                <a-icon slot="prefix" type="cluster" title="部门选择控件" />
+                <a-icon v-if="queryParam.dept!=null&&queryParam.dept!=''" slot="suffix" type="close-circle"
+                  @click="handleEmpty" title="清空" />
+              </a-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="6" :md="6" :sm="6">
@@ -41,8 +42,8 @@
       <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-tab-pane key="2" tab="按班次上下班">
-          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns" :scroll="{ x:300,y:400}"
-            :pagination="ipagination" @change="handleTableChange"
+          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns"
+            :scroll="{ x:300,y:400}" :pagination="ipagination" @change="handleTableChange"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
               <div style="height: 35px;">
@@ -69,7 +70,8 @@
             </span>
           </a-table>
 
-          <a-table bordered :data-source="dataSources" :loading="loading" :columns="columnst" :scroll="{ x:300 }" :pagination="ipaginations" @change="handleTableChanges">
+          <a-table bordered :data-source="dataSources" :loading="loading" :columns="columnst" :scroll="{ x:300 }"
+            :pagination="ipaginations" @change="handleTableChanges">
             <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;">
@@ -89,9 +91,8 @@
           </a-table>
         </a-tab-pane>
         <a-tab-pane key="1" tab="固定时间上下班">
-          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns" :scroll="{ x:300 }"
-            :pagination="ipagination" @change="handleTableChange"
-            >
+          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns"
+            :scroll="{ x:300 }" :pagination="ipagination" @change="handleTableChange">
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
               <div style="height: 35px;">
                 <div style="text-align: center;margin-top: -10px;">
@@ -165,7 +166,7 @@
 
     <!-- 表单区域 -->
     <attendanceRule-modal ref="modalForm" @ok="modalFormOk"></attendanceRule-modal>
-
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
     <userShift-modal ref="userShiftModal"></userShift-modal>
   </a-card>
 </template>
@@ -179,6 +180,7 @@
   } from '@/api/manage'
   import '@/assets/less/TableExpand.less'
   import AttendanceRuleModal from './modules/AttendanceRuleModal'
+  import departWindow from './modules/DepartWindow'
   import {
     JeecgListMixin
   } from '@/mixins/JeecgListMixin'
@@ -189,17 +191,20 @@
     mixins: [JeecgListMixin],
     components: {
       AttendanceRuleModal,
-      UserShiftModal
+      UserShiftModal,
+      departWindow
     },
     data() {
       return {
+        departNames: null,
         queryParam: {
           ShiftDate: moment(new Date()).format('yyyy-MM-DD HH:mm:ss'),
-          type: "2"
+          type: "2",
+          dept: null
         },
         description: '打卡规则管理页面',
         tts: false,
-        isColse:true,
+        isColse: true,
         tpdata: [],
         currentMonth: new Date().getMonth(),
         currentYear: new Date().getYear(),
@@ -222,7 +227,7 @@
         isShow: true,
         listData: [],
         is: "1",
-        ipaginations:{
+        ipaginations: {
           current: 1,
           pageSize: 10,
           pageSizeOptions: ['10', '20', '30'],
@@ -245,11 +250,11 @@
         },
       }
     },
-    watch:{
-      dataSource:{
-         handler (newName, oldName) {
-              this.queryMothByCount();
-         },
+    watch: {
+      dataSource: {
+        handler(newName, oldName) {
+          this.queryMothByCount();
+        },
       }
     },
     computed: {
@@ -263,8 +268,28 @@
       this.queryShift()
       this.queryMothByCount();
     },
-    
+
     methods: {
+      modalFormOks(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.dept = formData.departIdList[i].key;
+            this.departNames = formData.departIdList[i].title;
+
+          }
+
+        }
+
+      },
+      openModal() {
+        var ls = [];
+        ls.push(this.queryParam.dept);
+        this.$refs.departWindow.add(ls, {});
+      },
+      handleEmpty() {
+        this.queryParam.dept = null;
+        this.departNames = null;
+      },
       handleAddts() {
         if (this.selectedRowKeys.length < 1 && this.queryParam.type == "4") {
           this.$message.warning("请勾选需要排班人员");
@@ -290,10 +315,10 @@
 
       },
       callback(key) {
-        if(key=="1"||key==1){
-          this.isColse=false;
-        }else{
-          this.isColse=true;
+        if (key == "1" || key == 1) {
+          this.isColse = false;
+        } else {
+          this.isColse = true;
         }
         this.queryParam.type = key;
         this.selectedRowKeys = [];
@@ -307,17 +332,17 @@
         this.initData(this.queryParam.ShiftDate)
 
       },
-    handleTableChanges(pagination, filters, sorter) {
-      //分页、排序、筛选变化时触发
-      //TODO 筛选
-      if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field;
-        this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
-      }
-      this.ipaginations = pagination;
-      console.log(pagination)
-      this.queryMothByCount();
-    },
+      handleTableChanges(pagination, filters, sorter) {
+        //分页、排序、筛选变化时触发
+        //TODO 筛选
+        if (Object.keys(sorter).length > 0) {
+          this.isorter.column = sorter.field;
+          this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
+        }
+        this.ipaginations = pagination;
+        console.log(pagination)
+        this.queryMothByCount();
+      },
 
       initData: function(cur) {
         this.columns = [];
@@ -383,7 +408,7 @@
           //     return name;
           //   }
           // })
-          if(this.queryParam.type == "1"){
+          if (this.queryParam.type == "1") {
             this.columns.push({
               title: '上班时间',
               dataIndex: 'startDate',
@@ -391,9 +416,9 @@
               fixed: 'left',
               customRender: function(t, r, index) {
                 var date = "";
-                if (t!=null&&t!="") {
-                  date=moment(new Date(t)).format('HH:mm:ss')
-                 }
+                if (t != null && t != "") {
+                  date = moment(new Date(t)).format('HH:mm:ss')
+                }
                 return date;
               }
             })
@@ -402,17 +427,17 @@
               dataIndex: 'endDate',
               width: '100px',
               fixed: 'left',
-             customRender: function(t, r, index) {
-               var date = "";
-               if (t!=null&&t!="") {
-                 date=moment(new Date(t)).format('HH:mm:ss')
+              customRender: function(t, r, index) {
+                var date = "";
+                if (t != null && t != "") {
+                  date = moment(new Date(t)).format('HH:mm:ss')
                 }
-               return date;
-             }
+                return date;
+              }
             })
           }
-          
-          
+
+
 
           if (this.queryParam.type == "2") {
             for (var i = 1; i <= moth.getDate(); i++) {
@@ -498,19 +523,18 @@
       queryMothByCount() {
         getAction(this.url.lists, {
           shiftDate: moment(this.queryParam.ShiftDate).format('yyyy-MM-DD HH:mm:ss'),
-          userId:this.ipaginations.current,
+          userId: this.ipaginations.current,
           shiftId: this.ipaginations.pageSize,
-          realname:this.queryParam.name,
-          deptid:this.queryParam.dept
+          realname: this.queryParam.name,
+          deptid: this.queryParam.dept
         }, "post").then((res) => {
           if (res.success) {
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-            this.dataSources = res.result.records||res.result;
-            if(res.result.total)
-            {
-              this.ipaginations.total = res.result.total+1;
-            }else{
-              this.ipaginationstotal = 0+1;
+            this.dataSources = res.result.records || res.result;
+            if (res.result.total) {
+              this.ipaginations.total = res.result.total + 1;
+            } else {
+              this.ipaginationstotal = 0 + 1;
             }
             //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
           }

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

@@ -5,8 +5,8 @@
 
         <!-- 按钮操作区域 -->
         <a-row style="margin-left: 14px">
-          <a-button @click="handleAdd(1)" type="primary" v-has='"depart:add"'>添加部门</a-button>
-          <a-button @click="handleAdd(2)" type="primary" v-has='"depart:subordinate"'>添加下级</a-button>
+          <a-button @click="handleAdd(1)" type="primary" v-has='"depart:add"'>添加组织</a-button>
+          <a-button @click="handleAdd(2)" type="primary" v-has='"depart:subordinate"'>添加下级部门</a-button>
           <a-button type="primary" icon="download" @click="handleExportXls('部门信息')" v-has='"depart:export"'>导出</a-button>
           <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-has='"depart:import"'>
             <a-button type="primary" icon="import">导入</a-button>
@@ -42,11 +42,11 @@
               @expand="onExpand"/>
                 </span>
                 <!--新增右键点击事件,和增加添加和删除功能-->
-                <a-menu slot="overlay">
+                <!-- <a-menu slot="overlay">
                   <a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>
                   <a-menu-item @click="handleDelete" key="2">删除</a-menu-item>
                   <a-menu-item @click="closeDrop" key="3">取消</a-menu-item>
-                </a-menu>
+                </a-menu> -->
               </a-dropdown>
             </template>
           </a-col>
@@ -113,9 +113,9 @@
                     <a-radio value="2">
                       部门
                     </a-radio>
-                    <a-radio value="3">
+                    <!-- <a-radio value="3">
                       岗位
-                    </a-radio>
+                    </a-radio> -->
                   </a-radio-group>
                 </template>
               </a-form-item>

+ 34 - 8
src/views/system/MakeUpCardList.vue

@@ -14,12 +14,11 @@
           
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="部门">
-              <j-tree-select
-                      style="width: 200px"
-                      v-model="queryParam.dept"
-                      dict="sys_depart,depart_name,id"
-                      pid-field="parent_id">
-                    </j-tree-select>
+              <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly >
+                <a-icon slot="prefix" type="cluster" title="部门选择控件"/>
+                <a-icon v-if="queryParam.dept!=null&&queryParam.dept!=''" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
+              </a-input>
+              
             </a-form-item>
           </a-col>
           
@@ -95,12 +94,13 @@
       </a-table>
     </div>
     <!-- table区域-end -->
-
+<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
 
   </a-card>
 </template>
 
 <script>
+  import departWindow from './modules/DepartWindow'
   import '@/assets/less/TableExpand.less'
   import {
     JeecgListMixin
@@ -109,9 +109,16 @@
   export default {
     name: "MakeUpCardList",
     mixins: [JeecgListMixin],
+    components: {
+      departWindow
+    },
     data() {
       return {
         description: '补卡信息管理页面',
+        departNames:null,
+        queryParam:{
+          dept:null
+        },
         // 表头
         columns: [
           // {
@@ -186,7 +193,26 @@
       }
     },
     methods: {
-
+      modalFormOk(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.dept=formData.departIdList[i].key;
+            this.departNames =formData.departIdList[i].title;
+          
+           }
+        
+        }
+      
+      },
+      openModal(){
+        var ls=[];
+        ls.push(this.queryParam.dept);
+        this.$refs.departWindow.add(ls, {});
+      },
+      handleEmpty(){
+        this.queryParam.dept=null;
+        this.departNames=null;
+      },
     }
   }
 </script>

+ 37 - 8
src/views/system/SysPositionList.vue

@@ -24,12 +24,12 @@
             </a-col> -->
             <a-col :md="6" :sm="8">
               <a-form-item label="部门名称">
-                <j-tree-select
-                        style="width: 200px"
-                        v-model="queryParam.deptId"
-                        dict="sys_depart,depart_name,id"
-                        pid-field="parent_id">
-                      </j-tree-select>
+                <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly>
+                  <a-icon slot="prefix" type="cluster" title="部门选择控件" />
+                  <a-icon v-if="queryParam.deptId!=null&&queryParam.deptId!=''" slot="suffix" type="close-circle"
+                    @click="handleEmpty" title="清空" />
+                </a-input>
+               
               </a-form-item>
             
           </a-col>
@@ -110,6 +110,7 @@
 
     <!-- 表单区域 -->
     <sysPosition-modal ref="modalForm" @ok="modalFormOk"></sysPosition-modal>
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
   </a-card>
 </template>
 
@@ -117,6 +118,7 @@
   import SysPositionModal from './modules/SysPositionModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import JDictSelectTag from '@/components/dict/JDictSelectTag'
+  import departWindow from './modules/DepartWindow'
 import JTreeSelect from '@/components/jeecg/JTreeSelect'
   export default {
     name: 'SysPositionList',
@@ -124,11 +126,16 @@ import JTreeSelect from '@/components/jeecg/JTreeSelect'
     components: {
       SysPositionModal,
       JDictSelectTag,
-      JTreeSelect
+      JTreeSelect,
+      departWindow
     },
     data() {
       return {
         description: '职位表管理页面',
+        departNames:null,
+        queryParam:{
+          deptId:null,
+        },
         // 表头
         columns: [
           {
@@ -196,7 +203,29 @@ import JTreeSelect from '@/components/jeecg/JTreeSelect'
       importExcelUrl: function () {
         return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
       }
-    }
+    },
+    methods: {
+     modalFormOks(formData) {
+             if (formData.departIdList != null && formData.departIdList.length > 0) {
+               for (let i = 0; i < formData.departIdList.length; i++) {
+                 this.queryParam.deptId=formData.departIdList[i].key;
+                 this.departNames =formData.departIdList[i].title;
+               
+                }
+             
+             }
+           
+           },
+           openModal(){
+             var ls=[];
+             ls.push(this.queryParam.deptId);
+             this.$refs.departWindow.add(ls, {});
+           },
+           handleEmpty(){
+             this.queryParam.deptId=null;
+             this.departNames=null;
+           },
+    },
   }
 </script>
 <style scoped>

+ 36 - 7
src/views/system/UserChange.vue

@@ -12,9 +12,11 @@
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="部门名称">
-              <j-tree-select style="width: 200px" v-model="queryParam.deptId" dict="sys_depart,depart_name,id"
-                pid-field="parent_id" placeholder="请选择部门">
-              </j-tree-select>
+              <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly >
+                <a-icon slot="prefix" type="cluster" title="部门选择控件"/>
+                <a-icon v-if="queryParam.deptId!=null&&queryParam.deptId!=''" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
+              </a-input>
+             
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -89,11 +91,11 @@
               </a-popconfirm>
           </span>
           <span v-if="record.status==0&&record.state==0">
-          <a-popconfirm title="确定取消?" placement="left" @confirm="handleEdits(record,1)"  okText="确定" cancelText="取消">
+          <a-popconfirm title="确定同意?" placement="left" @confirm="handleEdits(record,1)"  okText="确定" cancelText="取消">
              <a>同意</a>
           </a-popconfirm>
           <a-divider type="vertical" />
-          <a-popconfirm title="确定取消?" placement="left" @confirm="handleEdits(record,2)"  okText="确定" cancelText="取消">
+          <a-popconfirm title="确定拒绝?" placement="left" @confirm="handleEdits(record,2)"  okText="确定" cancelText="取消">
              <a>拒绝</a>
           </a-popconfirm>
           </span>
@@ -141,8 +143,10 @@
   </div>
 </a-tab-pane>
 </a-tabs>
+
     <!-- 表单区域 -->
     <userContract-modal ref="modalForm" @ok="modalFormOk"></userContract-modal>
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
   </a-card>
 </template>
 
@@ -150,6 +154,7 @@
   import '@/assets/less/TableExpand.less'
   import { httpAction,getAction } from '@/api/manage'
   import UserContractModal from './modules/UserContractModal'
+  import departWindow from './modules/DepartWindow'
   import moment from "moment"
   import pick from 'lodash.pick'
   import JInput from '@/components/jeecg/JInput'
@@ -162,7 +167,8 @@
     mixins: [JeecgListMixin],
     components: {
       UserContractModal,
-      JInput
+      JInput,
+      departWindow
     },
     data() {
       return {
@@ -170,8 +176,9 @@
         dataSources:[],
         isShow:1,
         loadings:false,
+        departNames:null,
         queryParam:{
-          
+          deptId:null
         },
         queryParam2:{
          
@@ -319,6 +326,7 @@
             },
           }
         ],
+        toggleSearchStatus:false,
         ipaginations:{
           current: 1,
           pageSize: 20,
@@ -348,6 +356,26 @@
       }
     },
     methods: {
+      modalFormOks(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.deptId=formData.departIdList[i].key;
+            this.departNames =formData.departIdList[i].title;
+          
+           }
+        
+        }
+      
+      },
+      openModal(){
+        var ls=[];
+        ls.push(this.queryParam.deptId);
+        this.$refs.departWindow.add(ls, {});
+      },
+      handleEmpty(){
+        this.queryParam.deptId=null;
+        this.departNames=null;
+      },
         handleEdits(e,a){
         let formData = Object.assign({},e);
         formData.state=a;
@@ -366,6 +394,7 @@
         if(key==1||key=='1'){
           this.$options.methods.searchQuery.call(this)
         }else if(key==2||key=='2'){
+          this.toggleSearchStatus=false;
           this.querys()
         }
       },

+ 32 - 5
src/views/system/UserContractList.vue

@@ -21,9 +21,10 @@
           <template v-if="toggleSearchStatus">
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
               <a-form-item label="部门名称">
-                <j-tree-select style="width: 200px" v-model="queryParam.deptId" dict="sys_depart,depart_name,id"
-                  pid-field="parent_id" placeholder="请选择部门">
-                </j-tree-select>
+                <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly >
+                  <a-icon slot="prefix" type="cluster" title="部门选择控件"/>
+                  <a-icon v-if="queryParam.deptId!=null&&queryParam.deptId!=''" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
+                </a-input>
               </a-form-item>
             </a-col>
             <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -108,12 +109,14 @@
 
     <!-- 表单区域 -->
     <userContract-modal ref="modalForm" @ok="modalFormOk"></userContract-modal>
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
   </a-card>
 </template>
 
 <script>
   import '@/assets/less/TableExpand.less'
   import UserContractModal from './modules/UserContractModal'
+  import departWindow from './modules/DepartWindow'
   import moment from "moment"
   import {
     JeecgListMixin
@@ -123,11 +126,16 @@
     name: "UserContractList",
     mixins: [JeecgListMixin],
     components: {
-      UserContractModal
+      UserContractModal,
+      departWindow
     },
     data() {
       return {
         description: '员工合同管理页面',
+        departNames:null,
+        queryParam:{
+          deptId:null,
+        },
         // 表头
         columns: [
           {
@@ -201,7 +209,26 @@
       }
     },
     methods: {
-
+modalFormOks(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.deptId=formData.departIdList[i].key;
+            this.departNames =formData.departIdList[i].title;
+          
+           }
+        
+        }
+      
+      },
+      openModal(){
+        var ls=[];
+        ls.push(this.queryParam.deptId);
+        this.$refs.departWindow.add(ls, {});
+      },
+      handleEmpty(){
+        this.queryParam.deptId=null;
+        this.departNames=null;
+      },
     }
   }
 </script>

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

@@ -18,12 +18,17 @@
           </a-col>
           <a-col :md="6" :sm="8">
               <a-form-item label="部门名称">
-                <j-tree-select
+                <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly >
+                  <a-icon slot="prefix" type="cluster" title="部门选择控件"/>
+                  <a-icon v-if="queryParam.orgCodeTxt!=null&&queryParam.orgCodeTxt!=''" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
+                </a-input>
+                <!-- <j-select-depart v-model="queryParam.orgCodeTxt"/> -->
+                <!-- <j-tree-select
                         style="width: 200px"
                         v-model="queryParam.orgCodeTxt"
                         dict="sys_depart,depart_name,id"
                         pid-field="parent_id">
-                      </j-tree-select>
+                      </j-tree-select> -->
               </a-form-item>
             </a-col>
           <a-col :md="6" :sm="8">
@@ -171,6 +176,7 @@
     <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
     <user-detail-modal ref="userdetailmodal"></user-detail-modal>
     <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
 
     <!-- 用户回收站 -->
     <user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
@@ -181,6 +187,7 @@
 
 <script>
   import UserModal from './modules/UserModal'
+  import departWindow from './modules/DepartWindow'
   import UserDetailModal from './modules/UserDetailModal'
   import PasswordModal from './modules/PasswordModal'
   import {putAction,getFileAccessHttpUrl,getAction,downFile} from '@/api/manage';
@@ -205,6 +212,7 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
       PasswordModal,
       JInput,
       UserRecycleBinModal,
+      departWindow,
       UserDetailModal,
       JSuperQuery,
       JSelectDepart,
@@ -216,8 +224,10 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
         description: '这是用户管理页面',
         queryParam: {
           empStatus:"10",
-          category:"101"
+          category:"101",
+          orgCodeTxt:null,
         },
+        departNames:null,
         recycleBinVisible: false,
         selectedRowKeys:[],
         selectionRows:[],
@@ -395,6 +405,17 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
       clearSpaces(e) {
         this.queryParam.workNo = e.target.value.replace(/\s+/g, '')
       },
+      modalFormOks(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.orgCodeTxt=formData.departIdList[i].key;
+            this.departNames =formData.departIdList[i].title;
+          
+           }
+        
+        }
+      
+      },
       batchrz(){
         if (this.selectedRowKeys.length<=0) {
           this.$message.warning('请选择一条记录!');
@@ -415,6 +436,10 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
           this.selectionRows=[];
         }
       },
+      handleEmpty(){
+        this.queryParam.orgCodeTxt=null;
+        this.departNames=null;
+      },
       batchFrozen: function (status) {
         if (this.selectedRowKeys.length <= 0) {
           this.$message.warning('请选择一条记录!');
@@ -452,6 +477,11 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
           });
         }
       },
+      openModal(){
+        var ls=[];
+        ls.push(this.queryParam.orgCodeTxt);
+        this.$refs.departWindow.add(ls, {});
+      },
       handleMenuClick(e) {
         var data=this.selectionRows;
         var f=false;

+ 33 - 5
src/views/system/UserPrizeList.vue

@@ -13,9 +13,11 @@
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="部门名称">
-              <j-tree-select style="width: 200px" v-model="queryParam.deptId" dict="sys_depart,depart_name,id"
-                pid-field="parent_id" placeholder="请选择部门">
-              </j-tree-select>
+              <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly >
+                <a-icon slot="prefix" type="cluster" title="部门选择控件"/>
+                <a-icon v-if="queryParam.deptId!=null&&queryParam.deptId!=''" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
+              </a-input>
+              
             </a-form-item>
           </a-col>
           <template v-if="toggleSearchStatus">
@@ -108,12 +110,14 @@
 
     <!-- 表单区域 -->
     <userPrize-modal ref="modalForm" @ok="modalFormOk"></userPrize-modal>
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
   </a-card>
 </template>
 
 <script>
   import '@/assets/less/TableExpand.less'
   import UserPrizeModal from './modules/UserPrizeModal'
+  import departWindow from './modules/DepartWindow'
   import {
     JeecgListMixin
   } from '@/mixins/JeecgListMixin'
@@ -122,11 +126,16 @@
     name: "UserPrizeList",
     mixins: [JeecgListMixin],
     components: {
-      UserPrizeModal
+      UserPrizeModal,
+      departWindow
     },
     data() {
       return {
         description: '员工奖惩管理页面',
+        departNames:null,
+        queryParam:{
+          deptId:null,
+        },
         // 表头
         columns: [
           // {
@@ -207,7 +216,26 @@
       }
     },
     methods: {
-
+modalFormOks(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.deptId=formData.departIdList[i].key;
+            this.departNames =formData.departIdList[i].title;
+          
+           }
+        
+        }
+      
+      },
+      openModal(){
+        var ls=[];
+        ls.push(this.queryParam.deptId);
+        this.$refs.departWindow.add(ls, {});
+      },
+      handleEmpty(){
+        this.queryParam.deptId=null;
+        this.departNames=null;
+      },
     }
   }
 </script>

+ 1 - 4
src/views/system/modules/DepartModal.vue

@@ -46,12 +46,9 @@
               <a-radio value="2">
                 部门
               </a-radio>
-              <a-radio value="3">
-                岗位
-              </a-radio>
             </a-radio-group>
           </template>
-        </a-form-item>
+        </a-form-item> 
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"

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

@@ -34,9 +34,9 @@
             <a-radio value="2">
               部门
             </a-radio>
-            <a-radio value="3">
+            <!-- <a-radio value="3">
               岗位
-            </a-radio>
+            </a-radio> -->
           </a-radio-group>
       </a-form-item>
       <a-form-item

+ 1 - 1
src/views/system/modules/ShiftModal.vue

@@ -16,7 +16,7 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="名称">
-          <a-input placeholder="请输入名称" v-decorator="['name', validatorRules.name]" />
+          <a-input :maxLength="10" placeholder="请输入名称" v-decorator="['name', validatorRules.name]" />
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"

+ 1 - 1
src/views/system/modules/StatutoryLeaveModal.vue

@@ -16,7 +16,7 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="假期名称">
-          <a-input placeholder="请输入假期名称" v-decorator="['name', validatorRules.name]" style="width: 180px;"/>
+          <a-input :maxLength="10" placeholder="请输入假期名称" v-decorator="['name', validatorRules.name]" style="width: 180px;"/>
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"

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

@@ -16,13 +16,13 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="职务编码">
-          <a-input placeholder="请输入职位编码" v-decorator="['code', validatorRules.code]" :read-only="readOnly"/>
+          <a-input :maxLength="10" placeholder="请输入职位编码" v-decorator="['code', validatorRules.code]" :read-only="readOnly"/>
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="职务名称">
-          <a-input placeholder="请输入职位名称" v-decorator="['name', validatorRules.name]"/>
+          <a-input :maxLength="15" placeholder="请输入职位名称" v-decorator="['name', validatorRules.name]"/>
         </a-form-item>
       
         <a-form-item label="部门" :labelCol="labelCol" :wrapperCol="wrapperCol" >

+ 17 - 25
src/views/system/modules/UserContractModal.vue

@@ -16,13 +16,14 @@
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="员工姓名">
-         <a-input placeholder="请输入员工姓名" v-decorator="['realname', validatorRules.realname ]" />
+         <j-select-user-by-dep  v-decorator="['userId', validatorRules.realname]"/>
+         
        </a-form-item>
        <a-form-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="部门名称">
-         <a-input placeholder="请输入部门名称" v-decorator="['deptNames', validatorRules.deptname ]" />
+         <a-input :disabled="true" placeholder="请输入部门名称" v-decorator="['deptNames', validatorRules.deptname ]" />
        </a-form-item>
        <a-form-item
         <a-form-item
@@ -55,9 +56,11 @@
   import { httpAction,getAction } from '@/api/manage'
   import pick from 'lodash.pick'
   import moment from "moment"
-
+import JSelectMultiUser from '@/components/jeecgbiz/JSelectMultiUser'
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
   export default {
     name: "UserContractModal",
+    components: {JSelectMultiUser,JSelectUserByDep},
     data () {
       return {
         title:"操作",
@@ -104,9 +107,8 @@
         this.model = Object.assign({}, record);
         this.visible = true;
         this.deptid=record.deptId;
-        this.userid=record.userId;
         this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'realname','contractType','deptNames'))
+          this.form.setFieldsValue(pick(this.model,'userId','contractType','deptNames'))
 		  //时间格式化
           this.form.setFieldsValue({startDate:this.model.startDate?moment(this.model.startDate):null})
           this.form.setFieldsValue({endDate:this.model.endDate?moment(this.model.endDate):null})
@@ -121,21 +123,7 @@
         const that = this;
         // 触发表单验证
         this.form.validateFields((err, values) => {
-          if(this.userid==null||this.userid==""){
-            this.form.setFieldsValue({
-              realname:""
-            })
-             that.$message.warning("未查询到此员工!");
-             return;
-          }else if(this.deptid==null||this.deptid==""){
-            this.form.setFieldsValue({
-              deptNames:""
-            })
-             that.$message.warning("员工对应部门不存在!");
-             return;
-          }
-          
-          
+         
           if (!err) {
             that.confirmLoading = true;
             let httpurl = '';
@@ -148,7 +136,7 @@
                method = 'put';
             }
             let formData = Object.assign(this.model, values);
-            formData.userId=this.userid;
+            
             formData.deptId=this.deptid;
             //时间格式化
             formData.startDate = formData.startDate?formData.startDate.format('YYYY-MM-DD HH:mm:ss'):null;
@@ -178,17 +166,20 @@
       validateRealname(rule, value, callback) {
         if (!value) {
           callback()
+          this.deptid="";
+          this.form.setFieldsValue({
+            deptNames:""
+          })
         } else {
           this.queryDeptName(value);
           callback()
         }
       },
       queryDeptName(e){
-        getAction(this.url.dept,{realname:e}).then((res)=>{
+        getAction(this.url.dept,{id:e}).then((res)=>{
           if(res.success){
             if(res.result.length>0){
               var list=res.result;
-              this.userid= list[0].id;
               var deptids=[];
               var deptname=[];
               for(var i=0;i<list.length;i++){
@@ -200,7 +191,6 @@
                 deptNames:deptname.join(",")
               })
             }else{
-              this.userid="";
               this.deptid="";
               this.form.setFieldsValue({
                 deptNames:""
@@ -210,7 +200,9 @@
           
           }
         }).finally(() => {
-         
+         this.form.setFieldsValue({
+           userId:e
+         })
         })
       }
       

+ 8 - 3
src/views/system/modules/UserModal.vue

@@ -37,7 +37,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="人员类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-dict-select-tag v-decorator="[ 'category', {initialValue:101}]" placeholder="请选择人员类别"
+              <j-dict-select-tag v-decorator="[ 'category', {initialValue:101,rules: [{ required: true, message: '请选择人员类别'}]}]" placeholder="请选择人员类别"
                 :triggerChange="true" @change="handleChangeStatus" dictCode="category"/>
                
               
@@ -268,7 +268,7 @@
           </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="请选择合同类型"
+             <j-dict-select-tag  v-decorator="['contractType',{rules: [{ required: true, message: '请选择入合同类型'}]}]" :triggerChange="true" placeholder="请选择合同类型"
                dictCode="contract_type" />
             </a-form-item>
           </a-col>
@@ -372,6 +372,7 @@
         titles: "新增员工",
         visibles: false,
         isEdit:false,
+        worMoth:0,
         personType: false,
         cEndDate:null,
         dataSources: [],
@@ -896,6 +897,7 @@
         }if(record.isAttendance!=null&& record.isAttendance != ""){
             this.isAttendance=record.isAttendance;
         }if(record.workMoth!=null&&record.workMoth!=""){
+          this.worMoth=record.workMoth;
           this.workMoth=record.workMoth - 0+this.moth - 0;
         }
         
@@ -1039,6 +1041,7 @@
             //   formData.avatar = null;
             // }
             formData.sfzType = this.sfzType;
+            formData.workMoth=this.workMoth;
             var a = this.fileLists;
             var txt = [];
             console.log(this.fileLists)
@@ -1052,6 +1055,8 @@
               formData.trialEndDate = moment(formData.trialEndDate).format('YYYY-MM-DD');
             }if(formData.isAttendance==1||formData.isAttendance=='1'){
               formData.type="";
+            }if(this.isEdit){
+              formData.workMoth=this.worMoth;
             }
             formData.post = this.zwCode;
             //formData.selectedroles = this.selectedRole.length>0?this.selectedRole.join(","):'';
@@ -1060,7 +1065,7 @@
             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;

+ 14 - 13
src/views/system/modules/UserPrizeModal.vue

@@ -16,13 +16,13 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="员工姓名">
-          <a-input placeholder="请输入员工姓名" v-decorator="['realname', validatorRules.realname ]" />
+          <j-select-user-by-dep  v-decorator="['userId', validatorRules.realname]"/>
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="部门名称">
-          <a-input placeholder="请输入部门名称" v-decorator="['deptNames', validatorRules.deptname ]" />
+          <a-input placeholder="请输入部门名称" :disabled="true" v-decorator="['deptNames', validatorRules.deptname ]" />
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
@@ -42,7 +42,7 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="备注">
-          <a-textarea  placeholder="请输入备注" v-decorator="['demo', {}]" />
+          <a-textarea :maxLength="255" placeholder="请输入备注" v-decorator="['demo', {}]" />
         </a-form-item>
         
 		
@@ -55,9 +55,10 @@
   import { httpAction,getAction } from '@/api/manage'
   import pick from 'lodash.pick'
   import moment from "moment"
-
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
   export default {
     name: "UserPrizeModal",
+    components: {JSelectUserByDep},
     data () {
       return {
         title:"操作",
@@ -101,9 +102,8 @@
         this.model = Object.assign({}, record);
         this.visible = true;
         this.deptid=record.deptId;
-        this.userid=record.userId;
         this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'realname','deptNames','type','demo'))
+          this.form.setFieldsValue(pick(this.model,'userId','deptNames','type','demo'))
 		  //时间格式化
           this.form.setFieldsValue({date:this.model.date?moment(this.model.date):null})
         });
@@ -132,7 +132,6 @@
             let formData = Object.assign(this.model, values);
             //时间格式化
             formData.date = formData.date?formData.date.format('YYYY-MM-DD HH:mm:ss'):null;
-            formData.userId=this.userid;
             formData.deptId=this.deptid;
             httpAction(httpurl,formData,method).then((res)=>{
               if(res.success){
@@ -152,11 +151,10 @@
         })
       },
       queryDeptName(e){
-        getAction(this.url.dept,{realname:e}).then((res)=>{
+        getAction(this.url.dept,{id:e}).then((res)=>{
           if(res.success){
             if(res.result.length>0){
               var list=res.result;
-              this.userid= list[0].id;
               var deptids=[];
               var deptname=[];
               for(var i=0;i<list.length;i++){
@@ -168,22 +166,25 @@
                 deptNames:deptname.join(",")
               })
             }else{
-              this.userid="";
               this.deptid="";
               this.form.setFieldsValue({
                 deptNames:""
               })
             }
-          
-          
           }
         }).finally(() => {
-         
+         this.form.setFieldsValue({
+           userId:""
+         })
         })
       },
       validateRealname(rule, value, callback) {
         if (!value) {
           callback()
+          this.deptid="";
+          this.form.setFieldsValue({
+            deptNames:e
+          })
         } else {
           this.queryDeptName(value);
           callback()