|
|
@@ -2360,14 +2360,19 @@ const handelSelectRow = (a, b) => {
|
|
|
companyId: b.id,
|
|
|
productId: insurancePolicyForm.value.productId
|
|
|
}).then((res: any) => {
|
|
|
- if(res.data?.schemes) {
|
|
|
- res.data?.schemes.forEach(item => {
|
|
|
+ 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 => {
|
|
|
item.checked = false
|
|
|
})
|
|
|
}
|
|
|
quoteData.value.forEach(item => {
|
|
|
if(item.id === b.id) {
|
|
|
- item.projectList = res.data.schemes.map(item => {
|
|
|
+ item.projectList = list.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
rescue: [],
|
|
|
@@ -2391,14 +2396,19 @@ const handelExpend = (e) => {
|
|
|
companyId: e.id,
|
|
|
productId: insurancePolicyForm.value.productId
|
|
|
}).then((res: any) => {
|
|
|
- if(res.data?.schemes) {
|
|
|
- res.data?.schemes.forEach(item => {
|
|
|
+ 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 => {
|
|
|
item.checked = false
|
|
|
})
|
|
|
}
|
|
|
quoteData.value.forEach(item => {
|
|
|
if(item.id === e .id) {
|
|
|
- item.projectList = res.data.schemes.map(item => {
|
|
|
+ item.projectList = list.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
rescue: [],
|