Commit aebe3bc9 by e

updata

parent 71b1baac
......@@ -42,7 +42,6 @@
readonly
clickable
v-model="obj.infoRegisteredResidence"
:value="value"
label="户口性质"
placeholder="请选择"
@click="showCategory = true"
......@@ -52,7 +51,6 @@
readonly
clickable
v-model="obj.unitPreSocialStatus"
:value="value"
label="前期社保状态"
placeholder="请选择"
@click="showSocialStatus = true"
......@@ -62,7 +60,6 @@
readonly
clickable
v-model="obj.unitPrePaymentType"
:value="value"
label="前期缴费种类"
placeholder="请选择"
@click="showPaymentType = true"
......@@ -72,7 +69,6 @@
readonly
clickable
v-model="obj.unitPreSocialCity"
:value="value"
label="原社保缴纳省市"
placeholder="请选择"
@click="showSocialCity = true"
......@@ -84,7 +80,6 @@
readonly
clickable
v-model="obj.unitRelationUnit"
:value="value"
label="与原单位关系"
placeholder="请选择"
@click="showRelationUnit = true"
......@@ -94,14 +89,19 @@
readonly
clickable
v-model="obj.unitPreEmploymentStatus"
:value="value"
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>
<!-- 户口性质 -->
......@@ -165,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({
......@@ -175,11 +175,13 @@ 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 main_city: any = [];
private show: boolean = false;
private showCategory: boolean = false;
private showSocialStatus: boolean = false;
......@@ -190,50 +192,127 @@ 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", JSON.stringify(res));
this.city = res;
for (let i = 0; i < this.city.length; i++) {
if (this.city[i].parentId == 0) {
this.main_city.push(this.city[i].name);
}
}
console.log(this.main_city);
// let attr = {
// id: "id",
// parentId: "parentId",
// name: "name",
// rootId: 1
// };
// function toTreeData(data, attr) {
// let tree = [];
// let resData = data;
// for (let i = 0; i < resData.length; i++) {
// if (resData[i].parentId === attr.rootId) {
// let obj = {
// id: resData[i][attr.id],
// name: resData[i][attr.name],
// children: []
// };
// tree.push(obj);
// resData.splice(i, 1);
// i--;
// }
// }
// var run = function(treeArrs) {
// if (resData.length > 0) {
// for (let i = 0; i < treeArrs.length; i++) {
// for (let j = 0; j < resData.length; j++) {
// if (treeArrs[i].id === resData[j][attr.parentId]) {
// let obj = {
// id: resData[j][attr.id],
// name: resData[j][attr.name],
// children: []
// };
// treeArrs[i].children.push(obj);
// resData.splice(j, 1);
// j--;
// }
// }
// run(treeArrs[i].children);
// }
// }
// };
// run(tree);
// return tree;
// }
// let arr = toTreeData(allDatas, attr);
// console.log(arr);
})
.catch(error => {
console.log(error);
});
}
created() {
private getSocialInfo(): void {
let params = {
edId: this.$route.query.ed_id
};
......@@ -245,10 +324,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, // 户口性质
......@@ -299,6 +380,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>; //获取工作信息列表
......
......@@ -211,6 +211,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)
......
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