Commit 994346da by lishengfu

update

parent ade06ad5
This diff could not be displayed because it is too large.
......@@ -34,12 +34,12 @@
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<van-form>
<van-field v-model="contactMobile" label="手机号码" placeholder="请填写手机号码" />
<van-field v-model="contactTelephone" label="固定电话" placeholder="请填写固定电话" />
<van-field v-model="contactEmergencyMobile" label="紧急联系电话" placeholder="请填写紧急联系电话" />
<van-field v-model="contactPostcode" label="邮政编码" placeholder="请填写邮政编码" />
<van-field v-model="contactCurrentResidence" label="户口所在地" placeholder="请填写户口所在地" />
<van-field v-model="infoRegisteredResidenceCity" label="现在居住地" placeholder="请填写现在居住地" />
<van-field v-model="obj.contactMobile" label="手机号码" placeholder="请填写手机号码" />
<van-field v-model="obj.contactTelephone" label="固定电话" placeholder="请填写固定电话" />
<van-field v-model="obj.contactEmergencyMobile" label="紧急联系电话" placeholder="请填写紧急联系电话" />
<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>
......@@ -65,13 +65,7 @@ import qs from "qs";
}
})
export default class contactInfo extends Vue {
private contactMobile: string = "";
private contactTelephone: string = "";
private contactEmergencyMobile: string = "";
private contactPostcode: string = "";
private contactCurrentResidence: string = "";
private infoRegisteredResidenceCity: string = "";
private obj: object = {};
private obj: any = {};
private show: boolean = false;
created() {
let params = {
......@@ -89,34 +83,34 @@ export default class contactInfo extends Vue {
updateContactInfo() {
let data = {
id: this.$route.query.ed_id,
contactCurrentResidence: this.contactCurrentResidence,
contactEmergencyMobile: this.contactEmergencyMobile,
contactMobile: this.contactMobile,
contactPostcode: this.contactPostcode,
contactTelephone: this.contactTelephone,
infoRegisteredResidenceCity: this.infoRegisteredResidenceCity
contactCurrentResidence: this.obj.contactCurrentResidence,
contactEmergencyMobile: this.obj.contactEmergencyMobile,
contactMobile: this.obj.contactMobile,
contactPostcode: this.obj.contactPostcode,
contactTelephone: this.obj.contactTelephone,
infoRegisteredResidenceCity: this.obj.infoRegisteredResidenceCity
};
if (!this.contactMobile || !(/^1\d{10}$/.test(this.contactMobile))) {
if (!this.obj.contactMobile || !(/^1\d{10}$/.test(this.obj.contactMobile))) {
Toast("请填写正确的手机号码");
return;
}
if (!this.contactTelephone || !(/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(this.contactTelephone))) {
if (!this.obj.contactTelephone || !(/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(this.obj.contactTelephone))) {
Toast("请填写正确的固定电话");
return;
}
if (!this.contactEmergencyMobile) {
if (!this.obj.contactEmergencyMobile) {
Toast("请填写紧急联系电话");
return;
}
if (!this.contactPostcode || !(/^[0-9]\d{5}(?!\d)$/.test(this.contactPostcode))) {
if (!this.obj.contactPostcode || !(/^[0-9]\d{5}(?!\d)$/.test(this.obj.contactPostcode))) {
Toast("请填写正确的邮政编码");
return;
}
if (!this.contactCurrentResidence) {
if (!this.obj.contactCurrentResidence) {
Toast("请填写户口所在地");
return;
}
if (!this.infoRegisteredResidenceCity) {
if (!this.obj.infoRegisteredResidenceCity) {
Toast("请填写现在居住地");
return;
}
......@@ -127,7 +121,7 @@ export default class contactInfo extends Vue {
}
})
.catch(error => {
console.log(error);
// console.log(error);
});
}
}
......
......@@ -40,37 +40,14 @@
</div>
</div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<!-- 出生地 -->
<van-field
readonly
clickable
name="datetimePicker"
:value="value"
label="出生地"
placeholder="请选择出生地"
@click="showBirthplace = true"
/>
<van-popup v-model="showBirthplace" position="bottom">
<van-area :area-list="areaList" @confirm="onConfirm" @cancel="showArea = false" />
</van-popup>
<!-- <van-field
readonly
clickable
name="picker"
:value="value"
label="出生地"
placeholder="点击选择出生地"
@click="showPicker = true"
/>
<select-info v-model="showPicker" />-->
<select-info />
</van-popup>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Icon, Popup, Field, Area } from "vant";
import { Icon, Popup } from "vant";
import { Component } from "vue-property-decorator";
import selectInfo from "@/components/archives/selectInfo.vue";
......@@ -78,17 +55,11 @@ import selectInfo from "@/components/archives/selectInfo.vue";
components: {
[Icon.name]: Icon,
[Popup.name]: Popup,
[Field.name]: Field,
[Area.name]: Area,
selectInfo
}
})
export default class personInfo extends Vue {
private obj: object = {};
private showPicker: boolean = false;
private showBirthplace: boolean = false;
private areaList:object= {};
private value: any = "";
private show: boolean = false;
created() {
......@@ -104,10 +75,7 @@ export default class personInfo extends Vue {
editInfo(): void {
this.show = true;
}
onConfirm(values:any) {
this.value = values.map((item:any) => item.name).join('/');
this.showBirthplace = false;
}
}
</script>
......
......@@ -2,20 +2,42 @@
<template>
<div>
<van-form>
<van-popup position="bottom">
<van-picker
show-toolbar
:columns="columns.list.one"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
<!-- 出生地 -->
<van-field
readonly
clickable
:value="value"
label="出生地"
placeholder="请选择出生地"
@click="showBirthplace = true"
/>
<van-popup v-model="showBirthplace" position="bottom">
<van-area :area-list="areaList" @confirm="onConfirm" @cancel="showArea = false" />
</van-popup>
<!-- 民族 -->
<!-- <van-field
readonly
clickable
:value="value"
label="民族"
placeholder="请选择"
@click="showNation = true"
/>
<van-popup v-model="showNation" position="bottom">
<van-picker
show-toolbar
:columns="columns.nation"
@confirm="onConfirm"
@cancel="showNation = false"
/>
</van-popup> -->
</van-form>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Popup, Form, Picker, Field } from "vant";
import AreaList from "@/assets/js/area.js";
import { Popup, Form, Picker, Field, Area } from "vant";
import { Component } from "vue-property-decorator";
@Component({
......@@ -23,23 +45,28 @@ import { Component } from "vue-property-decorator";
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field
[Field.name]: Field,
[Area.name]: Area
}
})
export default class personInfo extends Vue {
private obj: object = {};
private show: boolean = false;
private value: string = "";
private areaList: object = AreaList;
private showBirthplace: boolean = false;
private showNation: boolean = false;
private columns: any = {
list:{
one:['1','2','3'],
two:['4','5','6'],
three:['7','8','9']
}
nation: ["汉族", "回族", "蒙古族"],
political: ["4", "5", "6"],
edu: ["7", "8", "9"],
marry: ["7", "8", "9"],
Maternity: ["7", "8", "9"]
};
onConfirm(value: string): void {
this.value = value;
onConfirm(values: any) {
this.value = values.map((item: any) => item.name).join("/");
this.showBirthplace = false;
}
}
</script>
......
......@@ -3,7 +3,7 @@
<div class="header">
<div class="tip"></div>
<div class="title">工资卡信息</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" />
<van-icon size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
</div>
<div class="box">
<div class="item">
......@@ -23,32 +23,67 @@
<label>{{obj.bankNo}}</label>
</div>
</div>
<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>
</van-form>
</van-popup>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Icon } from "vant";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
@Component({
components: {
[Icon.name]: Icon
[Button.name]: Button,
[Icon.name]: Icon,
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field
}
})
export default class wageCardInfo extends Vue {
obj: object = {};
private show: boolean = false;
obj: any = {};
created() {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getWageCardInfo(params)
.then(res => {
// console.log("res=" + JSON.stringify(res));
this.obj = res;
})
.catch(error => {});
}
editInfo(): void {
this.show = true;
}
updateCardInfo() {
let params = {
id: this.$route.query.ed_id,
bankAccount: this.obj.bankAccount,
bankName: this.obj.bankName,
bankNo: this.obj.bankOpen,
bankOpen: this.obj.bankNo
};
this.$server.EmployeeService.saveWageCardInfo(params)
.then(res => {
console.log(res);
})
.catch(error => {
console.log(error);
});
}
}
</script>
......
......@@ -152,7 +152,7 @@ class EmployeeService implements EmployeeInterface {
* @params params
*/
public saveWageCardInfo(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/contact/salary/card/info`;
let url = urls.employeeUrl + `/api/user/employee/salary/card/save`;
return request.post(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