Commit 273bcb0b authored by 郭志伟's avatar 郭志伟

feat: 顾问终版联调

parent 879cbdd7
......@@ -20,6 +20,11 @@ export const getCulsuggestion = param => {
return req.get("consultant/suggestion/detail", param);
};
// 创建顾问订单-查询顾问信息
export const getCulInfo = param => {
return req.post("consultant/info", param);
};
// 查询顾问订单信息
export const getCulOrder = param => {
return req.get("consultant/order/query", param);
......
......@@ -3,5 +3,17 @@ export default {
serviceHours: "9:00-21:00",
sobot: "",
icp: "京ICP备15059975号",
copyright: "全天候保险代理股份有限公司"
copyright: "全天候保险代理股份有限公司",
consultant: {
name: "赵玉龙",
role: "金牌保险顾问",
card: "20192000000080002020003828",
id: "tgc5Dswotks",
qrcode: "",
avator: "",
serveNum: "-",
rate: "-%",
tel: "13888888888",
date: "9:00 ~ 21:00"
}
};
......@@ -9,19 +9,27 @@
<svg-icon icon-class="triangle-right" slot="button" />
</div>
<cr-popup v-model="show" position="bottom" get-container="body">
<cr-date-picker ref="datepicker" @confirm="onConfirm" @cancel="onCancel" />
<cr-date-picker
ref="datepicker"
@confirm="onConfirm"
@cancel="onCancel"
:init-value="initVal"
/>
</cr-popup>
</div>
</template>
<script>
import popupPickerMixin from "../mixins/popupPicker.mixin.js";
import { parseTime } from "@/service/utils";
export default {
name: "PopupDatePicker",
mixins: [popupPickerMixin],
data() {
return {
refName: "datepicker"
refName: "datepicker",
initVal: parseTime("", "{y}-{m}-{d}")
};
},
methods: {
......
export default {
basicHost: "http://yapi.quantgroups.com/mock/329/",
// basicHost: "http://192.168.29.211:8964/",
// basicHost: "http://yapi.quantgroups.com/mock/329/",
basicHost: "http://192.168.29.211:8964/",
wxAppId: "wx514de17b23d53a20"
};
......@@ -6,7 +6,7 @@
<h1>{{ info.name }}</h1>
<cr-tag><svg-icon icon-class="medal" />{{ info.role }}</cr-tag>
<small>执业保险销售资质:</small>
<small v-html="`${info.id.slice(0, 15)}<br />${info.id.slice(15)}`"></small>
<small v-html="`${info.card.slice(0, 15)}<br />${info.id.slice(15)}`"></small>
</div>
<cr-image
class="cul-hd-img"
......@@ -21,7 +21,7 @@
<div class="cul-entry-title">
<h3>您的专属保险方案</h3>
<small>CAPTIVE INSURANC</small>
<cr-tag>自己</cr-tag>
<cr-tag v-if="relation">{{ relation }}</cr-tag>
</div>
<svg-icon icon-class="arrow-right" />
</router-link>
......@@ -84,6 +84,10 @@
<script>
import copyright from "@/components/Copyright";
import Card from "@/components/Card";
import { getCulInfo } from "@/api/consultant";
import { getCulsuggestion } from "@/api/consultant";
import settings from "@/api/settings";
const { consultant } = settings;
export default {
name: "ConsultantExclusive",
components: {
......@@ -98,16 +102,9 @@ export default {
},
data() {
return {
relation: "",
info: {
name: "李玉婷",
role: "金牌保险顾问",
id: "20192000000080002020003828",
qrcode: "",
avator: "",
serveNum: 38100,
rate: "99.8%",
tel: "13888888888",
date: "9:00 ~ 21:00"
...consultant
},
oddsInsureList: [
{
......@@ -135,7 +132,34 @@ export default {
]
};
},
mounted() {}
watch: {
hasSuggestion: {
immediate: true,
handler(val) {
if (val) {
this.getSuggestion();
}
}
}
},
mounted() {
this.getInfo();
},
methods: {
async getInfo() {
const res = await getCulInfo({ consultantSecId: this.info.id });
if (res) {
this.info.rate = res.satisfaction;
this.info.serveNum = res.serviceNum;
}
},
async getSuggestion() {
const res = await getCulsuggestion();
if (res) {
this.relation = res.relation;
}
}
}
};
</script>
<style lang="less" src="./index.less" scoped></style>
......@@ -2,20 +2,18 @@
<div class="container">
<div class="cul-hd">
<div class="cul-hd-rec">
<small class="cul-hd-rec-sub">
HI,{{ baseInfo.userName }}{{ baseInfo.sex === 1 ? "先生" : "女士" }}
</small>
<h4 class="cul-hd-rec-title">以下是您本人的专属保险方案</h4>
<small class="cul-hd-rec-sub"> HI,{{ goodInfo.name || "-" }}</small>
<h4 class="cul-hd-rec-title">以下是您{{ goodInfo.relation || "-" }}的专属保险方案</h4>
</div>
<card title="1">
<h5 class="cul-hd-card-title" slot="header">
总保费:
<strong>{{ goodInfo.totalAmount }}</strong>
{{ baseInfo.unit }}
<strong>{{ goodInfo.totalAmount || "-" }}</strong>
元/年
</h5>
<p class="cul-hd-card-content">
推荐理由:
{{ goodInfo.remarks }}
{{ goodInfo.remarks || "-" }}
</p>
</card>
</div>
......@@ -106,13 +104,6 @@ export default {
goodInfo: {
ensure: []
},
baseInfo: {
userName: "王斌",
sex: 1,
amount: 10425,
unit: "元/年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
distList: [
{ title: "医疗险", price: "500万" },
{ title: "重疾险", price: "50万" },
......
......@@ -169,9 +169,9 @@ export default {
formData: {
birthday: "",
socialSecurity: "",
annualIncome: "",
loan: "",
addressCode: "111,111,11",
annualIncome: "10万",
loan: "无房贷",
addressCode: "北京市,北京市",
questionType: "",
userName: "",
gender: "",
......@@ -306,12 +306,16 @@ export default {
if (type === "annualIncome" || type === "loan") {
value = value[0];
}
// if (type === "area") {}
if (type === "addressCode") {
value = value.map(item => item.name).join(",");
}
this.formData[type] = value;
},
async onSubmit() {
const { formData } = this;
const res = await subCulQus(formData);
const { socialSecurity, gender } = formData;
const params = { ...formData, ...{ socialSecurity: +socialSecurity, gender: +gender } };
const res = await subCulQus(params);
if (res) {
setTimeout(() => {
this.showSubState = false;
......
......@@ -36,14 +36,14 @@ export default {
orderInfo: [
{
consultantOrderNo: "",
state: 0
state: -1
}
]
};
},
computed: {
orderState() {
return this.orderInfo[0] ? this.orderInfo[0].state : 0;
return this.orderInfo[0] ? this.orderInfo[0].state : -1;
},
...mapState(["isShowLogin"])
},
......
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 to comment