Commit 48e7232e by 王玉曼

20210504

1 parent b565d415
...@@ -21,9 +21,21 @@ ...@@ -21,9 +21,21 @@
<div class="img"><img :src="form.avatar" alt="" /></div> <div class="img"><img :src="form.avatar" alt="" /></div>
<div class="right"> <div class="right">
<div> <div>
<span>{{form.remark ? form.remark: form.name+"_"+form.remarkCorpName }} &nbsp; &nbsp;</span <span
><span class="icon iconfont icon-man" v-if="form.gender == 1"></span> >{{
<span class="icon iconfont icon-xingbie" v-else-if="form.gender ==2"></span> form.remark
? form.remark
: form.name + "_" + form.remarkCorpName
}}
&nbsp; &nbsp;</span
><span
class="icon iconfont icon-man"
v-if="form.gender == 1"
></span>
<span
class="icon iconfont icon-xingbie"
v-else-if="form.gender == 2"
></span>
<van-icon name="manager" color="#9c9c9c" v-else /> <van-icon name="manager" color="#9c9c9c" v-else />
</div> </div>
<div class="c9"> <div class="c9">
...@@ -53,7 +65,16 @@ ...@@ -53,7 +65,16 @@
label="生日" label="生日"
placeholder="生日" placeholder="生日"
input-align="right" input-align="right"
@click="!flage ? (show = true) : ''"
/> />
<van-popup v-model="show"> 内容</van-popup>
<!-- <van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
/> -->
<!-- -------------------------- --> <!-- -------------------------- -->
<van-field <van-field
v-model="form.email" v-model="form.email"
...@@ -103,67 +124,72 @@ ...@@ -103,67 +124,72 @@
</div> </div>
</template> </template>
<script> <script>
import { getCustomerInfo, getWeCustomerInfo } from '@/api/portrait' import { getCustomerInfo, getWeCustomerInfo } from "@/api/portrait";
import { getUserInfo } from '@/api/common' import { getUserInfo } from "@/api/common";
export default { export default {
data() { data() {
return { return {
flage: true, flage: true,
// 选择生日
show: false,
minDate: new Date(1940, 0, 1),
maxDate: new Date(),
// 接口开始 // 接口开始
// 表单数据 // 表单数据
form: { form: {
externalUserid: '', // 客户Id externalUserid: "", // 客户Id
userId: this.$store.state.userId, // 员工Id userId: this.$store.state.userId, // 员工Id
name: '', // 昵称 name: "", // 昵称
remarkMobiles: '', // 手机号 remarkMobiles: "", // 手机号
birthday: '', // 客户生日 birthday: "", // 客户生日
age: '', // 年龄 age: "", // 年龄
email: '', // 邮箱 email: "", // 邮箱
address: '', // 地址 address: "", // 地址
qq: '', // qq qq: "", // qq
position: '', // 职业 position: "", // 职业
remarkCorpName: '', // 公司 remarkCorpName: "", // 公司
description: '', // 其他描述 description: "", // 其他描述
}, },
} };
}, },
computed: { computed: {
// 获取客户年龄 // 获取客户年龄
}, },
created() { created() {
this.form.externalUserid = this.$route.query.customerId this.form.externalUserid = this.$route.query.customerId;
// 获取客户详细信息 // 获取客户详细信息
getCustomerInfo({ getCustomerInfo({
externalUserid: this.form.externalUserid, externalUserid: this.form.externalUserid,
userId: this.form.userId, userId: this.form.userId,
}) })
.then(({ data }) => { .then(({ data }) => {
console.log(data) console.log(data);
this.form = data this.form = data;
console.log(this.form) console.log(this.form);
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err);
}) });
}, },
methods: { methods: {
// 选择生日
edit() { edit() {
this.flage = !this.flage this.flage = !this.flage;
}, },
// 点击保存按钮提交表单 // 点击保存按钮提交表单
saveUserInformation() { saveUserInformation() {
this.flage = !this.flage this.flage = !this.flage;
getWeCustomerInfo(this.form) getWeCustomerInfo(this.form)
.then((data) => { .then((data) => {
console.log(data) console.log(data);
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err);
}) });
}, },
}, },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -177,7 +203,7 @@ export default { ...@@ -177,7 +203,7 @@ export default {
.header { .header {
margin: 20px 10px 10px; margin: 20px 10px 10px;
vertical-align: center; vertical-align: center;
// text-align: center; // text-align: center;
} }
.van-icon-cross { .van-icon-cross {
position: absolute; position: absolute;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="data" @click="goRoute('/detail')">详细资料></div> <div class="data" @click="goRoute('/customerDetail')">详细资料></div>
</div> </div>
<div class="detail"> <div class="detail">
<div class="c9">手机号</div> <div class="c9">手机号</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!