
13 changed files with 357 additions and 2738 deletions
@ -1,116 +0,0 @@ |
|||
import request from '@/utils/request' |
|||
// import qs from 'qs'
|
|||
// 其他入库单
|
|||
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 保存新增记录
|
|||
saveAdd: function(params) { |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 保存修改记录
|
|||
saveEdit: function(params,sid) { |
|||
console.log('bianjiebaocunjiekou',sid) |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/update/' + sid, |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid删除一条或多条记录
|
|||
delBySids: function(data) { |
|||
return request({ |
|||
url: '/base/v1/basedatalist/del_by_sids', |
|||
method: 'delete', |
|||
data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
|
|||
// 通过sid删除一条或多条记录
|
|||
del: function(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/del', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 员工信息编辑初始化及详情
|
|||
fetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/portal/v1/sysstaffinfo/fetchBySid/' + sid, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
|
|||
// 获取部门级联
|
|||
salesDepName: function(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysorganization/selectListOrg', |
|||
method: 'get', |
|||
params: data, |
|||
data: data |
|||
}) |
|||
}, |
|||
|
|||
// 获取岗位级联
|
|||
postName: function(data) { |
|||
return request({ |
|||
// /portal/v1/syspost/selectByOrgSid/{orgSid} 岗位列表
|
|||
url: '/portal/v1/syspost/selectList', |
|||
method: 'get', |
|||
params: data, |
|||
}) |
|||
}, |
|||
|
|||
// 获取下拉列表
|
|||
pullDown: function(data) { |
|||
return request({ |
|||
url: '/portal/v1/dictcommons/typeValues', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
}, |
|||
|
|||
// 提交
|
|||
doSubmit: function(params) { |
|||
return request({ |
|||
url: '/anruiscm/v1/scmotherinbound/doSubmit', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
|
|||
// 导入
|
|||
importExcel: function(params) { |
|||
return request({ |
|||
url: '/anruiscm/v1/scmotherinbound/importExcel', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
|
|||
// 导出
|
|||
exportExcel: function(params) { |
|||
return request({ |
|||
url: '/anruiscm/v1/scmotherinbound/exportExcel', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,671 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small">打印</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd"> |
|||
<div class="title" style=" display: flex; align-items: center; justify-content: space-between;"> |
|||
<div>客户基础信息</div> |
|||
</div> |
|||
<el-container> |
|||
<el-main> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>工号</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.jobNumber }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>姓名</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.name }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>性别</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.gender }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>出生年月日</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.birthday }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>身份证</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.idNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>证件有效期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.idTerm }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>民族</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.national }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>手机号码</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.mobile }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>婚姻状况</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.maritalStatus }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>政治面貌</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ temp.poliCode }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-main> |
|||
<el-aside style="width: 25%;margin-top:2%;text-align: center;border-right: 1px solid #e0e3eb"> |
|||
<img v-show="temp.photo !=='' ? true : false" style="cursor:pointer;width: 178px;height: 178px;" :src="temp.photo" @click="open(temp.photo)"> |
|||
</el-aside> |
|||
</el-container> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>紧急联系人</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.emergencyContact }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>紧急联系电话</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.emergencyMobile }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2" class="spe_style" style="border-top:1px solid #e0e3eb"> |
|||
<el-form-item> |
|||
<span>邮箱</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" style="border-top:1px solid #e0e3eb" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.email }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>住址</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ temp.address }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>籍贯</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ temp.province + temp.city + temp.county + temp.nativePlace}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title" style=" display: flex; align-items: center; justify-content: space-between;"> |
|||
<div>更多信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"> |
|||
<span><span class="icon">*</span>员工类型</span> |
|||
</div> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="6">--> |
|||
<el-form-item> |
|||
<span class="addinputw02">{{ temp.personType }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<span><span class="icon">*</span>所在部门</span> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{temp.sysStaffOrg.orgName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style"> |
|||
<span><span class="icon">*</span>岗位</span> |
|||
</el-col> |
|||
<el-col :span="6" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.sysStaffPost.name }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"> |
|||
<span><span class="icon">*</span>入职日期</span> |
|||
</div> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="6">--> |
|||
<el-form-item> |
|||
<span class="addinputw02">{{ temp.joinCompnyDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<span>试用期</span> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{temp.probPeriod}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style"> |
|||
<span>计划转正日期</span> |
|||
</el-col> |
|||
<el-col :span="6" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{temp.plannedConfirmDate}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"> |
|||
<span>实际转正日期</span> |
|||
</div> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="6">--> |
|||
<el-form-item> |
|||
<span class="addinputw02">{{temp.confirmationDate}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<span>开户行</span> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{temp.openBank}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style"> |
|||
<span>银行账号</span> |
|||
</el-col> |
|||
<el-col :span="6" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{temp.bankCardNo}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!-- !!!!各种附件证明图片!!!! --> |
|||
<el-row> |
|||
<el-col :span="6"> |
|||
<div class="span-sty"> |
|||
<span>身份证(人像面)</span> |
|||
</div> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="6">--> |
|||
<el-form-item> |
|||
<img class="addinputw02" v-show="temp.idCardA !=='' ? true : false" style="cursor:pointer;width: 178px;height: 178px;" :src="temp.idCardA" @click="open(temp.idCardA)"> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>身份证(国徽面)</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<img v-show="temp.idCardB !=='' ? true : false" style="cursor:pointer;width: 178px;height: 178px;" :src="temp.idCardB" @click="open(temp.idCardB)"> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style"> |
|||
<el-form-item> |
|||
<span>前公司离职证明</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6" class="spe_style02"> |
|||
<el-form-item> |
|||
<img v-show="temp.leaveCertificate !=='' ? true : false" style="cursor:pointer;width: 178px;height: 178px;" :src="temp.leaveCertificate" @click="open(temp.leaveCertificate)"> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title" style=" display: flex; align-items: center; justify-content: space-between;"> |
|||
<div>学历/技能信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>毕业院校</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.graduate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>学历/专业</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.education }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2" class="spe_style"> |
|||
<el-form-item> |
|||
<span>职称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.title }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>资格认证</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.qualification }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>驾照类型</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item> |
|||
<span>{{ temp.licenseType }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>学历证书</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<img v-show="temp.diploma !=='' ? true : false" style="cursor:pointer;width: 178px;height: 178px;" :src="temp.diploma" @click="open(temp.diploma)"> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>学位证书</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<img v-show="temp.degreeCertificate !=='' ? true : false" style="cursor:pointer;width: 178px;height: 178px;" :src="temp.degreeCertificate" @click="open(temp.degreeCertificate)"> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title" style=" display: flex; align-items: center; justify-content: space-between;"> |
|||
<div>社保信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>意外险参保</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.isHaveInsuranceValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>意外险参保地</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.insuranceAddr }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>意外险参保时间</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.insuranceStartDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>意外险终止时间</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.insuranceEndDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>养老</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.isHaveAgedValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>医疗/生育</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.isHaveMedicalValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>工伤</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.isHaveInjuryValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>失业</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.isHaveUnemployValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>社保参保地</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9" class="spe_style02"> |
|||
<el-form-item> |
|||
<span>{{ temp.insuredPlace }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>纸质档案保管地</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item> |
|||
<span>{{ temp.paperPlace }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="title" style=" display: flex; align-items: center; justify-content: space-between;"> |
|||
<div>合同信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<span>合同起止日期</span> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item prop="contractStartDate"> |
|||
<span>{{temp.contractStartDate}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<span>合同结束日期</span> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item prop="contractEndDate"> |
|||
<span>{{temp.contractEndDate}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!-- <div v-show="isQuit == true"> --> |
|||
<div v-show="isQuit"> |
|||
<div class="title" style=" display: flex; align-items: center; justify-content: space-between;"> |
|||
<div>离职信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>离职日期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item> |
|||
<span>{{ temp.quitDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item> |
|||
<span>离职理由</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="9"> |
|||
<el-form-item> |
|||
<span>{{ temp.quitReason }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<el-dialog :visible.sync="dialogVisible"> |
|||
<img width="100%" :src="dialogUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/management/yuangongguanli' |
|||
|
|||
export default { |
|||
name: 'yuangongInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
dialogStatus: '', |
|||
dialogVisible: false, |
|||
dialogUrl: '', |
|||
index: 0, |
|||
isQuit: false, |
|||
temp: { |
|||
sid: '', // 一条数据的sid |
|||
sysStaffOrg: { |
|||
orgName: '' |
|||
}, // 部门信息 |
|||
sysStaffPost: {} // 岗位信息 |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
handleReturn() { |
|||
this.temp = { |
|||
sid: '', // 一条数据的sid |
|||
sysStaffOrg: { |
|||
orgName: '' |
|||
}, // 部门信息 |
|||
sysStaffPost: {} // 岗位信息 |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.dialogStatus = 'edit' |
|||
this.viewTitle = '员工信息详情' |
|||
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 |
|||
} |
|||
data.isHaveAged = this.temp.isHaveAged |
|||
console.log('编辑回显出的数据', this.temp) |
|||
}).catch((e) => { |
|||
this.temp = row |
|||
}) |
|||
}, |
|||
open(val) { |
|||
this.dialogVisible = true |
|||
this.dialogUrl = val |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-main { |
|||
padding: 0; |
|||
} |
|||
/deep/ .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
|
|||
/deep/.el-col-3,.el-col-4 { |
|||
text-align: right; |
|||
float: left; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
line-height: 40px !important; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.formadd { |
|||
margin: 0 2%; |
|||
} |
|||
|
|||
.spe_style { |
|||
text-align: right; |
|||
float: left; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
line-height: 40px !important; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.spe_style02 { |
|||
text-align: left; |
|||
} |
|||
|
|||
.span-sty { |
|||
position: absolute; |
|||
top: 0; |
|||
bottom: 0; |
|||
left: 0; |
|||
line-height: 50px; |
|||
text-align: right; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
font-weight: 600; |
|||
width: 110px; |
|||
padding-right: 5px; |
|||
border-right: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
.addinputw02 { |
|||
padding: 5px 0; |
|||
width: 60% !important; |
|||
margin-left: 110px !important; |
|||
/*line-height: 48px;*/ |
|||
} |
|||
</style> |
@ -1,486 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="员工管理" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? "隐藏查询条件" : "显示藏查询条件" }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" label-width="100px" :model="queryParams" class="tab-header"> |
|||
<el-form-item label="员工姓名"> |
|||
<el-input v-model="queryParams.params.name" placeholder="请输入员工姓名" clearable class="addinputw"/> |
|||
</el-form-item> |
|||
<el-form-item label="员工类型"> |
|||
<el-select v-model="queryParams.params.personTypeKey" class="addinputw" placeholder="请选择员工类型"> |
|||
<el-option v-for="(item, index) in personType_list" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="联系电话"> |
|||
<el-input v-model="queryParams.params.mobile" placeholder="请输入联系电话" clearable class="addinputw"/> |
|||
</el-form-item> |
|||
<el-form-item label="所在部门"> |
|||
<el-cascader v-model="orgName_list" :props="props" :options="options" class="addinputw" style="line-height: 32px" @change="orgNameChange"/> |
|||
</el-form-item> |
|||
<el-form-item label="所在岗位"> |
|||
<el-select v-model="queryParams.params.postSid" class="addinputw" placeholder="请选择岗位"> |
|||
<el-option v-for="(item) in postSid_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="入职日期"> |
|||
<el-date-picker v-model="queryParams.params.joinCompnyDateStart" type="date" value-format="yyyy-MM-dd" placeholder="开始日期"> |
|||
</el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="queryParams.params.joinCompnyDateEnd" type="date" value-format="yyyy-MM-dd" placeholder="结束日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">员工信息列表</div> |
|||
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column width="120px" prop="jobNumber" label="员工编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="tablerow-click" @click="toInfo(scope.row)">{{ scope.row.jobNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column width="140px" prop="name" label="员工姓名" align="center"/> |
|||
<el-table-column width="85px" prop="personType" label="员工类型" align="center"/> |
|||
<el-table-column width="150px" prop="mobile" label="手机号" align="center"/> |
|||
<el-table-column prop="orgName" label="所在部门" header-align="center" align="left"/> |
|||
<el-table-column width="200px" prop="postName" label="岗位" align="center"/> |
|||
<el-table-column width="140px" prop="joinCompnyDate" label="入职日期" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End 查询和其列表部分--> |
|||
<yuangong-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/> |
|||
<yuangong-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/> |
|||
<el-dialog title="" :visible.sync="dialogVisible" width="40%" top="13%" center> |
|||
<el-form :model="personTypeForm" label-position="top"> |
|||
<el-form-item label="离职时间"> |
|||
<el-date-picker v-model="personTypeForm.quitDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"/> |
|||
</el-form-item> |
|||
<el-form-item label="离职理由"> |
|||
<el-input v-model="personTypeForm.quitReason" maxlength="100" placeholder="" type="textarea" clearable/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button class="el-button-sure" type="primary" @click="handleOpen()">确 定</el-button> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/management/yuangongguanli' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import yuangongAdd from './yuangongAdd' |
|||
import yuangongInfo from './yuangongInfo' |
|||
|
|||
export default { |
|||
name: 'Yuangongguanli', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
yuangongAdd, |
|||
yuangongInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, // 弹窗 |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, // 显示隐藏 |
|||
tableLoading: false, |
|||
personTypeForm: {}, // 离职信息 |
|||
// 列表数据 |
|||
dataList: [], |
|||
personType_list: [], |
|||
postSid_list: [], |
|||
// 级联 |
|||
orgSid: '', |
|||
orgName_list: [], // 所在部门 |
|||
dataArr: [], |
|||
refreshItem: 0, // 级联列表key值 |
|||
options: [], // 级联列表选项 |
|||
props: { |
|||
// props传值 |
|||
value: 'sid', |
|||
label: 'name', |
|||
children: 'children' |
|||
}, |
|||
// sid数组 |
|||
sids: [], // 用于导出的时候保存已选择SID |
|||
sides: '', // 一条数据的sid |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
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() { |
|||
this.loadList() |
|||
this.getType() |
|||
this.getBuMen() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
|
|||
methods: { |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX' + btnKey) |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toEdit': |
|||
this.toEdit() |
|||
break |
|||
case 'doSubmit': |
|||
this.doSubmit() |
|||
break |
|||
// case 'doDel': |
|||
// this.doDel(); |
|||
// break; |
|||
case 'doQuit': |
|||
this.doQuit() |
|||
break |
|||
case 'doImport': |
|||
this.doImport() |
|||
break |
|||
case 'doExport': |
|||
this.doExport() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
toAdd(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
toEdit() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择一条记录进行编辑' |
|||
}) |
|||
return |
|||
} |
|||
if (this.sids.length > 1) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '只能选择一条记录进行编辑' |
|||
}) |
|||
return |
|||
} |
|||
this.viewState = 3 |
|||
const sid = this.sids[0] |
|||
const row = this.row |
|||
this.$refs['divadd'].showEdit(sid, row) |
|||
}, |
|||
doSubmit(row) { |
|||
// 提交的代码 |
|||
this.btndisabled = true |
|||
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) => { |
|||
// if(item.btnKey == 'doDel'){ |
|||
// this.$refs['btn'].btnList.splice(i,1) |
|||
// return true |
|||
// } |
|||
// }) |
|||
// }, |
|||
doQuit() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择一条记录进行操作' |
|||
}) |
|||
return |
|||
} |
|||
if (this.sids.length > 1) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '只能选择一条记录进行操作' |
|||
}) |
|||
return |
|||
} |
|||
this.dialogVisible = true |
|||
}, |
|||
toInfo(row) { |
|||
this.viewState = 4 |
|||
const sid = row.sid |
|||
console.log('打开详情', sid) |
|||
this.$refs['divinfo'].showInfo(sid, row) |
|||
}, |
|||
doImport(row) { |
|||
// 导入的代码 |
|||
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 // 导出文件名 |
|||
// // 对于<a>标签,只有 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 |
|||
this.loadList() |
|||
}, |
|||
handleOpen() { |
|||
this.personTypeForm.sid = this.sids[0] |
|||
req.del(this.personTypeForm).then((resp) => { |
|||
if (resp.success) { |
|||
this.dialogVisible = false |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
this.loadList() |
|||
} |
|||
}).catch((e) => { |
|||
}) |
|||
}, |
|||
// 获取数据sid |
|||
handleSelectionChange(row) { |
|||
console.log('aaa', row) |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
this.row = row |
|||
this.sides = this.sids.join() // 将sid数组的元素转化成字符串 |
|||
console.log('获取sids数组', this.sids) |
|||
}, |
|||
|
|||
// 重置 |
|||
resetQuery() { |
|||
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 |
|||
}).catch(() => { |
|||
_this.tableLoading = false |
|||
}) |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
|
|||
getType() { |
|||
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 |
|||
console.log('下拉框请求岗位', res.data) |
|||
} |
|||
}) |
|||
}, |
|||
// 级联列表 部门 |
|||
getBuMen() { |
|||
req.salesDepName().then((res) => { |
|||
if (res.code === '200') { |
|||
this.options = res.data |
|||
console.log('请求到的部门级联列表', this.options) |
|||
this.BuMen0(this.options) |
|||
} |
|||
}) |
|||
}, |
|||
BuMen0(data) { |
|||
data.forEach((e) => { |
|||
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_Sid = '' |
|||
if (e.length > 0) { |
|||
// 循环多选项 |
|||
e.forEach((item) => { |
|||
var last_id = item |
|||
// 循环查找名字 |
|||
this.select_temp_Sid = '' // 临时遍历,用来保存选中结果(组织Sid) |
|||
this.findOrgId(last_id, this.options) |
|||
result_Sid = result_Sid + this.select_temp_Sid + ',' |
|||
}) |
|||
} |
|||
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.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) { |
|||
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 |
|||
return true |
|||
} else { |
|||
// 判断是否最后一级 |
|||
if (options[i].children !== undefined && options[i].children !== null) { |
|||
// 不是的话查询下一级 |
|||
if (this.findOrgId(id, options[i].children)) { |
|||
return true |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue