完成回执回销的逻辑对接
Showing
1 changed file
with
30 additions
and
9 deletions
| ... | @@ -85,11 +85,11 @@ export default { | ... | @@ -85,11 +85,11 @@ export default { |
| 85 | sid: true | 85 | sid: true |
| 86 | }).then(res => { | 86 | }).then(res => { |
| 87 | this.hadLoadPolicy = true; | 87 | this.hadLoadPolicy = true; |
| 88 | if (!res || res.length == 0) {} else { | 88 | if (!res || res.length == 0) { } else { |
| 89 | this.$store.commit("CACHE_POLICY_LIST", res); | 89 | this.$store.commit("CACHE_POLICY_LIST", res); |
| 90 | this.checkIfShowPolicy(); | 90 | this.checkIfShowPolicy(); |
| 91 | } | 91 | } |
| 92 | }).catch(e => {}); | 92 | }).catch(e => { }); |
| 93 | } else { | 93 | } else { |
| 94 | this.checkIfShowPolicy(); | 94 | this.checkIfShowPolicy(); |
| 95 | } | 95 | } |
| ... | @@ -130,6 +130,24 @@ export default { | ... | @@ -130,6 +130,24 @@ export default { |
| 130 | data: params | 130 | data: params |
| 131 | }).then(res => { | 131 | }).then(res => { |
| 132 | this.policyDetail = res; | 132 | this.policyDetail = res; |
| 133 | // 两份电子函的ID | ||
| 134 | this.policyDetail.agree1 = false; | ||
| 135 | this.policyDetail.agree2 = false; | ||
| 136 | this.policyDetail.letterNo1Id = ""; | ||
| 137 | this.policyDetail.letterNo2Id = ""; | ||
| 138 | |||
| 139 | for (let index = 0; index < this.policyDetail.policyAcknowledges.length; index++) { | ||
| 140 | let policyAcknowledge = this.policyDetail.policyAcknowledges[index]; | ||
| 141 | switch (policyAcknowledge.letterNo) { | ||
| 142 | case "1": | ||
| 143 | this.policyDetail.letterNo1Id = policyAcknowledge.recordId; | ||
| 144 | break; | ||
| 145 | case "2": | ||
| 146 | this.policyDetail.letterNo2Id = policyAcknowledge.recordId; | ||
| 147 | break; | ||
| 148 | } | ||
| 149 | } | ||
| 150 | |||
| 133 | this.policyDetail.ymd1 = ""; | 151 | this.policyDetail.ymd1 = ""; |
| 134 | this.policyDetail.ymd2 = ""; | 152 | this.policyDetail.ymd2 = ""; |
| 135 | this.policyDetail.ymd3 = ""; | 153 | this.policyDetail.ymd3 = ""; |
| ... | @@ -178,7 +196,8 @@ export default { | ... | @@ -178,7 +196,8 @@ export default { |
| 178 | // this.checkIfShowPolicy(); | 196 | // this.checkIfShowPolicy(); |
| 179 | 197 | ||
| 180 | let params = { | 198 | let params = { |
| 181 | policyCode: policyCode | 199 | policyCode: policyCode, |
| 200 | recordIds: [this.policyDetail.letterNo1Id, this.policyDetail.letterNo2Id] | ||
| 182 | }; | 201 | }; |
| 183 | // 回销 | 202 | // 回销 |
| 184 | httpPost({ | 203 | httpPost({ |
| ... | @@ -207,13 +226,14 @@ export default { | ... | @@ -207,13 +226,14 @@ export default { |
| 207 | }, | 226 | }, |
| 208 | // 下载冷静期通知书 | 227 | // 下载冷静期通知书 |
| 209 | downloadPolicy2() { | 228 | downloadPolicy2() { |
| 210 | this.agree1 = true; | 229 | this.policyDetail.agree2 = true; |
| 211 | if (this.policyDetail) { | 230 | if (this.policyDetail) { |
| 212 | httpPost({ | 231 | httpPost({ |
| 213 | url: api.getDownloadPath, | 232 | url: api.getDownloadPath, |
| 214 | sid: true, | 233 | sid: true, |
| 215 | data: { | 234 | data: { |
| 216 | policyCode: this.policyDetail.policyCode | 235 | policyCode: this.policyDetail.policyCode, |
| 236 | recordId: this.policyDetail.letterNo2Id | ||
| 217 | } | 237 | } |
| 218 | }).then(res => { | 238 | }).then(res => { |
| 219 | if (res) { | 239 | if (res) { |
| ... | @@ -225,15 +245,16 @@ export default { | ... | @@ -225,15 +245,16 @@ export default { |
| 225 | }); | 245 | }); |
| 226 | } | 246 | } |
| 227 | }, | 247 | }, |
| 228 | // 下载政策协议 | 248 | // 下载保险合约 |
| 229 | downloadPolicy() { | 249 | downloadPolicy() { |
| 230 | this.agree2 = true; | 250 | this.policyDetail.agree1 = true; |
| 231 | if (this.policyDetail) { | 251 | if (this.policyDetail) { |
| 232 | httpPost({ | 252 | httpPost({ |
| 233 | url: api.getDownloadPath, | 253 | url: api.getDownloadPath, |
| 234 | sid: true, | 254 | sid: true, |
| 235 | data: { | 255 | data: { |
| 236 | policyCode: this.policyDetail.policyCode | 256 | policyCode: this.policyDetail.policyCode, |
| 257 | recordId: this.policyDetail.letterNo1Id | ||
| 237 | } | 258 | } |
| 238 | }).then(res => { | 259 | }).then(res => { |
| 239 | if (res) { | 260 | if (res) { |
| ... | @@ -286,7 +307,7 @@ export default { | ... | @@ -286,7 +307,7 @@ export default { |
| 286 | return this.userInfo && this.userInfo.sid; | 307 | return this.userInfo && this.userInfo.sid; |
| 287 | }, | 308 | }, |
| 288 | onCheckHandler() { | 309 | onCheckHandler() { |
| 289 | if (this.agree1 && this.agree2) { | 310 | if (this.policyDetail.agree1 && this.policyDetail.agree2) { |
| 290 | this.checked = !this.checked; | 311 | this.checked = !this.checked; |
| 291 | this.errtipsVisible = false; | 312 | this.errtipsVisible = false; |
| 292 | } else { | 313 | } else { | ... | ... |
-
Please register or sign in to post a comment