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
@@ -1,19 +1,11 @@
1
- import { convertPersonData, convertProductData, calcTotalBaof, deepCopy } from 'packages/bxs-utils/index';
1
+ import { cloneDeep } from 'lodash'
2
+ import { convertPersonData, convertProductData, calcTotalBaof } from 'packages/bxs-utils/index'
2
3
 
3
4
  export function convertInputDataToResultData(inputData, options = {}) {
4
- let resultData = null;
5
+ let resultData = null
5
6
  if (inputData) {
6
- const {
7
- title,
8
- theme,
9
- categorySort,
10
- displayFormatSort,
11
- commonData,
12
- personData,
13
- productGroupList,
14
- addedServiceList = []
15
- } = deepCopy(inputData);
16
- const { planbookId, pbType, planName, userUuid } = options;
7
+ const { title, theme, categorySort, displayFormatSort, commonData, personData, productGroupList, addedServiceList = [] } = cloneDeep(inputData)
8
+ const { planbookId, pbType, planName, userUuid } = options
17
9
  resultData = {
18
10
  insuranceTypeId: planbookId,
19
11
  pbType,
@@ -28,70 +20,67 @@ export function convertInputDataToResultData(inputData, options = {}) {
28
20
  personData: convertPersonData(personData),
29
21
  productGroupList: [],
30
22
  totalBaof: null
31
- };
23
+ }
32
24
 
33
- const _productGroupList = productGroupList.filter(g => (g.prodOrderList || []).some(p => p.hadChoice && !p.hide));
25
+ const _productGroupList = productGroupList.filter(g => (g.prodOrderList || []).some(p => p.hadChoice && !p.hide))
34
26
  if (_productGroupList.length) {
35
27
  _productGroupList.forEach(g => {
36
- g.prodOrderList = g.prodOrderList.filter(p => p.hadChoice && !p.hide);
37
- });
28
+ g.prodOrderList = g.prodOrderList.filter(p => p.hadChoice && !p.hide)
29
+ })
38
30
  // 是否有产品支持多被保人
39
- const hasMultipleInsured = _productGroupList.some(g => g.prodOrderList.some(p => p.multipleInsured));
31
+ const hasMultipleInsured = _productGroupList.some(g => g.prodOrderList.some(p => p.multipleInsured))
40
32
  if (!hasMultipleInsured) {
41
- resultData.personData.personOrderList = resultData.personData.personOrderList.filter(
42
- p => p.key !== 'insured2Info'
43
- );
33
+ resultData.personData.personOrderList = resultData.personData.personOrderList.filter(p => p.key !== 'insured2Info')
44
34
  }
45
35
 
46
36
  _productGroupList.forEach(group => {
47
37
  const _productGroup = {
48
38
  key: group.key,
49
39
  prodOrderList: []
50
- };
40
+ }
51
41
  group.prodOrderList.forEach(prod => {
52
- const mainInsurance = prod.mulInsOrderList.find(ins => ins.key !== 'common');
42
+ const mainInsurance = prod.mulInsOrderList.find(ins => ins.key !== 'common')
53
43
  prod.mulInsOrderList.forEach((ins, i, arr) => {
54
44
  if (Array.isArray(ins.eleOrderList)) {
55
45
  // 用于结果页控制字段显示顺序
56
- const eleOrderInResult = [];
46
+ const eleOrderInResult = []
57
47
  // refInsuranceId: -1-主险 -2-险种自身
58
- const _refId = Number(ins.refInsuranceId);
59
- let refInsuranceData = null;
48
+ const _refId = Number(ins.refInsuranceId)
49
+ let refInsuranceData = null
60
50
  if (_refId && _refId !== -2) {
61
- refInsuranceData = _refId === -1 ? mainInsurance : arr.find(e => e.key === _refId);
51
+ refInsuranceData = _refId === -1 ? mainInsurance : arr.find(e => e.key === _refId)
62
52
  }
63
53
 
64
- const _refEleOrderList =
65
- refInsuranceData && refInsuranceData.eleOrderList ? refInsuranceData.eleOrderList : [];
54
+ const _refEleOrderList = refInsuranceData && refInsuranceData.eleOrderList ? refInsuranceData.eleOrderList : []
66
55
  ins.eleOrderList
67
56
  .filter(e => !['title', 'calMethod', 'customRate', 'company'].includes(e.key))
68
57
  .forEach(e => {
69
- const _refElementData = _refEleOrderList.find(e => e.key === e.key);
58
+ const _refElementData = _refEleOrderList.find(e => e.key === e.key)
70
59
  if (!e.isHide || (e.isHide && !e.isDisabled && _refElementData && !_refElementData.isHide)) {
71
60
  eleOrderInResult.push({
72
61
  value: e.key,
73
62
  label: e.labelName
74
- });
63
+ })
75
64
  }
76
- });
77
- ins.eleOrderInResult = eleOrderInResult;
65
+ })
66
+ ins.eleOrderInResult = eleOrderInResult
78
67
  }
79
- });
68
+ })
80
69
 
81
- const productData = convertProductData(prod);
70
+ const productData = convertProductData(prod)
82
71
  // 双豁免险种处理
83
72
  productData.mulInsOrderList.forEach(ins => {
84
- const { huomian, shmInsData } = ins;
73
+ const { huomian, shmInsData } = ins
85
74
  if (huomian === 'shuangHuomian' && shmInsData && shmInsData.title) {
86
- productData.mulInsOrderList.push(shmInsData);
75
+ productData.mulInsOrderList.push(shmInsData)
87
76
  }
88
- });
89
- _productGroup.prodOrderList.push(productData);
90
- });
91
- resultData.productGroupList.push(_productGroup);
92
- });
93
- resultData.totalBaof = calcTotalBaof(_productGroupList);
77
+ })
78
+ _productGroup.prodOrderList.push(productData)
79
+ })
80
+ resultData.productGroupList.push(_productGroup)
81
+ })
82
+ resultData.totalBaof = calcTotalBaof(_productGroupList)
94
83
  }
95
84
  }
96
- return resultData;
85
+ return resultData
97
86
  }
@@ -0,0 +1,235 @@
1
+ @import (reference) 'variables.less';
2
+
3
+ .bxt-product-show {
4
+ & .bxt-product-show-container {
5
+ padding: 12px;
6
+ background: #fff;
7
+ border-radius: 6px;
8
+
9
+ & .bxt-product-header {
10
+ position: relative;
11
+ font-size: 15px;
12
+ font-weight: bold;
13
+
14
+ & .bx-button {
15
+ line-height: normal;
16
+ }
17
+
18
+ & .bxt-product-header-title {
19
+ .bxt-nowrap();
20
+
21
+ width: 80%;
22
+
23
+ &.\--delete {
24
+ width: 63%;
25
+ }
26
+ }
27
+
28
+ & .bxt-product-header-btn {
29
+ position: absolute;
30
+ top: 50%;
31
+ right: 0;
32
+ transform: translateY(-50%);
33
+
34
+ & .bxt-button-delete {
35
+ margin-right: 5px;
36
+ }
37
+ }
38
+ }
39
+
40
+ & .bxt-product-body {
41
+ & .bxt-product-baof {
42
+ line-height: 32px;
43
+ font-size: 13px;
44
+ font-weight: normal;
45
+ color: var(--bxt-text-minor);
46
+ }
47
+
48
+ & .bxt-product-table {
49
+ width: 100%;
50
+ margin-top: 12px;
51
+ font-size: 14px;
52
+ color: var(--bxt-text-patch);
53
+ border-spacing: 0;
54
+
55
+ & tr {
56
+ & td {
57
+ padding: 6px 6px;
58
+ border-top: 1px solid var(--bxt-line-split);
59
+ border-left: 1px solid var(--bxt-line-split);
60
+ min-width: 3rem;
61
+ text-align: center;
62
+
63
+ &:first-child {
64
+ width: 7rem;
65
+ text-align: justify;
66
+ }
67
+
68
+ &:last-child {
69
+ width: 3rem;
70
+ border-right: 1px solid var(--bxt-line-split);
71
+ }
72
+ }
73
+
74
+ &:first-child {
75
+ & td {
76
+ text-align: center;
77
+ }
78
+ }
79
+
80
+ &:last-child {
81
+ & td {
82
+ border-bottom: 1px solid var(--bxt-line-split);
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ & .bxt-product-aat-container {
91
+ & .bxt-product-aat-table {
92
+ width: 100%;
93
+ margin-top: 9px;
94
+ border-collapse: collapse;
95
+ font-size: 14px;
96
+
97
+ & .bxt-product-aat-caption {
98
+ display: flex;
99
+ position: relative;
100
+ line-height: normal;
101
+ padding: 8px;
102
+ border: 1px solid var(--bxt-line-split);
103
+ text-align: left;
104
+
105
+ & span {
106
+ & em,
107
+ & .icon-more_circle {
108
+ font-style: normal;
109
+ margin-left: 5px;
110
+ vertical-align: middle;
111
+ }
112
+ }
113
+
114
+ & span:first-child {
115
+ .bxt-nowrap();
116
+
117
+ flex: 1;
118
+ font-weight: bold;
119
+ }
120
+
121
+ & span:last-child {
122
+ font-weight: normal;
123
+ font-size: 14px;
124
+ color: var(--bxt-primary);
125
+ text-align: right;
126
+ }
127
+
128
+ & h5 {
129
+ .bxt-nowrap();
130
+
131
+ width: 65%;
132
+ display: inline-block;
133
+ vertical-align: middle;
134
+ font-size: 14px;
135
+ }
136
+
137
+ & .bxt-product-aat-modify {
138
+ vertical-align: middle;
139
+ color: var(--bxt-primary);
140
+
141
+ & span {
142
+ margin-left: 16px;
143
+ }
144
+ }
145
+ }
146
+
147
+ & tbody {
148
+ & tr {
149
+ & td {
150
+ min-width: 24px;
151
+ padding: 8px 8px 5px;
152
+ border-bottom: 1px solid var(--bxt-line-split);
153
+ border-left: 1px solid var(--bxt-line-split);
154
+ text-align: center;
155
+ color: var(--bxt-text-patch);
156
+ vertical-align: middle;
157
+
158
+ &.first-child {
159
+ width: 50px;
160
+ }
161
+
162
+ &.second-child {
163
+ width: 110px;
164
+ }
165
+
166
+ &:last-child {
167
+ border-right: 1px solid var(--bxt-line-split);
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+
175
+ & .bxt-product-ade-container {
176
+ margin-top: 1rem;
177
+ text-align: left;
178
+ font-size: 14px;
179
+ overflow: auto;
180
+
181
+ & table {
182
+ width: 100%;
183
+ border-collapse: collapse;
184
+
185
+ & caption {
186
+ position: relative;
187
+ padding: 12px 8px 10px;
188
+ border: 1px solid var(--bxt-line-split);
189
+ text-align: left;
190
+
191
+ & h5 {
192
+ .bxt-nowrap();
193
+
194
+ width: 15rem;
195
+ font-size: 14px;
196
+ }
197
+
198
+ & .bxt-product-ade-button {
199
+ .bxt-vertical-center();
200
+
201
+ display: inline-block;
202
+ color: var(--bxt-primary);
203
+ right: 8px;
204
+ }
205
+ }
206
+
207
+ & thead,
208
+ & tbody {
209
+ text-align: center;
210
+
211
+ & tr {
212
+ display: table-row;
213
+
214
+ & td {
215
+ position: relative;
216
+ border-bottom: 1px solid var(--bxt-line-split);
217
+ border-left: 1px solid var(--bxt-line-split);
218
+ min-width: 36px;
219
+ color: var(--bxt-text-patch);
220
+ vertical-align: middle;
221
+ padding: 10px 8px 8px;
222
+
223
+ &:first-child {
224
+ width: 36px;
225
+ }
226
+
227
+ &:last-child {
228
+ border-right: 1px solid var(--bxt-line-split);
229
+ }
230
+ }
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }