|
|
@@ -1236,12 +1236,14 @@
|
|
|
@click="handleSubmit(InsurancePolicyRefs, scope.row)">计算保费</el-button>
|
|
|
<el-button v-if="scope.row.quoteCode == 200" link type="primary"
|
|
|
@click="handleShare(scope.row.quoteResult.ordersNo)">分享</el-button>
|
|
|
- <el-button v-if="scope.row.quoteResult?.quoteStatus == 4" link type="primary"
|
|
|
- @click="handlePayment(scope.row.quoteResult.ordersNo)">支付码</el-button>
|
|
|
- <el-button v-if="scope.row.quoteResult?.quoteStatus == 4" link type="primary"
|
|
|
- @click="handleCancelPayment(scope.row.quoteResult.ordersNo)">撤销支付码</el-button>
|
|
|
<el-button v-if="scope.row.quoteCode == 200" link type="primary" :loading="scope.row.loading"
|
|
|
@click="handleUnderwriting(scope)">核保</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.quoteResult?.quoteStatus == 4 || scope.row.quoteResult?.order?.orderStatus == 4"
|
|
|
+ link type="primary" @click="handlePayment(scope.row.quoteResult.ordersNo)">支付码</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.quoteResult?.quoteStatus == 4 || scope.row.quoteResult?.order?.orderStatus == 4"
|
|
|
+ link type="primary" @click="handleCancelPayment(scope.row.quoteResult.ordersNo)">撤销支付码</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -1365,6 +1367,49 @@
|
|
|
<div class="imageCode flex flex-col">
|
|
|
<img :src="payCodeUrl" />
|
|
|
</div>
|
|
|
+ <div class="payCodeInfo flex f-c ">
|
|
|
+ <span class="text-[24px] font-bold text-center m-[20px] text-[#d42426]">{{ payCodeInfo?.sumPremium }}</span>
|
|
|
+ <div class="ORtitle">
|
|
|
+ <div v-if="payCodeInfo?.company">
|
|
|
+ <span>保险公司:</span>
|
|
|
+ <span>{{ payCodeInfo?.company }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="payCodeInfo?.licenseNo">
|
|
|
+ <span>车牌号:</span>
|
|
|
+ <span>{{ payCodeInfo?.licenseNo }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="payCodeInfo?.policyName">
|
|
|
+ <span>投保人:</span>
|
|
|
+ <span>{{ payCodeInfo?.policyName }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="payCodeInfo?.jqPremium">
|
|
|
+ <span>交强:</span>
|
|
|
+ <span>{{ payCodeInfo?.jqPremium }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="payCodeInfo?.syPremium">
|
|
|
+ <span>商业:</span>
|
|
|
+ <span>{{ payCodeInfo?.syPremium }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="payCodeInfo?.taxPremium">
|
|
|
+ <span>车船税:</span>
|
|
|
+ <span>{{ payCodeInfo?.taxPremium }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="payCodeInfo?.jqStartTime">
|
|
|
+ <span>交强险起保日期:</span>
|
|
|
+ <span>{{ payCodeInfo?.jqStartTime }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="payCodeInfo?.syStartTime">
|
|
|
+ <span>商业险起保日期:</span>
|
|
|
+ <span>{{ payCodeInfo?.syStartTime }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="payCodeInfo?.jyPremium">
|
|
|
+ <span>驾意险:</span>
|
|
|
+ <span>{{ payCodeInfo?.jyPremium }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<template #footer>
|
|
|
<div class="flex justify-center">
|
|
|
<el-button plain type="danger" @click="handleCancelPayment">撤销支付码</el-button>
|
|
|
@@ -1691,7 +1736,6 @@ const initDetail = () => {
|
|
|
})
|
|
|
// 根据选择的保险类型过滤公司
|
|
|
let newObj = optionObj.value.insuranceType.find(a => a.checked)
|
|
|
- console.log(newObj)
|
|
|
if (newObj) {
|
|
|
ruleFilterCompany(newObj, obj)
|
|
|
|
|
|
@@ -1738,7 +1782,7 @@ const handleSalesmanSelect = (data: any) => {
|
|
|
quoteData.value = []
|
|
|
ruleFilterCompany({
|
|
|
value: insurancePolicyForm.value.productId
|
|
|
- },null)
|
|
|
+ }, null)
|
|
|
}
|
|
|
// 更新业务员信息
|
|
|
insurancePolicyForm.value.salesman = data.name
|
|
|
@@ -2148,7 +2192,6 @@ const licenseNoDataCancel = () => {
|
|
|
licenseNoShow.value = false
|
|
|
}
|
|
|
const licenseNoDataSubmit = () => {
|
|
|
- console.log(selectRowData.value)
|
|
|
if (selectRowData.value && 'ratedPassengerCapacity' in selectRowData.value) {
|
|
|
const carData = selectRowData.value as CarInfo;
|
|
|
insurancePolicyForm.value.seatCount = carData.ratedPassengerCapacity
|
|
|
@@ -2351,7 +2394,7 @@ const handleChange = (item: any, type: any) => {
|
|
|
}
|
|
|
break;
|
|
|
case 'insurance':
|
|
|
- ruleFilterCompany(item,null)
|
|
|
+ ruleFilterCompany(item, null)
|
|
|
let list4 = optionObj.value.insuranceType.filter(a => a.label != item.label)
|
|
|
list4.forEach(a => a.checked = false)
|
|
|
item.checked = true
|
|
|
@@ -2601,7 +2644,7 @@ const handleOpenEquities = (row: string) => {
|
|
|
// 保存权益
|
|
|
const handleEquitiesSave = (data: any) => {
|
|
|
insOrderRightsInfoDto.value = data
|
|
|
- console.log(insOrderRightsInfoDto.value)
|
|
|
+
|
|
|
equitiesShow.value = false
|
|
|
}
|
|
|
|
|
|
@@ -2615,7 +2658,6 @@ const handleSelect = (row: any) => {
|
|
|
let list = res.data?.schemes || [];
|
|
|
if (res.data?.optionalScheme) {
|
|
|
list.push(res.data.optionalScheme)
|
|
|
- console.log(123123123, list)
|
|
|
}
|
|
|
if (list.length > 0) {
|
|
|
list.forEach((item: any) => {
|
|
|
@@ -2624,8 +2666,15 @@ const handleSelect = (row: any) => {
|
|
|
}
|
|
|
// 方案信息
|
|
|
quoteData.value.forEach((item: any) => {
|
|
|
- item.productIndex = 0
|
|
|
if (item.id === row.id) {
|
|
|
+ item.productIndex = 0;
|
|
|
+ item.insurancePlanInfo = {
|
|
|
+ ...list[0],
|
|
|
+ rescue: [],
|
|
|
+ detection: [],
|
|
|
+ driver: [],
|
|
|
+ inspect: []
|
|
|
+ }
|
|
|
item.projectList = list.map((item: any) => {
|
|
|
return {
|
|
|
...item,
|
|
|
@@ -2651,7 +2700,6 @@ const handelExpend = (e: any) => {
|
|
|
let list = res.data?.schemes || [];
|
|
|
if (res.data?.optionalScheme) {
|
|
|
list.push(res.data.optionalScheme)
|
|
|
- console.log(123123123, list)
|
|
|
}
|
|
|
if (list.length > 0) {
|
|
|
list.forEach((item: any) => {
|
|
|
@@ -2659,8 +2707,15 @@ const handelExpend = (e: any) => {
|
|
|
})
|
|
|
}
|
|
|
quoteData.value.forEach((item: any) => {
|
|
|
- item.productIndex = 0
|
|
|
if (item.id === e.id) {
|
|
|
+ item.productIndex = 0;
|
|
|
+ item.insurancePlanInfo = {
|
|
|
+ ...list[0],
|
|
|
+ rescue: [],
|
|
|
+ detection: [],
|
|
|
+ driver: [],
|
|
|
+ inspect: []
|
|
|
+ }
|
|
|
item.projectList = list.map((item: any) => {
|
|
|
return {
|
|
|
...item,
|
|
|
@@ -2815,6 +2870,13 @@ const handleSpecialTableDataSubmit = () => {
|
|
|
let discounts = ref([])
|
|
|
let productIndex = ref(0)
|
|
|
const handleProduct = (scope: any, e: any, index: any) => {
|
|
|
+ scope.row.insurancePlanInfo = {
|
|
|
+ ...e,
|
|
|
+ rescue: [],
|
|
|
+ detection: [],
|
|
|
+ driver: [],
|
|
|
+ inspect: []
|
|
|
+ }
|
|
|
scope.row.productIndex = index
|
|
|
}
|
|
|
|
|
|
@@ -2891,7 +2953,7 @@ const handleCopyLink = async () => {
|
|
|
const handleCopyPaymentLink = async () => {
|
|
|
paymentShow.value = false
|
|
|
try {
|
|
|
- await navigator.clipboard.writeText(paymentCodeUrl.value);
|
|
|
+ await navigator.clipboard.writeText(payCodeInfo.value?.qrcode);
|
|
|
|
|
|
ElMessage({
|
|
|
message: '复制成功!',
|
|
|
@@ -2906,17 +2968,16 @@ const handleCopyPaymentLink = async () => {
|
|
|
}
|
|
|
// 支付码
|
|
|
let paymentShow = ref(false)
|
|
|
-let paymentCodeUrl = ref('')
|
|
|
+const payCodeInfo = ref()//支付码信息
|
|
|
const handlePayment = (scope: any) => {
|
|
|
- console.log(scope)
|
|
|
ordersNo.value = scope;
|
|
|
api.insurancePolicyApi.getQrCode(scope).then(async (res: any) => {
|
|
|
if (res.code == 200) {
|
|
|
+ payCodeInfo.value = res.data
|
|
|
payCodeUrl.value = await QRCode.toDataURL(res.data?.qrcode, {
|
|
|
width: 150,
|
|
|
margin: 2
|
|
|
});
|
|
|
- paymentCodeUrl.value = res.data?.qrcode
|
|
|
paymentShow.value = true
|
|
|
} else {
|
|
|
|
|
|
@@ -2931,7 +2992,6 @@ const handleCount = (scope: any) => {
|
|
|
|
|
|
// 详情
|
|
|
const toDetail = (scope: any) => {
|
|
|
- console.log(scope)
|
|
|
router.push({
|
|
|
path: '/insurancePolicy/order/insurancePolicyOrderDetail',
|
|
|
query: {
|
|
|
@@ -2975,20 +3035,6 @@ const handleImageSave = (scope: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//支付码
|
|
|
-const getPayCode = (orderNo: any) => {
|
|
|
- api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
|
|
|
- if (res.code == 200) {
|
|
|
- payCodeUrl.value = res.data?.qrcode
|
|
|
- } else {
|
|
|
- payCodeUrl.value = ''
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
|
|
|
//分享
|
|
|
let qrImageUrl = ref('')
|
|
|
@@ -3098,7 +3144,7 @@ const historyhandleUnderwriting = (ordersNo: String, scope: any) => {
|
|
|
let underwritingMsgShow = ref(false)
|
|
|
|
|
|
const handleUnderwritingClose = (bool: any, dataObj: any) => {
|
|
|
-
|
|
|
+ console.log(bool, dataObj)
|
|
|
if (dataObj) {
|
|
|
insOrderRightsInfoDto.value.length = dataObj.equitiesData;
|
|
|
insOrderRightsInfoDto.value.totalPriceCount = dataObj.totalPriceCount;
|
|
|
@@ -3109,7 +3155,15 @@ const handleUnderwritingClose = (bool: any, dataObj: any) => {
|
|
|
message: bool.msg,
|
|
|
type: 'success'
|
|
|
})
|
|
|
- if (underwritingIndex.value >= 0) quoteData.value[underwritingIndex.value].underwritingMsg = "";
|
|
|
+ api.insurancePolicyApi.getOrderDetail(myRoute.query.orderNo).then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ quoteData.value[underwritingIndex.value].underwritingMsg = "";
|
|
|
+ const quoteResult = quoteData.value[underwritingIndex.value].quoteResult;
|
|
|
+ if (quoteResult) {
|
|
|
+ quoteResult.quoteStatus = res.data?.order?.orderStatus;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
underwritingMsgShow.value = true
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
@@ -3285,7 +3339,6 @@ let loading = ref(false) // 提交加载状态
|
|
|
* @param scope 当前行作用域
|
|
|
*/
|
|
|
const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope: any) => {
|
|
|
- console.log(scope)
|
|
|
const valid = await validateForm(InsurancePolicyRefs)
|
|
|
if (!valid) {
|
|
|
ElMessage({
|
|
|
@@ -3464,7 +3517,6 @@ const paramValidate = () => {
|
|
|
const quoteInsurance = async (companyId: any, companyIndex: any) => {
|
|
|
quoteData.value[companyIndex].loading = true
|
|
|
let company = quoteData.value[companyIndex]
|
|
|
- console.log(company)
|
|
|
// 构建提交数据
|
|
|
let data = {
|
|
|
systemType: '2',
|
|
|
@@ -3579,8 +3631,8 @@ const quoteInsurance = async (companyId: any, companyIndex: any) => {
|
|
|
taxpayerIdentifier: insurancePolicyForm.value.taxpayerIdentifier,
|
|
|
identifyNumber: insurancePolicyForm.value.identifyNumber,
|
|
|
},
|
|
|
- kindInfoVo: company?.projectList?.[company.productIndex]?.kinds || [],
|
|
|
- accidentalDrivings: company?.projectList?.[company.productIndex]?.drivings || [],
|
|
|
+ kindInfoVo: company?.insurancePlanInfo?.kinds || [],
|
|
|
+ accidentalDrivings: company?.insurancePlanInfo?.drivings || [],
|
|
|
specialInfoVo: company?.specialSelectedList || []
|
|
|
}
|
|
|
owerFormInfo.value = { ...data.ownersInfo, title: '车主', policyPersonType: '1' };
|
|
|
@@ -3642,7 +3694,6 @@ const quoteInsurance = async (companyId: any, companyIndex: any) => {
|
|
|
quoteData.value[companyIndex].failMsg = res.msg
|
|
|
loading.value = false
|
|
|
quoteData.value[companyIndex].loading = false
|
|
|
- console.log(quoteData.value[companyIndex])
|
|
|
|
|
|
}
|
|
|
// InsurancePolicyRefs.resetFields()
|
|
|
@@ -3683,7 +3734,6 @@ const handleOpen = (scope: any) => {
|
|
|
* @param item 选中的产品信息
|
|
|
*/
|
|
|
const ruleFilterCompany = (item: any, obj: any) => {
|
|
|
- console.log(item, obj)
|
|
|
let data = {
|
|
|
productId: item.value, // 产品ID
|
|
|
carInfo: { // 车辆信息
|
|
|
@@ -3774,25 +3824,26 @@ const ruleFilterCompany = (item: any, obj: any) => {
|
|
|
})
|
|
|
if (obj) {
|
|
|
quoteData.value?.map((item: any) => {
|
|
|
- obj.insCompanyVo?.map((a: any) => {
|
|
|
- if (item.id == a.id) {
|
|
|
- item.quoteResult = a;
|
|
|
- item.quoteResult.ordersNo = obj.ordersNo
|
|
|
- item.quoteCode = 200
|
|
|
- item.checked = true
|
|
|
- handleSelect({id: item.id})
|
|
|
- // 如果有错误信息,设置状态为失败 并记录错误信息
|
|
|
- if (obj.errorMessage) {
|
|
|
- item.quoteCode = 500
|
|
|
- item.failMsg = obj.errorMessage
|
|
|
+ obj.insCompanyVo?.map((a: any) => {
|
|
|
+ if (item.id == a.id) {
|
|
|
+ item.quoteResult = { ...a, ...obj };
|
|
|
+ item.insurancePlanInfo = {}
|
|
|
+ item.insurancePlanInfo.drivings = obj.accidentalDrivings;
|
|
|
+ item.insurancePlanInfo.kinds = obj.kindInfoVo;
|
|
|
+ item.quoteCode = 200
|
|
|
+ item.checked = true
|
|
|
+ // 如果有错误信息,设置状态为失败 并记录错误信息
|
|
|
+ if (obj.errorMessage) {
|
|
|
+ item.quoteCode = 500
|
|
|
+ item.failMsg = obj.errorMessage
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- return a
|
|
|
+ return a
|
|
|
+ })
|
|
|
+ return item
|
|
|
})
|
|
|
- return item
|
|
|
- })
|
|
|
+ console.log(quoteData.value)
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
quoteData.value = []
|
|
|
}
|
|
|
@@ -4078,6 +4129,21 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .payCodeInfo {
|
|
|
+ .ORtitle>div {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ :first-child {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ :last-child {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.expandFlex {
|
|
|
display: flex;
|
|
|
|
|
|
@@ -4240,4 +4306,4 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|