Commit 85f4185e authored by 郭志伟's avatar 郭志伟

fix: 问题修复

parent 41a0daec
This diff is collapsed.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<script> <script>
import popupPickerMixin from "../mixins/popupPicker.mixin.js"; import popupPickerMixin from "../mixins/popupPicker.mixin.js";
import areaList from "@qg/cherry-ui/src/area/demo/china"; import areaList from "@/api/china";
export default { export default {
name: "PopupAreaPicker", name: "PopupAreaPicker",
mixins: [popupPickerMixin], mixins: [popupPickerMixin],
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: PopupPicker mixin * @Description: PopupPicker mixin
* @Date: 2020-07-28 19:46:31 * @Date: 2020-07-28 19:46:31
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-19 18:08:05 * @LastEditTime: 2020-08-21 15:10:01
*/ */
// TODO 默认值需要处理 // TODO 默认值需要处理
...@@ -39,6 +39,8 @@ export default { ...@@ -39,6 +39,8 @@ export default {
this.$refs[this.refName].refreshColumns(); this.$refs[this.refName].refreshColumns();
this.setDefaultVal(); this.setDefaultVal();
}, 500); }, 500);
} else {
this.refreshed = false;
} }
} }
// value: { // value: {
......
//引入axios //引入axios
import store from "@/store"; import store from "@/store";
import router from "@/router";
import axios from "axios"; import axios from "axios";
import cherry from "@qg/cherry-ui"; import cherry from "@qg/cherry-ui";
import config from "../config"; import config from "../config";
...@@ -77,7 +78,12 @@ axios.interceptors.response.use( ...@@ -77,7 +78,12 @@ axios.interceptors.response.use(
delete pending[response.config.url]; delete pending[response.config.url];
if (response.data.code === "0") return response.data.data; if (response.data.code === "0") return response.data.data;
// 特殊处理,下单已存在时,跳转到保单列表
if (response.config.url === "policy_order" && response.data.code === "40601") {
setTimeout(() => {
router.push("/policy");
}, 1000);
}
Notify({ type: "danger", message: response.data.msg || "后端服务异常" }); Notify({ type: "danger", message: response.data.msg || "后端服务异常" });
store.dispatch("setIsPayWait", false); store.dispatch("setIsPayWait", false);
return Promise.reject(response.data); return Promise.reject(response.data);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h1>{{ info.name }}</h1> <h1>{{ info.name }}</h1>
<cr-tag><svg-icon icon-class="medal" />{{ info.role }}</cr-tag> <cr-tag><svg-icon icon-class="medal" />{{ info.role }}</cr-tag>
<small>执业保险销售资质:</small> <small>执业保险销售资质:</small>
<small v-html="`${info.card.slice(0, 15)}<br />${info.id.slice(15)}`"></small> <small v-html="`${info.card.slice(0, 15)}<br />${info.card.slice(15)}`"></small>
</div> </div>
<cr-image <cr-image
class="cul-hd-img" class="cul-hd-img"
......
...@@ -238,6 +238,7 @@ export default { ...@@ -238,6 +238,7 @@ export default {
sub: "请预留您的信息,保险师会在您方便时联系您" sub: "请预留您的信息,保险师会在您方便时联系您"
} }
], ],
// 给谁买
insuredOptions: [ insuredOptions: [
{ label: "本人", value: "本人" }, { label: "本人", value: "本人" },
{ label: "配偶", value: "配偶" }, { label: "配偶", value: "配偶" },
...@@ -246,6 +247,7 @@ export default { ...@@ -246,6 +247,7 @@ export default {
{ label: "父亲", value: "父亲" }, { label: "父亲", value: "父亲" },
{ label: "母亲", value: "母亲" } { label: "母亲", value: "母亲" }
], ],
// 有无社保
hasSocialOptions: [ hasSocialOptions: [
{ label: "", value: "1" }, { label: "", value: "1" },
{ label: "", value: "0" } { label: "", value: "0" }
...@@ -254,7 +256,9 @@ export default { ...@@ -254,7 +256,9 @@ export default {
{ label: "", value: "0" }, { label: "", value: "0" },
{ label: "", value: "1" } { label: "", value: "1" }
], ],
// 收入
incomeOptions: ["10万", "20万", "25万", "30万"], incomeOptions: ["10万", "20万", "25万", "30万"],
// 贷款
loanOptions: ["无房贷", "1000元", "2000元", "3000元", "4000元"], loanOptions: ["无房贷", "1000元", "2000元", "3000元", "4000元"],
solveOptions: [ solveOptions: [
{ label: "之前从没买过保险,打算配置保险", value: "之前从没买过保险,打算配置保险" }, { label: "之前从没买过保险,打算配置保险", value: "之前从没买过保险,打算配置保险" },
......
...@@ -355,9 +355,10 @@ export default { ...@@ -355,9 +355,10 @@ export default {
const res = await trail(_param); const res = await trail(_param);
if (res) { if (res) {
price[2] = payType === "2" ? "" : "首月";
price[0] = res.downPayPrice; price[0] = res.downPayPrice;
subPrice[1] = "元/月"; subPrice[1] = "元/月";
subPrice[0] = res.regularPrice; subPrice[0] = payType === "2" ? "" : res.regularPrice;
this.goodActionInfo = { this.goodActionInfo = {
title: price, title: price,
sub: subPrice[0] ? subPrice : "" sub: subPrice[0] ? subPrice : ""
......
...@@ -340,8 +340,9 @@ export default { ...@@ -340,8 +340,9 @@ export default {
}; };
const res = await trail(_param); const res = await trail(_param);
if (res) { if (res) {
price[2] = payType === "2" ? "" : "首月";
price[0] = res.downPayPrice; price[0] = res.downPayPrice;
subPrice[0] = res.regularPrice; subPrice[0] = payType === "2" ? "" : res.regularPrice;
subPrice[1] = "元/月"; subPrice[1] = "元/月";
this.goodActionInfo = { this.goodActionInfo = {
title: price, title: price,
......
...@@ -60,7 +60,15 @@ ...@@ -60,7 +60,15 @@
:readonly="infoReadonly" :readonly="infoReadonly"
label="姓名" label="姓名"
:rules="[{ required: true, message: '请输入姓名' }]" :rules="[{ required: true, message: '请输入姓名' }]"
/> >
<cr-icon
type="arrow"
slot="button"
v-if="relationList.length > 1"
class="relation-select"
@click="showRelations = true"
/>
</cr-field>
<cr-field <cr-field
name="relativeIdNo" name="relativeIdNo"
v-if="formData.relation !== '1'" v-if="formData.relation !== '1'"
...@@ -119,6 +127,16 @@ ...@@ -119,6 +127,16 @@
title="我们常说的社保都包括哪些?" title="我们常说的社保都包括哪些?"
confirm-btn="我知道了" confirm-btn="我知道了"
/> />
<cr-popup v-model="showRelations" position="bottom" get-container="body">
<cr-picker
ref="relationsPicker"
:columns="relationList"
value-key="nameMask"
show-toolbar
@cancel="onRelationCancel"
@confirm="onRelationConfirm"
/>
</cr-popup>
</div> </div>
</template> </template>
...@@ -170,10 +188,25 @@ export default { ...@@ -170,10 +188,25 @@ export default {
xyqbAuthState: localStorage.get("xyqbAuthState"), xyqbAuthState: localStorage.get("xyqbAuthState"),
selfInfoReadonly: false, selfInfoReadonly: false,
infoReadonly: false, infoReadonly: false,
question: false question: false,
showRelations: false,
refreshed: false,
relationList: []
}; };
}, },
watch: { watch: {
showRelations(val) {
if (val && !this.refreshed && this.$refs["relationsPicker"]) {
const $relationsPicker = this.$refs["relationsPicker"];
$relationsPicker.formattedColumns = $relationsPicker.formatColumns(this.relationList);
setTimeout(() => {
this.refreshed = true;
$relationsPicker.refreshColumns();
}, 500);
} else {
this.refreshed = false;
}
},
detailType: { detailType: {
immediate: true, immediate: true,
handler(val) { handler(val) {
...@@ -240,6 +273,28 @@ export default { ...@@ -240,6 +273,28 @@ export default {
this.setAuthXyqb(2); this.setAuthXyqb(2);
} }
}, },
onRelationCancel() {
this.showRelations = false;
},
onRelationConfirm(picker, res) {
// console.log(res[0]);
const { idNoMask, nameMask, userInfoSecId, socialSecurity } = res[0];
this.formData = {
...this.formData,
...{
idNo: idNoMask,
name: nameMask,
userInfoSecId,
socialSecurity:
socialSecurity === "" || typeof socialSecurity === "undefined"
? ""
: socialSecurity
? "1"
: "0"
}
};
this.onRelationCancel();
},
relationChange(relation = this.formData.relation) { relationChange(relation = this.formData.relation) {
this.familyList.forEach(item => { this.familyList.forEach(item => {
const { const {
...@@ -301,6 +356,7 @@ export default { ...@@ -301,6 +356,7 @@ export default {
} }
this.infoReadonly = false; this.infoReadonly = false;
} }
this.relationList = userArray.length > 1 ? userArray : [];
this.formData = { this.formData = {
...this.formData, ...this.formData,
...{ ...{
...@@ -446,4 +502,10 @@ export default { ...@@ -446,4 +502,10 @@ export default {
top: 10px; top: 10px;
left: -35px; left: -35px;
} }
.relation-select {
width: 13px;
height: 22px;
text-align: center;
line-height: 22px;
}
</style> </style>
...@@ -112,4 +112,10 @@ ...@@ -112,4 +112,10 @@
} }
} }
} }
}
.relation-select {
width: 13px;
height: 22px;
text-align: center;
line-height: 22px;
} }
\ No newline at end of file
...@@ -229,7 +229,15 @@ ...@@ -229,7 +229,15 @@
message: '请填写正确的被保人姓名,最少2个中文字符' message: '请填写正确的被保人姓名,最少2个中文字符'
} }
]" ]"
/> >
<cr-icon
type="arrow"
slot="button"
v-if="relationList.length > 1"
class="relation-select"
@click="showRelations = true"
/>
</cr-field>
<cr-field <cr-field
v-model="formData.insuredUserInfo.idNo" v-model="formData.insuredUserInfo.idNo"
name="insuredUserInfo_idNo" name="insuredUserInfo_idNo"
...@@ -459,6 +467,16 @@ ...@@ -459,6 +467,16 @@
:url="pupopData.url" :url="pupopData.url"
> >
</popup-with-iframe> </popup-with-iframe>
<cr-popup v-model="showRelations" position="bottom" get-container="body">
<cr-picker
ref="relationsPicker"
:columns="relationList"
value-key="nameMask"
show-toolbar
@cancel="onRelationCancel"
@confirm="onRelationConfirm"
/>
</cr-popup>
</div> </div>
</template> </template>
...@@ -558,10 +576,25 @@ export default { ...@@ -558,10 +576,25 @@ export default {
insuredAmountOptions, insuredAmountOptions,
bankInfo, bankInfo,
selfInfoReadonly: false, selfInfoReadonly: false,
infoReadonly: false infoReadonly: false,
showRelations: false,
refreshed: false,
relationList: []
}; };
}, },
watch: { watch: {
showRelations(val) {
if (val && !this.refreshed && this.$refs["relationsPicker"]) {
const $relationsPicker = this.$refs["relationsPicker"];
$relationsPicker.formattedColumns = $relationsPicker.formatColumns(this.relationList);
setTimeout(() => {
this.refreshed = true;
$relationsPicker.refreshColumns();
}, 500);
} else {
this.refreshed = false;
}
},
popupShow(val) { popupShow(val) {
if (!val && this.currentPupopIndex === 6) this.currentPupopIndex = null; if (!val && this.currentPupopIndex === 6) this.currentPupopIndex = null;
}, },
...@@ -693,6 +726,28 @@ export default { ...@@ -693,6 +726,28 @@ export default {
this.setAuthXyqb(2); this.setAuthXyqb(2);
} }
}, },
onRelationCancel() {
this.showRelations = false;
},
onRelationConfirm(picker, res) {
// console.log(res[0]);
const { idNoMask, nameMask, userInfoSecId, socialSecurity } = res[0];
this.formData.insuredUserInfo = {
...this.formData.insuredUserInfo,
...{
idNo: idNoMask,
name: nameMask,
userInfoSecId,
socialSecurity:
socialSecurity === "" || typeof socialSecurity === "undefined"
? ""
: socialSecurity
? "1"
: "0"
}
};
this.onRelationCancel();
},
onFormSubmit() { onFormSubmit() {
this.goInsureState = true; this.goInsureState = true;
}, },
...@@ -758,6 +813,7 @@ export default { ...@@ -758,6 +813,7 @@ export default {
} }
this.infoReadonly = false; this.infoReadonly = false;
} }
this.relationList = userArray.length > 1 ? userArray : [];
this.formData.insuredUserInfo = { this.formData.insuredUserInfo = {
...this.formData.insuredUserInfo, ...this.formData.insuredUserInfo,
...{ ...{
......
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