Commit 994346da by lishengfu

update

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