LiGuang 3 tahun lalu
induk
melakukan
77b6b52e38

+ 14 - 7
src/components/jeecg/JImageUpload.vue

@@ -11,20 +11,27 @@
       :beforeUpload="beforeUpload"
       :disabled="disabled"
       :isMultiple="isMultiple"
-      :showUploadList="isMultiple"
+      :showUploadList="{
+            showRemoveIcon: true,
+            showPreviewIcon:false
+          }"
       @change="handleChange"
       @preview="handlePreview"
       :class="!isMultiple?'imgupload':''">
-      <div :style="{'width':(!isMultiple?'104px':'auto'),'height':(!isMultiple?'104px':'auto')}">
-        <img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/>
-        <div v-else class="iconp">
+     <!-- <div v-if="fileList.length<1" :style="{'width':(!isMultiple?'104px':'auto'),'height':(!isMultiple?'104px':'auto')}">
+        <img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/> 
+        <div  class="iconp">
           <a-icon :type="uploadLoading ? 'loading' : 'plus'" />
           <div class="ant-upload-text">{{ text }}</div>
         </div>
-      </div>
-      <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel()">
+      </div>-->
+       <div v-if="fileList.length<1" class="iconp">
+        <!-- <a-icon :type="uploadLoading ? 'loading' : 'plus'" /> -->
+         <div class="ant-upload-text">{{ text }}</div>
+       </div>
+     <!-- <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel()">
         <img alt="example" style="width: 100%" :src="previewImage"/>
-      </a-modal>
+      </a-modal> -->
     </a-upload>
   </div>
 </template>

+ 8 - 2
src/views/system/AttendanceRuleList.vue

@@ -38,7 +38,7 @@
 
     <div>
 
-      <a-button @click="handleAddts()" type="primary" icon="plus" v-has="'UserShift:add'">调整</a-button>
+      <a-button @click="handleAddts()" type="primary" icon="plus" v-has="'UserShift:add'" v-if="isColse">调整</a-button>
       <a-tabs default-active-key="2" @change="callback">
         <a-tab-pane key="2" tab="按班次上下班">
           <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns" :scroll="{ x:300,y:600}"
@@ -91,7 +91,7 @@
         <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"
-            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
+            >
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
               <div style="height: 35px;">
                 <div style="text-align: center;margin-top: -10px;">
@@ -199,6 +199,7 @@
         },
         description: '打卡规则管理页面',
         tts: false,
+        isColse:true,
         tpdata: [],
         currentMonth: new Date().getMonth(),
         currentYear: new Date().getYear(),
@@ -289,6 +290,11 @@
 
       },
       callback(key) {
+        if(key=="1"||key==1){
+          this.isColse=false;
+        }else{
+          this.isColse=true;
+        }
         this.queryParam.type = key;
         this.selectedRowKeys = [];
         this.selectionRows = [];

+ 30 - 9
src/views/system/UserChange.vue

@@ -67,10 +67,21 @@
         :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
          @change="handleTableChange">
 
-        <span slot="action" slot-scope="text, record" v-if="record.state==0||record.state=='0'">
-          <a @click="handleEdits(record,1)">同意</a>
+        <span slot="action" slot-scope="text, record" v-if="record.status==0||record.status=='0'">
+           <span v-if="record.status==0&&record.state!=0">
+             <a-popconfirm title="确定取消?" placement="left" @confirm="handleEdits(record,0)"  okText="确定" cancelText="取消">
+              <a>取消</a>
+              </a-popconfirm>
+          </span>
+          <span v-if="record.status==0&&record.state==0">
+          <a-popconfirm title="确定取消?" placement="left" @confirm="handleEdits(record,1)"  okText="确定" cancelText="取消">
+             <a>同意</a>
+          </a-popconfirm>
           <a-divider type="vertical" />
-          <a @click="handleEdits(record,2)">拒绝</a>
+          <a-popconfirm title="确定取消?" placement="left" @confirm="handleEdits(record,2)"  okText="确定" cancelText="取消">
+             <a>拒绝</a>
+          </a-popconfirm>
+          </span>
         </span>
 
       <span slot="types" slot-scope="text, record" >
@@ -89,10 +100,21 @@
       :pagination="ipaginations" :loading="loadings" class="j-table-force-nowrap"
       @change="handleTableChanges">
   
-      <span slot="action" slot-scope="text, record" v-if="record.state==0||record.state=='0'">
-        <a @click="changeEdit(record,1)">同意</a>
+      <span slot="action" slot-scope="text, record" v-if="record.status==0||record.status=='0'">
+        <span v-if="record.status==0&&record.state!=0">
+          <a-popconfirm title="确定取消?" placement="left" @confirm="changeEdit(record,0)"  okText="确定" cancelText="取消">
+           <a>取消</a>
+          </a-popconfirm>
+        </span>
+        <span v-if="record.status==0&&record.state==0">
+          <a-popconfirm title="确定同意?" placement="left" @confirm="changeEdit(record,1)"  okText="确定" cancelText="取消">
+           <a>同意</a>
+          </a-popconfirm>
         <a-divider type="vertical" />
-         <a @click="changeEdit(record,2)">拒绝</a>
+        <a-popconfirm title="确定拒绝?" placement="left" @confirm="changeEdit(record,2)"  okText="确定" cancelText="取消">
+          <a>拒绝</a>
+        </a-popconfirm>
+         </span>
       </span>
       
       <span slot="changeType" slot-scope="text, record" >
@@ -134,11 +156,10 @@
         isShow:1,
         loadings:false,
         queryParam:{
-          state:"0"
+          
         },
         queryParam2:{
-          state:"0",
-          type:"工资调整"
+         
         },
         // 表头
         columns: [

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

@@ -41,14 +41,9 @@
 
             <a-col :md="6" :sm="8">
               <a-form-item label="人员类别">
-                <a-select v-model="queryParam.category" placeholder="请选择">
-                  <a-select-option value="101">正式工</a-select-option>
-                  <a-select-option value="102">顾问</a-select-option>
-                  <a-select-option value="103">实习生</a-select-option>
-                  <a-select-option value="104">劳务工</a-select-option>
-                  <a-select-option value="105">劳务外包5+2</a-select-option>
-                  <a-select-option value="106">劳务外包6+1</a-select-option>
-                </a-select>
+                <j-dict-select-tag v-model="queryParam.category" placeholder="请选择人员类别"
+                  dictCode="category"/>
+                
               </a-form-item>
               <!-- <a-form-item label="手机号码">
                 <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
@@ -57,12 +52,15 @@
 
             <a-col :md="6" :sm="8">
               <a-form-item label="雇佣状态">
-                <a-select v-model="queryParam.employmentStatus" placeholder="请选择">
-                  <a-select-option value="10">在职</a-select-option>
-                  <a-select-option value="20">离退</a-select-option>
-                  <a-select-option value="30">离职</a-select-option>
-                  <a-select-option value="40">待入职</a-select-option>
-                </a-select>
+                <j-multi-select-tag
+                        v-model="queryParam.empStatus"
+                        dictCode="employmentStatus"
+                        placeholder="请选择雇佣状态">
+                      </j-multi-select-tag>
+                  
+                <!-- <j-dict-select-tag v-model="queryParam.employmentStatus" placeholder="请选择人员类别"
+                  dictCode="employmentStatus"/> -->
+                
               </a-form-item>
             </a-col>
           </template>
@@ -147,12 +145,7 @@
         </template>
         
         <span slot="categorys" slot-scope="text, record, index">
-          <a-tag color="#87d068" v-if="record.category=='101'||record.category==101 ">正式工</a-tag>
-          <a-tag color="#87d068" v-else-if="record.category=='102'||record.category==102 ">顾问</a-tag>
-          <a-tag color="#87d068" v-else-if="record.category=='103'||record.category==103 ">实习生</a-tag>
-          <a-tag color="#87d068" v-else-if="record.category=='104'||record.category==104 ">劳务工</a-tag>
-          <a-tag color="#87d068" v-else-if="record.category=='104'||record.category==105 ">劳务外包5+2</a-tag>
-          <a-tag color="#87d068" v-else-if="record.category=='104'||record.category==106 ">劳务外包6+1</a-tag>
+          <a-tag color="#87d068">{{text}}</a-tag>
         </span>
         
         <span slot="employmentStatuss" slot-scope="text, record, index">
@@ -216,6 +209,7 @@
   import JSuperQuery from '@/components/jeecg/JSuperQuery'
 import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
  import JTreeSelect from '@/components/jeecg/JTreeSelect'
+ import JDictSelectTag from '@/components/dict/JDictSelectTag'
  import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
  import store from '@/store'
  import { filterObj } from '@/utils/util';
@@ -232,13 +226,14 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
       UserDetailModal,
       JSuperQuery,
       JSelectDepart,
-      JTreeSelect
+      JTreeSelect,
+      JDictSelectTag
     },
     data() {
       return {
         description: '这是用户管理页面',
         queryParam: {
-          employmentStatus:"10",
+          empStatus:"10",
           category:"101"
         },
         recycleBinVisible: false,
@@ -345,7 +340,7 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
             title: '人员类别',
             align: "center",
             width: 100,
-            dataIndex: 'category',
+            dataIndex: 'category_dictText',
             scopedSlots: {customRender: "categorys"},
            
           },
@@ -470,6 +465,17 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
         }
       },
       handleMenuClick(e) {
+        var data=this.selectionRows;
+        var f=false;
+        for(var i=0;i<data.length;i++){
+            if(data[i].employmentStatus!=40){
+              f=true;
+            }
+        }
+        if(f){
+          this.$message.warning('请勾选待入职数据');
+          return;
+        }
         if (e.key == 1) {
           this.batchDel();
         } else if (e.key == 2) {
@@ -501,6 +507,8 @@ import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
         });
       },
       handleExportXls3(fileName){
+        
+      
         if(!fileName || typeof fileName != "string"){
           fileName = "导出文件"
         }

+ 245 - 188
src/views/system/modules/UserDetailModal.vue

@@ -16,35 +16,43 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-image-upload disabled class="avatar-uploader" text="上传" v-model="model.avatar"></j-image-upload>
+             <a-upload disabled  :action="url.fileUpload" list-type="picture-card" :fileList="fileListt" :showUploadList="{
+                         showRemoveIcon: false,
+                         showDownloadIcon: true
+                       }" @download="handleDownload" 
+                       
+                       @preview="handlePreview" >
+                <div v-if="fileListt.length<1">
+                  <a-icon type="plus" />
+                  <div class="ant-upload-text">
+                    上传
+                  </div>
+                </div>
+              </a-upload>
+              <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancelst">
+                <img alt="example" style="width: 100%" :src="previewImage" />
+              </a-modal>
+
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="10" v-decorator="[ 'realname']" />
+              <a-input disabled v-decorator="[ 'realname']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="英文名" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="10" v-decorator="[ 'egName']" />
+              <a-input disabled v-decorator="[ 'egName']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="30" v-decorator="[ 'email']" />
+              <a-input disabled v-decorator="[ 'email']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="人员类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select disabled v-decorator="[ 'category', {initialValue:101}]"
-                :getPopupContainer="(target) => target.parentNode" @change="handleChangeStatus">
-                <a-select-option :value="101">正式工</a-select-option>
-                <a-select-option :value="103">实习生</a-select-option>
-                <a-select-option :value="104">劳务工</a-select-option>
-                <a-select-option :value="105">劳务外包5+2</a-select-option>
-                <a-select-option :value="106">劳务外包6+1</a-select-option>
-                <a-select-option :value="102">顾问</a-select-option>
-              </a-select>
+              <j-dict-select-tag disabled v-decorator="[ 'category']" :triggerChange="true" dictCode="category" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -57,7 +65,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="20" v-decorator="[ 'sfzCode']" />
+              <a-input disabled v-decorator="[ 'sfzCode']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -77,7 +85,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="年龄" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled   v-decorator="['age', {}]" />
+              <a-input disabled v-decorator="['age', {}]" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -103,12 +111,12 @@
 
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="银行卡" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="20" v-decorator="['bankCard']" />
+              <a-input disabled v-decorator="['bankCard']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="30" v-decorator="['bankAddr', {}]" />
+              <a-input disabled v-decorator="['bankAddr', {}]" />
             </a-form-item>
           </a-col>
 
@@ -130,13 +138,12 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="工资" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled 
-                v-decorator="['wagesOne']" />
+              <a-input disabled v-decorator="['wagesOne']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="20" v-decorator="[ 'phone']" />
+              <a-input disabled v-decorator="[ 'phone']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -151,13 +158,12 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="公积金" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled maxLength="20" v-decorator="['syFund']" />
+              <a-input disabled v-decorator="['syFund']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="缴交基数" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input disabled controls="false" 
-                v-decorator="['wagesBase', {}]" />
+              <a-input disabled controls="false" v-decorator="['wagesBase', {}]" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -217,8 +223,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="分摊部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-dict-select-tag disabled v-decorator="['shareDept', {}]" :triggerChange="true" 
-                dictCode="share_dept" />
+              <j-dict-select-tag disabled v-decorator="['shareDept', {}]" :triggerChange="true" dictCode="share_dept" />
             </a-form-item>
           </a-col>
 
@@ -262,20 +267,18 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="雇佣状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select v-decorator="[ 'employmentStatus']" disabled :getPopupContainer="(target) => target.parentNode">
-                <a-select-option :value="10">在职</a-select-option>
-                <a-select-option :value="20">离退</a-select-option>
-                <a-select-option :value="30">离职</a-select-option>
-                <a-select-option :value="40">待入职</a-select-option>
-              </a-select>
+              <j-dict-select-tag disabled v-decorator="[ 'employmentStatus']" dictCode="employmentStatus"
+                :triggerChange="true" />
             </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-button icon="search" @click="uploads()" style="width: 210px;">查看</a-button>
+              <a-badge :count="count" show-zero :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button icon="search" @click="uploads()" style="width: 210px;">查看</a-button>
+              </a-badge>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8" v-if="isQuit">
@@ -298,53 +301,53 @@
                 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-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 v-if="dataSources.length>0" :data-source="dataSources" :columns="columnst" :pagination="false"
-            >
+
+          <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-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 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>
 
     <a-modal title="附件" :visible="visiblet" @ok="saveUpload()" @cancel="handleCancelts()" footer="">
-      <a-upload disabled action="http://58.34.141.138:8085/jeecg-boot/sys/common/upload" list-type="picture"
-        :file-list="fileLists" @change="t" method="post" @download="handleDownload" :showUploadList="{
+      <a-upload disabled :action="url.fileUpload" list-type="picture" :file-list="fileLists" @change="t" method="post"
+        @download="handleDownload" :showUploadList="{
               showRemoveIcon: false,
               showDownloadIcon: true
             }" :remove="handleRemove">
@@ -371,7 +374,8 @@
   import {
     getAction,
     httpAction,
-    deleteAction
+    deleteAction,
+    getFileAccessHttpUrl
   } from '@/api/manage'
   import {
     addUser,
@@ -387,6 +391,24 @@
   } from '@/api/api'
   import JImageUpload from '../../../components/jeecg/JImageUpload'
   import py from '../../../mixins/vue-py.js'
+const uidGenerator=()=>{
+    return '-'+parseInt(Math.random()*10000+1,10);
+  }
+  const getFileName=(path)=>{
+    if(path.lastIndexOf("\\")>=0){
+      let reg=new RegExp("\\\\","g");
+      path = path.replace(reg,"/");
+    }
+    return path.substring(path.lastIndexOf("/")+1);
+  }
+  function getBase64(file) {
+    return new Promise((resolve, reject) => {
+      const reader = new FileReader();
+      reader.readAsDataURL(file);
+      reader.onload = () => resolve(reader.result);
+      reader.onerror = error => reject(error);
+    });
+  }
   export default {
     name: "UserModal",
     components: {
@@ -397,9 +419,12 @@
     data() {
       return {
         selectedRowKeys: [],
-        dataContract:[],
+        fileListt: [],
+        previewVisible: false,
+        previewImage: '',
+        dataContract: [],
         selectionRows: [],
-        dataSources2:[],
+        dataSources2: [],
         departDisabled: false, //是否是我的部门调用该页面
         roleDisabled: false, //是否是角色维护调用该页面
         modalWidth: 800,
@@ -407,6 +432,7 @@
         titles: "新增员工",
         visibles: false,
         personType: false,
+        count: 0,
         dataSources: [],
         modaltoggleFlag: true,
         sfzCode: "",
@@ -424,7 +450,7 @@
         wkDate: new Date,
         wkMoth: 6,
         wkEndDate: null,
-        isQuit:false,
+        isQuit: false,
         moth: 0,
         ipaginations: {
           current: 1,
@@ -530,119 +556,114 @@
         },
         columnst: [{
           title: '奖惩列表',
-              children: [
-          {
-            title: '类型',
-            align: "center",
-            dataIndex: 'type_dictText',
-           
-          }, {
-            title: '备注',
-            dataIndex: 'demo',
-            ellipsis: true,
-          },
-          {
-            title: '日期',
-            align: "center",
-            dataIndex: 'date',
-            customRender: function(t, r, index) {
-              return moment(t).format('YYYY-MM-DD');
-            }
-          },
-          {
+          children: [{
+              title: '类型',
+              align: "center",
+              dataIndex: 'type_dictText',
+
+            }, {
+              title: '备注',
+              dataIndex: 'demo',
+              ellipsis: true,
+            },
+            {
+              title: '日期',
+              align: "center",
+              dataIndex: 'date',
+              customRender: function(t, r, index) {
+                return moment(t).format('YYYY-MM-DD');
+              }
+            },
+            {
               title: '操作员',
               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');
-            }
-          },
-          {
+          ]
+        }],
+        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'
-            }
-           
-          },
-          {
+          ]
+        }],
+        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',
+              dataIndex: 'conmitId_dictText',
             },
-            ]}
-        ],
+          ]
+        }],
         departIdShow: false,
         departIds: [], //负责部门id
         title: "操作",
@@ -678,6 +699,7 @@
         picUrl: "",
         url: {
           fileUpload: window._CONFIG['domianURL'] + "/sys/common/upload",
+          dowfile: window._CONFIG['domianURL'] + "/sys/common/static/",
           userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
           userId: "/sys/user/generateUserId", // 引入生成添加用户情况下的url
           syncUserByUserName: "/act/process/extActProcess/doSyncUserByUserName", //同步用户到工作流
@@ -687,9 +709,9 @@
           delSysFile: '/sysFile/sysFile/deleteById',
           post: '/sys/position/listByDept',
           Prize: '/userPrize/userPrize/list',
-          quitlist:"/userquit/userQuit/lists",
-          changelist:"/userchange/userChage/lists",
-          userCont:"/usercontract/userContract/lists"
+          quitlist: "/userquit/userQuit/lists",
+          changelist: "/userchange/userChage/lists",
+          userCont: "/usercontract/userContract/lists"
         },
         identity: "1",
         fileList: [],
@@ -712,6 +734,36 @@
       }
     },
     methods: {
+      initFileList(paths){
+        if(!paths || paths.length==0){
+          this.fileListt = [];
+          return;
+        }
+        let fileListt = [];
+          let url = getFileAccessHttpUrl(paths);
+          fileListt.push({
+            uid: uidGenerator(),
+            name: getFileName(paths),
+            status: 'done',
+            url: url,
+            response:{
+              status:"history",
+              message:paths
+            }
+          })
+      
+        this.fileListt = fileListt
+      },
+      handleCancelst() {
+        this.previewVisible = false;
+      },
+      async handlePreview(file) {
+        if (!file.url && !file.preview) {
+          file.preview = await getBase64(file.originFileObj);
+        }
+        this.previewImage = file.url || file.preview;
+        this.previewVisible = true;
+      },
       zwOk() {
         if (this.selectionRows != null && this.selectionRows.length > 0) {
           this.zwName = this.selectionRows[0].name;
@@ -750,7 +802,7 @@
           }
         }).finally(() => {});
       },
-      
+
       /* queryUserQuit() {
         getAction(this.url.quitlist, {
           userId: this.userId
@@ -769,7 +821,7 @@
           userId: this.userId
         }).then((res) => {
           if (res.success) {
-           this.dataContract=res.result.records;
+            this.dataContract = res.result.records;
           }
         }).finally(() => {});
       },
@@ -779,12 +831,12 @@
         }).then((res) => {
           if (res.success) {
             this.dataSources2 = res.result.records;
-           
+
           }
         }).finally(() => {});
       },
-      
-      
+
+
       handleRemove(file) {
         if (this.userId != null && this.userId != "") {
           deleteAction(this.url.delSysFile, {
@@ -801,7 +853,7 @@
       },
       // 文件下载
       handleDownload(file) {
-        window.location.href = "http://58.34.141.138:8085/jeecg-boot/sys/common/static/" + file.response.message;
+        window.location.href = this.url.dowfile + file.response.message;
       },
       t(info) {
         // this.files = [];
@@ -874,6 +926,7 @@
         }).then(res => {
           if (res.success) {
             if (res.result.length > 0) {
+              this.count = res.result.length;
               this.fileLists = [];
               for (var i = 0; i < res.result.length; i++) {
                 const rs = {
@@ -884,7 +937,7 @@
                   name: res.result[i].txtName,
                   status: "done",
                   response: rs,
-                  url: "http://58.34.141.138:8085/jeecg-boot/" + res.result[i].txtName,
+                  url: this.url.fileUpload + res.result[i].txtName,
                 };
                 this.fileLists.push(fileInfo)
               }
@@ -952,6 +1005,7 @@
         this.zwName = "";
         this.selectedRowKeys = [];
         this.selectionRows = [];
+        this.count = 0;
       },
       add() {
         this.picUrl = "";
@@ -970,7 +1024,7 @@
         this.egName = record.egName;
         this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
         let that = this;
-
+        this.initFileList(record.avatar);
         //that.initialRoleList();
         that.checkedDepartNameString = "";
         that.form.resetFields();
@@ -985,8 +1039,9 @@
         }
         if (record.entryDate != null) {
           this.moth = this.countMoth(record.entryDate)
-        }if(record.employmentStatus==30||record.employmentStatus=='30'){
-          this.isQuit=true;
+        }
+        if (record.employmentStatus == 30 || record.employmentStatus == '30') {
+          this.isQuit = true;
         }
         that.visible = true;
         that.model = Object.assign({}, record);
@@ -997,9 +1052,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','entryDate', 'trialEndDate', 'workMoth', 'divisionMoth',
+            'nationality', 'trialMoth', 'entryDate', 'trialEndDate', 'workMoth', 'divisionMoth',
             'infoSy', 'syFund', 'category', 'employmentStatus', 'wagesOne', 'wagesTwo', 'security', 'wagesBase',
-            'homeAddr', 'education','endDate','newDate','demo', 'school', 'contractDate', 'contractDate2', 'type', 'contractDate3',
+            'homeAddr', 'education', 'endDate', 'newDate', 'demo', 'school', 'contractDate', 'contractDate2',
+            'type', 'contractDate3',
             'shareDept'))
         });
         //身份为上级显示负责部门,否则不显示
@@ -1107,6 +1163,7 @@
         this.bankAddr = "";
         this.bankCard = "";
         this.syFund = "";
+        this.count = 0;
       },
       moment,
       handleSubmit() {

+ 23 - 28
src/views/system/modules/UserModal.vue

@@ -37,15 +37,10 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="人员类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select v-decorator="[ 'category', {initialValue:101}]" placeholder="请选择人员类别"
-                :getPopupContainer="(target) => target.parentNode" @change="handleChangeStatus">
-                <a-select-option :value="101">正式工</a-select-option>
-                <a-select-option :value="103">实习生</a-select-option>
-                <a-select-option :value="104">劳务工</a-select-option>
-                <a-select-option :value="105">劳务外包5+2</a-select-option>
-                <a-select-option :value="106">劳务外包6+1</a-select-option>
-                <a-select-option :value="102">顾问</a-select-option>
-              </a-select>
+              <j-dict-select-tag v-decorator="[ 'category', {initialValue:101}]" placeholder="请选择人员类别"
+                :triggerChange="true" @change="handleChangeStatus" dictCode="category"/>
+               
+              
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -133,7 +128,7 @@
         <a-row>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="工资" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="6" placeholder="请输入基本工资" v-decorator="['wagesOne',validatorRules.wagesOne]" />
+              <a-input :maxLength="8" placeholder="请输入基本工资" v-decorator="['wagesOne',validatorRules.wagesOne]" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -165,7 +160,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="缴交基数" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :maxLength="3" :disabled="personType" v-model="wagesBase" placeholder="请输入缴交基数"  />
+              <a-input :maxLength="8" :disabled="personType" v-model="wagesBase" placeholder="请输入缴交基数"  />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
@@ -250,27 +245,25 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="上班类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <j-dict-select-tag v-decorator="['type', {initialValue:2}]" :triggerChange="true" placeholder="请选择上班类型"
+              <j-dict-select-tag v-decorator="['type', {initialValue:2,rules: [{ required: true, message: '请选择类型'}]}]" :triggerChange="true" placeholder="请选择上班类型"
                 dictCode="type" />
             </a-form-item>
 
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="雇佣状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select v-decorator="[ 'employmentStatus', {initialValue:40}]" placeholder="请选择雇佣状态"
-                :getPopupContainer="(target) => target.parentNode">
-                <a-select-option :value="10">在职</a-select-option>
-                <a-select-option :value="20">离退</a-select-option>
-                <a-select-option :value="30">离职</a-select-option>
-                <a-select-option :value="40">待入职</a-select-option>
-              </a-select>
+              <j-dict-select-tag v-decorator="[ 'employmentStatus', {initialValue:40,rules: [{ required: true, message: '请选择状态'}]}]" placeholder="请选择人员类别"
+                dictCode="employmentStatus" :triggerChange="true"/>
+              
             </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-button icon="search" @click="uploads()" style="width: 210px;">选择</a-button>
+             <a-badge :count="fileLists.length" show-zero :number-style="{ backgroundColor: '#52c41a' }">
+               <a-button icon="search" @click="uploads()" style="width: 210px;">选择</a-button>
+             </a-badge>
             </a-form-item>
           </a-col>
         </a-row>
@@ -293,10 +286,10 @@
 
       </a-form>
     </a-spin>
-    <depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
+    <depart-windows ref="departWindows" @ok="modalFormOk"></depart-windows>
 
     <a-modal title="附件" :visible="visiblet" @ok="saveUpload()" @cancel="handleCancelts()" footer="">
-      <a-upload action="http://58.34.141.138:8085/jeecg-boot/sys/common/upload" list-type="picture"
+      <a-upload :action="url.fileUpload" list-type="picture"
         :file-list="fileLists" @change="t" method="post" @download="handleDownload" :showUploadList="{
               showRemoveIcon: true,
               showDownloadIcon: true
@@ -324,7 +317,7 @@
   import moment from 'moment'
   import Vue from 'vue'
   // 引入搜索部门弹出框的组件
-  import departWindow from './DepartWindow'
+  import departWindows from './DepartWindows'
   import JSelectPosition from '@/components/jeecgbiz/JSelectPosition'
   import {
     ACCESS_TOKEN
@@ -352,7 +345,7 @@
     name: "UserModal",
     components: {
       JImageUpload,
-      departWindow,
+      departWindows,
       JSelectPosition
     },
     data() {
@@ -384,6 +377,7 @@
         zwName: "",
         zwCode: "",
         urgentPhone:"",
+        count:0,
         sfzType: "0",
         ipaginations: {
           current: 1,
@@ -542,6 +536,7 @@
         picUrl: "",
         url: {
           fileUpload: window._CONFIG['domianURL'] + "/sys/common/upload",
+          dowfile:window._CONFIG['domianURL'] +"/sys/common/static/",
           userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
           userId: "/sys/user/generateUserId", // 引入生成添加用户情况下的url
           syncUserByUserName: "/act/process/extActProcess/doSyncUserByUserName", //同步用户到工作流
@@ -661,7 +656,7 @@
       },
       // 文件下载
       handleDownload(file) {
-        window.location.href = "http://58.34.141.138:8085/jeecg-boot/sys/common/static/" + file.response.message;
+        window.location.href =this.url.dowfile + file.response.message;
       },
       t(info) {
         // this.files = [];
@@ -757,7 +752,7 @@
                   name: res.result[i].txtName,
                   status: "done",
                   response: rs,
-                  url: "http://58.34.141.138:8085/jeecg-boot/" + res.result[i].txtName,
+                  url:this.url.fileUpload + res.result[i].txtName,
                 };
                 this.fileLists.push(fileInfo)
               }
@@ -1313,8 +1308,8 @@
       },
       // 搜索用户对应的部门API
       onSearch() {
-        console.log(this.$refs.departWindow)
-        this.$refs.departWindow.add(this.checkedDepartKeys, this.userId);
+        //console.log(this.$refs.departWindow)
+        this.$refs.departWindows.add(this.checkedDepartKeys, this.userId);
 
       },