0f58bc06 by joe

回销回执

1 parent b8d2cdc5
......@@ -58,6 +58,10 @@ module.exports = {
idPicUpload : "/pingan_hklife_webapi/policy/idPicUpload",
// 回销回执
policyReceipt : "/pingan_hklife_webapi/policy/policyReceipt",
// 获取电子保单下载code
getDownloadPath : "/pingan_hklife_webapi/policy/getDownloadPath",
// 下载电子保单
downloadPolicy : "/pingan_hklife_webapi/policy/d",
// cms相关
......
......@@ -50,9 +50,11 @@ function Toast(msg) {
// let base = process.env.REQUEST_DOMAIN || "http://localhost:9101";
// let base = COM.baseUrl;
// console.log(process.env);
let base = "";
let base = process.env.VUE_APP_BASE_URL;
// let baseURL = "http://localhost:9101";
const axios = axiosIns.create({
baseURL: process.env.VUE_APP_BASE_URL,
// baseURL: process.env.VUE_APP_BASE_URL,
baseURL: baseURL,
timeout: 10000
})
......@@ -193,7 +195,7 @@ export const httpGet = params => {
}
}
}
return axios.get(`${base}${url}`, {
return axios.get(`${url}`, {
params: data
}, headers).then(res => res.data.content);
}
......@@ -225,7 +227,7 @@ export const httpPost = params => {
}
}
}
return axios.post(`${base}${url}`, data, headers).then(res => res.data.content);
return axios.post(`${url}`, data, headers).then(res => res.data.content);
}
/**
......@@ -257,5 +259,9 @@ export const formdata = params => {
let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : "";
headers.headers.sid = sessionId;
}
return axios.post(`${base}${url}`, formData, headers).then(res => res.data);
return axios.post(`${url}`, formData, headers).then(res => res.data);
}
export const requestDomain = () => {
return baseURL;
}
\ No newline at end of file
......
......@@ -61,12 +61,11 @@ module.exports = {
path: "/product/introduction",
list: [{
name: "VHIS",
path: "",
value: "gotoVHIS"
path: "/vhis?p=VHIS001"
},
{
name: "Insurance with Investment Focus",
path: "/product"
path: "/vhis?p=endowment"
}]
},
{
......
......@@ -62,12 +62,11 @@ module.exports = {
path: "/product/introduction",
list: [{
name: "自願醫保計劃",
path: "",
value: "gotoVHIS"
path: "/vhis?p=VHIS001"
},
{
name: "投資成份保險",
path: "/product"
path: "/vhis?p=endowment"
}]
},
{
......
......@@ -61,12 +61,11 @@ module.exports = {
path: "/product/introduction",
list: [{
name: "自愿医保计划",
path: "",
value: "gotoVHIS"
path: "/vhis?p=VHIS001"
},
{
name: "投资成份保险",
path: "/product"
path: "/vhis?p=endowment"
}]
},
{
......
......@@ -3,7 +3,8 @@ import { mapState } from "vuex";
import api from '@/api/api'
import {
httpGet,
httpPost
httpPost,
requestDomain
} from '@/api/fetch-api.js'
export default {
......@@ -26,6 +27,15 @@ export default {
},
methods: {
initData() {
if (this.showPolicy) {
let hidePolicy = sessionStorage.getItem("hidePolicy");
if (hidePolicy) {
this.showPolicy = false;
}
}
if (!this.showPolicy) {
return;
}
if (this.isLogin() && !this.hadLoadPolicy) {
this.ignorePolicyCodes = [];
let temp = sessionStorage.getItem("ignorePolicyCodes");
......@@ -132,15 +142,25 @@ export default {
},
// 忽略保单按钮
handleIgnorePolicy() {
console.log(this.policyDetail);
if (this.policyDetail) {
this.ignorePolicyCodes.push(this.policyDetail.policyCode);
sessionStorage.setItem("ignorePolicyCodes", JSON.stringify(this.ignorePolicyCodes));
this.checkIfShowPolicy();
}
},
downloadPolicy() {
if (this.policyDetail) {
httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: this.policyDetail.policyCode } }).then(res => {
if (res) {
let url = requestDomain() + api.downloadPolicy + "/" + res;
window.open(url);
}
});
}
},
onOverLayHandler() {
this.showPolicy = false;
sessionStorage.setItem("hidePolicy", "true");
},
toContact() {
this.showPolicy = false;
......@@ -158,6 +178,7 @@ export default {
this.policyDetail = null;
this.ignorePolicyCodes = [];
sessionStorage.removeItem("ignorePolicyCodes");
sessionStorage.removeItem("hidePolicy");
},
isLogin() {
return this.userInfo && this.userInfo.sid;
......
......@@ -19,7 +19,7 @@
<div class="flex-left"><div class="desc">{{$t('vhis.label4')}}</div><div class="value">{{policyDetail.clientNameCn}}</div></div>
<div class="flex-left"><div class="desc">{{$t('vhis.label5')}}</div><div class="value">{{policyDetail.insuredNameCn}}</div></div>
<div class="download-btn flex-center"><img src="@/assets/images/vhis/vhis-download.png"><span class="btn-name">{{$t('vhis.btn1')}}</span></div>
<div class="download-btn flex-center" @click="downloadPolicy"><img src="@/assets/images/vhis/vhis-download.png"><span class="btn-name">{{$t('vhis.btn1')}}</span></div>
</div>
<hr class="default-mt">
<div class="content default-mt">
......
......@@ -14,8 +14,6 @@ input {
color: #747474;
}
.value .ipt-wrap .comp .ipt-wrap .ipt {}
.submit-btn{
background: url("~@assets/images/vhis/vhis-btn.png");
background-size: 100% 100%;
......
......@@ -76,7 +76,7 @@
padding: 0 2.75rem;
max-height: 41.666667rem;
transition: max-height ease-out 0.3s !important;
overflow: hidden;
overflow: scroll;
.data-line {
height: 4.416667rem;
......
......@@ -21,7 +21,7 @@
<div class="separator-v"></div>
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t2n2')}}</div>
<div class="label">{{toMoneyCode(dataForm.moneyCode)}} {{formatMoney(dataForm.amount,0)}}</div>
<div class="label">{{dataForm.moneyMark}} {{formatMoney(dataForm.amount,0)}}</div>
</div>
</div>
<div class="separator-h"></div>
......@@ -162,7 +162,7 @@
<div class="data-line">
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div>
<div class="label">{{dataForm.insuredPeriod}}</div>
<div class="label">{{dataForm.payPeriod}}</div>
</div>
<div class="separator-v"></div>
<div class="cell1">
......@@ -175,12 +175,12 @@
<div class="data-line">
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div>
<div class="label">{{toMoneyCodeName(dataForm.moneyCode)}}</div>
<div class="label">{{dataForm.moneyName}}</div>
</div>
<div class="separator-v"></div>
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t5CurrentPremium')}}</div>
<div class="label">{{toMoneyCode(dataForm.moneyCode)}} {{formatMoney(dataForm.premium)}}</div>
<div class="label">{{dataForm.moneyMark}} {{formatMoney(dataForm.premium)}}</div>
</div>
</div>
<div class="separator-h"></div>
......@@ -220,7 +220,7 @@
<div class="td w2">{{item.paidPeriod}}</div>
<div class="td w2">{{item.payType}}</div>
<div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div>
<div class="td w2">{{toMoneyCode(dataForm.moneyCode)}} {{formatMoney(item.totalPremium)}}</div>
<div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div>
</div>
<div class="separator-h" v-if="index < dataForm.pandupList.length - 1"></div>
</div>
......
......@@ -27,7 +27,7 @@ export default {
maxShow: 2,
selectPolicyCode: "",
selectPolicyCodes: {},
hide : false
hide: false
}
},
computed: {
......@@ -189,6 +189,16 @@ export default {
}
return formatMoney(s, t);
},
downloadPolicy(policy) {
if (policy) {
httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: policy.policyCode } }).then(res => {
if (res) {
let url = requestDomain() + api.downloadPolicy + "/" + res;
window.open(url);
}
});
}
}
},
components: {
},
......
......@@ -32,7 +32,7 @@
</template>
<span class="sp" :class="{ac: selectPolicyCode == item.policyCode}">{{item.policyCode}}</span>
<template v-if="model == 'download'">
<img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt="">
<img @click="downloadPolicy(item)" class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt="">
</template>
</template>
</div>
......
......@@ -204,7 +204,10 @@ export default {
break;
case "vhis":
this.$router.push({
path: "/vhis"
path: "/vhis",
query: {
p: link
}
});
break;
default:
......
......@@ -60,6 +60,8 @@ export default {
},
gotoVhis() {
let url = window.global.vhis;
let productCode = this.$route.query.p;
productCode = productCode ? productCode : "VHIS001";
let lan = this.$i18n.locale;
switch (lan) {
case 'zh':
......@@ -72,7 +74,8 @@ export default {
url += "?language=zh-hk";
break;
}
url += "&partnerId=PA001&productCode=VHIS001";
url += "&partnerId=PA001&productCode=" + productCode;
if (this.information && this.information.idType && this.information.idNo) {
let data = {
name: this.information.fullName,
......@@ -106,7 +109,7 @@ export default {
// }, 500);
// }
window.removeEventListener("message",function(){});
window.removeEventListener("message", function () { });
window.addEventListener('message', function (e) {
let height = e.data ? e.data.height : null;
if (height) {
......@@ -114,9 +117,9 @@ export default {
try {
iframe.height = height;
iframe.style.height = height + "px";
} catch (ex) {}
} catch (ex) { }
}
});
},
created() {}
created() { }
}
......