Browse Source

Merge remote-tracking branch 'origin/master'

master
dimengzhe 2 years ago
parent
commit
d431939cd7
  1. 38
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java
  2. 2
      anrui-buscenter/anrui-buscenter-ui/src/views/discountpackagehandover/discountpackagetobehandover.vue
  3. 6
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/suicheziliaojiaojie/cardatahandedoverAdd.vue
  4. 116
      anrui-riskcenter-ui/src/api/management/yuangongguanli.js
  5. 2
      anrui-riskcenter-ui/src/layout/components/Sidebar/index.vue
  6. 2
      anrui-riskcenter-ui/src/layout/index.vue
  7. 131
      anrui-riskcenter-ui/src/main.js
  8. 42
      anrui-riskcenter-ui/src/router/index.js
  9. 299
      anrui-riskcenter-ui/src/styles/index.scss
  10. 8
      anrui-riskcenter-ui/src/utils/auth.js
  11. 1292
      anrui-riskcenter-ui/src/views/sysstaffinfo/yuangongAdd.vue
  12. 671
      anrui-riskcenter-ui/src/views/sysstaffinfo/yuangongInfo.vue
  13. 486
      anrui-riskcenter-ui/src/views/sysstaffinfo/yuangongguanli.vue

38
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java

@ -1448,26 +1448,28 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
List<BusHandoverItems> itemsList = busHandoverItemsService.getItemsListByMainSid(sid).getData();
itemsList.removeAll(Collections.singleton(null));
for (BusHandoverItems v : itemsList) {
BusHandoverItemListDetailsVo detailsVo = new BusHandoverItemListDetailsVo();
String handoverPhoto = v.getHandoverPhoto();
String policyPhoto = v.getPolicyPhoto();
BeanUtil.copyProperties(v, detailsVo);
if (StringUtils.isNotBlank(handoverPhoto)) {
List<String> stringList = Arrays.asList(handoverPhoto.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList());
detailsVo.setDeliveryImages(stringList);
}
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService.fetchDetailsByVinSid(v.getVinSid());
if (null != busHandoverPrepareVehicle) {
List<BuscenterFile> fileList = buscenterFileService.selectByLinkSid(busHandoverPrepareVehicle.getSid(), BuscenterFileEnum.HANDOVER_POLICY.getAttachType());
fileList.removeAll(Collections.singleton(null));
if (!fileList.isEmpty()) {
List<String> policyPhotoList = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
collect(Collectors.toList());
detailsVo.setPolicyImages(policyPhotoList);
if ("主车".equals(v.getVehivelOrTrailer())) {
BusHandoverItemListDetailsVo detailsVo = new BusHandoverItemListDetailsVo();
String handoverPhoto = v.getHandoverPhoto();
String policyPhoto = v.getPolicyPhoto();
BeanUtil.copyProperties(v, detailsVo);
if (StringUtils.isNotBlank(handoverPhoto)) {
List<String> stringList = Arrays.asList(handoverPhoto.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList());
detailsVo.setDeliveryImages(stringList);
}
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService.fetchDetailsByVinSid(v.getVinSid());
if (null != busHandoverPrepareVehicle) {
List<BuscenterFile> fileList = buscenterFileService.selectByLinkSid(busHandoverPrepareVehicle.getSid(), BuscenterFileEnum.HANDOVER_POLICY.getAttachType());
fileList.removeAll(Collections.singleton(null));
if (!fileList.isEmpty()) {
List<String> policyPhotoList = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
collect(Collectors.toList());
detailsVo.setPolicyImages(policyPhotoList);
}
}
detailsVo.setVinSid(v.getVinSid());
items.add(detailsVo);
}
detailsVo.setVinSid(v.getVinSid());
items.add(detailsVo);
}
vo.setCarList(items);
//接收车辆确认书照片

2
anrui-buscenter/anrui-buscenter-ui/src/views/discountpackagehandover/discountpackagetobehandover.vue

@ -49,7 +49,7 @@
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.state == 1 ? '待准备' : scope.row.state == 2 ? '待交接' : scope.row.state == 3 ? '已交接' : '其他' }}</span>
<span>{{ scope.row.transferstateValue }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="110">

6
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/suicheziliaojiaojie/cardatahandedoverAdd.vue

@ -100,7 +100,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row v-if="formobj.isFuelVehicle">
<el-col :span="24">
<div class="span-sty"><span class="icon">*</span>气瓶产品质量证明书(燃气车)</div>
<el-form-item>
@ -155,6 +155,7 @@ export default {
transferRemarks: '',
transferName: '',
recTime: '',
isFuelVehicle: false
}
},
rules: {}
@ -241,7 +242,8 @@ export default {
gasCertificate: '',
transferRemarks: '',
transferName: '',
recTime: ''
recTime: '',
isFuelVehicle: false
}
}
this.submitdisabled = false

116
anrui-riskcenter-ui/src/api/management/yuangongguanli.js

@ -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
})
}
}

2
anrui-riskcenter-ui/src/layout/components/Sidebar/index.vue

@ -35,7 +35,7 @@
YongHuid: [],
routes: [],
params: {
sourceSid: 'ede8c71e-8351-4d58-810b-620852b6f9af',
sourceSid: '20221d77-239e-4e4a-bdec-3266478dfdc3',
userSid: '',
}
}

2
anrui-riskcenter-ui/src/layout/index.vue

@ -11,7 +11,7 @@
<div class="main-container">
<div class="home-box">
<a href="javascript:window.opener=null;window.open('','_self');window.close();" class="text-center">平台首页</a>
<a href="javascript:void(0);" class="text-center">行政管理</a>
<a href="javascript:void(0);" class="text-center">风控管理</a>
</div>
<sidebar class="sidebar-container" />
<!--菜单-->

131
anrui-riskcenter-ui/src/main.js

@ -1,42 +1,104 @@
import 'babel-polyfill'
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import '@/icons' // icon
// 全局自定义组件
import Pagination from '@/components/pagination/index.vue'
import tabsearch from '@/components/tab-search/index.vue'
import eimage from '@/components/E-image/index.vue'
import Print from '@/utils/print' // 引入附件的js文件
import { setStorage, setDefaultOrgPathName, setDefaultOrgPath } from './utils/auth.js'
import VueAMap from 'vue-amap'
import request from '@/utils/request'
Vue.use(ElementUI)
// import '@/permission' //权限控制
Vue.prototype.$userInfo = null // 用户信息
// 全局自定义组件
import Pagination from '@/components/pagination/index.vue'
Vue.component('Pagination', Pagination)
import tabsearch from '@/components/tab-search/index.vue'
Vue.component('tab-search', tabsearch)
import eimage from '@/components/E-image/index.vue'
Vue.component('eimage', eimage)
import Print from '@/utils/print' // 引入附件的js文件
Vue.use(Print) // 注册
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请
plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], // 此处的插件按需添加
v: '1.4.4',
uiVersion: '1.0'
})
Vue.config.productionTip = false
import { setStorage, getStorage } from './utils/auth.js'
let token = null
token = GetQueryString('token')
// token = getQueryVariable('token')
if (token) {
setStorage(token)
let href = window.location.href
// href = href.split(`token=${token}`)[0]
// window.location.href = href.slice(0, href.length - 1)
setStorage(token)
let href = window.location.href
// href = href.split(`token=${token}`)[0]
// window.location.href = href.slice(0, href.length - 1)
}
function GetQueryString(name) {
var one = window.location.href.indexOf('?token=') + 7
if (one < 7)
return null
var two = window.location.href.lastIndexOf('&') // + 1
var data = window.location.href.substr(one)
if (two > one) {
data = window.location.href.slice(one, two)
console.log('token', data)
}
if (data) {
return data
}
return null
// var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
// var se = window.location.search.substr(1)
// var hr = window.location.href.substr(window.location.href.indexOf("?")+1)
// var r = hr.match( reg)
// if (r != null)
// return unescape(r[2]);
// return null
}
function getQueryVariable(variable) {
var query = window.location.search.substring(1)
// console.log('main:query'+ query)
var vars = query.split('&')
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=')
// console.log('main:pair-0', pair[0])
// console.log('main:pair-1', pair[1])
if (pair[0] == variable) {
return pair[1]
}
}
return (false)
}
var one = window.location.href.indexOf('&organizationData') + 18
if (parseInt(one) > 18) {
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用
var data1 = decodeURIComponent(data)
if (data1 !== undefined) {
const obj = JSON.parse(data1)
setDefaultOrgPath(obj.defaultOrgPath)
setDefaultOrgPathName(obj.defaultOrgPathName)
}
}
// 获取登录用户信息
@ -63,9 +125,9 @@ function getUserInfo() {
dwjb: data.dwjb,
orgNamePath: data.orgNamePath, // 使用组织全路径名称
orgSidPath: data.orgSidPath, // 使用组织全路径Sid
pNameAndDepartmentNameAndPostName:data.pNameAndDepartmentNameAndPostName
pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName
}
// 结果存入缓存
//结果存入缓存
window.sessionStorage.setItem('staffSid', user.staffSid)
window.sessionStorage.setItem('userSid', user.userSid)
window.sessionStorage.setItem('Orgname', user.Orgname)
@ -89,39 +151,4 @@ function getUserInfo() {
getUserInfo()
function GetQueryString(name) {
var one = window.location.href.indexOf('?token=') + 7
if(one<7)
return null;
var two = window.location.href.lastIndexOf('&') //+ 1
var data = window.location.href.substr(one)
if (two > one) {
data = window.location.href.slice(one, two)
console.log('token', data)
}
if (data) {
return data
}
return null
// var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
// var r = window.location.search.substr(1).match(reg)
// if (r != null) return unescape(r[2]); return null
}
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请
plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], // 此处的插件按需添加
v: '1.4.4',
uiVersion: '1.0'
})
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
store,
render: h => h(App)
})
export default getUserInfo()

42
anrui-riskcenter-ui/src/router/index.js

@ -21,16 +21,6 @@ export const constantRoutes = [
path: '/',
redirect: 'index'
},
/*{
path: '/login',
component: () => import('@/views/login/login.vue')
},*/
/* {
path: '/home',
component: () => import('@/views/Home/Home.vue'),
name: 'home'
},*/
{
path: '/index',
component: Layout,
@ -48,33 +38,31 @@ export const constantRoutes = [
}]
},
{
path: '/sysstaffinfo',
path: '/404',
component: () =>
import('@/views/404'),
hidden: true
},
{
path: '/capital',
component: Layout,
redirect: '/sysstaffinfo',
redirect: '/capital',
meta: {
title: '员工信息管理'
title: '资方管理'
},
children: [
{
path: '/yuangongguanli',
component: () => import('@/views/sysstaffinfo/yuangongguanli.vue'),
name: 'yuangongguanli',
meta: { title: '员工信息管理',noCache:false }
},
path: '/capital',
component: () => import('@/views/capital/capital.vue'),
name: 'Capital',
meta: { title: '资方管理', noCache: true }
}
]
},
{
path: '/404',
component: () =>
import('@/views/404'),
hidden: true
}
}
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]
import componentsRouter from '@/router/modules/components'
const createRouter = () => new Router({
// mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),

299
anrui-riskcenter-ui/src/styles/index.scss

@ -66,11 +66,11 @@ div:focus {
}
// main-container global css
.container{
min-height: 100%;
min-height: 100%;
height: 100%;
background-color: #FFFFFF;
box-sizing: border-box;
padding: 10px 0;
background-color: #FFFFFF;
box-sizing: border-box;
padding: 10px 0;
}
.fl{
@ -90,26 +90,63 @@ div:focus {
padding-bottom: 10px;
}
.pd-y40{
.pd-y40 {
padding: 40px 0;
}
.pd-y20{
.pd-y20 {
padding: 20px 0;
}
.fs20{
.fs20 {
font-size: 20px;
}
// 页面上的button按钮
.app-container {
.el-button--medium {
padding: 10px 14px;
font-size: 16px;
}
.el-button--small {
padding: 8px 12px;
font-size: 14px;
}
.el-button--mini {
padding: 7px 10px;
font-size: 12px;
}
}
// 添加样式
.app-container {margin: 5px;
.app-container {
margin: 5px 0 5px 0;
background-color: #fff;
}
// 设置了滚动区域
.main-content{ overflow-x: hidden;overflow-y: auto;height: calc(100vh - 200px);padding: 0 20px;}
.listcon{height: calc(100vh - 425px);overflow-y: auto;overflow-x: hidden;}
.listconadd{height: calc(100vh - 200px);overflow-y: auto;overflow-x: hidden;}
.listconsub{height: calc(100vh - 310px);overflow-y: auto;overflow-x: hidden;}
.listconsubjxs{height: calc(100vh - 300px);overflow-y: auto;overflow-x: hidden;}
.listconadd{
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
}
.listconsub {
height: calc(100vh - 310px);
overflow-y: auto;
overflow-x: hidden;
}
.listconsubjxs {
height: calc(100vh - 300px);
overflow-y: auto;
overflow-x: hidden;
}
// 搜索的
.webtop {
// position: fixed;top: 110px;width: calc(100% - 240px);z-index: 6000;
@ -117,13 +154,35 @@ div:focus {
display: flex !important;
flex-direction: row;
justify-content: space-between !important;
align-items: center; margin-bottom: 0px !important;
align-items: center;
margin-bottom: 0px !important;
font-size: 20px;
}
// 设置了页面头部的内边距和背景色
.tab-header {
font-size: 20px;
font-weight: bold;
}
// 设置了搜索条件里的样式
.search {
.tab-header {
.el-form-item {
margin-right: 16px;
.el-form-item__label {
font-size: 16px;
font-weight: 500;
}
}
}
}
.filter-item {
padding: 0 10px;
width: 168px;
width: 220px;
display: inline-block;
}
// 设置列表页面内容布局
.listtop {
display: flex;
flex-direction: row;
@ -145,12 +204,13 @@ div:focus {
margin: 0;
padding: 0;
}
.pages {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: flex-end;
padding: 0px 0px 15px 15px;
padding: 0 0 15px 15px;
}
.pages .tit{font-weight: bold;}
.pages .pagination{margin: 0;}
@ -158,84 +218,179 @@ div:focus {
// .listeltable{overflow-y: auto;height: calc(100vh - 420px);}
.formadd {
padding: 20px 0;
padding: 10px 40px 0 40px;
font-size: 16px;
// height: calc(100vh - 200px);overflow-y: auto;
.title {
padding: 10px;font-weight: bold;
font-size: 20px;
.title {
padding: 12px;
font-weight: bold;
font-size: 16px;
background-color: $header-bg;
text-align: center;
text-align: left;
color: #ffffff;
}
}
.first_row{
border-top: 1px solid $table-border-color;
}
.el-row {
display:flex;
flex-wrap: wrap;
border-left: 1px solid $table-border-color;
.el-col{
border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color;
padding: 5px 15px 5px 15px !important;
min-height: 50px;
line-height: 1;
.el-form-item{
margin-bottom: 0;
// .addinputw{width: 400px;}
.addinputw{width: 80%;}
display: flex;
flex-wrap: wrap;
border-left: 1px solid $table-border-color;
.el-col {
border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color;
padding: 0 15px;
min-height: 42px;
line-height: 1;
.el-form-item {
margin-bottom: 0;
line-height: 42px;
// .addinputw{width: 400px;}
.addinputw {
width: 80%;
line-height: 42px;
}
.el-input__inner {
height: 36px;
}
}
}
.footer{margin: 20px;}
}
}
.footer{margin: 20px;}
}
.forminfo {
padding: 20px 0;
.title {
padding: 10px;font-weight: bold;
font-size: 20px;
background-color: $header-bg;
text-align: center;
.formaddcopy02 {
padding: 10px 40px 0 40px;
.title {
padding: 12px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
color: #ffffff;
}
text-align: left;
}
.el-row {
display:flex;
flex-wrap: wrap;
border-left: 1px solid $table-border-color;
.trightb{ text-align: right;font-weight: bold;color: #606266; }
.tleft{ text-align: left; }
.el-col{
border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color;
padding: 0px 15px 0px 15px !important;
min-height: 50px;
line-height: 50px;
display: flex;
flex-wrap: wrap;
border-left: 1px solid $table-border-color;
.el-col {
border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color;
min-height: 42px;
padding: 0 15px;
line-height: 42px;
position: relative;
.span-sty {
position: absolute;
top: 0;
bottom: 0;
left: 0;
line-height: 42px;
text-align: right;
font-size: 14px;
color: #606266;
font-weight: 600;
width: 70px;
padding-right: 5px;
border-right: 1px solid #e0e3eb;
}
.el-form-item {
margin-bottom: 0;
line-height: 42px;
.addinputw {
//padding: 5px 0;
width: 65%;
margin-left: 80px;
line-height: 42px;
}
.addinputInfo {
margin-left: 80px;
line-height: 42px;
}
.el-input__inner {
height: 36px;
}
}
}
}
.footer {
margin: 20px;
}
}
.forminfo {
padding: 10px 40px 0 40px;
font-size: 16px;
.title {
padding: 12px;
font-weight: bold;
font-size: 16px;
background-color: $header-bg;
text-align: left;
color: #ffffff;
}
.el-row {
display:flex;
flex-wrap: wrap;
border-left: 1px solid $table-border-color;
.trightb{ text-align: right;font-weight: bold;color: #606266; }
.tleft{ text-align: left; }
.el-col{
border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color;
padding: 0 15px 0 15px !important;
min-height: 50px;
line-height: 50px;
font-size: 14px;
}
}
.footer{margin: 20px;}
}
.footer{margin: 20px;}
}
.el-form-item__error {
z-index: 100;
z-index: 100;
}
.bluezi{color: $header-bg;}
.bluezi{color: $header-bg; cursor: pointer}
// 经销商添加样式
.titcon{
display: flex;flex-direction: row;justify-content: space-around; background-color: #0294d7;flex: 3;
display: flex;
flex-direction: row;
justify-content: space-around;
background-color: #0294d7;
flex: 3;
}
.titcon .title{
padding: 10px;font-weight: bold;
font-size: 20px;
text-align: center;
color: #ffffff;
.titcon .title {
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: center;
color: #ffffff;
}
.titcon .baocun{text-align: right;flex: 2;padding: 5px 20px;}
.addinputwda{width: 600px;}
.titcon .baocun {
text-align: right;
flex: 2;
padding: 5px 20px;
}
.addinputwda {
width: 600px;
}
//.searchcon{margin: 0px 0 10px 0;}
//.searchcon .searchbtn{margin: 10px 0;}
//.searchcon .searchbtn{margin: 10px 0;border: #2cab69 1px solid;color: #2cab69;}
// 隐藏显示按钮
.main-content {
.searchcon {
.searchbtn {
@ -246,6 +401,7 @@ div:focus {
}
}
.search .btn {
padding: 5px 0;
border: 1px solid #e0e3eb;
@ -253,18 +409,19 @@ div:focus {
margin-bottom: 5px;
}
// 弹出窗口按钮
.btnCancel{
background: #e84026 !important;outline: none;border: none;color: #fff !important;
background: #e84026 !important;outline: none;border: none;color: #fff !important;
}
.btnCancel:hover{
background: #ed6651 !important;
background: #ed6651 !important;
}
.btnFalses{
background: #2cab69 !important;outline: none;border: none;
background: #2cab69 !important;outline: none;border: none;
}
.btnFalses:hover{
background: #3dc47e !important;
background: #3dc47e !important;
}
.btntopblueline{background-color: #066bc9 !important;}
.btntopblueline:hover{background-color: #34a1db !important;}

8
anrui-riskcenter-ui/src/utils/auth.js

@ -24,6 +24,14 @@ export function setStorage(session) {
return sessionStorage.setItem('token', session)
}
export function setDefaultOrgPathName(data) {
return sessionStorage.setItem('defaultOrgPathName', data)
}
export function setDefaultOrgPath(data) {
return sessionStorage.setItem('defaultOrgPath', data)
}
export function removeStorage() {
return sessionStorage.removeItem('token')
}

1292
anrui-riskcenter-ui/src/views/sysstaffinfo/yuangongAdd.vue

File diff suppressed because it is too large

671
anrui-riskcenter-ui/src/views/sysstaffinfo/yuangongInfo.vue

@ -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>

486
anrui-riskcenter-ui/src/views/sysstaffinfo/yuangongguanli.vue

@ -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
// // IE10blobdownload
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…
Cancel
Save