+
@@ -830,12 +471,7 @@
-
+
@@ -843,24 +479,12 @@
-
+
-
-
+
+
@@ -869,12 +493,7 @@
-
+
@@ -882,20 +501,13 @@
-
+
-
@@ -951,7 +563,6 @@ export default {
orgSid: '',
orgName_list: [], // 所在部门
dataArr: [],
- refreshItem: 0, // 级联列表key值
options: [], // 级联列表选项
props: {
// props传值
@@ -960,15 +571,13 @@ export default {
children: 'children'
},
// 上传图片
- photo_list: [],
+ // photo_list: [],
idCardA_list: [],
idCardB_list: [],
diploma_list: [],
degree_list: [],
leave_list: [],
sid: '', // 一条数据的sid
- sysStaffOrgDto: {}, // 编辑回显所用
- sysStaffPostDto: {},
temp: {
provinceCode: '',
postName: '',
@@ -976,44 +585,20 @@ export default {
countyCode: '',
genderKey: '', // 性别code
nativePlace: '', // 籍贯
- sysStaffOrgDto: {
+ sysStaffOrg: {
orgName: '',
orgSid: ''
- }, // 部门信息
- sysStaffPostDto: {} // 岗位信息
+ },
+ sysStaffPost: {} // 岗位信息
},
rules: {
- // jobNumber: [{required: true, message: '单据类型不能为空', trigger: 'change'}],
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }],
- gender: [
- { required: true, message: '性别不能为空', trigger: 'change' }
- ],
- idNo: [
- {
- required: true,
- message: '身份证号不能为空',
- validator: identitycard,
- trigger: 'change'
- }
- ],
- idTerm: [
- { required: true, message: '证件有效期不能为空', trigger: 'change' }
- ],
- national: [
- { required: true, message: '民族不能为空', trigger: 'change' }
- ],
- mobile: [
- {
- required: true,
- message: '手机号不能为空',
- validator: checkSubmit,
- trigger: 'change'
- }
- ],
- personType: [
- { required: true, message: '员工类型不能为空', trigger: 'change' }
- ]
- // joinCompnyDate: [{required: true, message: '入职时间不能为空', trigger: 'change'}],
+ gender: [{ required: true, message: '性别不能为空', trigger: 'change' }],
+ idNo: [{ required: true, message: '身份证号不能为空', trigger: 'change' }],
+ idTerm: [{ required: true, message: '证件有效期不能为空', trigger: 'change' }],
+ national: [{ required: true, message: '民族不能为空', trigger: 'change' }],
+ mobile: [{ required: true, message: '手机号不能为空', validator: checkSubmit, trigger: 'change' }],
+ personType: [{ required: true, message: '员工类型不能为空', trigger: 'change' }]
},
submitdisabled: false
}
@@ -1076,13 +661,7 @@ export default {
})
this.temp.city = bb.name
this.temp.cityCode = bb.districtCode
- // this.deCode.push(bb.districtCode)
this.huoquXian(bb.sid)
- // this.temp.orgmoneVakue.push(bb)
- // let aa = ''
- // this.temp.orgmoneVakue.forEach((e)=>{
- // aa = aa +e.districtCode
- // })
},
huoquXian(sid1) {
var sid = {
@@ -1107,8 +686,7 @@ export default {
}
})
this.temp.county = bb.name
- this.temp.countyCode = bb.districtCode
- // this.deCode.push(bb.districtCode)
+ this.temp.countyCode = bb.districtCodes
console.log('6666677777777', this.deCode)
},
// 级联列表 部门
@@ -1123,12 +701,14 @@ export default {
},
BuMen0(data) {
data.forEach((e) => {
- if (e.children.length !== 0) {
- this.BuMen0(e.children)
- } else {
- delete e.children
- this.dataArr.push(e)
- return
+ if (e.children) {
+ if (e.children.length !== 0) {
+ this.BuMen0(e.children)
+ } else {
+ delete e.children
+ this.dataArr.push(e)
+ return
+ }
}
})
},
@@ -1162,7 +742,7 @@ export default {
result = result.substring(0, result.length - 1)
}
if (namePath !== '') {
- namePath = namePath.substring(0, result.length - 1)
+ namePath = namePath.substring(0, namePath.length - 1)
}
if (result_Sid !== '') {
result_Sid = result_Sid.substring(0, result_Sid.length - 1)
@@ -1173,147 +753,100 @@ export default {
const orgNameArray = result.split(',')
const orgName = orgNameArray[orgNameArray.length - 1]
- this.temp.sysStaffOrgDto.orgName = orgName
- this.temp.sysStaffOrgDto.orgSid = orgSid
- this.temp.sysStaffOrgDto.orgSidPath = sidPath
- this.temp.sysStaffOrgDto.orgNamePath = namePath
- this.temp.sysStaffOrgDto.orgCode = result_code
- console.log(
- '选中名称:' + orgName,
- orgSid,
- sidPath,
- namePath,
- result_code
- )
+ this.temp.sysStaffOrg.orgName = orgName
+ this.temp.sysStaffOrg.orgSid = orgSid
+ this.temp.sysStaffOrg.orgSidPath = sidPath
+ this.temp.sysStaffOrg.orgNamePath = namePath
+ this.temp.sysStaffOrg.orgCode = result_code
},
-
// --- 循环查询
findOrgId(id, options) {
- console.log('这是部门id', id)
- for (var i = 0; i < options.length; i++) {
- if (id === options[i].sid) {
- this.select_temp_Name = options[i].name // 保存找到的内容
- this.select_temp_Sid = options[i].sid
- this.select_temp_NamePath = options[i].name
- this.select_temp_SidPath = options[i].orgSidPath
- this.select_temp_code = options[i].orgCode
- return true
- } else {
- // 判断是否最后一级
- if (options[i].children !== undefined) {
- // 不是的话查询下一级
- if (this.findOrgId(id, options[i].children)) {
- return true
+ if (options.length > 0) {
+ for (var i = 0; i < options.length; i++) {
+ if (id === options[i].sid) {
+ this.select_temp_Name = options[i].name // 保存找到的内容
+ this.select_temp_Sid = options[i].sid
+ this.select_temp_NamePath = options[i].name
+ this.select_temp_SidPath = options[i].orgSidPath
+ this.select_temp_code = options[i].orgCode
+ return true
+ } else {
+ // 判断是否最后一级
+ if (options[i].children !== undefined && options[i].children !== null) {
+ // 不是的话查询下一级
+ if (this.findOrgId(id, options[i].children)) {
+ return true
+ }
}
}
}
}
+
},
// -------------------------数据字典下拉框-------------------------
getType() {
- req
- .pullDown({
- type: 'national'
- })
- .then((res) => {
- if (res.code === '200') {
- this.national_list = res.data
- console.log('下拉框请求民族', res.data)
- }
- })
-
- req
- .pullDown({
- type: 'maritalstatus'
- })
- .then((res) => {
- if (res.code === '200') {
- this.maritalstatus_list = res.data
- console.log('下拉框请求婚姻', res.data)
- }
- })
-
- req
- .pullDown({
- type: 'political'
- })
- .then((res) => {
- if (res.code === '200') {
- this.political_list = res.data
- console.log('下拉框请求政治', res.data)
- }
- })
-
- req
- .pullDown({
- type: 'personType'
- })
- .then((res) => {
- if (res.code === '200') {
- this.personType_list = res.data
- console.log('下拉框员工类型', res.data)
- }
- })
-
- req
- .pullDown({
- type: 'probPeriod'
- })
- .then((res) => {
- if (res.code === '200') {
- this.probPeriod_list = res.data
- console.log('下拉框试用期', res.data)
- }
- })
-
- req
- .pullDown({
- type: 'sex'
- })
- .then((res) => {
- if (res.code === '200') {
- this.gender_list = res.data
- console.log('下拉框性别', res.data)
- }
- })
-
+ req.pullDown({ type: 'national' }).then((res) => {
+ if (res.code === '200') {
+ this.national_list = res.data
+ console.log('下拉框请求民族', res.data)
+ }
+ })
+ req.pullDown({ type: 'maritalstatus' }).then((res) => {
+ if (res.code === '200') {
+ this.maritalstatus_list = res.data
+ console.log('下拉框请求婚姻', res.data)
+ }
+ })
+ req.pullDown({ type: 'political' }).then((res) => {
+ if (res.code === '200') {
+ this.political_list = res.data
+ console.log('下拉框请求政治', res.data)
+ }
+ })
+ req.pullDown({ type: 'personType' }).then((res) => {
+ if (res.code === '200') {
+ this.personType_list = res.data
+ console.log('下拉框员工类型', res.data)
+ }
+ })
+ req.pullDown({ type: 'probPeriod' }).then((res) => {
+ if (res.code === '200') {
+ this.probPeriod_list = res.data
+ console.log('下拉框试用期', res.data)
+ }
+ })
+ req.pullDown({ type: 'sex' }).then((res) => {
+ if (res.code === '200') {
+ this.gender_list = res.data
+ console.log('下拉框性别', res.data)
+ }
+ })
req.postName().then((res) => {
if (res.code === '200') {
this.postSid_list = res.data
console.log('下拉框请求岗位', res.data)
}
})
-
- req
- .pullDown({
- type: 'educationdegree'
- })
- .then((res) => {
- if (res.code === '200') {
- this.educate_list = res.data
- console.log('下拉框请求学历', res.data)
- }
- })
-
- req
- .pullDown({
- type: 'carType'
- })
- .then((res) => {
- if (res.code === '200') {
- this.licenseType_list = res.data
- console.log('下拉框请求驾照', res.data)
- }
- })
+ req.pullDown({ type: 'educationdegree' }).then((res) => {
+ if (res.code === '200') {
+ this.educate_list = res.data
+ console.log('下拉框请求学历', res.data)
+ }
+ })
+ req.pullDown({ type: 'carType' }).then((res) => {
+ if (res.code === '200') {
+ this.licenseType_list = res.data
+ console.log('下拉框请求驾照', res.data)
+ }
+ })
},
getNational(value) {
console.log('触发下拉框按钮')
- let bb = {}
+ let bb = null
this.national_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1324,16 +857,14 @@ export default {
})
this.temp.national = bb.name
this.temp.nationalKey = bb.key
- // this.formobj.scmOtherInboundDto.billType = bb.sid
console.log('name', this.temp.national)
},
getMari(value) {
console.log('触发下拉框按钮')
- let bb = {}
+ let bb = null
this.maritalstatus_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1344,16 +875,14 @@ export default {
})
this.temp.maritalStatus = bb.name
this.temp.maritalStatusKey = bb.key
- // this.formobj.scmOtherInboundDto.billType = bb.sid
console.log('name', this.temp.maritalStatus)
},
getPoliCode(value) {
console.log('触发下拉框按钮')
- let bb = {}
+ let bb = null
this.political_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1362,17 +891,16 @@ export default {
}
}
})
- this.temp.political = bb.name
+ this.temp.poliCode = bb.name
this.temp.poliCodeKey = bb.key
console.log('name', this.temp.political)
},
getPersonType(value) {
console.log('触发下拉框按钮')
- let bb = {}
+ let bb = null
this.personType_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1393,10 +921,9 @@ export default {
getProbPeriod(value) {
console.log('触发下拉框按钮')
- let bb = {}
+ let bb = null
this.probPeriod_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1412,10 +939,9 @@ export default {
getPostSid(value) {
console.log('触发下拉框按钮', value)
- let bb = {}
+ let bb = null
this.postSid_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.postCode == value) {
+ if (e.postCode === value) {
bb = {
name: e.name,
key: e.postCode,
@@ -1423,19 +949,17 @@ export default {
}
}
})
- this.temp.sysStaffPostDto.postSid = bb.sid
+ this.temp.sysStaffPost.postSid = bb.sid
this.temp.postName = bb.name
- this.temp.sysStaffPostDto.postCode = bb.key
- // this.formobj.scmOtherInboundDto.billType = bb.sid
- console.log('name', this.temp.sysStaffPostDto.postSid)
+ this.temp.sysStaffPost.postCode = bb.key
+ console.log('name', this.temp.sysStaffPost.postSid)
},
getEducate(value) {
console.log('触发下拉框按钮', value)
- let bb = {}
+ let bb = null
this.educate_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1446,15 +970,14 @@ export default {
})
this.temp.education = bb.name
this.temp.educationKey = bb.key
- console.log('name', this.temp.sysStaffPostDto.postSid)
+ console.log('name', this.temp.sysStaffPost.postSid)
},
getLicenseType(value) {
console.log('触发下拉框按钮', value)
- let bb = {}
+ let bb = null
this.licenseType_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
+ if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1472,8 +995,7 @@ export default {
console.log('触发下拉框按钮')
let bb = {}
this.gender_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictValue == this.temp.gender) {
+ if (e.dictValue === this.temp.gender) {
bb = {
type: e.dictType,
name: e.dictValue,
@@ -1485,47 +1007,56 @@ export default {
if (this.temp.gender === bb.name) {
this.temp.genderKey = bb.key
}
- // this.temp.probPeriod = bb.name
- // this.temp.probPeriodKey = bb.key
- // console.log('name', this.temp.probPeriod)
},
-
+ photoPath(val) {
+ this.temp.photo = val
+ },
// 上传附件
getUrl() {
// 员工照片
- this.temp.photo = this.photo_list[this.photo_list.length - 1].url
+ // if (this.photo_list.length > 0) {
+ // this.temp.photo = this.photo_list[this.photo_list.length - 1].url
+ // }
// for (var i = 0; i < this.photo_list.length; i++) {
// this.temp.photo = this.photo_list[i].url;
// console.log("图片信息", this.temp.photo);
// }
// 身份证(人像面)
- this.temp.idCardA = this.idCardA_list[this.idCardA_list.length - 1].url
+ if (this.idCardA_list.length > 0) {
+ this.temp.idCardA = this.idCardA_list[this.idCardA_list.length - 1].url
+ }
// for (var i = 0; i < this.idCardA_list.length; i++) {
// this.temp.idCardA = this.idCardA_list[i].url;
// console.log("图片信息", this.temp.idCardA);
// }
// 身份证(国徽面)
- this.temp.idCardB = this.idCardB_list[this.idCardB_list.length - 1].url
+ if (this.idCardB_list.length > 0) {
+ this.temp.idCardB = this.idCardB_list[this.idCardB_list.length - 1].url
+ }
// for (var i = 0; i < this.idCardB_list.length; i++) {
// this.temp.idCardB = this.idCardB_list[i].url;
// console.log("图片信息", this.temp.idCardB);
// }
// 学历证书
- this.temp.diploma = this.diploma_list[this.diploma_list.length - 1].url
+ if (this.diploma_list.length > 0) {
+ this.temp.diploma = this.diploma_list[this.diploma_list.length - 1].url
+ }
// for (var i = 0; i < this.diploma_list.length; i++) {
// this.temp.diploma = this.diploma_list[i].url;
// console.log("图片信息", this.temp.diploma);
// }
// 学位证书
- this.temp.degreeCertificate =
- this.degree_list[this.degree_list.length - 1].url
+ if (this.degree_list.length > 0) {
+ this.temp.degreeCertificate = this.degree_list[this.degree_list.length - 1].url
+ }
// for (var i = 0; i < this.degree_list.length; i++) {
// this.temp.degreeCertificate = this.degree_list[i].url;
// console.log("图片信息", this.temp.degreeCertificate);
// }
// 前公司离职证明 leaveCertificate
- this.temp.leaveCertificate =
- this.leave_list[this.leave_list.length - 1].url
+ if (this.leave_list.length > 0) {
+ this.temp.leaveCertificate = this.leave_list[this.leave_list.length - 1].url
+ }
// for (var i = 0; i < this.leave_list.length; i++) {
// this.temp.leaveCertificate = this.leave_list[i].url;
// console.log("图片信息", this.temp.leaveCertificate);
@@ -1536,19 +1067,20 @@ export default {
// 返回(===既判断又赋值)
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
- this.photo_list = []
+ // this.photo_list = []
this.idCardA_list = []
this.idCardB_list = []
this.diploma_list = []
this.degree_list = []
this.leave_list = []
this.temp = {
- sysStaffOrgDto: {}, // 部门信息
- sysStaffPostDto: {} // 岗位信息
+ sysStaffOrg: {}, // 部门信息
+ sysStaffPost: {} // 岗位信息
}
+ this.orgName_list = []
+ // this.$refs['clearableCascader'].checkedValue = ''
this.$refs['dataForm'].resetFields()
this.$emit('doback')
- this.refreshItem++
},
showAdd() {
@@ -1556,7 +1088,7 @@ export default {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'add'
- this.viewTitle = '员工信息登记'
+ this.viewTitle = '【新增】员工信息'
},
showEdit(sid, row) {
@@ -1564,127 +1096,105 @@ export default {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'edit'
- this.viewTitle = '【编辑】其他入库单'
+ this.viewTitle = '【编辑】员工信息'
console.log('编辑页面sid', sid)
- req
- .fetchBySid(sid)
- .then((resp) => {
- const data = resp.data
- this.sid = sid
- this.temp = data
- this.orgName_list = data.sysStaffOrgDetailsVo.orgSid
- // ---修改名称---
- this.temp = JSON.parse(
- JSON.stringify(this.temp).replace(
- /sysStaffOrgDetailsVo/g,
- 'sysStaffOrgDto'
- )
- )
- this.temp = JSON.parse(
- JSON.stringify(this.temp).replace(
- /sysStaffPostDetailsVo/g,
- 'sysStaffPostDto'
- )
- )
- // ---修改名称---
- // this.sysStaffOrgDto =data.sysStaffOrgDetailsVo
- // this.sysStaffPostDto = data.sysStaffPostDetailsVo
- // this.temp.sysStaffOrgDetailsVo = this.sysStaffOrgDto
- // this.temp.sysStaffPostDetailsVo = this.sysStaffPostDto
- // console.log('1111111',this.sysStaffOrgDto,this.sysStaffPostDto)
- console.log('888999', this.temp)
- let bb = {}
- this.postSid_list.forEach((e) => {
- if (e.sid === data.sysStaffPostDetailsVo.postSid) {
- bb = {
- name: e.name,
- key: e.postCode,
- sid: e.sid
- }
+ req.fetchBySid(sid).then((resp) => {
+ const data = resp.data
+ this.sid = sid
+ this.temp = data
+ if (this.temp.personType === '全职') {
+ this.isQuit = false
+ } else {
+ this.isQuit = true
+ }
+ this.orgName_list = data.sysStaffOrg.orgSid
+ let bb = {}
+ this.postSid_list.forEach((e) => {
+ if (e.sid === data.sysStaffPost.postSid) {
+ bb = {
+ name: e.name,
+ key: e.postCode,
+ sid: e.sid
}
- })
- this.temp.postName = bb.name
- if (this.temp.photo !== '') {
- const imgName = this.temp.photo.split('/')
- this.photo_list.push({
- name: imgName[imgName.length - 1],
- url: this.temp.photo
- })
- }
- if (this.temp.idCardA !== '') {
- const imgName = this.temp.idCardA.split('/')
- this.idCardA_list.push({
- name: imgName[imgName.length - 1],
- url: this.temp.idCardA
- })
- }
- if (this.temp.idCardB !== '') {
- const imgName = this.temp.idCardB.split('/')
- this.idCardB_list.push({
- name: imgName[imgName.length - 1],
- url: this.temp.idCardB
- })
- }
- if (this.temp.diploma !== '') {
- const imgName = this.temp.diploma.split('/')
- this.diploma_list.push({
- name: imgName[imgName.length - 1],
- url: this.temp.diploma
- })
- }
- if (this.temp.degreeCertificate !== '') {
- const imgName = this.temp.degreeCertificate.split('/')
- this.degree_list.push({
- name: imgName[imgName.length - 1],
- url: this.temp.degreeCertificate
- })
- }
- if (this.temp.leaveCertificate !== '') {
- const imgName = this.temp.leaveCertificate.split('/')
- this.leave_list.push({
- name: imgName[imgName.length - 1],
- url: this.temp.leaveCertificate
- })
}
})
- .catch((e) => {
- this.temp = row
- })
+ this.temp.postName = bb.name
+ // if (this.temp.photo !== '') {
+ // const imgName = this.temp.photo.split('/')
+ // this.photo_list.push({
+ // name: imgName[imgName.length - 1],
+ // url: this.temp.photo
+ // })
+ // }
+ if (this.temp.idCardA !== '') {
+ const imgName = this.temp.idCardA.split('/')
+ this.idCardA_list.push({
+ name: imgName[imgName.length - 1],
+ url: this.temp.idCardA
+ })
+ }
+ if (this.temp.idCardB !== '') {
+ const imgName = this.temp.idCardB.split('/')
+ this.idCardB_list.push({
+ name: imgName[imgName.length - 1],
+ url: this.temp.idCardB
+ })
+ }
+ if (this.temp.diploma !== '') {
+ const imgName = this.temp.diploma.split('/')
+ this.diploma_list.push({
+ name: imgName[imgName.length - 1],
+ url: this.temp.diploma
+ })
+ }
+ if (this.temp.degreeCertificate !== '') {
+ const imgName = this.temp.degreeCertificate.split('/')
+ this.degree_list.push({
+ name: imgName[imgName.length - 1],
+ url: this.temp.degreeCertificate
+ })
+ }
+ if (this.temp.leaveCertificate !== '') {
+ const imgName = this.temp.leaveCertificate.split('/')
+ this.leave_list.push({
+ name: imgName[imgName.length - 1],
+ url: this.temp.leaveCertificate
+ })
+ }
+ }).catch((e) => {
+ this.temp = row
+ })
},
saveAdd() {
const _this = this
+ this.getUrl()
this.$refs['dataForm'].validate((valid) => {
this.getGenderKey()
this.getUrl()
if (valid) {
this.submitdisabled = true
- req
- .saveAdd(this.temp)
- .then((resp) => {
- this.submitdisabled = false
- console.log(resp)
- if (resp.success) {
- _this.$message({
- showClose: true,
- type: 'success',
- message: resp.msg
- })
- _this.handleReturn('true')
- // _this.handleReturn("true");
- console.log('保存成功')
- } else {
- _this.$message({
- showClose: true,
- type: 'success',
- message: resp.msg
- })
- // resp.code
- }
- })
- .catch(() => {
- this.submitdisabled = false
- })
+ req.saveAdd(this.temp).then((resp) => {
+ this.submitdisabled = false
+ console.log(resp)
+ if (resp.success) {
+ _this.$message({
+ showClose: true,
+ type: 'success',
+ message: resp.msg
+ })
+ _this.handleReturn('true')
+ console.log('保存成功')
+ } else {
+ _this.$message({
+ showClose: true,
+ type: 'success',
+ message: resp.msg
+ })
+ }
+ }).catch(() => {
+ this.submitdisabled = false
+ })
} else {
return false
}
@@ -1693,40 +1203,20 @@ export default {
saveEdit() {
const _this = this
- // Start
- // var orgName_Sid = "";
- // if (this.orgName_list.length > 0) {
- // console.log('114477885522',this.orgName_list)
- // this.orgName_list.forEach((item) => {
- // var last_id = item[item.length - 1];
- // this.select_temp_Sid = ""; //临时遍历,用来保存选中结果(组织Sid)
- // this.findOrgId(last_id, this.options);
- // orgName_Sid = orgName_Sid + this.select_temp_Sid + ",";
- // });
- // }
- // if (orgName_Sid !== "") {
- // orgName_Sid = orgName_Sid.substring(0, orgName_Sid.length - 1);
- // }
- // this.temp.sysStaffOrgDto.orgSid = orgName_Sid;
- // console.log("重新赋值后的组织结构", this.temp.sysStaffOrgDto.orgSid);
- // End
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.submitdisabled = true
- req
- .saveEdit(this.temp, this.sid)
- .then((resp) => {
- this.submitdisabled = false
- _this.$message({
- showClose: true,
- type: 'success',
- message: resp.msg
- })
- _this.handleReturn('true')
- })
- .catch(() => {
- this.submitdisabled = false
+ req.saveEdit(this.temp, this.sid).then((resp) => {
+ this.submitdisabled = false
+ _this.$message({
+ showClose: true,
+ type: 'success',
+ message: resp.msg
})
+ _this.handleReturn('true')
+ }).catch(() => {
+ this.submitdisabled = false
+ })
} else {
return false
}
@@ -1740,7 +1230,9 @@ export default {
/deep/ .el-main {
padding: 0;
}
-
+.formadd {
+ margin: 0 15%;
+}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
diff --git a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue
index 1dba3b3c21..294810e6cc 100644
--- a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue
+++ b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongInfo.vue
@@ -1,283 +1,253 @@
-
-
-
-
-
-
+
+
-
+
工号
-
+
{{ temp.jobNumber }}
-
+
姓名
-
+
{{ temp.name }}
-
+
性别
-
+
{{ temp.gender }}
-
+
身份证
-
+
{{ temp.idNo }}
-
-
-
- 证件有效期
-
-
-
-
- {{ temp.idTerm }}
-
-
-
-
-
-
- 出生年月日
-
-
-
-
- {{ temp.birthday }}
-
-
-
-
-
-
- 民族
-
-
-
-
- {{ temp.national }}
-
-
-
-
-
+
+
-
- 籍贯
+
+ 证件有效期
-
+
+ {{ temp.idTerm }}
+
+
+
+
+
+
+ 出生年月日
+
+
+
+
+ {{ temp.birthday }}
+
+
+
+
+
+
+ 民族
+
+
+
+
+ {{ temp.national }}
+
+
+
+
+
+
+ 籍贯
+
+
+
+
{{ temp.province + temp.city + temp.county }}
-
+
住址
-
+
{{ temp.address }}
-
+
手机号码
-
+
{{ temp.mobile }}
-
+
邮箱
-
+
{{ temp.email }}
-
+
紧急联系人
-
+
{{ temp.emergencyContact }}
-
+
紧急联系电话
-
+
{{ temp.emergencyMobile }}
-
+
政治面貌
-
+
{{ temp.poliCode }}
-
+
婚姻状况
-
+
{{ temp.maritalStatus }}
-
+
-
+
员工类型
-
+
{{ temp.personType }}
-
+
入职时间
-
+
{{ temp.joinCompnyDate }}
-
+
试用期
-
+
{{ temp.probPeriod }}
-
+
计划转正日期
-
+
{{ temp.plannedConfirmDate }}
-
+
实际转正日期
-
+
{{ temp.confirmationDate }}
@@ -285,44 +255,44 @@
-
+
所在部门
-
- {{ temp.sysStaffOrgDetailsVo.orgName }}
+
+ {{ temp.sysStaffOrg.orgName }}
-
+
岗位
-
- {{ temp.sysStaffPostDetailsVo.postSid }}
+
+ {{ temp.sysStaffPost.name }}
-
+
银行账号
-
+
{{ temp.bankCardNo }}
-
+
开户行
-
+
{{ temp.openBank }}
@@ -330,337 +300,318 @@
-
-
+
身份证(人像面)
-
-
+
+
-
-
+
身份证(国徽面)
-
-
+
+
-
-
+
前公司离职证明
-
-
+
+
-
+
-
+
毕业院校
-
+
{{ temp.graduate }}
-
-
+
学历/专业
-
+
{{ temp.education }}
-
+
职称
-
+
{{ temp.title }}
-
+
资格认证
-
+
{{ temp.qualification }}
-
+
驾照类型
-
+
{{ temp.licenseType }}
-
+
学历证书
-
+
-
+
学位证书
-
+
-
+
-
+
意外险参保
-
- 是
- 否
+
+ {{ temp.isHaveInsuranceValue }}
-
+
意外险参保地
-
+
{{ temp.insuranceAddr }}
-
-
+
意外险参保时间
-
+
{{ temp.insuranceStartDate }}
-
+
意外险终止时间
-
+
{{ temp.insuranceEndDate }}
-
+
养老
-
- 是
- 否
+
+ {{ temp.isHaveAgedValue }}
-
+
医疗/生育
-
- 是
- 否
+
+ {{ temp.isHaveMedicalValue }}
-
+
工伤
-
- 是
- 否
+
+ {{ temp.isHaveInjuryValue }}
-
+
失业
-
- 是
- 否
+
+ {{ temp.isHaveUnemployValue }}
-
+
社保参保地
-
+
{{ temp.insuredPlace }}
-
+
纸质档案保管地
-
+
{{ temp.paperPlace }}
-
-
离职信息
+
+
+
+
+
+ 离职日期
+
+
+
+
+ {{ temp.quitDate }}
+
+
+
+
+ 离职理由
+
+
+
+
+ {{ temp.quitReason }}
+
+
+
-
-
-
- 离职日期
-
-
-
-
- {{ temp.quitDate }}
-
-
-
-
- 离职理由
-
-
-
-
- {{ temp.quitReason }}
-
-
-
+
+
+
-
diff --git a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue
index a10113cc09..3a2cc6c20f 100644
--- a/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue
+++ b/anrui-management/anrui-management-ui/src/views/sysstaffinfo/yuangongguanli.vue
@@ -1,218 +1,94 @@
-
+
-
- {{ isSearchShow ? "隐藏查询条件" : "显示藏查询条件" }}
-
+
{{ isSearchShow ? "隐藏查询条件" : "显示藏查询条件" }}
-
-
-
-
-
-
-
+
+
+
- {{
- scope.row.jobNumber
- }}
+ {{ scope.row.jobNumber }}
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
@@ -224,7 +100,6 @@ import req from '@/api/management/yuangongguanli'
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
-import { setuser, getuser } from '@/utils/baocun'
import yuangongAdd from './yuangongAdd'
import yuangongInfo from './yuangongInfo'
@@ -239,7 +114,6 @@ export default {
},
data() {
return {
- pageType: 'staff',
dialogVisible: false, // 弹窗
btndisabled: false,
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
@@ -269,8 +143,60 @@ export default {
current: 1,
size: 10,
total: 0,
- params: {}
- }
+ params: {
+ joinCompnyDateEnd: '',
+ joinCompnyDateStart: '',
+ mobile: '',
+ name: '',
+ orgSid: '',
+ personTypeKey: '',
+ postSid: ''
+ }
+ },
+ btnList: [
+ {
+ type: 'primary',
+ size: 'small',
+ icon: 'el-icon-plus',
+ btnKey: 'toAdd',
+ btnLabel: '新增'
+ },
+ {
+ type: 'primary',
+ size: 'small',
+ icon: 'el-icon-edit',
+ btnKey: 'toEdit',
+ btnLabel: '编辑'
+ },
+ {
+ type: 'primary',
+ size: 'small',
+ icon: '',
+ btnKey: 'doSubmit',
+ btnLabel: '提交'
+ },
+ {
+ type: 'danger',
+ size: 'small',
+ icon: '',
+ btnKey: 'doQuit',
+ btnLabel: '离职'
+ },
+ {
+ type: 'success',
+ size: 'small',
+ icon: '',
+ btnKey: 'doImport',
+ btnLabel: '导入'
+ },
+ {
+ type: 'success',
+ size: 'small',
+ icon: '',
+ btnKey: 'doExport',
+ btnLabel: '导出'
+ }
+ ]
}
},
created() {
@@ -279,7 +205,7 @@ export default {
this.getBuMen()
},
mounted() {
- // this.$refs["btnbar"].setButtonList(this.btnList);
+ this.$refs["btnbar"].setButtonList(this.btnList)
},
methods: {
@@ -343,15 +269,12 @@ export default {
doSubmit(row) {
// 提交的代码
this.btndisabled = true
- req
- .doSubmit(this.queryParams.params, this.sids)
- .then((resp) => {
- console.log(resp)
- this.btndisabled = false
- })
- .catch(() => {
- this.btndisabled = false
- })
+ req.doSubmit(this.queryParams.params, this.sids).then((resp) => {
+ console.log(resp)
+ this.btndisabled = false
+ }).catch(() => {
+ this.btndisabled = false
+ })
},
// doDel() {
// this.$refs['btn'].btnList.some((item,i) => {
@@ -388,32 +311,27 @@ export default {
},
doImport(row) {
// 导入的代码
- req
- .importExcel(this.queryParams.params, this.sids)
- .then((resp) => {
- console.log(resp)
- })
- .catch(() => {})
+ req.importExcel(this.queryParams.params, this.sids).then((resp) => {
+ console.log(resp)
+ }).catch(() => {
+ })
},
doExport(sids) {
// 导出的代码
- req
- .exportExcel(this.queryParams.params, this.sids)
- .then((resp) => {
- var map = resp.data
- const fileName = map.filename // 导出文件名
- // // 对于标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
- // // IE10以上支持blob但是依然不支持download
- const link = document.createElement('a') // 创建a标签
- link.download = fileName // a标签添加属性
- link.style.display = 'none'
- link.href = map.downurl
- document.body.appendChild(link)
- link.click() // 执行下载
- URL.revokeObjectURL(link.href) // 释放url
- document.body.removeChild(link) // 释放标签
- })
- .catch(() => {})
+ req.exportExcel(this.queryParams.params, this.sids).then((resp) => {
+ var map = resp.data
+ const fileName = map.filename // 导出文件名
+ // // 对于标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
+ // // IE10以上支持blob但是依然不支持download
+ const link = document.createElement('a') // 创建a标签
+ link.download = fileName // a标签添加属性
+ link.style.display = 'none'
+ link.href = map.downurl
+ document.body.appendChild(link)
+ link.click() // 执行下载
+ URL.revokeObjectURL(link.href) // 释放url
+ document.body.removeChild(link) // 释放标签
+ }).catch(() => {})
},
dosearch() {
this.queryParams.current = 1
@@ -422,21 +340,18 @@ export default {
handleOpen() {
const _this = this
this.personTypeForm.sid = this.sids[0]
- req
- .delBySids(this.personTypeForm)
- .then((resp) => {
- loading.close()
- _this.$message({
- type: 'success',
- message: resp.msg,
- showClose: true
- })
- _this.loadList()
- this.dialogVisible = false
- })
- .catch((e) => {
- loading.close()
+ req.del(this.personTypeForm).then((resp) => {
+ loading.close()
+ _this.$message({
+ type: 'success',
+ message: resp.msg,
+ showClose: true
})
+ _this.loadList()
+ this.dialogVisible = false
+ }).catch((e) => {
+ loading.close()
+ })
},
// 获取数据sid
handleSelectionChange(row) {
@@ -444,7 +359,6 @@ export default {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
- setuser(this.sids)
})
this.sids = aa
this.row = row
@@ -454,31 +368,36 @@ export default {
// 重置
resetQuery() {
- this.queryParams.params = {}
- this.queryParams.params.sid = '' // sid
- this.queryParams.params.name = '' // 登录名
+ this.queryParams = {
+ current: 1,
+ size: 10,
+ total: 0,
+ params: {
+ joinCompnyDateEnd: '',
+ joinCompnyDateStart: '',
+ mobile: '',
+ name: '',
+ orgSid: '',
+ personTypeKey: '',
+ postSid: ''
+ }
+ }
+ this.orgName_list = []
this.dosearch()
},
// 查询
loadList() {
const _this = this
this.tableLoading = true
- req
- .listPage(this.queryParams)
- .then((resp) => {
- console.log('查询列表', resp)
- _this.tableLoading = false
- const data = resp.data
- _this.queryParams.total = data.total
- _this.dataList = data.records
- // for (var i = 0; i < data.records.length; i++) {
- // var timeArr = data.records[i].createTime.split(' ');
- // this.dataList[i].createTime = timeArr[0];
- // }
- })
- .catch(() => {
- _this.tableLoading = false
- })
+ req.listPage(this.queryParams).then((resp) => {
+ console.log('查询列表', resp)
+ _this.tableLoading = false
+ const data = resp.data
+ _this.queryParams.total = data.total
+ _this.dataList = data.records
+ }).catch(() => {
+ _this.tableLoading = false
+ })
},
// 序号
indexMethod(index) {
@@ -488,16 +407,12 @@ export default {
},
getType() {
- req
- .pullDown({
- type: 'personType'
- })
- .then((res) => {
- if (res.code === '200') {
- this.personType_list = res.data
- console.log('下拉框员工类型', res.data)
- }
- })
+ req.pullDown({ type: 'personType' }).then((res) => {
+ if (res.code === '200') {
+ this.personType_list = res.data
+ console.log('下拉框员工类型', res.data)
+ }
+ })
req.postName().then((res) => {
if (res.code === '200') {
this.postSid_list = res.data
@@ -505,42 +420,6 @@ export default {
}
})
},
-
- getPersonType(value) {
- console.log('触发下拉框按钮')
- let bb = {}
- this.personType_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.dictKey == value) {
- bb = {
- type: e.dictType,
- name: e.dictValue,
- key: e.dictKey,
- sid: e.sid
- }
- }
- })
- this.queryParams.params.personType = bb.name
- console.log('name', this.queryParams.params.personType)
- },
- getPostSid(value) {
- console.log('触发下拉框按钮', value)
- let bb = {}
- this.postSid_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
- if (e.postCode == value) {
- bb = {
- name: e.name,
- key: e.postCode,
- sid: e.sid
- }
- }
- })
- this.queryParams.params.postSid = bb.sid
- // this.temp.nationalKey = bb.key
- // this.formobj.scmOtherInboundDto.billType = bb.sid
- console.log('name', this.queryParams.params.postSid)
- },
// 级联列表 部门
getBuMen() {
req.salesDepName().then((res) => {
@@ -553,61 +432,45 @@ export default {
},
BuMen0(data) {
data.forEach((e) => {
- if (e.children.length != 0) {
- this.BuMen0(e.children)
- } else {
- delete e.children
- this.dataArr.push(e)
- return
+ if (e.children) {
+ if (e.children.length !== 0) {
+ this.BuMen0(e.children)
+ } else {
+ delete e.children
+ this.dataArr.push(e)
+ return
+ }
}
})
},
// 部门
orgNameChange(e) {
console.log('选中结果:' + JSON.stringify(e))
- var result = ''
var result_Sid = ''
- var sidPath = ''
- var namePath = ''
if (e.length > 0) {
// 循环多选项
e.forEach((item) => {
var last_id = item
// 循环查找名字
- this.select_temp_Name = '' // 临时遍历,用来保存选中结果(组织名称)
this.select_temp_Sid = '' // 临时遍历,用来保存选中结果(组织Sid)
- this.select_temp_NamePath = '' // 临时遍历,用来保存选中结果(名称路径)
- this.select_temp_SidPath = '' // 临时遍历,用来保存选中结果(sid路径)
this.findOrgId(last_id, this.options)
- result = result + this.select_temp_Name + '/'
result_Sid = result_Sid + this.select_temp_Sid + ','
- sidPath = this.select_temp_SidPath
- namePath = namePath + this.select_temp_Name + '/'
})
}
- if (result !== '') {
- result = result.substring(0, result.length - 1)
- }
- if (namePath !== '') {
- namePath = namePath.substring(0, result.length - 1)
- }
if (result_Sid !== '') {
result_Sid = result_Sid.substring(0, result_Sid.length - 1)
}
const orgSidArray = result_Sid.split(',')
const orgSid = orgSidArray[orgSidArray.length - 1]
- this.queryParams.params.orgName = result
- // this.temp.sysStaffOrgDto.orgSid = orgSid
- // this.temp.sysStaffOrgDto.orgSidPath = sidPath
- // this.temp.sysStaffOrgDto.orgNamePath = namePath
- console.log('选中名称:' + result, orgSid, sidPath, namePath)
+ this.queryParams.params.orgSid = orgSid
+ console.log('选中名称:' + orgSid)
},
// --- 循环查询
findOrgId(id, options) {
console.log('这是部门id', id)
for (var i = 0; i < options.length; i++) {
- if (id == options[i].sid) {
+ if (id === options[i].sid) {
this.select_temp_Name = options[i].name // 保存找到的内容
this.select_temp_Sid = options[i].sid
this.select_temp_NamePath = options[i].name
@@ -615,7 +478,7 @@ export default {
return true
} else {
// 判断是否最后一级
- if (options[i].children !== undefined) {
+ if (options[i].children !== undefined && options[i].children !== null) {
// 不是的话查询下一级
if (this.findOrgId(id, options[i].children)) {
return true
@@ -651,7 +514,4 @@ export default {
border: #2cab69 1px solid;
color: #2cab69;
}
-.lizhiliyou {
- width: 200px !important;
-}
diff --git a/anrui-management/anrui-management-ui/vue.config.js b/anrui-management/anrui-management-ui/vue.config.js
index fb3fc36d4f..f44b706fa4 100644
--- a/anrui-management/anrui-management-ui/vue.config.js
+++ b/anrui-management/anrui-management-ui/vue.config.js
@@ -40,16 +40,16 @@ module.exports = {
},
proxy: {
'/api': { // 匹配所有以 '/api'开头的请求路径
- target: 'http://127.0.0.1:8111/',
- // target: process.env.VUE_APP_URL, // 代理目标的基础路径
+ // target: 'http://127.0.0.1:8111/',
+ target: process.env.VUE_APP_URL, // 代理目标的基础路径
changeOrigin: true, // 支持跨域
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
'^/api': ''
}
},
'/upload': { // 匹配所有以 '/api'开头的请求路径
- target: 'http://4424790b0u.qicp.vip/',
- // target: process.env.VUE_APP_URL, // 代理目标的基础路径
+ // target: 'http://4424790b0u.qicp.vip/',
+ target: process.env.VUE_APP_URL, // 代理目标的基础路径
changeOrigin: true, // 支持跨域
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
'^/upload': ''