bxs-tools-ui 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +20 -20
  2. package/es/add-and-take/index.css +1 -1
  3. package/es/add-and-take/index.js +283 -64
  4. package/es/adjust-baoe/index.css +1 -1
  5. package/es/adjust-baoe/index.js +444 -195
  6. package/es/business-card/index.css +1 -1
  7. package/es/business-card/index.js +1 -0
  8. package/es/canvas-poster/index.css +1 -1
  9. package/es/canvas-poster/index.js +1 -0
  10. package/es/index.css +1 -1
  11. package/es/index.js +936 -824
  12. package/es/insure-calculate/index.css +1 -1
  13. package/es/insure-calculate/index.js +438 -265
  14. package/es/person-info/index.css +1 -1
  15. package/es/person-info/index.js +296 -1370
  16. package/es/product-info/index.css +1 -1
  17. package/es/product-info/index.js +644 -548
  18. package/es/share-sheet/index.css +1 -1
  19. package/es/share-sheet/index.js +313 -21
  20. package/es/utils/index.js +530 -429
  21. package/lib/add-and-take/index.css +1 -1
  22. package/lib/add-and-take/index.js +283 -64
  23. package/lib/adjust-baoe/index.css +1 -1
  24. package/lib/adjust-baoe/index.js +441 -194
  25. package/lib/business-card/index.css +1 -1
  26. package/lib/business-card/index.js +1 -0
  27. package/lib/canvas-poster/index.css +1 -1
  28. package/lib/canvas-poster/index.js +1 -0
  29. package/lib/index.css +1 -1
  30. package/lib/index.js +939 -826
  31. package/lib/insure-calculate/index.css +1 -1
  32. package/lib/insure-calculate/index.js +438 -268
  33. package/lib/person-info/index.css +1 -1
  34. package/lib/person-info/index.js +295 -1372
  35. package/lib/product-info/index.css +1 -1
  36. package/lib/product-info/index.js +645 -550
  37. package/lib/share-sheet/index.css +1 -1
  38. package/lib/share-sheet/index.js +313 -25
  39. package/lib/utils/index.js +531 -433
  40. package/package.json +9 -7
  41. package/packages/add-and-take/components/interest-form.less +144 -0
  42. package/packages/add-and-take/components/interest-form.vue +179 -179
  43. package/packages/add-and-take/components/interest-items.less +87 -0
  44. package/packages/add-and-take/components/interest-items.vue +67 -80
  45. package/packages/add-and-take/components/interest-table.less +111 -0
  46. package/packages/add-and-take/components/interest-table.vue +31 -31
  47. package/packages/add-and-take/constant.ts +2 -2
  48. package/packages/add-and-take/demo/index.vue +89 -86
  49. package/packages/add-and-take/handler.ts +52 -57
  50. package/packages/add-and-take/index.less +69 -0
  51. package/packages/add-and-take/index.vue +156 -156
  52. package/packages/add-and-take/readme.md +87 -98
  53. package/packages/adjust-baoe/demo/index.vue +37 -47
  54. package/packages/adjust-baoe/index.less +125 -0
  55. package/packages/adjust-baoe/index.vue +134 -147
  56. package/packages/adjust-baoe/readme.md +35 -45
  57. package/packages/business-card/demo/index.vue +7 -7
  58. package/packages/business-card/index.less +100 -0
  59. package/packages/business-card/index.vue +18 -21
  60. package/packages/business-card/readme.md +46 -53
  61. package/packages/bxs-utils/demo/index.vue +2 -2
  62. package/packages/bxs-utils/index.ts +5 -5
  63. package/packages/bxs-utils/planbook/common.ts +56 -92
  64. package/packages/bxs-utils/planbook/index.ts +4 -4
  65. package/packages/bxs-utils/planbook/insurance.ts +137 -127
  66. package/packages/bxs-utils/planbook/person.ts +143 -147
  67. package/packages/bxs-utils/planbook/product.ts +473 -509
  68. package/packages/bxs-utils/readme.md +94 -84
  69. package/packages/bxs-utils/trade/index.js +1 -1
  70. package/packages/bxs-utils/trade/insureCalculate.js +91 -204
  71. package/packages/canvas-poster/demo/index.vue +9 -13
  72. package/packages/canvas-poster/index.less +5 -0
  73. package/packages/canvas-poster/index.vue +68 -79
  74. package/packages/canvas-poster/readme.md +106 -109
  75. package/packages/index.ts +1 -1
  76. package/packages/insure-calculate/demo/index.vue +20 -20
  77. package/packages/insure-calculate/index.less +366 -0
  78. package/packages/insure-calculate/index.vue +305 -329
  79. package/packages/insure-calculate/readme.md +99 -106
  80. package/packages/person-info/crm-popup.vue +81 -80
  81. package/packages/person-info/demo/index.vue +25 -37
  82. package/packages/person-info/index-inline.less +11 -0
  83. package/packages/person-info/index.vue +53 -83
  84. package/packages/person-info/readme.md +109 -115
  85. package/packages/planbook-input/components/footer.less +54 -0
  86. package/packages/planbook-input/components/footer.vue +8 -64
  87. package/packages/planbook-input/components/handler.js +33 -44
  88. package/packages/planbook-input/components/product-table.less +235 -0
  89. package/packages/planbook-input/components/product-table.vue +114 -108
  90. package/packages/planbook-input/demo/index.vue +3 -3
  91. package/packages/planbook-input/helper.js +852 -465
  92. package/packages/planbook-input/index.less +30 -0
  93. package/packages/planbook-input/index.vue +86 -103
  94. package/packages/planbook-input/readme.md +72 -90
  95. package/packages/product-info/demo/constant.js +1 -1
  96. package/packages/product-info/demo/index.vue +31 -43
  97. package/packages/product-info/index.less +271 -0
  98. package/packages/product-info/index.vue +198 -210
  99. package/packages/product-info/readme.md +72 -75
  100. package/packages/share-sheet/constant.js +4 -4
  101. package/packages/share-sheet/demo/index.vue +10 -10
  102. package/packages/share-sheet/handler.js +14 -14
  103. package/packages/share-sheet/index.less +201 -0
  104. package/packages/share-sheet/index.vue +39 -39
  105. package/packages/share-sheet/readme.md +121 -127
  106. package/src/api/add-and-take.js +45 -0
  107. package/src/api/adjust-baoe.js +16 -0
  108. package/src/api/index.js +6 -0
  109. package/src/api/planbook.js +93 -0
  110. package/src/api/request.js +211 -0
  111. package/src/api/trade.js +56 -0
  112. package/src/api/user.js +18 -0
  113. package/src/components/common/common-age-birthday.less +66 -0
  114. package/src/components/common/common-age-birthday.vue +27 -95
  115. package/src/components/common/common-popup.less +81 -0
  116. package/src/components/common/common-popup.vue +12 -96
  117. package/src/components/common/common-radio.less +75 -0
  118. package/src/components/common/common-radio.vue +13 -91
  119. package/src/components/common/common-select.less +13 -0
  120. package/src/components/common/common-select.vue +21 -38
  121. package/src/components/common/common-title.less +115 -0
  122. package/src/components/common/common-title.vue +24 -24
  123. package/src/js/loading.js +6 -6
  124. package/src/js/md5Token.js +38 -44
  125. package/src/js/utils.js +45 -53
  126. package/src/js/variables.js +47 -25
  127. package/src/style/base.less +18 -0
  128. package/src/style/color.less +40 -0
  129. package/src/style/variables.less +21 -42
  130. package/packages/add-and-take/api.ts +0 -70
  131. package/packages/add-and-take/components/interest-form.css +0 -146
  132. package/packages/add-and-take/components/interest-items.css +0 -87
  133. package/packages/add-and-take/components/interest-table.css +0 -113
  134. package/packages/add-and-take/index.css +0 -70
  135. package/packages/adjust-baoe/index.css +0 -123
  136. package/packages/business-card/index.css +0 -101
  137. package/packages/canvas-poster/index.css +0 -5
  138. package/packages/insure-calculate/index.css +0 -368
  139. package/packages/planbook-input/api.js +0 -29
  140. package/packages/planbook-input/components/product-table.css +0 -236
  141. package/packages/planbook-input/index.css +0 -31
  142. package/packages/product-info/index.css +0 -264
  143. package/packages/share-sheet/index.css +0 -203
  144. package/src/components/common/common-title.css +0 -116
  145. package/src/js/request.js +0 -64
  146. package/src/style/apply.css +0 -25
  147. package/src/style/base.css +0 -36
  148. package/src/style/color.css +0 -74
@@ -64,55 +64,55 @@ export default {
64
64
  </template>
65
65
 
66
66
  <script>
67
- import { AddAndTake } from 'bxs-tools-ui';
68
-
69
- export default {
70
- components: { AddAndTake },
71
- data() {
72
- return {
73
- takePopupConfig: {
74
- visible: true,
75
- title: '弹层标题',
76
- type: 'reduceBaof',
77
- submoduleName: 'Table',
78
- scene: 0,
79
- groupKey: 'allMainInsData',
80
- productKey: 1800,
81
- insuranceKey: 17588,
82
- resultUuid: null,
83
- inputData: null,
84
- insuredAge: 30,
85
- accountData: null,
86
- accountInsuranceId: null,
87
- reduceBaofData: null,
88
- reduceBaofData2: null,
89
- reduceBaofInsuranceId: 17588,
90
- interestData: {
91
- bonus: 'low',
92
- rate: null,
93
- takeType: 'account',
94
- customRate: 0.047
67
+ import { AddAndTake } from 'bxs-tools-ui';
68
+
69
+ export default {
70
+ components: { AddAndTake },
71
+ data() {
72
+ return {
73
+ takePopupConfig: {
74
+ visible: true,
75
+ title: '弹层标题',
76
+ type: 'reduceBaof',
77
+ submoduleName: 'Table',
78
+ scene: 0,
79
+ groupKey: 'allMainInsData',
80
+ productKey: 1800,
81
+ insuranceKey: 17588,
82
+ resultUuid: null,
83
+ inputData: null,
84
+ insuredAge: 30,
85
+ accountData: null,
86
+ accountInsuranceId: null,
87
+ reduceBaofData: null,
88
+ reduceBaofData2: null,
89
+ reduceBaofInsuranceId: 17588,
90
+ interestData: {
91
+ bonus: 'low',
92
+ rate: null,
93
+ takeType: 'account',
94
+ customRate: 0.047
95
+ }
95
96
  }
96
- }
97
- };
98
- },
99
- methods: {
100
- addAndTakeConfirm(data) {
101
- const { type, accountData, accountInsuranceId, reduceBaofData, reduceBaofData2, reduceBaofInsuranceId, interestData } = data;
102
- console.log(data);
97
+ };
103
98
  },
104
- closeAddAndTake() {
105
- const { $refs, takePopupConfig } = this;
106
- if (!takePopupConfig.visible) {
107
- const refAddAndTake = $refs.AddAndTake;
108
- if (refAddAndTake && refAddAndTake.subName === 'Form') {
109
- refAddAndTake.goToTable();
110
- takePopupConfig.visible = true;
99
+ methods: {
100
+ addAndTakeConfirm(data) {
101
+ const { type, accountData, accountInsuranceId, reduceBaofData, reduceBaofData2, reduceBaofInsuranceId, interestData } = data;
102
+ console.log(data);
103
+ },
104
+ closeAddAndTake() {
105
+ const { $refs, takePopupConfig } = this;
106
+ if (!takePopupConfig.visible) {
107
+ const refAddAndTake = $refs.AddAndTake;
108
+ if (refAddAndTake && refAddAndTake.subName === 'Form') {
109
+ refAddAndTake.goToTable();
110
+ takePopupConfig.visible = true;
111
+ }
111
112
  }
112
113
  }
113
114
  }
114
- }
115
- };
115
+ };
116
116
  </script>
117
117
  ```
118
118
 
@@ -122,28 +122,27 @@ export default {
122
122
 
123
123
  #### 根级 props
124
124
 
125
- | 参数 | 说明 | 类型 | 默认值 | 备注 |
126
- | --- | --- | --- | --- | --- |
127
- | `type` | 可选,追加领取的类型 | String | `addAndTake` | `addAndTake` 追加领取 / `add` 追加 / `take` 领取 / `reduceBaof` 减保领取 |
128
- | `groupKey` | 必传,产品组的 key | Number / String | — | — |
129
- | `productKey` | 必传,产品的 key | Number / String | — | — |
130
- | `insuredAge` | 必传,被保人年龄 | Number | — | — |
131
- | `scene` | 可选,所在场景 | Number | `0` | `0` 投保页 / `1` 结果页 / `2` 计划书对比 / `3` 利益对比 / `4` 保司投保页 / `5` 险种对比(利益对比2024) |
132
- | `submoduleName` | 可选,当前展示的子模块(`.sync`) | String | `Table` | `Table` 利益表格 / `Form` 追加领取表单 |
133
- | `resultUuid` | 可选,计划书结果页的 uuid | String | — | 传入后可不传 `inputData` |
134
- | `inputData` | 可选,计划书投保页数据结构 | Object | — | 不传 `resultUuid` 时需传入;见 InputData 对象 |
135
- | `periodNum` | 可选,险种交费期间 | Number | `0` | — |
136
- | `accountData` | 可选,追加领取的数据 | Object | — | 见 AccountData 对象 |
137
- | `accountInsuranceId` | 可选,追加领取险种的 key | Number | — | — |
138
- | `reduceBaofData` | 可选,减保领取的数据 | Object | — | 见 ReduceBaofData 对象 |
139
- | `reduceBaofData2` | 可选,双减保领取的数据 | Object | — | 见 ReduceBaofData 对象 |
140
- | `reduceBaofInsuranceId` | 可选,减保领取险种的 key | Number | — | — |
141
- | `interestData` | 可选,利益数据 | Object | — | 见 InterestData 对象 |
142
- | `footer` | 可选,是否显示底部按钮 | Boolean | `true` | — |
125
+ | 参数 | 说明 | 类型 | 默认值 | 备注 |
126
+ | ----------------------- | --------------------------------- | --------------- | ------------ | -------------------------------------------------------------------------------------------------------- |
127
+ | `type` | 可选,追加领取的类型 | String | `addAndTake` | `addAndTake` 追加领取 / `add` 追加 / `take` 领取 / `reduceBaof` 减保领取 |
128
+ | `groupKey` | 必传,产品组的 key | Number / String | — | — |
129
+ | `productKey` | 必传,产品的 key | Number / String | — | — |
130
+ | `insuredAge` | 必传,被保人年龄 | Number | — | — |
131
+ | `scene` | 可选,所在场景 | Number | `0` | `0` 投保页 / `1` 结果页 / `2` 计划书对比 / `3` 利益对比 / `4` 保司投保页 / `5` 险种对比(利益对比 2024) |
132
+ | `submoduleName` | 可选,当前展示的子模块(`.sync`) | String | `Table` | `Table` 利益表格 / `Form` 追加领取表单 |
133
+ | `resultUuid` | 可选,计划书结果页的 uuid | String | — | 传入后可不传 `inputData` |
134
+ | `inputData` | 可选,计划书投保页数据结构 | Object | — | 不传 `resultUuid` 时需传入;见 InputData 对象 |
135
+ | `periodNum` | 可选,险种交费期间 | Number | `0` | — |
136
+ | `accountData` | 可选,追加领取的数据 | Object | — | 见 AccountData 对象 |
137
+ | `accountInsuranceId` | 可选,追加领取险种的 key | Number | — | — |
138
+ | `reduceBaofData` | 可选,减保领取的数据 | Object | — | 见 ReduceBaofData 对象 |
139
+ | `reduceBaofData2` | 可选,双减保领取的数据 | Object | — | 见 ReduceBaofData 对象 |
140
+ | `reduceBaofInsuranceId` | 可选,减保领取险种的 key | Number | — | — |
141
+ | `interestData` | 可选,利益数据 | Object | — | 见 InterestData 对象 |
142
+ | `footer` | 可选,是否显示底部按钮 | Boolean | `true` | — |
143
143
 
144
144
  > `accountData` / `accountInsuranceId` 对应追加领取,`reduceBaofData` / `reduceBaofInsuranceId` 对应减保领取。产品下同时存在两者时,需全部传入。
145
145
 
146
-
147
146
  #### InputData 对象
148
147
 
149
148
  ```json
@@ -184,7 +183,6 @@ export default {
184
183
  }
185
184
  ```
186
185
 
187
-
188
186
  #### AccountData 对象
189
187
 
190
188
  ```json
@@ -194,15 +192,11 @@ export default {
194
192
  "addAndTakeData": [
195
193
  {
196
194
  "key": "add",
197
- "adjustData": [
198
- [1, 6, 1]
199
- ]
195
+ "adjustData": [[1, 6, 1]]
200
196
  },
201
197
  {
202
198
  "key": "take",
203
- "adjustData": [
204
- [3, 3, 2, ""]
205
- ]
199
+ "adjustData": [[3, 3, 2, ""]]
206
200
  }
207
201
  ]
208
202
  }
@@ -211,7 +205,6 @@ export default {
211
205
  > `accountPart`:`addAndTake` 追加领取 / `add` 追加 / `take` 领取 / `reduceBaof` 减额领取
212
206
  > `adjustData` 行格式:`[开始年度, 结束年度, 金额]`(追加);`[开始年度, 结束年度, 金额, 用途]`(领取)
213
207
 
214
-
215
208
  #### ReduceBaofData 对象
216
209
 
217
210
  ```json
@@ -220,52 +213,48 @@ export default {
220
213
  "addAndTakeData": [
221
214
  {
222
215
  "key": "take",
223
- "adjustData": [
224
- [3, 3, 2, ""]
225
- ]
216
+ "adjustData": [[3, 3, 2, ""]]
226
217
  }
227
218
  ]
228
219
  }
229
220
  ```
230
221
 
231
-
232
222
  #### InterestData 对象
233
223
 
234
- | 参数 | 说明 | 类型 | 备注 |
235
- | --- | --- | --- | --- |
236
- | `takeType` | 领取方式 | String | — |
237
- | `bonus` | 分红值 | String | — |
238
- | `rate` | 账户利率值 | Number | — |
239
- | `customRate` | 自定义利率 | Number | — |
224
+ | 参数 | 说明 | 类型 | 备注 |
225
+ | --------------- | -------------- | ------ | ----------------------------------- |
226
+ | `takeType` | 领取方式 | String | — |
227
+ | `bonus` | 分红值 | String | — |
228
+ | `rate` | 账户利率值 | Number | — |
229
+ | `customRate` | 自定义利率 | Number | — |
240
230
  | `yearBonusRate` | 现金分红实现率 | Number | 仅 `scene` 为 `3`(利益对比)时有效 |
241
- | `endBonusRate` | 终了分红实现率 | Number | 仅 `scene` 为 `3`(利益对比)时有效 |
231
+ | `endBonusRate` | 终了分红实现率 | Number | 仅 `scene` 为 `3`(利益对比)时有效 |
242
232
 
243
233
  ---
244
234
 
245
235
  ### Methods
246
236
 
247
- | 方法名 | 说明 | 参数 |
248
- | --- | --- | --- |
249
- | `goToTable` | 从 Form 子模块返回 Table 子模块 | — |
250
- | `confirm` | 自动触发 Table / Form 的确定事件;当前为 Table 时返回追加领取数据(Promise) | — |
237
+ | 方法名 | 说明 | 参数 |
238
+ | ----------- | ---------------------------------------------------------------------------- | ---- |
239
+ | `goToTable` | 从 Form 子模块返回 Table 子模块 | — |
240
+ | `confirm` | 自动触发 Table / Form 的确定事件;当前为 Table 时返回追加领取数据(Promise) | — |
251
241
 
252
242
  ---
253
243
 
254
244
  ### Events
255
245
 
256
- | 事件名 | 说明 | 回调参数 |
257
- | --- | --- | --- |
246
+ | 事件名 | 说明 | 回调参数 |
247
+ | --------- | --------------------------------------------------------------- | ------------------------------------------------- |
258
248
  | `confirm` | 确定事件;`footer` 为 `true` 时,Table 子模块底部确定按钮的回调 | `Function(data, 模块实例)`,data 见 Response 对象 |
259
249
 
260
-
261
250
  #### Response 对象
262
251
 
263
- | 参数 | 说明 | 类型 | 备注 |
264
- | --- | --- | --- | --- |
265
- | `type` | 追加领取的数据类型 | String | `addAndTake` / `add` / `take` / `reduceBaof` |
266
- | `accountData` | 追加领取的数据 | Object | 见 AccountData 对象 |
267
- | `accountInsuranceId` | 追加领取险种的 key | Number | — |
268
- | `reduceBaofData` | 减保领取的数据 | Object | 见 ReduceBaofData 对象 |
269
- | `reduceBaofData2` | 双减保领取的数据 | Object | 见 ReduceBaofData 对象 |
270
- | `reduceBaofInsuranceId` | 减保领取险种的 key | Number | — |
271
- | `interestData` | 利益数据 | Object | 见 InterestData 对象 |
252
+ | 参数 | 说明 | 类型 | 备注 |
253
+ | ----------------------- | ------------------ | ------ | -------------------------------------------- |
254
+ | `type` | 追加领取的数据类型 | String | `addAndTake` / `add` / `take` / `reduceBaof` |
255
+ | `accountData` | 追加领取的数据 | Object | 见 AccountData 对象 |
256
+ | `accountInsuranceId` | 追加领取险种的 key | Number | — |
257
+ | `reduceBaofData` | 减保领取的数据 | Object | 见 ReduceBaofData 对象 |
258
+ | `reduceBaofData2` | 双减保领取的数据 | Object | 见 ReduceBaofData 对象 |
259
+ | `reduceBaofInsuranceId` | 减保领取险种的 key | Number | — |
260
+ | `interestData` | 利益数据 | Object | 见 InterestData 对象 |
@@ -59,13 +59,13 @@
59
59
  </div>
60
60
  </template>
61
61
  <script lang="ts">
62
- import Vue from 'vue';
63
- import QS from 'qs';
64
- import { PLANBOOK_API_HOSTNAME } from '@src/js/variables.js';
65
- import { Component } from 'vue-property-decorator';
66
- import { initPageData, setPageDataBaseOnResult } from 'packages/planbook-input/helper.js';
67
- import CommonPopup from '@src/components/common/common-popup.vue';
68
- import AdjustBaoe from '../index.vue';
62
+ import Vue from 'vue'
63
+ import QS from 'qs'
64
+ import { getPlanbookInitData } from '../../../src/api/planbook.js'
65
+ import { Component } from 'vue-property-decorator'
66
+ import { initPageData } from 'packages/planbook-input/helper.js'
67
+ import CommonPopup from '../../../src/components/common/common-popup.vue'
68
+ import AdjustBaoe from '../index.vue'
69
69
 
70
70
  @Component({
71
71
  components: {
@@ -75,68 +75,58 @@ import AdjustBaoe from '../index.vue';
75
75
  })
76
76
  export default class AdjustBaoeDemo extends Vue {
77
77
  get inputData() {
78
- return this.planbookData && this.planbookData.initData && this.planbookData.initData.inputData;
78
+ return this.planbookData && this.planbookData.initData && this.planbookData.initData.inputData
79
79
  }
80
80
  get groupData() {
81
- return this.inputData && this.inputData.productGroupList[0];
81
+ return this.inputData && this.inputData.productGroupList[0]
82
82
  }
83
83
  get productData() {
84
- return this.groupData && this.groupData.prodOrderList[0];
84
+ return this.groupData && this.groupData.prodOrderList[0]
85
85
  }
86
86
 
87
- URL_PARAM: any = this.getUrlParam();
88
- tab = 1;
89
- submoduleName1 = 'Table';
90
- submoduleName2 = 'Table';
91
- isShowAdjustBaoe = false;
92
- planbookData: any = null;
87
+ URL_PARAM: any = this.getUrlParam()
88
+ tab = 1
89
+ submoduleName1 = 'Table'
90
+ submoduleName2 = 'Table'
91
+ isShowAdjustBaoe = false
92
+ planbookData: any = null
93
93
 
94
94
  created() {
95
- this.getPlanbookData();
95
+ this.getPlanbookData()
96
96
  }
97
97
  getUrlParam() {
98
- return QS.parse(`${location.href.split('?')[1]}`) || {};
98
+ return QS.parse(`${location.href.split('?')[1]}`) || {}
99
99
  }
100
100
  getPlanbookData() {
101
- fetch(
102
- `${PLANBOOK_API_HOSTNAME}/planBook/V2/getInitData?${QS.stringify({
103
- insuranceTypeId: this.URL_PARAM.planbookId * 1 || 3933
104
- })}`,
105
- {
106
- credentials: 'include'
107
- }
108
- )
109
- .then(response => response.json())
110
- .then(async ({ success, data }: any) => {
111
- if (!success || !data) {
112
- return;
113
- }
114
- await initPageData(data);
115
- setPageDataBaseOnResult(data);
116
- this.planbookData = data;
117
- document.title = `DEMO:${this.planbookData.title}`;
101
+ getPlanbookInitData({
102
+ insuranceTypeId: this.URL_PARAM.planbookId * 1 || 3933
103
+ })
104
+ .then(async (data: any) => {
105
+ await initPageData(data)
106
+ this.planbookData = data
107
+ document.title = `DEMO:${this.planbookData.title}`
118
108
  })
119
109
  .catch(error => {
120
- console.log(error);
121
- });
110
+ console.log(error)
111
+ })
122
112
  }
123
113
  onClickPopupConfirm(data) {
124
- this.productData.adjustBaoeData = data;
125
- this.isShowAdjustBaoe = false;
126
- console.log(data);
127
- this.$toast('调整保额成功');
114
+ this.productData.adjustBaoeData = data
115
+ this.isShowAdjustBaoe = false
116
+ console.log(data)
117
+ this.$toast('调整保额成功')
128
118
  }
129
119
  onClickNormalConfirm() {
130
- const { productData } = this;
131
- const refAdjustBaoe: any = this.$refs.AdjustBaoe2;
120
+ const { productData } = this
121
+ const refAdjustBaoe: any = this.$refs.AdjustBaoe2
132
122
  refAdjustBaoe
133
123
  .confirm()
134
124
  .then(data => {
135
- productData.adjustBaoeData = data;
136
- console.log(data);
137
- this.$toast('调整保额成功');
125
+ productData.adjustBaoeData = data
126
+ console.log(data)
127
+ this.$toast('调整保额成功')
138
128
  })
139
- .catch(() => {});
129
+ .catch(() => {})
140
130
  }
141
131
  }
142
132
  </script>
@@ -0,0 +1,125 @@
1
+ @import (reference) 'variables.less';
2
+ @import 'color.less';
3
+
4
+ .bxt-adjust-baoe {
5
+ font-size: 14px;
6
+ padding: 9px;
7
+ background: var(--bxt-bg-primary);
8
+ text-align: left;
9
+
10
+ &.bxt-adjust-baoe--footer {
11
+ .bxt-safe-area-inset-bottom();
12
+
13
+ padding-bottom: 64px;
14
+ }
15
+
16
+ & .bxt-ade-table {
17
+ padding: 15px;
18
+ background: #fff;
19
+ border-radius: 6px;
20
+
21
+ & .bxt-ade-table-content {
22
+ margin-top: 6px;
23
+ width: 100%;
24
+ color: var(--bxt-text-primary);
25
+ text-align: center;
26
+
27
+ & tr {
28
+ & td {
29
+ position: relative;
30
+ color: var(--bxt-text-patch);
31
+ text-align: center;
32
+ padding: 10px 8px 8px;
33
+
34
+ & em {
35
+ font-style: normal;
36
+ }
37
+
38
+ & em.active {
39
+ color: var(--bxt-primary);
40
+ }
41
+ }
42
+
43
+ &:nth-child(2n + 1) {
44
+ & td {
45
+ background: var(--bxt-bg-minor);
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ & .bxt-ade-form {
53
+ padding-bottom: 9px;
54
+ background: white;
55
+ border-radius: 6px;
56
+ overflow: hidden;
57
+
58
+ & .bxt-ade-form-items {
59
+ & .bxt-ade-field-head {
60
+ padding: 5px 16px;
61
+ background-color: #f8f8f8;
62
+ text-align: center;
63
+ }
64
+
65
+ & .bxt-ade-field-label {
66
+ display: flex;
67
+ justify-content: space-between;
68
+ align-items: center;
69
+
70
+ & span {
71
+ flex: 0 0 3em;
72
+ }
73
+
74
+ & span:not(:first-child) {
75
+ flex: 0 0 6em;
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ & .bxt-ade-tips {
82
+ line-height: 145%;
83
+ font-size: 12px;
84
+ color: var(--bxt-text-patch);
85
+ }
86
+
87
+ & .bxt-ade-footer {
88
+ position: fixed;
89
+ bottom: 0;
90
+ left: 0;
91
+ width: 100%;
92
+ padding: 7px 15px;
93
+ box-sizing: border-box;
94
+ border-top: 1px solid var(--bxt-line-split);
95
+ background: var(--bxt-bg-minor);
96
+
97
+ .bxt-safe-area-inset-bottom();
98
+
99
+ & .bxt-ade-footer-wrapper {
100
+ display: flex;
101
+
102
+ & span {
103
+ flex: 4;
104
+ margin-right: 9px;
105
+ padding: 9px 0;
106
+ border: 1px solid var(--bxt-line-split);
107
+ border-radius: 6px;
108
+ background: white;
109
+ text-align: center;
110
+
111
+ &:first-child {
112
+ flex: 2;
113
+ }
114
+
115
+ &:last-child {
116
+ flex: 3;
117
+ margin-right: 0;
118
+ color: white;
119
+ border: 1px solid var(--bxt-primary);
120
+ background: var(--bxt-primary);
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }