Commit aebe3bc9 by e

updata

parent 71b1baac
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
readonly readonly
clickable clickable
v-model="obj.infoRegisteredResidence" v-model="obj.infoRegisteredResidence"
:value="value"
label="户口性质" label="户口性质"
placeholder="请选择" placeholder="请选择"
@click="showCategory = true" @click="showCategory = true"
...@@ -52,7 +51,6 @@ ...@@ -52,7 +51,6 @@
readonly readonly
clickable clickable
v-model="obj.unitPreSocialStatus" v-model="obj.unitPreSocialStatus"
:value="value"
label="前期社保状态" label="前期社保状态"
placeholder="请选择" placeholder="请选择"
@click="showSocialStatus = true" @click="showSocialStatus = true"
...@@ -62,7 +60,6 @@ ...@@ -62,7 +60,6 @@
readonly readonly
clickable clickable
v-model="obj.unitPrePaymentType" v-model="obj.unitPrePaymentType"
:value="value"
label="前期缴费种类" label="前期缴费种类"
placeholder="请选择" placeholder="请选择"
@click="showPaymentType = true" @click="showPaymentType = true"
...@@ -72,7 +69,6 @@ ...@@ -72,7 +69,6 @@
readonly readonly
clickable clickable
v-model="obj.unitPreSocialCity" v-model="obj.unitPreSocialCity"
:value="value"
label="原社保缴纳省市" label="原社保缴纳省市"
placeholder="请选择" placeholder="请选择"
@click="showSocialCity = true" @click="showSocialCity = true"
...@@ -84,7 +80,6 @@ ...@@ -84,7 +80,6 @@
readonly readonly
clickable clickable
v-model="obj.unitRelationUnit" v-model="obj.unitRelationUnit"
:value="value"
label="与原单位关系" label="与原单位关系"
placeholder="请选择" placeholder="请选择"
@click="showRelationUnit = true" @click="showRelationUnit = true"
...@@ -94,14 +89,19 @@ ...@@ -94,14 +89,19 @@
readonly readonly
clickable clickable
v-model="obj.unitPreEmploymentStatus" v-model="obj.unitPreEmploymentStatus"
:value="value"
label="前期就业状态" label="前期就业状态"
placeholder="请选择" placeholder="请选择"
@click="showEmploymentStatus = true" @click="showEmploymentStatus = true"
/> />
<div style="margin: 16px;"> <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> </div>
<!-- 户口性质 --> <!-- 户口性质 -->
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
<script lang="ts"> <script lang="ts">
import Vue from "vue"; 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"; import { Component } from "vue-property-decorator";
@Component({ @Component({
...@@ -175,11 +175,13 @@ import { Component } from "vue-property-decorator"; ...@@ -175,11 +175,13 @@ import { Component } from "vue-property-decorator";
[Popup.name]: Popup, [Popup.name]: Popup,
[Form.name]: Form, [Form.name]: Form,
[Picker.name]: Picker, [Picker.name]: Picker,
[Field.name]: Field, [Field.name]: Field
} }
}) })
export default class socialInfo extends Vue { export default class socialInfo extends Vue {
private obj: any = {}; private obj: any = {};
private city: any = {};
private main_city: any = [];
private show: boolean = false; private show: boolean = false;
private showCategory: boolean = false; private showCategory: boolean = false;
private showSocialStatus: boolean = false; private showSocialStatus: boolean = false;
...@@ -190,50 +192,127 @@ export default class socialInfo extends Vue { ...@@ -190,50 +192,127 @@ export default class socialInfo extends Vue {
private columns: any = { private columns: any = {
category: ["城镇", "农业"], category: ["城镇", "农业"],
socialStatus:["曾上过社会保险","从未上过社会保险"], socialStatus: ["曾上过社会保险", "从未上过社会保险"],
paymentType:["养老","失业","工伤","生育","医疗","住房"], paymentType: ["养老", "失业", "工伤", "生育", "医疗", "住房"],
relationUnit:["与原单位已不存在任何劳动关系","与原单位仍保持劳动关系,社保由原单位缴纳"], relationUnit: [
employmentStatus:["下岗","内退","其他"], "与原单位已不存在任何劳动关系",
socialCity:["北京市","郑州市"] "与原单位仍保持劳动关系,社保由原单位缴纳"
],
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.obj.infoRegisteredResidence = value;
this.showCategory = false; this.showCategory = false;
} }
// 前期社保状态 // 前期社保状态
onConfirmSocialStatus(value:string, index:any) { onConfirmSocialStatus(value: string, index: any) {
this.obj.unitPreSocialStatus = value; this.obj.unitPreSocialStatus = value;
this.showSocialStatus = false; this.showSocialStatus = false;
} }
// 前期缴费种类 // 前期缴费种类
onConfirmPaymentType(value:string, index:any) { onConfirmPaymentType(value: string, index: any) {
this.obj.unitPrePaymentType = value; this.obj.unitPrePaymentType = value;
this.showPaymentType = false; this.showPaymentType = false;
} }
// 原社保缴纳省市 // 原社保缴纳省市
onConfirmSocialCity(value:string, index:any) { onConfirmSocialCity(value: string, index: any) {
this.obj.unitPreSocialCity = value; this.obj.unitPreSocialCity = value;
this.showSocialCity = false; this.showSocialCity = false;
} }
// 与原单位关系 // 与原单位关系
onConfirmRelationUnit(value:string, index:any) { onConfirmRelationUnit(value: string, index: any) {
this.obj.unitRelationUnit = value; this.obj.unitRelationUnit = value;
this.showRelationUnit = false; this.showRelationUnit = false;
} }
// 前期就业状态 // 前期就业状态
onConfirmEmploymentStatus(value:string, index:any) { onConfirmEmploymentStatus(value: string, index: any) {
this.obj.unitPreEmploymentStatus = value; this.obj.unitPreEmploymentStatus = value;
this.showEmploymentStatus = false; 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);
});
}
private getSocialInfo(): void {
created() {
let params = { let params = {
edId: this.$route.query.ed_id edId: this.$route.query.ed_id
}; };
...@@ -245,10 +324,12 @@ export default class socialInfo extends Vue { ...@@ -245,10 +324,12 @@ export default class socialInfo extends Vue {
}) })
.catch(error => {}); .catch(error => {});
} }
editInfo(): void { editInfo(): void {
this.show = true; this.show = true;
} }
updateContactInfo() {
updateContactInfo_click() {
let data = { let data = {
id: this.$route.query.ed_id, id: this.$route.query.ed_id,
infoRegisteredResidence: this.obj.infoRegisteredResidence, // 户口性质 infoRegisteredResidence: this.obj.infoRegisteredResidence, // 户口性质
...@@ -299,6 +380,11 @@ export default class socialInfo extends Vue { ...@@ -299,6 +380,11 @@ export default class socialInfo extends Vue {
console.log(error); console.log(error);
}); });
} }
created() {
this.getSocialInfo();
this.getCityList();
}
} }
</script> </script>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
export interface EmployeeInterface { export interface EmployeeInterface {
getUserInfo(params: any): Promise<any>; getUserInfo(params: any): Promise<any>;
getCityList(params: any): Promise<any>; // 获取城市列表
getDispatchList(params: any): Promise<any>; //根据身份证获取用户所属派遣公司列表 getDispatchList(params: any): Promise<any>; //根据身份证获取用户所属派遣公司列表
getDispatchInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据) getDispatchInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据)
getWorkInfoList(params: any): Promise<any>; //获取工作信息列表 getWorkInfoList(params: any): Promise<any>; //获取工作信息列表
......
...@@ -211,6 +211,15 @@ class EmployeeService implements EmployeeInterface { ...@@ -211,6 +211,15 @@ class EmployeeService implements EmployeeInterface {
return request.put(url, params, this.header) 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> { public getAgileWorker(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/employee/${params.idNo}/bill/item`; let url = urls.employeeUrl + `/api/user/employee/${params.idNo}/bill/item`;
return request.get(url, params, this.header) 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