t20-common-lib 0.10.5 → 0.10.6

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.5",
3
+ "version": "0.10.6",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -165,19 +165,22 @@ export default {
165
165
  const allStatistics = []
166
166
  const selectedStatistics = []
167
167
  let defaultCurrencyName = this.$l('人民币')
168
+ let defaultCurrencyNo = 'CNY'
168
169
  if (this.$store && this.$store.state && this.$store.state.user && this.$store.state.user.defaultCurrencyName) {
169
170
  defaultCurrencyName = this.$store.state.user.defaultCurrencyName
171
+ defaultCurrencyNo = this.$store.state.user.defaultCurrencyNo
170
172
  }
171
173
  this.views.forEach(item => {
174
+ const statisChildList = item.currencyNo !== defaultCurrencyNo ? this.config : this.config.filter(c => !c.currencyType || c.currencyType === 'origin')
172
175
  allStatistics.push({
173
176
  title: item.currencyName,
174
177
  currencyNo: item.currencyNo,
175
178
  statis: [
176
179
  {
177
180
  type: this.$l('全部合计'), //全部合计
178
- list: this.config.map((c, i) => {
181
+ list: statisChildList.map(c => {
179
182
  let label = c.label
180
- if (i !== 0) {
183
+ if (item.currencyNo !== defaultCurrencyNo && c.key) {
181
184
  label = c.currencyType === 'origin' ? `${c.label}(${this.$l('原币')})` : `${c.label}(${this.$l('折')}${this.$l(defaultCurrencyName)})`
182
185
  }
183
186
  return {
@@ -194,7 +197,7 @@ export default {
194
197
  statis: [
195
198
  {
196
199
  type: this.$l('已选合计'), //已选合计
197
- list: this.config.map(c => ({label: c.label, value: 0}))
200
+ list: (this.config.filter(c => !c.currencyType || c.currencyType === 'origin')).map(c => ({label: c.label, value: 0}))
198
201
  }
199
202
  ]
200
203
  })