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
@@ -113,15 +113,16 @@
113
113
  </div>
114
114
  </template>
115
115
  <script lang="ts">
116
- import Vue from 'vue';
117
- import { get as _get } from 'lodash';
118
- import { Component, Prop } from 'vue-property-decorator';
119
- import { convertEleOrderListToObj, personDataHandler, productDataHandler, clearAddAndTakeAndAdjustBaoeData } from 'packages/bxs-utils/index';
120
- import CommonTitle from '@src/components/common/common-title.vue';
121
- import CommonRadio from '@src/components/common/common-radio.vue';
122
- import CommonSelect from '@src/components/common/common-select.vue';
123
- import CommonAgeBirthday from '@src/components/common/common-age-birthday.vue';
124
- import CrmPopup from 'packages/person-info/crm-popup.vue';
116
+ import Vue from 'vue'
117
+ import { get as _get } from 'lodash'
118
+ import { Component, Prop } from 'vue-property-decorator'
119
+ import { convertEleOrderListToObj, personDataHandler } from 'packages/bxs-utils/index'
120
+ import CommonTitle from '../../src/components/common/common-title.vue'
121
+ import CommonRadio from '../../src/components/common/common-radio.vue'
122
+ import CommonSelect from '../../src/components/common/common-select.vue'
123
+ import CommonAgeBirthday from '../../src/components/common/common-age-birthday.vue'
124
+ import CrmPopup from 'packages/person-info/crm-popup.vue'
125
+ import './index-inline.less'
125
126
 
126
127
  @Component({
127
128
  name: 'BxtPersonInfo',
@@ -134,145 +135,114 @@ import CrmPopup from 'packages/person-info/crm-popup.vue';
134
135
  }
135
136
  })
136
137
  export default class BxtPersonInfo extends Vue {
137
- isShowCrmPersonPop = false;
138
+ isShowCrmPersonPop = false
138
139
  @Prop({
139
140
  default: () => ({})
140
141
  })
141
- inputData: any;
142
+ user: any
142
143
 
143
144
  @Prop({
144
145
  default: () => ({})
145
146
  })
146
- verifyData: any;
147
+ inputData: any
147
148
 
148
149
  @Prop({
149
150
  default: () => ({})
150
151
  })
151
- personData: any;
152
+ verifyData: any
152
153
 
153
154
  @Prop({
154
155
  default: () => ({})
155
156
  })
156
- params: any;
157
+ personData: any
158
+
159
+ @Prop({
160
+ default: () => ({})
161
+ })
162
+ params: any
157
163
 
158
164
  @Prop({
159
165
  default: false
160
166
  })
161
- isShowCrmPerson!: boolean;
167
+ isShowCrmPerson!: boolean
162
168
 
163
169
  get personForm() {
164
- return convertEleOrderListToObj(this.personData);
170
+ return convertEleOrderListToObj(this.personData)
165
171
  }
166
172
 
167
173
  get birthdayElement() {
168
- const elementList = _get(this, 'personData.eleOrderList') || [];
169
- const element = elementList.find(e => e.key === 'birthday');
170
- return element;
174
+ const elementList = _get(this, 'personData.eleOrderList') || []
175
+ const element = elementList.find(e => e.key === 'birthday')
176
+ return element
171
177
  }
172
178
 
173
179
  isShowPersonElement(person, ele) {
174
- const title = person.eleOrderList.find(e => e.key === 'title');
175
- let bool = title && title.value;
180
+ const title = person.eleOrderList.find(e => e.key === 'title')
181
+ let bool = title && title.value
176
182
  if (!bool) {
177
- return false;
183
+ return false
178
184
  }
179
185
  if (person.key === 'applicantInfo' && ele.key !== 'applicantAndInsuredSame') {
180
- const applicantSame = person.eleOrderList.find(e => e.key === 'applicantAndInsuredSame');
186
+ const applicantSame = person.eleOrderList.find(e => e.key === 'applicantAndInsuredSame')
181
187
  if (applicantSame) {
182
- bool = !applicantSame.value;
188
+ bool = !applicantSame.value
183
189
  }
184
190
  }
185
- return bool;
191
+ return bool
186
192
  }
187
193
  onClickLabel(ele) {
188
- this.$emit('clickLabel', this.personData, ele);
194
+ this.$emit('clickLabel', this.personData, ele)
189
195
  }
190
196
  onClickIcon(id) {
191
- const inputDom: any = document.querySelector(`#${id}`);
192
- inputDom.focus();
197
+ const inputDom: any = document.querySelector(`#${id}`)
198
+ inputDom.focus()
193
199
  }
194
200
  async change(ele: any = {}) {
195
- const { inputData, personData, verifyData, params } = this;
201
+ const { inputData, personData } = this
196
202
  if (!inputData) {
197
- return;
203
+ return
198
204
  }
199
- const allPersonsData = inputData.personData;
200
- const productGroupList = inputData.productGroupList || [];
201
- const eventTarget = {
202
- personKey: personData.key,
203
- elementKey: ele.key
204
- };
205
-
205
+ const allPersonsData = inputData.personData
206
206
  if (allPersonsData) {
207
- personDataHandler(allPersonsData);
207
+ personDataHandler(allPersonsData)
208
208
  if (personData.key === 'applicantInfo') {
209
209
  if (ele.key === 'applicantAndInsuredSame' && !ele.value) {
210
- personData.cid = null;
210
+ personData.cid = null
211
211
  }
212
212
  }
213
-
214
- const promises: any = [];
215
- productGroupList
216
- .filter(g => g.prodOrderList)
217
- .forEach(g => {
218
- g.prodOrderList.map(p => {
219
- clearAddAndTakeAndAdjustBaoeData(p);
220
- promises.push(
221
- productDataHandler(p, _get(verifyData, `[${p.key}]`), allPersonsData, {
222
- planbookId: _get(params, 'planbookId'),
223
- eventTarget
224
- })
225
- );
226
- });
227
- });
228
- await Promise.all(promises);
229
213
  }
230
214
  if (personData.key && ele.key && !['age'].includes(ele.key)) {
231
- window.WeiyiStatSDK && window.WeiyiStatSDK.submit(`${personData.key}_${ele.key}`);
215
+ window.WeiyiStatSDK && window.WeiyiStatSDK.submit(`${personData.key}_${ele.key}`)
232
216
  }
233
- this.$emit('change', personData, ele);
217
+ this.$emit('change', personData, ele)
234
218
  }
235
219
  validate() {
236
220
  if (!this.personForm.title) {
237
- return Promise.resolve();
221
+ return Promise.resolve()
238
222
  }
239
223
  return new Promise((resolve, reject) => {
240
- const refPersonForm: any = this.$refs.personForm;
224
+ const refPersonForm: any = this.$refs.personForm
241
225
  return refPersonForm
242
226
  ?.validate()
243
227
  .then(valid => {
244
228
  if (!valid) {
245
- resolve(valid);
246
- return;
229
+ resolve(valid)
230
+ return
247
231
  }
248
- reject();
232
+ reject()
249
233
  })
250
234
  .catch(err => {
251
- reject(err);
252
- });
253
- });
235
+ reject(err)
236
+ })
237
+ })
254
238
  }
255
239
  closeKeyBoard() {
256
- const activeElement: any = document.activeElement;
240
+ const activeElement: any = document.activeElement
257
241
  if (!activeElement) {
258
- return false;
242
+ return false
259
243
  }
260
- activeElement.blur();
261
- return false;
244
+ activeElement.blur()
245
+ return false
262
246
  }
263
247
  }
264
248
  </script>
265
- <style lang="postcss">
266
- @import 'base.css';
267
- @import 'color.css';
268
-
269
- .bxt-person-info {
270
- & .van-form {
271
- background: #fff;
272
-
273
- & .van-cell::after {
274
- border-bottom: 0;
275
- }
276
- }
277
- }
278
- </style>
@@ -3,6 +3,7 @@
3
3
  计划书投保页的人员信息模块,基于服务端下发的 `eleOrderList` 动态渲染表单元素,支持性别、年龄、生日等字段的展示与编辑。
4
4
 
5
5
  > 数据来源:访问[计划书初始化 API](http://app.winbaoxian.cn/planBook/V2/getInitData?insuranceTypeId=6128) 查看示例数据。
6
+ >
6
7
  > - `inputData`:`data → initData → inputData`
7
8
  > - `verifyData`:`data → verifyData`
8
9
  > - `personData`:`data → initData → inputData → personData → personOrderList[0]`
@@ -26,90 +27,85 @@ export default {
26
27
 
27
28
  ```html
28
29
  <template>
29
- <PersonInfo
30
- :input-data="inputData"
31
- :verify-data="verifyData"
32
- :person-data="personData"
33
- @change="changePersonInfo"
34
- />
30
+ <PersonInfo :input-data="inputData" :verify-data="verifyData" :person-data="personData" @change="changePersonInfo" />
35
31
  </template>
36
32
 
37
33
  <script>
38
- import { PersonInfo } from 'bxs-tools-ui';
39
-
40
- export default {
41
- components: { PersonInfo },
42
- data() {
43
- return {
44
- inputData: null,
45
- verifyData: null,
46
- personData: {
47
- eleOrderList: [
48
- {
49
- isImport: true,
50
- value: true,
51
- key: 'title',
52
- isDisabled: false,
53
- componentName: 'cmCommonTitle',
54
- label: '投保人信息'
55
- },
56
- {
57
- key: 'applicantAndInsuredSame',
58
- value: 0,
59
- label: '投被保人',
60
- componentName: 'cmCommonRadio',
61
- options: [
62
- { val: 0, desc: '非同一人' },
63
- { val: 1, desc: '是同一人' }
64
- ],
65
- isDisabled: null,
66
- isHide: null
67
- },
68
- {
69
- value: 1,
70
- key: 'sex',
71
- label: '性别',
72
- componentName: 'cmCommonRadio',
73
- options: [
74
- { val: 1, desc: '男' },
75
- { val: 2, desc: '女' }
76
- ],
77
- isDisabled: false,
78
- isHide: false
79
- },
80
- {
81
- value: 30,
82
- key: 'age',
83
- label: '年龄',
84
- componentName: 'cmCommonSelect',
85
- placeholder: '请选择年龄',
86
- options: [
87
- { val: 18, desc: '18岁' },
88
- { val: 19, desc: '19岁' }
89
- ],
90
- isHide: false
91
- },
92
- {
93
- key: 'birthday',
94
- value: null,
95
- label: '生日',
96
- componentName: 'cmCommonDate',
97
- placeholder: '请选择生日',
98
- minDate: new Date(2000, 0, 1),
99
- maxDate: new Date(),
100
- defaulValue: new Date(2020, 11, 1),
101
- isHide: false
102
- }
103
- ]
34
+ import { PersonInfo } from 'bxs-tools-ui';
35
+
36
+ export default {
37
+ components: { PersonInfo },
38
+ data() {
39
+ return {
40
+ inputData: null,
41
+ verifyData: null,
42
+ personData: {
43
+ eleOrderList: [
44
+ {
45
+ isImport: true,
46
+ value: true,
47
+ key: 'title',
48
+ isDisabled: false,
49
+ componentName: 'cmCommonTitle',
50
+ label: '投保人信息'
51
+ },
52
+ {
53
+ key: 'applicantAndInsuredSame',
54
+ value: 0,
55
+ label: '投被保人',
56
+ componentName: 'cmCommonRadio',
57
+ options: [
58
+ { val: 0, desc: '非同一人' },
59
+ { val: 1, desc: '是同一人' }
60
+ ],
61
+ isDisabled: null,
62
+ isHide: null
63
+ },
64
+ {
65
+ value: 1,
66
+ key: 'sex',
67
+ label: '性别',
68
+ componentName: 'cmCommonRadio',
69
+ options: [
70
+ { val: 1, desc: '男' },
71
+ { val: 2, desc: '女' }
72
+ ],
73
+ isDisabled: false,
74
+ isHide: false
75
+ },
76
+ {
77
+ value: 30,
78
+ key: 'age',
79
+ label: '年龄',
80
+ componentName: 'cmCommonSelect',
81
+ placeholder: '请选择年龄',
82
+ options: [
83
+ { val: 18, desc: '18岁' },
84
+ { val: 19, desc: '19岁' }
85
+ ],
86
+ isHide: false
87
+ },
88
+ {
89
+ key: 'birthday',
90
+ value: null,
91
+ label: '生日',
92
+ componentName: 'cmCommonDate',
93
+ placeholder: '请选择生日',
94
+ minDate: new Date(2000, 0, 1),
95
+ maxDate: new Date(),
96
+ defaulValue: new Date(2020, 11, 1),
97
+ isHide: false
98
+ }
99
+ ]
100
+ }
101
+ };
102
+ },
103
+ methods: {
104
+ changePersonInfo(personData, eleData) {
105
+ console.log(`${eleData.label} -> ${eleData.value}`);
104
106
  }
105
- };
106
- },
107
- methods: {
108
- changePersonInfo(personData, eleData) {
109
- console.log(`${eleData.label} -> ${eleData.value}`);
110
107
  }
111
- }
112
- };
108
+ };
113
109
  </script>
114
110
  ```
115
111
 
@@ -117,55 +113,53 @@ export default {
117
113
 
118
114
  ### Attributes
119
115
 
120
- | 参数 | 说明 | 类型 | 默认值 |
121
- | --- | --- | --- | --- |
122
- | `input-data` | 必传,计划书初始化数据;不传则不执行模块内部的人员逻辑与产品逻辑 | Object | `{}` |
123
- | `person-data` | 必传,人员数据结构,见 PersonData 对象 | Object | `{}` |
124
- | `verify-data` | 可选,计划书限制条件;不传则不执行模块内部的产品逻辑 | Object | `{}` |
125
- | `is-show-crm-person` | 可选,是否显示修改 CRM 人员信息的按钮 | Boolean | `false` |
126
- | `params` | 可选,附加信息 | Object | `{}` |
127
-
116
+ | 参数 | 说明 | 类型 | 默认值 |
117
+ | -------------------- | ---------------------------------------------------------------- | ------- | ------- |
118
+ | `input-data` | 必传,计划书初始化数据;不传则不执行模块内部的人员逻辑与产品逻辑 | Object | `{}` |
119
+ | `person-data` | 必传,人员数据结构,见 PersonData 对象 | Object | `{}` |
120
+ | `verify-data` | 可选,计划书限制条件;不传则不执行模块内部的产品逻辑 | Object | `{}` |
121
+ | `is-show-crm-person` | 可选,是否显示修改 CRM 人员信息的按钮 | Boolean | `false` |
122
+ | `params` | 可选,附加信息 | Object | `{}` |
128
123
 
129
124
  #### PersonData 对象
130
125
 
131
- | 参数 | 说明 | 类型 | 默认值 |
132
- | --- | --- | --- | --- |
133
- | `eleOrderList` | 必传,人员信息的元素数据,见 EleOrderList 数组 | Array | — |
134
-
126
+ | 参数 | 说明 | 类型 | 默认值 |
127
+ | -------------- | ---------------------------------------------- | ----- | ------ |
128
+ | `eleOrderList` | 必传,人员信息的元素数据,见 EleOrderList 数组 | Array | — |
135
129
 
136
130
  #### EleOrderList 数组(单项)
137
131
 
138
- | 参数 | 说明 | 类型 | 默认值 |
139
- | --- | --- | --- | --- |
140
- | `key` | 必传,元素关键字 | String | — |
141
- | `value` | 必传,元素当前值 | String / Number | — |
142
- | `componentName` | 必传,对应渲染组件(`cmCommonTitle` / `cmCommonInput` / `cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday`) | String | — |
143
- | `label` | 元素名称 | String | — |
144
- | `placeholder` | 元素占位符 | String | — |
145
- | `options` | 元素选项列表(`cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday` 适用) | Array | — |
146
- | `rules` | 校验规则(基于 vant van-form) | Array | — |
147
- | `labelIcon` | 标签右侧图标 class 名(`cmCommonInput` 适用) | String | — |
148
- | `maxlength` | 输入最大长度,默认 9(`cmCommonInput` 适用) | Number | `9` |
149
- | `minDate` | 日期最小范围(`cmAgeBirthday` 适用) | Date | — |
150
- | `maxDate` | 日期最大范围(`cmAgeBirthday` 适用) | Date | — |
151
- | `defaulValue` | 日期默认值(`cmAgeBirthday` 适用) | Date | — |
152
- | `isHide` | 必传,是否隐藏元素 | Boolean | — |
153
- | `isDisabled` | 必传,元素值是否不可修改 | Boolean | — |
154
- | `isImport` | 预留字段 | Boolean | — |
132
+ | 参数 | 说明 | 类型 | 默认值 |
133
+ | --------------- | -------------------------------------------------------------------------------------------------------------- | --------------- | ------ |
134
+ | `key` | 必传,元素关键字 | String | — |
135
+ | `value` | 必传,元素当前值 | String / Number | — |
136
+ | `componentName` | 必传,对应渲染组件(`cmCommonTitle` / `cmCommonInput` / `cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday`) | String | — |
137
+ | `label` | 元素名称 | String | — |
138
+ | `placeholder` | 元素占位符 | String | — |
139
+ | `options` | 元素选项列表(`cmCommonRadio` / `cmCommonSelect` / `cmAgeBirthday` 适用) | Array | — |
140
+ | `rules` | 校验规则(基于 vant van-form) | Array | — |
141
+ | `labelIcon` | 标签右侧图标 class 名(`cmCommonInput` 适用) | String | — |
142
+ | `maxlength` | 输入最大长度,默认 9(`cmCommonInput` 适用) | Number | `9` |
143
+ | `minDate` | 日期最小范围(`cmAgeBirthday` 适用) | Date | — |
144
+ | `maxDate` | 日期最大范围(`cmAgeBirthday` 适用) | Date | — |
145
+ | `defaulValue` | 日期默认值(`cmAgeBirthday` 适用) | Date | — |
146
+ | `isHide` | 必传,是否隐藏元素 | Boolean | — |
147
+ | `isDisabled` | 必传,元素值是否不可修改 | Boolean | — |
148
+ | `isImport` | 预留字段 | Boolean | — |
155
149
 
156
150
  ---
157
151
 
158
152
  ### Methods
159
153
 
160
- | 方法名 | 说明 | 参数 |
161
- | --- | --- | --- |
162
- | `validate` | 表单校验,通过 `$refs` 调用,返回 Promise;若当前人员的 `title` 为 `false`(折叠状态)则跳过校验 | — |
154
+ | 方法名 | 说明 | 参数 |
155
+ | ---------- | ------------------------------------------------------------------------------------------------ | ---- |
156
+ | `validate` | 表单校验,通过 `$refs` 调用,返回 Promise;若当前人员的 `title` 为 `false`(折叠状态)则跳过校验 | — |
163
157
 
164
158
  ---
165
159
 
166
160
  ### Events
167
161
 
168
- | 事件名 | 说明 | 回调参数 |
169
- | --- | --- | --- |
170
- | `change` | 任一元素的值变化时触发 | `Function(personData, eleData)`;`personData` 为 PersonData 对象,`eleData` 为当前变化的元素(EleOrderList 单项) |
171
- | `clickLabel` | 点击 `cmCommonInput` 元素的标签区域时触发 | `Function(personData, eleData)` |
162
+ | 事件名 | 说明 | 回调参数 |
163
+ | ------------ | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
164
+ | `change` | 任一元素的值变化时触发 | `Function(personData, eleData)`;`personData` 为 PersonData 对象,`eleData` 为当前变化的元素(EleOrderList 单项) |
165
+ | `clickLabel` | 点击 `cmCommonInput` 元素的标签区域时触发 | `Function(personData, eleData)` |
@@ -0,0 +1,54 @@
1
+ .bxt-input-footer {
2
+ position: fixed;
3
+ bottom: 0;
4
+ width: 100%;
5
+ z-index: 100;
6
+ border-top: 1px solid var(--bxt-line-split);
7
+ background: var(--bxt-bg-minor);
8
+ padding-bottom: constant(safe-area-inset-bottom);
9
+ padding-bottom: env(safe-area-inset-bottom);
10
+ box-sizing: content-box;
11
+
12
+ & ul {
13
+ display: flex;
14
+ padding: 6px 10px;
15
+
16
+ & li {
17
+ flex: 2;
18
+
19
+ & .bxt-footer-info {
20
+ color: var(--bxt-text-primary);
21
+
22
+ & .bxt-info-title {
23
+ margin-top: 2px;
24
+ font-size: 12px;
25
+ }
26
+
27
+ & .bxt-info-baofei {
28
+ font-size: 20px;
29
+ color: var(--bxt-feature-minor);
30
+
31
+ & em {
32
+ font-style: normal;
33
+ font-size: 12px;
34
+ }
35
+ }
36
+ }
37
+
38
+ & .bxt-footer-btn {
39
+ padding: 10px 12px;
40
+ background: var(--bxt-primary);
41
+ border-radius: 6px;
42
+ color: #fff;
43
+ font-size: 13px;
44
+ }
45
+
46
+ &:last-child {
47
+ display: flex;
48
+ flex: 1;
49
+ justify-content: flex-end;
50
+ align-items: center;
51
+ }
52
+ }
53
+ }
54
+ }
@@ -16,9 +16,11 @@
16
16
  </footer>
17
17
  </template>
18
18
  <script lang="ts">
19
- import Vue from 'vue';
20
- import { Component, Prop } from 'vue-property-decorator';
21
- import { calcTotalBaof } from 'packages/bxs-utils/index';
19
+ import Vue from 'vue'
20
+ import { Component, Prop } from 'vue-property-decorator'
21
+ import { calcTotalBaof } from 'packages/bxs-utils/index'
22
+ import './footer.less'
23
+
22
24
  @Component({
23
25
  name: 'BxtInputFooter',
24
26
  components: {}
@@ -27,72 +29,14 @@ export default class BxtInputFooter extends Vue {
27
29
  @Prop({
28
30
  default: () => ({})
29
31
  })
30
- inputData: any;
32
+ inputData: any
31
33
 
32
34
  // 计算属性
33
35
  get totalBaoFei() {
34
- return calcTotalBaof(this.inputData.productGroupList);
36
+ return calcTotalBaof(this.inputData.productGroupList)
35
37
  }
36
38
  createPlanbook() {
37
- this.$emit('createPlanbook');
39
+ this.$emit('createPlanbook')
38
40
  }
39
41
  }
40
42
  </script>
41
- <style lang="postcss">
42
- @import 'base.css';
43
- @import '../index.css';
44
-
45
- .bxt-input-footer {
46
- position: fixed;
47
- bottom: 0;
48
- width: 100%;
49
- z-index: 100;
50
- border-top: 1px solid var(--color-line-split);
51
- background: var(--color-bg-minor);
52
- padding-bottom: constant(safe-area-inset-bottom);
53
- padding-bottom: env(safe-area-inset-bottom);
54
- box-sizing: content-box;
55
-
56
- & ul {
57
- display: flex;
58
- padding: 6px 10px;
59
-
60
- & li {
61
- flex: 2;
62
-
63
- & .bxt-footer-info {
64
- color: var(--color-text-primary);
65
-
66
- & .bxt-info-title {
67
- margin-top: 2px;
68
- font-size: 12px;
69
- }
70
-
71
- & .bxt-info-baofei {
72
- font-size: 20px;
73
- color: var(--color-feature-minor);
74
-
75
- & em {
76
- font-size: 12px;
77
- }
78
- }
79
- }
80
-
81
- & .bxt-footer-btn {
82
- padding: 10px 12px;
83
- background: var(--color-primary);
84
- border-radius: 6px;
85
- color: #fff;
86
- font-size: 13px;
87
- }
88
-
89
- &:last-child {
90
- display: flex;
91
- flex: 1;
92
- justify-content: flex-end;
93
- align-items: center;
94
- }
95
- }
96
- }
97
- }
98
- </style>