|
|
@@ -1091,7 +1091,7 @@
|
|
|
<div v-if="currentRow.some(a => a.id === scope.row.id)">
|
|
|
<el-button link type="primary" @click="handleCount(scope)">优惠测算</el-button>
|
|
|
<el-button link type="primary">详情</el-button>
|
|
|
- <el-button link type="primary" :loading="loading" @click="handleSubmit(InsurancePolicyRefs)">计算保费</el-button>
|
|
|
+ <el-button link type="primary" :loading="loading" @click="handleSubmit(InsurancePolicyRefs,scope)">计算保费</el-button>
|
|
|
<el-button link type="primary" @click="handleShare(scope)">分享</el-button>
|
|
|
<el-button link type="primary" @click="handleUnderwriting(scope)">核保</el-button>
|
|
|
</div>
|
|
|
@@ -2120,8 +2120,10 @@ const handleCount = (scope) => {
|
|
|
// 提交核保
|
|
|
let underwritingShow = ref(false)
|
|
|
const handleUnderwriting = (scope) => {
|
|
|
+ console.log(scope.row)
|
|
|
underwritingShow.value = true
|
|
|
let data = {
|
|
|
+
|
|
|
// ordersNo: '1915570359429222400'
|
|
|
ordersNo: scope.row.quoteResult.ordersNo,
|
|
|
quoteNo: insurancePolicyForm.value.order.quoteNo
|
|
|
@@ -2234,7 +2236,8 @@ const handleRecognition = () => {
|
|
|
|
|
|
// 提交
|
|
|
let loading = ref(false)
|
|
|
-const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined) => {
|
|
|
+const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope) => {
|
|
|
+ console.log(scope.$index)
|
|
|
if(!InsurancePolicyRefs) {
|
|
|
InsurancePolicyRefs?.resetFields()
|
|
|
return
|
|
|
@@ -2242,7 +2245,7 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined) => {
|
|
|
await InsurancePolicyRefs.validate((valid) => {
|
|
|
if(valid) {
|
|
|
loading.value = true
|
|
|
- quoteData.value[drivingRow.value].loading = true
|
|
|
+ quoteData.value[scope.$index].loading = true
|
|
|
let arr = [], brr = []
|
|
|
if(quoteData.value.length>0) {
|
|
|
let obj = quoteData.value.find(a => a.id === insurancePolicyForm.value.order.insuranceCompanyCode)
|
|
|
@@ -2386,22 +2389,22 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined) => {
|
|
|
let d = res.data.niPremium?res.data.niPremium:0
|
|
|
res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d)
|
|
|
}
|
|
|
- quoteData.value[drivingRow.value].quoteResult = res.data
|
|
|
+ quoteData.value[scope.$index].quoteResult = res.data
|
|
|
loading.value = false
|
|
|
- quoteData.value[drivingRow.value].loading = false
|
|
|
+ quoteData.value[scope.$index].loading = false
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
|
type: 'warning'
|
|
|
})
|
|
|
- quoteData.value[drivingRow.value].quoteResult.failMsg = res.msg
|
|
|
+ quoteData.value[scope.$index].quoteResult.failMsg = res.msg
|
|
|
loading.value = false
|
|
|
- quoteData.value[drivingRow.value].loading = false
|
|
|
+ quoteData.value[scope.$index].loading = false
|
|
|
}
|
|
|
// InsurancePolicyRefs.resetFields()
|
|
|
}).catch(e => {
|
|
|
loading.value = false
|
|
|
- quoteData.value[drivingRow.value].loading = false
|
|
|
+ quoteData.value[scope.$index].loading = false
|
|
|
quoteData.value.forEach(a => {
|
|
|
a.loading = false
|
|
|
})
|