Commit 561663c5 by lishengfu

Merge branch 'master' of gitlab.corp.qinqinxiaobao.com:frontend_vue/qqxb-self-service

parents 84c87798 529884ed
......@@ -7,30 +7,30 @@
<div class="box">
<div class="item">
<span>是否有传染病、精神病及任何慢性疾病史?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio-group v-model="radio1" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
<div class="item">
<span>是否与其他公司签订过“竞业禁止协议”?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
<van-radio-group v-model="radio2" direction="horizontal" class="item-radio">
<van-radio name="3" checked-color="#07c160"></van-radio>
<van-radio name="4" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
<div class="item">
<span>是否曾因个人行为不检而被其他公司解雇?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
<van-radio-group v-model="radio3" direction="horizontal" class="item-radio">
<van-radio name="5" checked-color="#07c160"></van-radio>
<van-radio name="6" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
<div class="item">
<span>是否愿意接受我公司及派至公司一切规章制度?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
<van-radio-group v-model="radio4" direction="horizontal" class="item-radio">
<van-radio name="7" checked-color="#07c160"></van-radio>
<van-radio name="8" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
</div>
......@@ -48,7 +48,10 @@ import { Component } from "vue-property-decorator";
},
data() {
return {
radio: 1
radio1: 1,
radio2: 2,
radio3: 3,
radio4: 4
};
}
})
......
......@@ -41,7 +41,7 @@
<van-field
readonly
clickable
:value="obj.infoRegisteredResidence"
v-model="obj.infoRegisteredResidence"
label="户口性质"
placeholder="请选择"
@click="showCategory = true"
......@@ -50,7 +50,7 @@
<van-field
readonly
clickable
:value="obj.unitPreSocialStatus"
v-model="obj.unitPreSocialStatus"
label="前期社保状态"
placeholder="请选择"
@click="showSocialStatus = true"
......@@ -59,7 +59,7 @@
<van-field
readonly
clickable
:value="obj.unitPrePaymentType"
v-model="obj.unitPrePaymentType"
label="前期缴费种类"
placeholder="请选择"
@click="showPaymentType = true"
......@@ -68,7 +68,7 @@
<van-field
readonly
clickable
:value="obj.unitPreSocialCity"
v-model="obj.unitPreSocialCity"
label="原社保缴纳省市"
placeholder="请选择"
@click="showSocialCity = true"
......@@ -79,7 +79,7 @@
<van-field
readonly
clickable
:value="obj.unitRelationUnit"
v-model="obj.unitRelationUnit"
label="与原单位关系"
placeholder="请选择"
@click="showRelationUnit = true"
......@@ -88,14 +88,20 @@
<van-field
readonly
clickable
:value="obj.unitPreEmploymentStatus"
v-model="obj.unitPreEmploymentStatus"
label="前期就业状态"
placeholder="请选择"
@click="showEmploymentStatus = true"
/>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateContactInfo">保存</van-button>
<van-button
round
block
type="info"
native-type="submit"
@click="updateContactInfo_click"
>保存</van-button>
</div>
<!-- 户口性质 -->
......@@ -159,7 +165,7 @@
<script lang="ts">
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast} from "vant";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
@Component({
......@@ -169,11 +175,14 @@ import { Component } from "vue-property-decorator";
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field,
[Field.name]: Field
}
})
export default class socialInfo extends Vue {
private obj: any = {};
private city: any = {};
private parents: any = [];
private childrens: any = [];
private show: boolean = false;
private showCategory: boolean = false;
private showSocialStatus: boolean = false;
......@@ -184,50 +193,109 @@ export default class socialInfo extends Vue {
private columns: any = {
category: ["城镇", "农业"],
socialStatus:["曾上过社会保险","从未上过社会保险"],
paymentType:["养老","失业","工伤","生育","医疗","住房"],
relationUnit:["与原单位已不存在任何劳动关系","与原单位仍保持劳动关系,社保由原单位缴纳"],
employmentStatus:["下岗","内退","其他"],
socialCity:["北京市","郑州市"]
socialStatus: ["曾上过社会保险", "从未上过社会保险"],
paymentType: ["养老", "失业", "工伤", "生育", "医疗", "住房"],
relationUnit: [
"与原单位已不存在任何劳动关系",
"与原单位仍保持劳动关系,社保由原单位缴纳"
],
employmentStatus: ["下岗", "内退", "其他"],
socialCity: [
{
text: "浙江",
children: [
{
text: "杭州",
children: [{ text: "西湖区" }, { text: "余杭区" }]
},
{
text: "温州",
children: [{ text: "鹿城区" }, { text: "瓯海区" }]
}
]
}
]
};
// 户口性质
onConfirmCategory(value:string, index:any) {
onConfirmCategory(value: string, index: any) {
this.obj.infoRegisteredResidence = value;
this.showCategory = false;
}
// 前期社保状态
onConfirmSocialStatus(value:string, index:any) {
onConfirmSocialStatus(value: string, index: any) {
this.obj.unitPreSocialStatus = value;
this.showSocialStatus = false;
}
// 前期缴费种类
onConfirmPaymentType(value:string, index:any) {
onConfirmPaymentType(value: string, index: any) {
this.obj.unitPrePaymentType = value;
this.showPaymentType = false;
}
// 原社保缴纳省市
onConfirmSocialCity(value:string, index:any) {
onConfirmSocialCity(value: string, index: any) {
this.obj.unitPreSocialCity = value;
this.showSocialCity = false;
}
// 与原单位关系
onConfirmRelationUnit(value:string, index:any) {
onConfirmRelationUnit(value: string, index: any) {
this.obj.unitRelationUnit = value;
this.showRelationUnit = false;
}
// 前期就业状态
onConfirmEmploymentStatus(value:string, index:any) {
onConfirmEmploymentStatus(value: string, index: any) {
this.obj.unitPreEmploymentStatus = value;
this.showEmploymentStatus = false;
}
private getCityList(): void {
this.$server.EmployeeService.getCityList({})
.then(res => {
console.log("citylist", res);
this.city = res;
for (let i = 0; i < this.city.length; i++) {
if (this.city[i].parentId == 0) {
this.parents.push(this.city[i]);
}
if (this.city[i].parentId != 0) {
this.childrens.push(this.city[i]);
}
}
//没有父节点的数据
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
// let fliterEvent = (parents:any, childrens:any) => {
// parents.forEach(parent => {
// childrens.forEach((current:any, index:any) => {
// if (current.parentId === parent.id) {
// let temp = JSON.parse(JSON.stringify(children));
// temp.splice(index, 1);
// fliterEvent([current], temp);
// typeof parent.children !== "undefined"
// ? parent.children.push(current)
// : (parent.children = [current]);
// }
// });
// });
// };
// function translator(parents, childrens) {
// fliterEvent(parents, childrens);
// return parents;
// }
})
.catch(error => {
console.log(error);
});
}
created() {
private getSocialInfo(): void {
let params = {
edId: this.$route.query.ed_id
};
......@@ -239,10 +307,12 @@ export default class socialInfo extends Vue {
})
.catch(error => {});
}
editInfo(): void {
this.show = true;
}
updateContactInfo() {
updateContactInfo_click() {
let data = {
id: this.$route.query.ed_id,
infoRegisteredResidence: this.obj.infoRegisteredResidence, // 户口性质
......@@ -293,6 +363,11 @@ export default class socialInfo extends Vue {
console.log(error);
});
}
created() {
this.getSocialInfo();
this.getCityList();
}
}
</script>
......
......@@ -3,6 +3,7 @@
*/
export interface EmployeeInterface {
getUserInfo(params: any): Promise<any>;
getCityList(params: any): Promise<any>; // 获取城市列表
getDispatchList(params: any): Promise<any>; //根据身份证获取用户所属派遣公司列表
getDispatchInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据)
getWorkInfoList(params: any): Promise<any>; //获取工作信息列表
......
......@@ -240,6 +240,15 @@ class EmployeeService implements EmployeeInterface {
return request.put(url, params, this.header)
}
/**
* 获取城市列表
* @param params
*/
public getCityList(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/dispatch/cities`;
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)
......
......@@ -80,21 +80,26 @@ export default class Index extends Vue {
private position: string = "";
private entry_date: string = "";
private id_no: string = "";
private ed_id: string = "8";
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));
let params={
spId:1,
idNo:this.$route.query.id_no
}
this.$server.EmployeeService.getDispatchInfo(params).then(res=>{
console.log(res)
}).catch(error=>{
console.log(error)
})
this.sp_id = this.$route.query.sp_id as string;
let params = {
spId: this.sp_id,
idNo: this.id_no
};
this.$server.EmployeeService.getDispatchInfo(params)
.then(res => {
console.log(res);
})
.catch(error => {
console.log(error);
});
}
}
</script>
......
......@@ -7,15 +7,15 @@
<p>可查看专项订单服务,使用职场小工具</p>
</div>
</a>-->
<a class="si-child" id="dispatch-employee" @click="toIndex">
<img src="../assets/images/agent/company-employee.png" alt />
<a class="si-child" id="dispatch-employee" @click="toIndex_click">
<img src="../assets/images/agent/dispatch-employee.png" alt />
<div class="si-child-desc">
<h4>我是派遣员工</h4>
<p>可查看编辑自己的劳务派遣员工档案信息</p>
</div>
</a>
<a class="si-child" id="flex-employee" @click="toFlex">
<img src="../assets/images/agent/company-employee.png" alt />
<img src="../assets/images/agent/flex-employee.png" alt />
<div class="si-child-desc">
<h4>我是灵活用工员工</h4>
<p>可查看灵活用工人员任务信息</p>
......@@ -37,17 +37,24 @@ export default class SelectIdentity extends Vue {
this.$router.push({ name: "FlexEmployee", query: { id_no: this.id_no } });
}
private toIndex(): void {
this.$router.push({ name: "Index", query: { id_no: this.id_no } });
private toIndex(sp_id: string): void {
this.$router.push({
name: "Index",
query: { id_no: this.id_no, sp_id: sp_id }
});
// this.$router.push({ name: "ChooseCompany", query: { id_no: this.id_no } });
}
private toIndex_click(): void {
const sp_id: string = "";
this.toIndex(sp_id);
}
async created() {
await this.$server.EmployeeService.getUserInfo({})
.then(res => {
if (res.data && res.data.uthStatus && res.data.uthStatus > 0) {
this.id_no = res.data.personalIdCardNo;
console.log("this.id_no=", this.id_no);
} else {
//TODO: 跳转到实名认证
}
......@@ -55,6 +62,13 @@ export default class SelectIdentity extends Vue {
.catch(err => {
console.log("err=", err);
});
this.$server.EmployeeService.getDispatchList({ idNo: this.id_no })
.then(res => {
console.log("getDispatchList res=", res);
})
.catch(err => {
console.log("err=", err);
});
}
}
</script>
......
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