Commit 021dffe9 by cocomilk2012
parents 6099b3bd 4296a7bd
......@@ -56,3 +56,8 @@ outline: none;
text-decoration: none;
-webkit-tap-highlight-color:rgba(255,255,255,0);
}
.submit_btn{
position: absolute;
bottom: 0;
width: 100%;
}
\ No newline at end of file
......@@ -100,7 +100,8 @@ export default class cityList extends Vue {
}
onConfirm(values: any) {
console.log(values);
console.log(values)
this.$emit('childCityList',values)
}
}
</script>
......
......@@ -5,8 +5,8 @@
<i>18821992017</i>
</div>
<div class="header">
<div class="header_name">哈撒剋</div>
<div class="header_info">女|1888-01-01</div>
<div class="header_name">{{employee_name}}</div>
<div class="header_info">{{employee_sex}}|{{employee_birthday}}</div>
</div>
<work-info />
<person-info :isEdit="isEdit" />
......@@ -53,7 +53,15 @@ import archiveQuestion from "./archives/archiveQuestion.vue";
}
})
export default class archives extends Vue {
private isEdit:any="123"
private isEdit:any="123";
private employee_name:any="";
private employee_birthday:any="";
private employee_sex:any="";
created(){
this.employee_name=localStorage.getItem("name") as string;
this.employee_birthday=localStorage.getItem("birthday") as string;
this.employee_sex=localStorage.getItem("sex") as string;
}
}
</script>
......
......@@ -11,8 +11,8 @@
@childEndDate="childEndDate"
/>
<van-field v-model="description" label="工作内容" placeholder="请填写工作内容(非必填)" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="saveWorkInfo">保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="saveWorkInfo">保存</van-button>
</div>
</van-form>
</div>
......@@ -56,7 +56,6 @@ export default class eduExperience extends Vue {
private showStartDate: boolean = false;
private showEndDate: boolean = false;
//获取日期组件中的值
childStartDate(item: any) {
this.workStartDate = item;
......
......@@ -32,7 +32,7 @@
</div>
</div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '100%' }">
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<van-form>
<van-field v-model="obj.contactMobile" label="手机号码" placeholder="请填写手机号码" />
<van-field v-model="obj.contactTelephone" label="固定电话" placeholder="请填写固定电话" />
......@@ -40,8 +40,8 @@
<van-field v-model="obj.contactPostcode" label="邮政编码" placeholder="请填写邮政编码" />
<van-field v-model="obj.contactCurrentResidence" label="户口所在地" placeholder="请填写户口所在地" />
<van-field v-model="obj.infoRegisteredResidenceCity" label="现在居住地" placeholder="请填写现在居住地" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateContactInfo">保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="updateContactInfo">保存</van-button>
</div>
</van-form>
</van-popup>
......@@ -90,11 +90,14 @@ export default class contactInfo extends Vue {
contactTelephone: this.obj.contactTelephone,
infoRegisteredResidenceCity: this.obj.infoRegisteredResidenceCity
};
if (!this.obj.contactMobile || !(/^1\d{10}$/.test(this.obj.contactMobile))) {
if (!this.obj.contactMobile || !/^1\d{10}$/.test(this.obj.contactMobile)) {
Toast("请填写正确的手机号码");
return;
}
if (!this.obj.contactTelephone || !(/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(this.obj.contactTelephone))) {
if (
!this.obj.contactTelephone ||
!/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(this.obj.contactTelephone)
) {
Toast("请填写正确的固定电话");
return;
}
......@@ -102,7 +105,10 @@ export default class contactInfo extends Vue {
Toast("请填写紧急联系电话");
return;
}
if (!this.obj.contactPostcode || !(/^[0-9]\d{5}(?!\d)$/.test(this.obj.contactPostcode))) {
if (
!this.obj.contactPostcode ||
!/^[0-9]\d{5}(?!\d)$/.test(this.obj.contactPostcode)
) {
Toast("请填写正确的邮政编码");
return;
}
......@@ -119,7 +125,7 @@ export default class contactInfo extends Vue {
if (res == true) {
Toast.success("保存成功");
this.show = false;
}else{
} else {
Toast.success(res.message);
}
})
......
......@@ -25,8 +25,8 @@
@childStartDate="childStartDate"
@childEndDate="childEndDate"
/>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="addEduInfo">保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="addEduInfo">保存</van-button>
</div>
</van-form>
</div>
......
......@@ -25,11 +25,9 @@
@childStartDate="childStartDate"
@childEndDate="childEndDate"
/>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button>
</div>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="deleteEduInfo">删除</van-button>
<div class="edu_button">
<div @click="updateEduInfo">修改</div>
<div @click="deleteEduInfo">删除</div>
</div>
</van-form>
</div>
......@@ -101,11 +99,10 @@ export default class eduExperience extends Vue {
id: this.childItem.id,
major: this.childItem.major
};
this.$server.EmployeeService.updateEduExperience(params)
.then(res => {
this.$server.EmployeeService.updateEduExperience(params).then(res => {
Toast.success("修改成功");
this.$emit("popupShow");
})
});
}
//删除
deleteEduInfo() {
......@@ -133,4 +130,48 @@ export default class eduExperience extends Vue {
}
</script>
<style lang="less" scoped>
.edu_button {
display: flex;
position: absolute;
bottom: 0;
width: 100%;
height: 50px;
align-items: center;
&::before {
position: absolute;
box-sizing: border-box;
content: " ";
pointer-events: none;
right: 0;
bottom: 50px;
left: 0;
border-bottom: 0.02667rem solid #ebedf0;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5);
}
div {
background: white;
width: 50%;
text-align: center;
font-size: 14px;
color: #666;
&:last-child {
color: #fc3e30;
&::before {
position: absolute;
box-sizing: border-box;
content: " ";
width: 1px;
height: 50px;
background: #ebedf0;
left: 50%;
top: 0;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5);
}
}
}
}
</style>
\ No newline at end of file
......@@ -52,11 +52,7 @@
@click="showBirthplace = true"
/>
<van-popup v-model="showBirthplace" position="bottom">
<van-area
:area-list="areaList"
@confirm="onConfirmBirthplace"
@cancel="showArea = false"
/>
<city-list @childCityList="birthCity" />
</van-popup>
<!-- 民族 -->
<!-- <van-field
......@@ -74,8 +70,8 @@
@confirm="onConfirmNation"
@cancel="showNation = false"
/>
</van-popup> -->
<popup-picker :label="label"/>
</van-popup>-->
<popup-picker :label="label" />
<!-- 政治面貌 -->
<van-field
readonly
......@@ -154,33 +150,29 @@
@click="showFile = true"
/>
<van-popup v-model="showFile" position="bottom">
<van-picker
show-toolbar
:columns="columns.maternity"
@confirm="onConfirmFile"
@cancel="showFile = false"
/>
<city-list @childCityList="localCity" />
</van-popup>
<!-- 开始工作时间 -->
<!-- <van-field
<van-field
readonly
clickable
:value="obj.infoWorkStartDate"
label="开始工作时间"
placeholder="请选择"
@click="showMaternity = true"
@click="showWorkStartDate = true"
/>
<van-popup v-model="showMaternity" position="bottom">
<van-picker
show-toolbar
:columns="columns.maternity"
<van-popup v-model="showWorkStartDate" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
@confirm="onConfirmWorkDate"
@cancel="showMaternity = false"
@cancel="showWorkStartDate = false"
/>
</van-popup> -->
</van-popup>
</van-form>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updatePersonInfo">保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="updatePersonInfo">保存</van-button>
</div>
</van-popup>
</div>
......@@ -188,34 +180,46 @@
<script lang="ts">
import Vue from "vue";
import { Icon, Button, Popup, Form, Picker, Field, Area, Toast } from "vant";
import { Component,Prop } from "vue-property-decorator";
import popupPicker from "@/components/common/popupPicker.vue"
// import AreaList from "@/assets/js/area.js";
import {
Icon,
Button,
Popup,
Form,
Picker,
Field,
DatetimePicker,
Toast
} from "vant";
import { Component, Prop } from "vue-property-decorator";
import popupPicker from "@/components/common/popupPicker.vue";
import cityList from "@/components/common/cityList.vue";
import dateSelect from "@/components/common/dateSelect.vue";
import { formatDate } from "../../utils/public";
@Component({
components: {
[Button.name]: Button,
[Icon.name]: Icon,
[Popup.name]: Popup,
[Picker.name]: Picker,
[DatetimePicker.name]: DatetimePicker,
[Field.name]: Field,
// [Area.name]: Area,
[Form.name]: Form,
popupPicker
popupPicker,
cityList
}
})
export default class personInfo extends Vue {
//获取父组件中的isEdit
@Prop({
type:String,
required:true,
default:''
}) isEdit !:string
type: String,
required: true,
default: ""
})
isEdit!: string;
private obj: any = {};
private show: boolean = false;
private label: any = "民族";
// private areaList: object = AreaList;
private showBirthplace: boolean = false;
private showNation: boolean = false;
private showPolitical: boolean = false;
......@@ -224,7 +228,7 @@ export default class personInfo extends Vue {
private showMaternity: boolean = false;
private showFile: boolean = false;
private showWorkStartDate: boolean = false;
private areaList: object = {};
private currentDate: Date = new Date();
private columns: any = {
nation: ["汉族", "回族", "蒙古族"],
political: ["群众", "共青团员", "预备党员", "中共党员", "其他"],
......@@ -249,19 +253,18 @@ export default class personInfo extends Vue {
let params = {
edId: this.$route.query.ed_id
};
console.log("props="+this.$props.isEdit)
this.$server.EmployeeService.getPersonInfo(params)
.then(res => {
this.obj = res;
console.log(res);
})
.catch(error => {});
}
editInfo(): void {
this.show = true;
}
//出生地
onConfirmBirthplace(values: any) {
this.obj.infoBirthCity = values.map((item: any) => item.name).join("/");
birthCity(values: any) {
this.obj.infoBirthCity = values.join("/");
this.showBirthplace = false;
}
//民族
......@@ -290,15 +293,16 @@ export default class personInfo extends Vue {
this.showMaternity = false;
}
//档案所在地
onConfirmFile(value: any) {
this.obj.infoFileLocation = value;
localCity(values: any) {
this.obj.infoFileLocation = values.map((item: any) => item.name).join("/");
this.showFile = false;
}
//开始工作时间
onConfirmWorkDate(value: any) {
this.obj.infoWorkStartDate = value;
this.obj.infoWorkStartDate = formatDate(value, "yyyy-MM-dd");
this.showWorkStartDate = false;
}
updatePersonInfo() {
let params = {
id: this.$route.query.ed_id,
......@@ -321,6 +325,8 @@ export default class personInfo extends Vue {
console.log(error);
});
}
}
</script>
......
......@@ -35,7 +35,7 @@
<label>{{obj.unitPreEmploymentStatus}}</label>
</div>
</div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '100%' }">
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<van-form>
<!-- <van-field v-model="obj.infoRegisteredResidence" label="户口性质" placeholder="请选择户口性质" /> -->
<van-field
......@@ -93,15 +93,8 @@
placeholder="请选择"
@click="showEmploymentStatus = true"
/>
<div style="margin: 16px;">
<van-button
round
block
type="info"
native-type="submit"
@click="updateContactInfo_click"
>保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="updateContactInfo_click">保存</van-button>
</div>
<!-- 户口性质 -->
......@@ -133,12 +126,7 @@
</van-popup>
<!-- 原社保缴纳省市 -->
<van-popup v-model="showSocialCity" position="bottom">
<van-picker
show-toolbar
:columns="columns.socialCity"
@confirm="onConfirmSocialCity"
@cancel="showSocialCity = false"
/>
<city-list @childCityList="socialCity" />
</van-popup>
<!-- 与原单位关系 -->
<van-popup v-model="showRelationUnit" position="bottom">
......@@ -167,6 +155,7 @@
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
import cityList from "@/components/common/cityList.vue";
@Component({
components: {
......@@ -175,7 +164,8 @@ import { Component } from "vue-property-decorator";
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field
[Field.name]: Field,
cityList
}
})
export default class socialInfo extends Vue {
......@@ -249,72 +239,13 @@ export default class socialInfo extends Vue {
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);
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) => {
// 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);
});
}
private getSocialInfo(): void {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getSocialInfo(params)
.then(res => {
// console.log("res=" + JSON.stringify(res)+'社保信息');
this.$server.EmployeeService.getSocialInfo(params).then(res => {
this.obj = res;
})
.catch(error => {});
});
}
private getSalaryInfo(): void {
......@@ -327,13 +258,9 @@ export default class socialInfo extends Vue {
};
console.log(params);
this.$server.EmployeeService.getSalaryInfo(params)
.then(res => {
// console.log("res=" + JSON.stringify(res)+'工资条');
this.$server.EmployeeService.getSalaryInfo(params).then(res => {
this.obj = res;
})
.catch(error => {});
});
}
editInfo(): void {
......@@ -391,17 +318,21 @@ export default class socialInfo extends Vue {
console.log(error);
});
}
socialCity(values: any) {
this.obj.unitPreSocialCity = values.join("/");
this.showSocialCity = false;
}
created() {
this.getSalaryInfo();
this.getSocialInfo();
this.getCityList();
}
}
</script>
<style lang="less" scoped>
.content /deep/ .van-field__label{
width: 110px;
}
.content {
margin-top: 10px;
background: white;
......
......@@ -19,14 +19,13 @@
<label>{{obj.expertiseQualification}}</label>
</div>
</div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '100%' }">
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<van-form>
<van-field v-model="obj.expertiseTechnologySpecialty" label="技术特长" placeholder="请填写技术特长" />
<van-field v-model="obj.expertiseTechnologyTitle" label="技术职称" placeholder="请填写技术职称" />
<van-field v-model="obj.expertiseQualification" label="资格证书" placeholder="请填写资格证书" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateContactInfo">保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="updateContactInfo">保存</van-button>
</div>
</van-form>
</van-popup>
......
......@@ -11,11 +11,9 @@
@childEndDate="childEndDate"
/>
<van-field v-model="childItem.description" label="工作内容" placeholder="请填写工作内容(非必填)" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button>
</div>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="deleteEduInfo">删除</van-button>
<div class="work_button">
<div @click="updateWorkInfo">修改</div>
<div @click="deleteWorkInfo">删除</div>
</div>
</van-form>
</div>
......@@ -70,7 +68,7 @@ export default class eduExperience extends Vue {
this.childItem.workEndDate = item;
}
//修改
updateEduInfo() {
updateWorkInfo() {
let params = {
description: this.childItem.description,
edId: this.childItem.id,
......@@ -85,7 +83,7 @@ export default class eduExperience extends Vue {
});
}
//删除
deleteEduInfo() {
deleteWorkInfo() {
let params = {
edId: this.childItem.id
};
......@@ -102,4 +100,48 @@ export default class eduExperience extends Vue {
}
</script>
<style lang="less" scoped>
.work_button {
display: flex;
position: absolute;
bottom: 0;
width: 100%;
height: 50px;
align-items: center;
&::before {
position: absolute;
box-sizing: border-box;
content: " ";
pointer-events: none;
right: 0;
bottom: 50px;
left: 0;
border-bottom: 0.02667rem solid #ebedf0;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5);
}
div {
background: white;
width: 50%;
text-align: center;
font-size: 14px;
color: #666;
&:last-child {
color: #fc3e30;
&::before {
position: absolute;
box-sizing: border-box;
content: " ";
width: 1px;
height: 50px;
background: #ebedf0;
left: 50%;
top: 0;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5);
}
}
}
}
</style>
\ No newline at end of file
......@@ -23,14 +23,14 @@
<label>{{obj.bankNo}}</label>
</div>
</div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '100%' }">
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<van-form>
<van-field v-model="obj.bankAccount" label="账户名称" placeholder="请填写账户名称" />
<van-field v-model="obj.bankName" label="银行名称" placeholder="请填写银行名称" />
<van-field v-model="obj.bankOpen" label="开户行" placeholder="请填写开户行" />
<van-field v-model="obj.bankNo" label="银行卡号" placeholder="请填写银行卡号" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateCardInfo">保存</van-button>
<div class="submit_btn">
<van-button type="primary" block @click="updateCardInfo">保存</van-button>
</div>
</van-form>
</van-popup>
......
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