|
@@ -64,7 +64,7 @@
|
|
|
>
|
|
>
|
|
|
<el-table-column label="名称" prop="productName">
|
|
<el-table-column label="名称" prop="productName">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <a>{{ scope.row.productName }}</a>
|
|
|
|
|
|
|
+ <el-button link type="primary" @click="getJYXDetail(scope.row)">{{ scope.row.productName }}</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="客户端状态" prop="selectedStatus">
|
|
<el-table-column label="客户端状态" prop="selectedStatus">
|
|
@@ -109,17 +109,17 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="保额" prop="optionId">
|
|
<el-table-column label="保额" prop="optionId">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-select v-if="projectAddFrom.schemeType === 2" v-model="scope.row.moneyId" style="width: 150px" multiple>
|
|
|
|
|
|
|
+ <el-select :disabled="projectAddFrom.productId == '0330' || projectAddFrom.productId == '0330034002' || projectAddFrom.productId == '0330034001'" v-if="projectAddFrom.schemeType === 2" v-model="scope.row.moneyId" style="width: 150px" multiple>
|
|
|
<el-option v-for="m in scope.row.options" :label="m.label" :key="m.id" :value="m.id"></el-option>
|
|
<el-option v-for="m in scope.row.options" :label="m.label" :key="m.id" :value="m.id"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- <el-select v-else v-model="scope.row.moneyId" style="width: 150px" @change="">
|
|
|
|
|
|
|
+ <el-select :disabled="projectAddFrom.productId == '0330' || projectAddFrom.productId == '0330034002' || projectAddFrom.productId == '0330034001'" v-else v-model="scope.row.moneyId" style="width: 150px" @change="">
|
|
|
<el-option v-for="m in scope.row.options" :label="m.label" :key="m.id" :value="m.id"></el-option>
|
|
<el-option v-for="m in scope.row.options" :label="m.label" :key="m.id" :value="m.id"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" @click="insuranceTypeDel(item, scope.row)">删除</el-button>
|
|
|
|
|
|
|
+ <el-button :disabled="projectAddFrom.productId == '0330' || projectAddFrom.productId == '0330034002' || projectAddFrom.productId == '0330034001'" link type="primary" @click="insuranceTypeDel(item, scope.row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -148,6 +148,13 @@
|
|
|
>
|
|
>
|
|
|
<insurance ref="InsuranceTypeRef" @close="handleClose" ></insurance>
|
|
<insurance ref="InsuranceTypeRef" @close="handleClose" ></insurance>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="JYXDetailShow"
|
|
|
|
|
+ title="驾意险详情"
|
|
|
|
|
+ width="600"
|
|
|
|
|
+ >
|
|
|
|
|
+ <detail ref="JYXDetail"></detail>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -159,12 +166,15 @@ import { useRouter, useRoute } from 'vue-router'
|
|
|
import insurance from '../../../../layouts/components/InsuranceType/index.vue'
|
|
import insurance from '../../../../layouts/components/InsuranceType/index.vue'
|
|
|
import driving from '../../../../layouts/components/DrivingType/index.vue'
|
|
import driving from '../../../../layouts/components/DrivingType/index.vue'
|
|
|
import rule from '../../../../components/ruleConditionContainer/index.vue'
|
|
import rule from '../../../../components/ruleConditionContainer/index.vue'
|
|
|
|
|
+import detail from '../../../../layouts/components/JYXDetail/index.vue'
|
|
|
|
|
+import Detail from "@/views/representative/detail.vue";
|
|
|
|
|
|
|
|
const myRouter = useRouter()
|
|
const myRouter = useRouter()
|
|
|
const myRoute = useRoute()
|
|
const myRoute = useRoute()
|
|
|
const ProjectAddRef = ref<FormInstance>()
|
|
const ProjectAddRef = ref<FormInstance>()
|
|
|
const InsuranceTypeRef = ref(null)
|
|
const InsuranceTypeRef = ref(null)
|
|
|
const DrivingTypeRef = ref(null)
|
|
const DrivingTypeRef = ref(null)
|
|
|
|
|
+const JYXDetail = ref(null)
|
|
|
|
|
|
|
|
// 是否编辑
|
|
// 是否编辑
|
|
|
let isEdit = ref(false)
|
|
let isEdit = ref(false)
|
|
@@ -191,8 +201,17 @@ let projectAddRules = ref<FormRules>({
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+// 驾意险详情
|
|
|
|
|
+let JYXDetailShow = ref(false)
|
|
|
|
|
+const getJYXDetail = (row) => {
|
|
|
|
|
+ JYXDetailShow.value = true
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ JYXDetail.value.initData(row.drivingIntentionId)
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 新增的时候初始化已有的方案
|
|
// 新增的时候初始化已有的方案
|
|
|
-const initProduct = () => {
|
|
|
|
|
|
|
+const initProduct = (e) => {
|
|
|
api.projectApi.getSchemeByCompany({
|
|
api.projectApi.getSchemeByCompany({
|
|
|
companyId: projectAddFrom.value.companyId,
|
|
companyId: projectAddFrom.value.companyId,
|
|
|
productId: projectAddFrom.value.productId,
|
|
productId: projectAddFrom.value.productId,
|
|
@@ -217,18 +236,36 @@ const initProduct = () => {
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
projectAddFrom.value.ruleAttrs = []
|
|
projectAddFrom.value.ruleAttrs = []
|
|
|
- projectAddFrom.value.schemeList = [{
|
|
|
|
|
- schemeName: '',
|
|
|
|
|
- description: '',
|
|
|
|
|
- tableData: [],
|
|
|
|
|
- drivingList: [],
|
|
|
|
|
- schemeInsuranceList: [],
|
|
|
|
|
- drivingIntentionList: []
|
|
|
|
|
- }]
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- message: res.msg,
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(e == '0330' || e == '0330034002' || e == '0330034001') {
|
|
|
|
|
+ let obj = insuranceTypeList.value.find(a => a.alias == '交强险')
|
|
|
|
|
+ if(obj) {
|
|
|
|
|
+ obj.insuranceId = obj.id
|
|
|
|
|
+ let sub = obj.options.find(b => b.label == '投保')
|
|
|
|
|
+ obj.optionId = projectAddFrom.value.schemeType==1?sub?.id:projectAddFrom.value.schemeType==2?[sub?.id]:''
|
|
|
|
|
+ obj.moneyId = sub?.id
|
|
|
|
|
+ }
|
|
|
|
|
+ projectAddFrom.value.schemeList = [{
|
|
|
|
|
+ schemeName: '',
|
|
|
|
|
+ description: '',
|
|
|
|
|
+ tableData: [obj],
|
|
|
|
|
+ drivingList: [],
|
|
|
|
|
+ schemeInsuranceList: [obj],
|
|
|
|
|
+ drivingIntentionList: []
|
|
|
|
|
+ }]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ projectAddFrom.value.schemeList = [{
|
|
|
|
|
+ schemeName: '',
|
|
|
|
|
+ description: '',
|
|
|
|
|
+ tableData: [],
|
|
|
|
|
+ drivingList: [],
|
|
|
|
|
+ schemeInsuranceList: [],
|
|
|
|
|
+ drivingIntentionList: []
|
|
|
|
|
+ }]
|
|
|
|
|
+ }
|
|
|
|
|
+ // ElMessage({
|
|
|
|
|
+ // message: res.msg,
|
|
|
|
|
+ // type: 'warning'
|
|
|
|
|
+ // })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -255,17 +292,7 @@ const initInsurance = () => {
|
|
|
|
|
|
|
|
// 方案类型切换
|
|
// 方案类型切换
|
|
|
const schemeTypeChange = (e) => {
|
|
const schemeTypeChange = (e) => {
|
|
|
- projectAddFrom.value.ruleAttrs = []
|
|
|
|
|
- projectAddFrom.value.schemeList = [{
|
|
|
|
|
- schemeName: '',
|
|
|
|
|
- description: '',
|
|
|
|
|
- tableData: [],
|
|
|
|
|
- drivingList: [],
|
|
|
|
|
- schemeInsuranceList: [],
|
|
|
|
|
- drivingIntentionList: []
|
|
|
|
|
- }]
|
|
|
|
|
- initProduct()
|
|
|
|
|
- // rulesAttrList.value = defaultAttrList.value
|
|
|
|
|
|
|
+ initProduct(projectAddFrom.value.productId)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 保险公司
|
|
// 保险公司
|
|
@@ -369,13 +396,13 @@ const handleDriving = (item, index) => {
|
|
|
}
|
|
}
|
|
|
const handleDrivingClose = ( obj ) => {
|
|
const handleDrivingClose = ( obj ) => {
|
|
|
if(obj.list && obj.list.length > 0) {
|
|
if(obj.list && obj.list.length > 0) {
|
|
|
- let selectList = obj.list.filter(a => a.checked)
|
|
|
|
|
- selectList.forEach(sub => {
|
|
|
|
|
|
|
+ // let selectList = obj.list.filter(a => a.checked)
|
|
|
|
|
+ obj.list.forEach(sub => {
|
|
|
sub.drivingIntentionId = sub.drivingIntentionId
|
|
sub.drivingIntentionId = sub.drivingIntentionId
|
|
|
sub.selectedStatus = sub.selectedStatus?sub.selectedStatus:'1'
|
|
sub.selectedStatus = sub.selectedStatus?sub.selectedStatus:'1'
|
|
|
sub.quantity = sub.quantity?sub.quantity:'1'
|
|
sub.quantity = sub.quantity?sub.quantity:'1'
|
|
|
})
|
|
})
|
|
|
- projectAddFrom.value.schemeList[obj.index].drivingList = selectList
|
|
|
|
|
|
|
+ projectAddFrom.value.schemeList[obj.index].drivingList = obj.list
|
|
|
}
|
|
}
|
|
|
drivingShow.value = false
|
|
drivingShow.value = false
|
|
|
}
|
|
}
|