|
|
@@ -986,6 +986,7 @@
|
|
|
<div class="card-xianzhong">
|
|
|
<div>已选险种</div>
|
|
|
<div class="card-btn" v-show="reslistitem.programme.description">{{ reslistitem.programme.description }}</div>
|
|
|
+ <!-- <div v-if="reslistitem.quoteCode == '200' && reslistitem.result.orderstatus">{{ reslistitem.result.orderstatus | cap }}</div> -->
|
|
|
</div>
|
|
|
</el-col>
|
|
|
|
|
|
@@ -1374,6 +1375,7 @@
|
|
|
<el-button :disabled="reslistitem.namesimple == '众安财险' &&
|
|
|
reslistitem.result.tips == '需要验车'
|
|
|
" v-show="reslistitem.quoteCode == '200' &&
|
|
|
+ !hbcg &&
|
|
|
!('editStatus' in reslistitem.result)
|
|
|
" type="text" size="small" style="color: #2d4d89; font-size: 14px"
|
|
|
@click="hbsubmitdialog(reslistitem, reslistindex)">下单</el-button>
|
|
|
@@ -5556,6 +5558,7 @@ export default {
|
|
|
showLoading: false,
|
|
|
detailJiaYiTitle: '查看详情',
|
|
|
oldData: {}, // 旧获取公司参数
|
|
|
+ hbcg: false,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -5777,6 +5780,7 @@ export default {
|
|
|
},
|
|
|
// 获取新公司列表
|
|
|
getCompanyList(data) {
|
|
|
+ var _this = this;
|
|
|
if (!this.productId) {
|
|
|
this.$message.warning('请选择险种')
|
|
|
return
|
|
|
@@ -5788,149 +5792,160 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
console.log(this.policyHolderInfo, 'policyHolderInfo')
|
|
|
- this.policyHolderInfovalidate();
|
|
|
- this.$refs["carInfo"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- var _this = this;
|
|
|
- // this.policyHolderInfovalidate()
|
|
|
- _this.$refs["ownerInfo"].validate(async (valid1) => {
|
|
|
- if (valid1) {
|
|
|
- if (!_this.productId) {
|
|
|
- _this.$message.warning('请选择险别')
|
|
|
- return
|
|
|
- }
|
|
|
- // tbczcarShow: true, //投保人同车主
|
|
|
- // bbczcarShow: false, //被保人同车主
|
|
|
- // bbtbcarShow: true, //被保人同投保人
|
|
|
- // ownerInfo 车主
|
|
|
- // policyHolderInfo 投保人
|
|
|
- // insuredPersonInfo 被保人
|
|
|
-
|
|
|
- if (_this.bbtbcarShow == true) {
|
|
|
- _this.insuredPersonInfo = JSON.parse(
|
|
|
- JSON.stringify(_this.policyHolderInfo)
|
|
|
- );
|
|
|
- } else if (_this.bbczcarShow == true) {
|
|
|
- _this.insuredPersonInfo = JSON.parse(
|
|
|
- JSON.stringify(_this.ownerInfo)
|
|
|
- );
|
|
|
- } else {
|
|
|
- // _this.insuredPersonInfo = {}
|
|
|
- }
|
|
|
-
|
|
|
- if (this.tbczcarShow == true) {
|
|
|
- this.policyHolderInfo = JSON.parse(
|
|
|
- JSON.stringify(_this.ownerInfo)
|
|
|
- );
|
|
|
- } else {
|
|
|
- // this.policyHolderInfo = {}
|
|
|
- }
|
|
|
+ // this.policyHolderInfovalidate();
|
|
|
+
|
|
|
+ this.$refs["insuredPersonInfo"].validate((valid11) => {
|
|
|
+ if (valid11) {
|
|
|
+ this.$refs["carInfo"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ // this.policyHolderInfovalidate()
|
|
|
+ _this.$refs["ownerInfo"].validate(async (valid1) => {
|
|
|
+ if (valid1) {
|
|
|
+ if (!_this.productId) {
|
|
|
+ _this.$message.warning('请选择险别')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // tbczcarShow: true, //投保人同车主
|
|
|
+ // bbczcarShow: false, //被保人同车主
|
|
|
+ // bbtbcarShow: true, //被保人同投保人
|
|
|
+ // ownerInfo 车主
|
|
|
+ // policyHolderInfo 投保人
|
|
|
+ // insuredPersonInfo 被保人
|
|
|
+
|
|
|
+ if (_this.bbtbcarShow == true) {
|
|
|
+ _this.insuredPersonInfo = JSON.parse(
|
|
|
+ JSON.stringify(_this.policyHolderInfo)
|
|
|
+ );
|
|
|
+ } else if (_this.bbczcarShow == true) {
|
|
|
+ _this.insuredPersonInfo = JSON.parse(
|
|
|
+ JSON.stringify(_this.ownerInfo)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // _this.insuredPersonInfo = {}
|
|
|
+ }
|
|
|
|
|
|
- let res = {};
|
|
|
- // res = await this.$api.letter.getAllAgreement();
|
|
|
- // this.$api.letter.getAllAgreement().then((res) => {
|
|
|
- // oldData
|
|
|
- let param = {
|
|
|
- productId: this.productId,
|
|
|
- carInfo: this.carInfo,
|
|
|
- ownerInfo: this.ownerInfo,
|
|
|
- applyInfo: this.policyHolderInfo,
|
|
|
- insureInfo: this.insuredPersonInfo,
|
|
|
- userId:this.isLetter==2? this.userId:""
|
|
|
- }
|
|
|
- if (JSON.stringify(param) === this.oldData) {
|
|
|
- return
|
|
|
- } else {
|
|
|
- this.oldData = JSON.stringify(param)
|
|
|
- }
|
|
|
- console.log('校验成功,获取列表')
|
|
|
- this.showLoading = true
|
|
|
- this.$api.letter.ruleFilterCompany(param).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- res.data.map((ele) => {
|
|
|
- ele["result"] = {};
|
|
|
- ele["quoteCode"] = 0;
|
|
|
- ele["checked"] = false;
|
|
|
- ele["msg"] = "";
|
|
|
- ele["lastYearMsg"] = "";
|
|
|
- ele["agreementId"] = "";
|
|
|
- ele["apiType"] = "";
|
|
|
- ele["orderstatus"] = 0;
|
|
|
- ele.coefficient = "";
|
|
|
- ele.underwritingDescription =
|
|
|
- ele.agreement[0].underwritingDescription;
|
|
|
- if (ele.isTaxSource && ele.isTaxSource == "1" && ele.agreement) {
|
|
|
- ele.agreement.forEach((val) => {
|
|
|
- if (val.isTaxSource && val.isTaxSource == "1") {
|
|
|
- ele.agreementId = val.id;
|
|
|
- ele.apiType = val.apiType;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.tbczcarShow == true) {
|
|
|
+ this.policyHolderInfo = JSON.parse(
|
|
|
+ JSON.stringify(_this.ownerInfo)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // this.policyHolderInfo = {}
|
|
|
}
|
|
|
- });
|
|
|
|
|
|
- if (data) {
|
|
|
- this.productId = this.productId || data.productid
|
|
|
- res.data.forEach((val, index) => {
|
|
|
- if(!data.insAreaCompanyEditingDtos) {
|
|
|
- return
|
|
|
- }
|
|
|
- data.insAreaCompanyEditingDtos.forEach((ele) => {
|
|
|
- if (val.namesimple == ele.inscompany) {
|
|
|
- if (ele.inscompany == "中国人寿" && ele.companyId) {
|
|
|
- this.lastCompanyId = ele.companyId;
|
|
|
+ let res = {};
|
|
|
+ // res = await this.$api.letter.getAllAgreement();
|
|
|
+ // this.$api.letter.getAllAgreement().then((res) => {
|
|
|
+ // oldData
|
|
|
+ let param = {
|
|
|
+ productId: this.productId,
|
|
|
+ carInfo: this.carInfo,
|
|
|
+ ownerInfo: this.ownerInfo,
|
|
|
+ applyInfo: this.policyHolderInfo,
|
|
|
+ insureInfo: this.insuredPersonInfo,
|
|
|
+ userId:this.isLetter==2? this.userId:""
|
|
|
+ }
|
|
|
+ if (JSON.stringify(param) === this.oldData) {
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.oldData = JSON.stringify(param)
|
|
|
+ }
|
|
|
+ console.log('校验成功,获取列表')
|
|
|
+ this.showLoading = true
|
|
|
+ this.$api.letter.ruleFilterCompany(param).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ res.data.map((ele) => {
|
|
|
+ ele["result"] = {};
|
|
|
+ ele["quoteCode"] = 0;
|
|
|
+ ele["checked"] = false;
|
|
|
+ ele["msg"] = "";
|
|
|
+ ele["lastYearMsg"] = "";
|
|
|
+ ele["agreementId"] = "";
|
|
|
+ ele["apiType"] = "";
|
|
|
+ ele["orderstatus"] = 0;
|
|
|
+ ele.coefficient = "";
|
|
|
+ ele.underwritingDescription =
|
|
|
+ ele.agreement[0].underwritingDescription;
|
|
|
+ if (ele.isTaxSource && ele.isTaxSource == "1" && ele.agreement) {
|
|
|
+ ele.agreement.forEach((val) => {
|
|
|
+ if (val.isTaxSource && val.isTaxSource == "1") {
|
|
|
+ ele.agreementId = val.id;
|
|
|
+ ele.apiType = val.apiType;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- res.data[index].quoteCode = 200;
|
|
|
- res.data[index].result = ele;
|
|
|
+ });
|
|
|
+ if (this.$route.query.data) {
|
|
|
+ data = data || this.$route.query.data
|
|
|
+ }
|
|
|
+ if (data) {
|
|
|
+ this.productId = this.productId || data.productid
|
|
|
+ res.data.forEach((val, index) => {
|
|
|
+ if(!data.insAreaCompanyEditingDtos) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ data.insAreaCompanyEditingDtos.forEach((ele) => {
|
|
|
+ if (val.namesimple == ele.inscompany) {
|
|
|
+ if (ele.inscompany == "中国人寿" && ele.companyId) {
|
|
|
+ this.lastCompanyId = ele.companyId;
|
|
|
+ }
|
|
|
+ res.data[index].quoteCode = 200;
|
|
|
+ res.data[index].result = ele;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
+ // //险种合并集合
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ const combinedArray = [
|
|
|
+ ...this.riskList.map(item => item.riskCode),
|
|
|
+ ...this.kindList.map(item => item.kindCode),
|
|
|
+ ];
|
|
|
+ if (res.data) {
|
|
|
+ res.data = res.data.filter(obj => {
|
|
|
+ obj.agreement = obj.agreement.filter(agreementObj => {
|
|
|
+ // 险种配置为空,则过滤掉该协议
|
|
|
+ if (agreementObj.productsCodes == null) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ // 检查是否包含 A 的特殊处理
|
|
|
+ if (combinedArray.includes('A') && !agreementObj.productsCodes.includes(
|
|
|
+ 'A')) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return agreementObj.productsCodes.some(item => combinedArray.includes(
|
|
|
+ item));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return obj.agreement.length > 0; // 返回true保留,返回false移除该保险公司
|
|
|
+ });
|
|
|
+ res.data.forEach((e) => {
|
|
|
+ e.agreement.forEach((el) => (el.disabled = false));
|
|
|
});
|
|
|
- });
|
|
|
- }
|
|
|
- // //险种合并集合
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
- const combinedArray = [
|
|
|
- ...this.riskList.map(item => item.riskCode),
|
|
|
- ...this.kindList.map(item => item.kindCode),
|
|
|
- ];
|
|
|
- if (res.data) {
|
|
|
- res.data = res.data.filter(obj => {
|
|
|
- obj.agreement = obj.agreement.filter(agreementObj => {
|
|
|
- // 险种配置为空,则过滤掉该协议
|
|
|
- if (agreementObj.productsCodes == null) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- // 检查是否包含 A 的特殊处理
|
|
|
- if (combinedArray.includes('A') && !agreementObj.productsCodes.includes(
|
|
|
- 'A')) {
|
|
|
- return false;
|
|
|
}
|
|
|
- return agreementObj.productsCodes.some(item => combinedArray.includes(
|
|
|
- item));
|
|
|
- }
|
|
|
- });
|
|
|
- return obj.agreement.length > 0; // 返回true保留,返回false移除该保险公司
|
|
|
- });
|
|
|
- res.data.forEach((e) => {
|
|
|
- e.agreement.forEach((el) => (el.disabled = false));
|
|
|
+ this.totalCompanyList = res.data;
|
|
|
+ this.showLoading = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ document.getElementById("CheZhu").scrollIntoView();
|
|
|
+ _this.$message({ message: "请检查人员信息", type: "warning" });
|
|
|
+ }
|
|
|
});
|
|
|
- }
|
|
|
- this.totalCompanyList = res.data;
|
|
|
- this.showLoading = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- document.getElementById("CheZhu").scrollIntoView();
|
|
|
- _this.$message({ message: "请检查人员信息", type: "warning" });
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- document.getElementById("Car").scrollIntoView();
|
|
|
- this.$message({ message: "请检查车辆信息", type: "warning" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ } else {
|
|
|
+ document.getElementById("Car").scrollIntoView();
|
|
|
+ this.$message({ message: "请检查车辆信息", type: "warning" });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log(3333333333333)
|
|
|
+ document.getElementById("toubaor").scrollIntoView();
|
|
|
+ _this.$message({ message: "请检查投保人信息", type: "warning" });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
// 保费计算(报价)按钮
|
|
|
handleListJisuan(item, index) {
|
|
|
this.quote(index)
|
|
|
@@ -9937,6 +9952,7 @@ export default {
|
|
|
if (namesimple == "中国人寿" && res.data.companyId) {
|
|
|
this.lastCompanyId = res.data.companyId;
|
|
|
}
|
|
|
+ console.log(res.data, 'res.data111111111111111111111111111')
|
|
|
this.QuotationHistory();
|
|
|
} else {
|
|
|
this.totalCompanyList[num].quoteCode = "3";
|
|
|
@@ -10509,6 +10525,7 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.hbcg = true
|
|
|
this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
@@ -10565,7 +10582,8 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.QuotationHistory();
|
|
|
+ this.hbcg = true
|
|
|
+ this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
.then((res) => {
|
|
|
@@ -10643,6 +10661,7 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.hbcg = true
|
|
|
this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
@@ -10704,7 +10723,8 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.QuotationHistory();
|
|
|
+ this.hbcg = true
|
|
|
+ this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
.then((res) => {
|
|
|
@@ -10771,7 +10791,8 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.QuotationHistory();
|
|
|
+ this.hbcg = true
|
|
|
+ this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
.then((res) => {
|
|
|
@@ -10828,7 +10849,8 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.QuotationHistory();
|
|
|
+ this.hbcg = true
|
|
|
+ this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
.then((res) => {
|
|
|
@@ -10894,6 +10916,7 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.hbcg = true
|
|
|
this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
@@ -10955,7 +10978,8 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.QuotationHistory();
|
|
|
+ this.hbcg = true
|
|
|
+ this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
.then((res) => {
|
|
|
@@ -11022,6 +11046,7 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.hbcg = true
|
|
|
this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
@@ -11079,7 +11104,8 @@ export default {
|
|
|
message: "核保成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.QuotationHistory();
|
|
|
+ this.hbcg = true
|
|
|
+ this.QuotationHistory();
|
|
|
_this.$api.letter
|
|
|
.getByCompanyId({ companyId: this.companyId })
|
|
|
.then((res) => {
|
|
|
@@ -11834,10 +11860,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
CarOCRdiscern() {
|
|
|
- if (!this.CarFrontFile || !this.CarBackFile) {
|
|
|
- this.$message.warning('请上传行驶证主页和副页')
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (!this.CarFrontFile || !this.CarBackFile) {
|
|
|
+ // this.$message.warning('请上传行驶证主页和副页')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
//car识别
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|