Commit c6cadf95 by lishengfu

udpte

parents 50c130d2 1c79b845
......@@ -26,6 +26,8 @@ export interface EmployeeInterface {
deleteEduExperience(params: any): Promise<any>; //删除教育信息
getTechnologyExperience(params: any): Promise<any>; //获取技术特长
updateTechnologyExperience(params: any): Promise<any>; //修改技术特长
getSalaryInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的工资条信息
getAgileWorker(params: any): Promise<any>; //灵活用工
}
......@@ -259,6 +259,17 @@ class EmployeeService implements EmployeeInterface {
return request.get(url, params, this.header)
}
/**
*
* 通过身份证号和派遣公司ID拿到派遣员工的工资条信息
* @param params
*/
public getSalaryInfo(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/dispatch/companies/${params.idNo}/employee/${params.spId}/payroll`;
return request.get(url, params, this.header)
}
public getAgileWorker(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/employee/${params.idNo}/bill/item`;
return request.get(url, params, this.header)
......
......@@ -8,9 +8,7 @@
<h3>{{name}}</h3>
<p>{{birthday}}</p>
</div>
<div class="person-information-right">
<img src="../assets/images/agent/123.jpg" alt />
</div>
</div>
<div class="person-information-bottom">
<div class="person-information-bottom-child" id="person-information-yjrw">
......@@ -111,8 +109,9 @@ export default class FlexEmployee extends Vue {
}
mounted() {
let params = {
idNo: this.$route.query.id_no
idNo: this.$route.query.id_no //371327198511175134
};
this.$server.EmployeeService.getAgileWorker(params).then((res: any) => {
console.log(res);
......
......@@ -3,22 +3,19 @@
<div class="info-card-box">
<div class="info-card-top">
<div class="info-card-top-left">
<h4>{{user_name}}</h4>
<h4>{{name}}</h4>
<p>{{birthday}}</p>
</div>
<div class="info-card-top-right">
<img src="../assets/images/agent/123.jpg" alt="头像" title="头像" />
</div>
</div>
<div class="info-card-bottom">
<p>
<label>用工单位</label>
<span>{{company_name}}</span>
<span>{{ceFullName}}</span>
</p>
<p>
<label>工作地点</label>
<span>{{work_address}}</span>
<span>{{workAddress}}</span>
</p>
<p>
<label>工作职位</label>
......@@ -26,7 +23,7 @@
</p>
<p>
<label>入职时间</label>
<span>{{entry_date}}</span>
<span>{{employeeEntryDate}}</span>
</p>
</div>
</div>
......@@ -35,7 +32,7 @@
<img src="../assets/images/ic_unfold@2x.png" />
</div>
<router-link class="entrance" :to="`/archives?ed_id=${ed_id}`">
<router-link class="entrance" :to="`/archives?ed_id=${ed_id}&sp_id=${sp_id}&id_no=${id_no}`">
<img src="../assets/images/archives_icon.png" alt="我的档案" title="我的档案" />
<div>
<h4>我的档案</h4>
......@@ -54,7 +51,7 @@
<img class="arrow" src="../assets/images/right_arrow.png" alt="arrow" title="arrow" />
</router-link>
<router-link class="entrance" :to="`/PaySlips?ed_id=${ed_id}`">
<router-link class="entrance" :to="`/PaySlips?sp_id=${sp_id}&id_no=371327198511175134`">
<img src="../assets/images/slips_icon.png" alt="我的工资条" title="我的工资条" />
<div>
<h4>我的工资条</h4>
......@@ -73,29 +70,35 @@ import { Component, Vue } from "vue-property-decorator";
components: {}
})
export default class Index extends Vue {
private user_name: string = "";
private name: string = "";
private birthday: string = "";
private company_name: string = "";
private work_address: string = "";
private ceFullName: string = "";
private workAddress: string = "";
private position: string = "";
private entry_date: string = "";
private employeeEntryDate: string = "";
private id_no: string = "";
private sp_id: string = "";
private ed_id: string = "";
created() {
const id_no = this.$route.query.id_no as string;
this.id_no = window.atob(encodeURI(id_no));
// this.id_no = window.atob(encodeURI(id_no));
this.sp_id = this.$route.query.sp_id as string;
let params = {
spId: this.sp_id,
idNo: this.id_no
spId: "85",
idNo: "51090219750505229X"
};
// 通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据)
this.$server.EmployeeService.getDispatchInfo(params)
.then(res => {
console.log(res);
this.name = res.name;
this.birthday = res.birthday;
this.ceFullName = res.ceFullName;
this.workAddress = res.workAddress;
this.position = res.position;
this.employeeEntryDate = res.employeeEntryDate;
})
.catch(error => {
console.log(error);
......
......@@ -13,7 +13,7 @@
</div>
</template>
<script>
<script lang='ts'>
import "../assets/css/labor.css";
export default {};
</script>
......
......@@ -46,256 +46,285 @@
</div>
</template>
<script>
<script lang="ts">
import "../assets/css/labor.css";
import "../assets/js/jquery.min.js";
import "../assets/js/echarts.min.js";
import Vue from "vue";
import { Button } from "vant";
import { Component } from "vue-property-decorator";
var myChart = echarts.init(document.getElementById("chart"));
var dataAxis = [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12"
];
var columnData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000];
var yMax = 15000;
var dataShadow = [];
var date = new Date();
var cur_year = date.getFullYear();
for (var i = 0; i < columnData.length; i++) {
dataShadow.push(yMax);
}
option = {
xAxis: {
offset: 10,
name: "元",
nameLocation: "start",
nameTextStyle: {
padding: [45, -10, 0, 0]
},
data: dataAxis,
axisLabel: {
inside: false,
textStyle: {
color: "#BABFC2"
}
},
axisTick: {
show: false
},
axisLine: {
show: false
},
z: 10
},
yAxis: {
name: "月/",
nameLocation: "start",
nameTextStyle: {
padding: [2, 55, 0, 0]
},
axisLine: {
show: false
},
splitLine: {
// grid 分割线设置
show: false
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: "#BABFC2"
}
}
},
grid: {
bottom: "30%",
top: "10%",
width: "82%",
left: "15%"
},
// dataZoom: [
// {
// type: 'inside'
// }
// ],
series: [
{
// For shadow
type: "bar",
itemStyle: {
normal: { color: "rgba(0,0,0,0.05)" }
},
barGap: "-100%",
barCategoryGap: "40%",
data: dataShadow,
animation: false
},
{
type: "bar",
barWidth: 8,
itemStyle: {
normal: {
barBorderRadius: [50, 50, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#33CD8B" },
{ offset: 0.5, color: "#22BD7A" },
{ offset: 1, color: "#22BD7A" }
])
},
emphasis: {
barBorderRadius: [50, 50, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#33CD8B" },
{ offset: 0.5, color: "#22BD7A" },
{ offset: 1, color: "#22BD7A" }
]),
label: {
show: true,
position: "top",
rich: {},
textStyle: {
// color: '#FC8936',
color: "#FFFFFF"
},
backgroundColor: {
image: "../assets/images/echart_backgorund.png"
},
padding: [10, 12, 12, 8]
}
}
},
data: columnData
}
]
};
function init() {
option.series[1].data = columnData;
myChart.setOption(option);
myChart.dispatchAction({
type: "highlight",
seriesIndex: 0,
dataIndex: 12
});
}
window.onresize = function() {
myChart.resize();
};
//select
//初始化赋值
$(".select-head .select-head-cont").html(
$(".option li")
.eq(0)
.html()
);
$(".option li")
.eq(0)
.addClass("click_bg")
.siblings()
.removeClass("click_bg");
//点击弹出下拉列表
$(".select-head").click(function(event) {
event.stopPropagation(); //阻止冒泡~必须条件!!
$(".option").slideToggle();
//箭头动画
if ($(".select-icon").hasClass("rotate")) {
$(".select-icon")
.addClass("rotate1")
.removeClass("rotate");
} else {
$(".select-icon")
.removeClass("rotate1")
.addClass("rotate");
}
});
//点击下拉菜单之外隐藏列表
$(document).click(function(event) {
$(".option").hide();
$(".select-icon")
.addClass("rotate1")
.removeClass("rotate");
});
function transData(data, cur_year) {
columnData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let obj = [];
let yearList = [];
for (const item in data) {
if (data.hasOwnProperty(item)) {
const element = data[item];
if (element.pay_time) {
const year = element.pay_time.substr(0, 4);
if (year == cur_year) {
yearList.push(year);
}
}
}
@Component({
components: {
[Button.name]: Button
}
})
export default class PaySlips extends Vue {
private obj: any = {};
yearList = [...new Set(yearList)];
if (yearList.length < 1) {
return;
}
for (const year of yearList) {
const o = { year: year, list: [] };
obj.push(o);
}
private getSalaryInfo(): void {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getSalaryInfo(params)
.then(res => {
console.log("res=" + JSON.stringify(res)+'工资条信息');
for (const yObj of obj) {
const oy = yObj.year;
const set = new Set();
for (const item of data) {
const iy = item.pay_time.substr(0, 4);
if (oy === iy) {
const month = item.pay_time.substr(5, 2);
set.add(month);
}
}
set.forEach(m => {
yObj.list.push({ month: m, sum: 0, list: [] });
});
this.obj = res;
})
.catch(error => {});
}
for (const y of obj) {
const yl = y.list;
for (const m of yl) {
const month = m.month;
let sum = 0;
for (const item of data) {
if (item.pay_time.indexOf(month) > -1) {
m.list.push(item);
sum += item.current_real_wage;
}
}
let mon = parseInt(month);
columnData[mon] = sum;
m.sum = sum;
}
created() {
}
return obj;
}
export default {};
// var myChart = echarts.init(document.getElementById("chart"));
// var dataAxis = [
// "01",
// "02",
// "03",
// "04",
// "05",
// "06",
// "07",
// "08",
// "09",
// "10",
// "11",
// "12"
// ];
// var columnData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000];
// var yMax = 15000;
// var dataShadow = [];
// var date = new Date();
// var cur_year = date.getFullYear();
// for (var i = 0; i < columnData.length; i++) {
// dataShadow.push(yMax);
// }
// option = {
// xAxis: {
// offset: 10,
// name: "元",
// nameLocation: "start",
// nameTextStyle: {
// padding: [45, -10, 0, 0]
// },
// data: dataAxis,
// axisLabel: {
// inside: false,
// textStyle: {
// color: "#BABFC2"
// }
// },
// axisTick: {
// show: false
// },
// axisLine: {
// show: false
// },
// z: 10
// },
// yAxis: {
// name: "月/",
// nameLocation: "start",
// nameTextStyle: {
// padding: [2, 55, 0, 0]
// },
// axisLine: {
// show: false
// },
// splitLine: {
// // grid 分割线设置
// show: false
// },
// axisTick: {
// show: false
// },
// axisLabel: {
// textStyle: {
// color: "#BABFC2"
// }
// }
// },
// grid: {
// bottom: "30%",
// top: "10%",
// width: "82%",
// left: "15%"
// },
// // dataZoom: [
// // {
// // type: 'inside'
// // }
// // ],
// series: [
// {
// // For shadow
// type: "bar",
// itemStyle: {
// normal: { color: "rgba(0,0,0,0.05)" }
// },
// barGap: "-100%",
// barCategoryGap: "40%",
// data: dataShadow,
// animation: false
// },
// {
// type: "bar",
// barWidth: 8,
// itemStyle: {
// normal: {
// barBorderRadius: [50, 50, 0, 0],
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// { offset: 0, color: "#33CD8B" },
// { offset: 0.5, color: "#22BD7A" },
// { offset: 1, color: "#22BD7A" }
// ])
// },
// emphasis: {
// barBorderRadius: [50, 50, 0, 0],
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// { offset: 0, color: "#33CD8B" },
// { offset: 0.5, color: "#22BD7A" },
// { offset: 1, color: "#22BD7A" }
// ]),
// label: {
// show: true,
// position: "top",
// rich: {},
// textStyle: {
// // color: '#FC8936',
// color: "#FFFFFF"
// },
// backgroundColor: {
// image: "../assets/images/echart_backgorund.png"
// },
// padding: [10, 12, 12, 8]
// }
// }
// },
// data: columnData
// }
// ]
// };
// function init() {
// option.series[1].data = columnData;
// myChart.setOption(option);
// myChart.dispatchAction({
// type: "highlight",
// seriesIndex: 0,
// dataIndex: 12
// });
// }
// window.onresize = function() {
// myChart.resize();
// };
// //select
// //初始化赋值
// $(".select-head .select-head-cont").html(
// $(".option li")
// .eq(0)
// .html()
// );
// $(".option li")
// .eq(0)
// .addClass("click_bg")
// .siblings()
// .removeClass("click_bg");
// //点击弹出下拉列表
// $(".select-head").click(function(event) {
// event.stopPropagation(); //阻止冒泡~必须条件!!
// $(".option").slideToggle();
// //箭头动画
// if ($(".select-icon").hasClass("rotate")) {
// $(".select-icon")
// .addClass("rotate1")
// .removeClass("rotate");
// } else {
// $(".select-icon")
// .removeClass("rotate1")
// .addClass("rotate");
// }
// });
// //点击下拉菜单之外隐藏列表
// $(document).click(function(event) {
// $(".option").hide();
// $(".select-icon")
// .addClass("rotate1")
// .removeClass("rotate");
// });
// function transData(data, cur_year) {
// columnData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
// let obj = [];
// let yearList = [];
// for (const item in data) {
// if (data.hasOwnProperty(item)) {
// const element = data[item];
// if (element.pay_time) {
// const year = element.pay_time.substr(0, 4);
// if (year == cur_year) {
// yearList.push(year);
// }
// }
// }
// }
// yearList = [...new Set(yearList)];
// if (yearList.length < 1) {
// return;
// }
// for (const year of yearList) {
// const o = { year: year, list: [] };
// obj.push(o);
// }
// for (const yObj of obj) {
// const oy = yObj.year;
// const set = new Set();
// for (const item of data) {
// const iy = item.pay_time.substr(0, 4);
// if (oy === iy) {
// const month = item.pay_time.substr(5, 2);
// set.add(month);
// }
// }
// set.forEach(m => {
// yObj.list.push({ month: m, sum: 0, list: [] });
// });
// }
// for (const y of obj) {
// const yl = y.list;
// for (const m of yl) {
// const month = m.month;
// let sum = 0;
// for (const item of data) {
// if (item.pay_time.indexOf(month) > -1) {
// m.list.push(item);
// sum += item.current_real_wage;
// }
// }
// let mon = parseInt(month);
// columnData[mon] = sum;
// m.sum = sum;
// }
// }
// return obj;
// }
</script>
<style lang="less">
......
......@@ -243,7 +243,7 @@ export default class socialInfo extends Vue {
this.obj.unitRelationUnit = value;
this.showRelationUnit = false;
}
// 前期就业状态
// 前期就业状态 getSalaryInfo decodeURI
onConfirmEmploymentStatus(value: string, index: any) {
this.obj.unitPreEmploymentStatus = value;
this.showEmploymentStatus = false;
......@@ -266,9 +266,18 @@ export default class socialInfo extends Vue {
//没有父节点的数据
// console.log(this.parents);
//有父节点的数据
// console.log(this.childrens);
// 城市3级级联 鄙人黔驴技穷,有请大佬继续 https://blog.csdn.net/MySunshine07/article/details/104960244?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1
console.log(this.childrens);
this.parents.forEach((parent:any) => {
this.childrens.forEach((children:any) =>{
if(parent.id==children.parentId){
console.log(parent.name+parent.id+"++"+children.name+children.parentId)
}
})
});
// https://blog.csdn.net/MySunshine07/article/details/104960244?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1
// let fliterEvent = (parents:any, childrens:any) => {
// parents.forEach(parent => {
// childrens.forEach((current:any, index:any) => {
......@@ -308,6 +317,25 @@ export default class socialInfo extends Vue {
.catch(error => {});
}
private getSalaryInfo(): void {
const id_no = this.$route.query.id_no as string;
const sp_id = this.$route.query.sp_id as string;
let params = {
idNo: id_no,
spId: sp_id
};
console.log(params);
this.$server.EmployeeService.getSalaryInfo(params)
.then(res => {
console.log("res=" + JSON.stringify(res)+'工资条');
this.obj = res;
})
.catch(error => {});
}
editInfo(): void {
this.show = true;
}
......@@ -365,6 +393,8 @@ export default class socialInfo extends Vue {
}
created() {
this.getSalaryInfo();
this.getSocialInfo();
this.getCityList();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment