Commit 2f4d9ed6 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/update_pdf' into 'master'

fix: 修改pdf数据显示异常问题

See merge request !57
parents 1389ef3f 647b8ec3
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
:autoRenewPolicy="data.autoRenewPolicy" :autoRenewPolicy="data.autoRenewPolicy"
:policyNo="data.policyNo" :policyNo="data.policyNo"
:orderNo="data.orderNo" :orderNo="data.orderNo"
v-if="showInsuranceCard"
></insurance-card> ></insurance-card>
<security-content :data="data" :detail="planDetail"></security-content> <security-content :data="data" :detail="planDetail"></security-content>
<insurance-service :detail="qaDetail"></insurance-service> <insurance-service :detail="qaDetail"></insurance-service>
...@@ -75,6 +76,9 @@ export default { ...@@ -75,6 +76,9 @@ export default {
showPayCost() { showPayCost() {
return ["2", "4"].includes(this.data?.cardConfig?.key); return ["2", "4"].includes(this.data?.cardConfig?.key);
}, },
showInsuranceCard() {
return this.data?.cardConfig?.key !== "4";
},
planDetail() { planDetail() {
const { const {
type, type,
...@@ -131,6 +135,13 @@ export default { ...@@ -131,6 +135,13 @@ export default {
}, },
EndDate() { EndDate() {
return parseTime(this.data.policyEndDate, "{y}.{m}.{d}"); return parseTime(this.data.policyEndDate, "{y}.{m}.{d}");
},
payInfo() {
return {
payOrderNo: this.data?.payInfo?.payOrderNo,
payType: this.data?.payInfo?.payOrderType,
orderNo: this.data?.orderNo
};
} }
}, },
methods: { methods: {
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
v-if="showPayCost" v-if="showPayCost"
:statusKey="data.cardConfig.key" :statusKey="data.cardConfig.key"
:payCostConfig="data.cardConfig.payCostConfig" :payCostConfig="data.cardConfig.payCostConfig"
:payInfo="payInfo"
></pay-cost> ></pay-cost>
<refund <refund
v-else v-else
...@@ -57,7 +56,7 @@ export default { ...@@ -57,7 +56,7 @@ export default {
return this.data.cardConfig.key === "8" ? "到账时间" : "支付时间"; return this.data.cardConfig.key === "8" ? "到账时间" : "支付时间";
}, },
showPayCost() { showPayCost() {
return ["4", "14", "13"].includes(this.data?.cardConfig?.key); return ["14", "13"].includes(this.data?.cardConfig?.key);
} }
} }
}; };
......
...@@ -375,9 +375,6 @@ ...@@ -375,9 +375,6 @@
} }
&-agreement { &-agreement {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
a { a {
font-size: 12px; font-size: 12px;
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
pupopData() { pupopData() {
const { currentPupopIndex } = this; const { currentPupopIndex } = this;
const { popupArray } = this.detail; const { popupArray } = this.detail;
return (currentPupopIndex && popupArray[currentPupopIndex]) || {}; return popupArray[currentPupopIndex] || {};
} }
}, },
data() { data() {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</template> </template>
<script> <script>
import setting from "@/api/settings"; import setting from "@/api/settings";
console.log(setting);
export default { export default {
name: "Phone", name: "Phone",
data() { data() {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<Collapse v-else :collapse-data="detail.planCellInfo" /> <Collapse v-else :collapse-data="detail.planCellInfo" />
<div class="Pdb-content-operation"> <div class="Pdb-content-operation" v-if="isShowPdfBtn">
<cr-button class="Pdbc-button" @click="showPdf">电子保单</cr-button> <cr-button class="Pdbc-button" @click="showPdf">电子保单</cr-button>
</div> </div>
<div class="Pdb-content-user"> <div class="Pdb-content-user">
...@@ -70,7 +70,12 @@ export default { ...@@ -70,7 +70,12 @@ export default {
}, },
methods: { methods: {
showPdf() { showPdf() {
this.$router.push({ path: "/policy/virtual-detail", query: { url: this.data.policyUrl } }); this.$router.push({ path: "/policy/virtual-detail", query: { url: "http://hathaway-mg.liangkebang.net/third/huagui/download?idStr=Z3BSb1djY1N0S2s9" } });
}
},
computed: {
isShowPdfBtn() {
return this.data?.cardConfig?.key !== "4";
} }
} }
}; };
......
...@@ -53,13 +53,13 @@ export default { ...@@ -53,13 +53,13 @@ export default {
...result, ...result,
permium: `首月保费${this.policy?.downPayPrice || 0}元,次月起${this.policy permium: `首月保费${this.policy?.downPayPrice || 0}元,次月起${this.policy
?.regularPrice || 0}`, ?.regularPrice || 0}`,
note: `:微信将会在每月${this.policy.nextPayInfo.day}日在您的账户内扣除该保费。(您可以随时取消自动扣费)` note: `微信将会在每月${this.policy.nextPayInfo.day}日在您的账户内扣除该保费。(您可以随时取消自动扣费)`
}; };
} else { } else {
result = { result = {
...result, ...result,
permium: `${this.policy?.downPayPrice || 0}/`, permium: `${this.policy?.downPayPrice || 0}/`,
note: `合同终止前,每年${this.policy?.nextPayInfo?.month || "-"}${this.policy note: `注:合同终止前,每年${this.policy?.nextPayInfo?.month || "-"}${this.policy
?.nextPayInfo?.day || "-"}${this.policy?.company || "-"}保险公司将在您预留尾号为${this ?.nextPayInfo?.day || "-"}${this.policy?.company || "-"}保险公司将在您预留尾号为${this
.policy?.bankCardNoLast4 || "-"}的银行卡内扣除次年保费,请保证余额充足哦。` .policy?.bankCardNoLast4 || "-"}的银行卡内扣除次年保费,请保证余额充足哦。`
}; };
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
<script> <script>
import pdf from "vue-pdf"; import pdf from "vue-pdf";
import CMapReaderFactory from "vue-pdf/src/CMapReaderFactory.js";
import { mapActions } from "vuex"; import { mapActions } from "vuex";
let CMAP_URL = "https://unpkg.com/pdfjs-dist@2.0.943/cmaps/";
export default { export default {
name: "PolicyVirtualDetail", name: "PolicyVirtualDetail",
components: { components: {
...@@ -33,7 +34,7 @@ export default { ...@@ -33,7 +34,7 @@ export default {
this.pdfTask(); this.pdfTask();
}, },
pdfTask() { pdfTask() {
this.pdfUrl = pdf.createLoadingTask({ url: this.url, CMapReaderFactory }); this.pdfUrl = pdf.createLoadingTask({ url: this.url, cMapUrl: CMAP_URL, cMapPacked: true });
this.pdfUrl.promise this.pdfUrl.promise
.then(pdf => { .then(pdf => {
this.pdfNumPages = pdf.numPages; this.pdfNumPages = pdf.numPages;
......
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