|
@@ -122,19 +122,16 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8" :lg="12">
|
|
|
- <a-form-item label="身份类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
- <a-radio-group v-model="identity" @change="identityChange">
|
|
|
- <a-radio value="1">普通员工</a-radio>
|
|
|
- <a-radio value="2">上级</a-radio>
|
|
|
- </a-radio-group>
|
|
|
+ <a-form-item label="缴交基数" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <a-input placeholder="请输入缴交基数" v-decorator="['wagesBase', {}]" />
|
|
|
</a-form-item>
|
|
|
+
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
<a-row>
|
|
|
<a-col :md="6" :sm="8" :lg="12">
|
|
|
<a-form-item label="证件类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
- <a-select v-model="sfzType" placeholder="请选择证件类型"
|
|
|
- :getPopupContainer="(target) => target.parentNode">
|
|
|
+ <a-select v-model="sfzType" placeholder="请选择证件类型">
|
|
|
<a-select-option value="0">中国身份证</a-select-option>
|
|
|
<a-select-option value="1">其他身份证</a-select-option>
|
|
|
</a-select>
|
|
@@ -142,8 +139,11 @@
|
|
|
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8" :lg="12">
|
|
|
- <a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
- <j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]" />
|
|
|
+ <a-form-item label="身份类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <a-radio-group v-model="identity" @change="identityChange">
|
|
|
+ <a-radio value="1">普通员工</a-radio>
|
|
|
+ <a-radio value="2">上级</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -187,6 +187,18 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col :md="6" :sm="8" :lg="12">
|
|
|
+ <a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="8" :lg="12">
|
|
|
+ <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <a-button icon="search" @click="uploads()">选择</a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
<a-row>
|
|
|
<a-col :lg="15">
|
|
|
<a-form-item label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
@@ -194,13 +206,23 @@
|
|
|
:triggerChange="true" dictCode="info_sy" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+
|
|
|
</a-row>
|
|
|
-
|
|
|
</a-form>
|
|
|
</a-spin>
|
|
|
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
|
|
|
|
|
-
|
|
|
+ <a-modal title="附件" :visible="visiblet" @ok="saveUpload()" @cancel="handleCancelts()">
|
|
|
+ <a-upload action="http://localhost:8080/jeecg-boot/sys/common/upload" list-type="picture" :file-list="fileList"
|
|
|
+ @change="t" method="post" @download="handleDownload" :showUploadList="{
|
|
|
+ showRemoveIcon: true,
|
|
|
+ showDownloadIcon: true
|
|
|
+ }">
|
|
|
+ <a-button>
|
|
|
+ <a-icon type="upload" />上传
|
|
|
+ </a-button>
|
|
|
+ </a-upload>
|
|
|
+ </a-modal>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
@@ -215,7 +237,8 @@
|
|
|
ACCESS_TOKEN
|
|
|
} from "@/store/mutation-types"
|
|
|
import {
|
|
|
- getAction
|
|
|
+ getAction,
|
|
|
+ httpAction
|
|
|
} from '@/api/manage'
|
|
|
import {
|
|
|
addUser,
|
|
@@ -250,12 +273,15 @@
|
|
|
bankCard: "",
|
|
|
bankAddr: "",
|
|
|
syFund: "",
|
|
|
+ visiblet: false,
|
|
|
phone: "",
|
|
|
isSalary: "0",
|
|
|
email: "",
|
|
|
isAttendance: "0",
|
|
|
- sfzType:"0",
|
|
|
+ sfzType: "0",
|
|
|
+ fileList: [],
|
|
|
confirmDirty: false,
|
|
|
+ files: [],
|
|
|
selectedDepartKeys: [], //保存用户选择部门id
|
|
|
checkedDepartKeys: [],
|
|
|
checkedDepartNames: [], // 保存部门的名称 =>title
|
|
@@ -357,7 +383,9 @@
|
|
|
userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
|
|
|
userId: "/sys/user/generateUserId", // 引入生成添加用户情况下的url
|
|
|
syncUserByUserName: "/act/process/extActProcess/doSyncUserByUserName", //同步用户到工作流
|
|
|
- queryTenantList: '/sys/tenant/queryList'
|
|
|
+ queryTenantList: '/sys/tenant/queryList',
|
|
|
+ xzupload: '/sys/common/static',
|
|
|
+ sysFile: '/sysFile/sysFile/queryByUserId'
|
|
|
},
|
|
|
identity: "1",
|
|
|
fileList: [],
|
|
@@ -373,13 +401,48 @@
|
|
|
this.initTenantList()
|
|
|
|
|
|
},
|
|
|
+
|
|
|
computed: {
|
|
|
uploadAction: function() {
|
|
|
return this.url.fileUpload;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ handleCancelts() {
|
|
|
+ this.fileList = [];
|
|
|
+ this.visiblet = false;
|
|
|
+ },
|
|
|
+ // 文件下载
|
|
|
+ handleDownload(file) {
|
|
|
+ console.log(file.response.message)
|
|
|
+ window.location.href = "http://localhost:8080/jeecg-boot/sys/common/static/" + file.response.message;
|
|
|
+ },
|
|
|
+ t(info) {
|
|
|
+ // this.files = [];
|
|
|
+ // let {
|
|
|
+ // fileList
|
|
|
+ // } = info
|
|
|
+ // const status = info.file.status
|
|
|
+ // if (status !== 'uploading') {}
|
|
|
+ // if (status === 'done') {
|
|
|
+ // var list = fileList.fileList;
|
|
|
+ // for (var i = 0; i < list.length; i++) {
|
|
|
+ // this.files.push(list[i].response.message);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ this.fileList = info.fileList //重点
|
|
|
+ //console.log(info)
|
|
|
+ },
|
|
|
+ saveUpload() {
|
|
|
+ this.visiblet = false;
|
|
|
+ console.log(this.defaultFileList)
|
|
|
+ },
|
|
|
+ uploads() {
|
|
|
+ this.visiblet = true;
|
|
|
+ if (this.userId != null && this.userId != "") {
|
|
|
+ this.queryFiles(this.userId)
|
|
|
+ }
|
|
|
+ },
|
|
|
isDisabledAuth(code) {
|
|
|
return disabledAuthFilter(code);
|
|
|
},
|
|
@@ -412,6 +475,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
+ queryFiles(e) {
|
|
|
+ getAction(this.url.sysFile, {
|
|
|
+ userid: e
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ if (res.result.length > 0) {
|
|
|
+ this.fileList = [];
|
|
|
+ for (var i = 0; i < res.result.length; i++) {
|
|
|
+ const rs = {
|
|
|
+ message: res.result[i].txtName
|
|
|
+ };
|
|
|
+ const fileInfo = {
|
|
|
+ uid: res.result[i].id,
|
|
|
+ name: res.result[i].txtName,
|
|
|
+ status: "done",
|
|
|
+ response: rs,
|
|
|
+ url: "http://localhost:8080/jeecg-boot/" + res.result[i].txtName,
|
|
|
+ };
|
|
|
+ this.fileList.push(fileInfo)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log("==========" + this.fileList)
|
|
|
},
|
|
|
initTenantList() {
|
|
|
getAction(this.url.queryTenantList).then(res => {
|
|
@@ -479,11 +568,11 @@
|
|
|
});
|
|
|
},
|
|
|
edit(record) {
|
|
|
- if (record.id != null && record.id != "") {
|
|
|
- this.titles = "编辑员工";
|
|
|
- }
|
|
|
+ this.realname = record.realname;
|
|
|
+ this.egName = record.egName;
|
|
|
this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
|
|
let that = this;
|
|
|
+
|
|
|
//that.initialRoleList();
|
|
|
that.checkedDepartNameString = "";
|
|
|
that.form.resetFields();
|
|
@@ -493,14 +582,15 @@
|
|
|
this.fileList = record.avatar;
|
|
|
}, 5)
|
|
|
}
|
|
|
- this.sfzType=record.sfzType;
|
|
|
- that.userId = record.id;
|
|
|
+ if (record.sfzType != null && record.sfzType != "") {
|
|
|
+ this.sfzType = record.sfzType;
|
|
|
+ }
|
|
|
that.visible = true;
|
|
|
that.model = Object.assign({}, record);
|
|
|
that.$nextTick(() => {
|
|
|
that.form.setFieldsValue(pick(this.model, 'sex', 'email', 'phone', 'post', 'urgentName', 'urgentPhone',
|
|
|
'bankAddr', 'bankCard', 'realname', 'egName', 'sfzCode',
|
|
|
- 'infoSy', 'syFund', 'category', 'employmentStatus','wagesOne','wagesTwo','security'))
|
|
|
+ 'infoSy', 'syFund', 'category', 'employmentStatus', 'wagesOne', 'wagesTwo', 'security','wagesBase'))
|
|
|
});
|
|
|
//身份为上级显示负责部门,否则不显示
|
|
|
if (this.model.userIdentity == "2") {
|
|
@@ -510,10 +600,7 @@
|
|
|
this.identity = "1";
|
|
|
this.departIdShow = false;
|
|
|
}
|
|
|
- // 调用查询用户对应的部门信息的方法
|
|
|
- that.checkedDepartKeys = [];
|
|
|
- that.loadCheckedDeparts();
|
|
|
-
|
|
|
+
|
|
|
//update-begin-author:taoyan date:2020710 for:多租户配置
|
|
|
if (!record.relTenantIds || record.relTenantIds.length == 0) {
|
|
|
this.currentTenant = []
|
|
@@ -521,10 +608,18 @@
|
|
|
this.currentTenant = record.relTenantIds.split(',').map(Number);
|
|
|
}
|
|
|
|
|
|
- //update-end-author:taoyan date:2020710 for:多租户配置
|
|
|
+ if (record.id != null && record.id != "") {
|
|
|
+ this.userId = record.id;
|
|
|
+ this.queryFiles(record.id)
|
|
|
+ }
|
|
|
+
|
|
|
+ // 调用查询用户对应的部门信息的方法
|
|
|
+ that.checkedDepartKeys = [];
|
|
|
+ that.loadCheckedDeparts();
|
|
|
},
|
|
|
//
|
|
|
loadCheckedDeparts() {
|
|
|
+ var id= this.userId
|
|
|
let that = this;
|
|
|
if (!that.userId) {
|
|
|
return
|
|
@@ -599,12 +694,21 @@
|
|
|
values.birthday = values.birthday;
|
|
|
}
|
|
|
let formData = Object.assign(this.model, values);
|
|
|
- if (that.fileList != '') {
|
|
|
- formData.avatar = that.fileList;
|
|
|
- } else {
|
|
|
- formData.avatar = null;
|
|
|
+ // if (that.fileList != '') {
|
|
|
+ // formData.avatar = that.fileList;
|
|
|
+ // } else {
|
|
|
+ // formData.avatar = null;
|
|
|
+ // }
|
|
|
+ formData.sfzType = this.sfzType;
|
|
|
+ var a = this.fileList;
|
|
|
+ var txt = [];
|
|
|
+ if (this.fileList != null && this.fileList.length > 0) {
|
|
|
+ for (var i = 0; i < this.fileList.length; i++) {
|
|
|
+ txt.push(this.fileList[i].response.message)
|
|
|
+ }
|
|
|
+ formData.txt = txt.join(",");
|
|
|
}
|
|
|
- formData.sfzType=this.sfzType;
|
|
|
+
|
|
|
//formData.selectedroles = this.selectedRole.length>0?this.selectedRole.join(","):'';
|
|
|
formData.selecteddeparts = this.userDepartModel.departIdList.length > 0 ? this.userDepartModel
|
|
|
.departIdList.join(",") : '';
|
|
@@ -669,7 +773,7 @@
|
|
|
if (!value) {
|
|
|
callback()
|
|
|
} else {
|
|
|
- if(this.sfzType=="0"){
|
|
|
+ if (this.sfzType == "0") {
|
|
|
this.getBirth(value)
|
|
|
}
|
|
|
callback()
|
|
@@ -690,7 +794,7 @@
|
|
|
callback()
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
validatePhone(rule, value, callback) {
|
|
|
if (!value) {
|
|
|
callback()
|