t20-common-lib 0.10.6 → 0.10.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "t20-common-lib",
3
- "version": "0.10.6",
3
+ "version": "0.10.7",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -97,21 +97,23 @@ export default {
97
97
  const coins = selectedList.filter(item => {
98
98
  return item.currencyName === statistic.title
99
99
  })
100
-
100
+
101
+ const statisChildList = this.config.filter(c => !c.currencyType || c.currencyType === 'origin')
101
102
  if (coins.length) {
102
103
  const statis = [
103
104
  {
104
105
  type: this.$l('已选合计'), //已选合计
105
- list: this.config.map(c => ({
106
- label: c.label,
107
- value: (() => {
108
- if (c.label === this.$l('笔数')) {
109
- //笔|条
110
- return coins.length
111
- }
112
- return coins.reduce((amount, item) => amount + item[c.key], 0)
113
- })()
114
- }))
106
+ list: statisChildList.map(c => {
107
+ return {
108
+ label: c.label,
109
+ value: (() => {
110
+ if (c.label === this.$l('笔数')) {
111
+ //笔|条
112
+ return coins.length
113
+ }
114
+ return coins.reduce((amount, item) => amount + item[c.key], 0)
115
+ })()
116
+ }})
115
117
  }
116
118
  ]
117
119
  this.selectStatistics.push({...statistic, statis})
@@ -180,7 +182,9 @@ export default {
180
182
  type: this.$l('全部合计'), //全部合计
181
183
  list: statisChildList.map(c => {
182
184
  let label = c.label
183
- if (item.currencyNo !== defaultCurrencyNo && c.key) {
185
+ if (item.currencyNo === defaultCurrencyNo) {
186
+ label = c.label + this.$l('(原币)')
187
+ } else if (c.key) {
184
188
  label = c.currencyType === 'origin' ? `${c.label}(${this.$l('原币')})` : `${c.label}(${this.$l('折')}${this.$l(defaultCurrencyName)})`
185
189
  }
186
190
  return {