gcs-ui-lib 1.0.1
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/.env.development +5 -0
- package/.env.production +7 -0
- package/.eslintrc.js +5 -0
- package/README.md +97 -0
- package/_webpack.config.js +135 -0
- package/babel.config.js +16 -0
- package/lib/demo.html +10 -0
- package/lib/fonts/SIMSUN.5e0c362c.5e0c362c.ttf +0 -0
- package/lib/fonts/element-icons.535877f5.535877f5.woff +0 -0
- package/lib/fonts/element-icons.732389de.732389de.ttf +0 -0
- package/lib/fonts/iconfont.09d221ee.09d221ee.woff +0 -0
- package/lib/fonts/iconfont.1c4bfacc.1c4bfacc.ttf +0 -0
- package/lib/fonts/iconfont.a6f34dc7.a6f34dc7.woff2 +0 -0
- package/lib/fonts/iconfont.f4c32765.f4c32765.ttf +0 -0
- package/lib/gcs-ui-lib.common.js +106776 -0
- package/lib/gcs-ui-lib.css +3 -0
- package/lib/gcs-ui-lib.umd.js +106786 -0
- package/lib/gcs-ui-lib.umd.min.js +330 -0
- package/lib/img/bankbackground(1).e1f6e40f.jpg +0 -0
- package/lib/img/busibackground(2).7e09bf1f.jpg +0 -0
- package/lib/img/document.193a282d.svg +8 -0
- package/lib/img/folder.8e019792.svg +9 -0
- package/lib/img/icon.fc86764f.gif +0 -0
- package/npm +1 -0
- package/package.json +101 -0
- package/packages/AutoFillDetail/index.js +7 -0
- package/packages/AutoFillDetail/src/components/fillDetail.vue +188 -0
- package/packages/AutoFillDetail/src/demo/index.vue +18 -0
- package/packages/AutoFillDetail/src/main.vue +283 -0
- package/packages/AutoFillDetection/index.js +7 -0
- package/packages/AutoFillDetection/src/components/FillInfo.vue +36 -0
- package/packages/AutoFillDetection/src/components/HandEntred.vue +226 -0
- package/packages/AutoFillDetection/src/components/RuleHit.vue +105 -0
- package/packages/AutoFillDetection/src/components/SelectEntries.vue +192 -0
- package/packages/AutoFillDetection/src/components/config.js +359 -0
- package/packages/AutoFillDetection/src/demo/index.vue +18 -0
- package/packages/AutoFillDetection/src/main.vue +130 -0
- package/packages/AutoFillList/index.js +7 -0
- package/packages/AutoFillList/src/components/ImportRules.vue +407 -0
- package/packages/AutoFillList/src/components/ImportRulesDialog.vue +40 -0
- package/packages/AutoFillList/src/components/config.js +616 -0
- package/packages/AutoFillList/src/demo/index.vue +28 -0
- package/packages/AutoFillList/src/main.vue +559 -0
- package/packages/AutoFillRuleHistory/index.js +7 -0
- package/packages/AutoFillRuleHistory/src/demo/index.vue +23 -0
- package/packages/AutoFillRuleHistory/src/main.vue +422 -0
- package/packages/AutoFillService/index.js +7 -0
- package/packages/AutoFillService/src/components/BudgetAccountDialogForSetting.vue +588 -0
- package/packages/AutoFillService/src/components/BudgetAccountSettingDialog.vue +377 -0
- package/packages/AutoFillService/src/components/ConditionGroup.vue +413 -0
- package/packages/AutoFillService/src/components/CustomInput.vue +191 -0
- package/packages/AutoFillService/src/components/FillComponent.vue +371 -0
- package/packages/AutoFillService/src/components/SelectBudgetAccountDialog.vue +161 -0
- package/packages/AutoFillService/src/components/SelectDialog.vue +211 -0
- package/packages/AutoFillService/src/components/basic.vue +308 -0
- package/packages/AutoFillService/src/components/config.js +549 -0
- package/packages/AutoFillService/src/components/fillDetail.vue +145 -0
- package/packages/AutoFillService/src/components/fillRules.vue +787 -0
- package/packages/AutoFillService/src/components/paymentCategory.vue +297 -0
- package/packages/AutoFillService/src/components/paymentCategoryT.vue +292 -0
- package/packages/AutoFillService/src/customTemplate/FillBigDecimal.vue +50 -0
- package/packages/AutoFillService/src/customTemplate/FillDate.vue +54 -0
- package/packages/AutoFillService/src/customTemplate/FillInput.vue +33 -0
- package/packages/AutoFillService/src/customTemplate/FillMultiSelect.vue +70 -0
- package/packages/AutoFillService/src/customTemplate/FillSelect.vue +72 -0
- package/packages/AutoFillService/src/demo/index.vue +30 -0
- package/packages/AutoFillService/src/main.vue +432 -0
- package/packages/Bank/index.js +7 -0
- package/packages/Bank/src/demo/index.vue +18 -0
- package/packages/Bank/src/main.vue +70 -0
- package/packages/BranchBank/index.js +7 -0
- package/packages/BranchBank/src/demo/index.vue +18 -0
- package/packages/BranchBank/src/main.vue +97 -0
- package/packages/ConfigurableForm/index.js +7 -0
- package/packages/ConfigurableForm/src/components/config.js +63 -0
- package/packages/ConfigurableForm/src/components/detail.vue +158 -0
- package/packages/ConfigurableForm/src/demo/index.vue +279 -0
- package/packages/ConfigurableForm/src/main.vue +529 -0
- package/packages/DynamicForm/index.js +7 -0
- package/packages/DynamicForm/src/components/Amount.vue +51 -0
- package/packages/DynamicForm/src/components/AmountRange.vue +76 -0
- package/packages/DynamicForm/src/components/CheckboxGroup.vue +63 -0
- package/packages/DynamicForm/src/components/DMY.vue +126 -0
- package/packages/DynamicForm/src/components/Date.vue +51 -0
- package/packages/DynamicForm/src/components/DateRange.vue +51 -0
- package/packages/DynamicForm/src/components/Dialog.vue +247 -0
- package/packages/DynamicForm/src/components/Input.vue +48 -0
- package/packages/DynamicForm/src/components/InputNumber.vue +69 -0
- package/packages/DynamicForm/src/components/InputNumberRange.vue +47 -0
- package/packages/DynamicForm/src/components/LazySelect.vue +311 -0
- package/packages/DynamicForm/src/components/RadioGroup.vue +43 -0
- package/packages/DynamicForm/src/components/Rate.vue +57 -0
- package/packages/DynamicForm/src/components/Select.vue +307 -0
- package/packages/DynamicForm/src/components/Switch.vue +32 -0
- package/packages/DynamicForm/src/components/Textarea.vue +58 -0
- package/packages/DynamicForm/src/components/TimeSelect.vue +61 -0
- package/packages/DynamicForm/src/components/unitTreeSelect.vue +141 -0
- package/packages/DynamicForm/src/components/urlLinkInput.vue +100 -0
- package/packages/DynamicForm/src/demo/index.vue +486 -0
- package/packages/DynamicForm/src/fileUpload.js +232 -0
- package/packages/DynamicForm/src/formConfig.js +2910 -0
- package/packages/DynamicForm/src/helpers.js +18 -0
- package/packages/DynamicForm/src/main.vue +1095 -0
- package/packages/FileImport/index.js +7 -0
- package/packages/FileImport/src/demo/index.vue +29 -0
- package/packages/FileImport/src/main.vue +306 -0
- package/packages/MultiCurrencyStatistics/index.js +7 -0
- package/packages/MultiCurrencyStatistics/src/demo/index.vue +320 -0
- package/packages/MultiCurrencyStatistics/src/main.vue +200 -0
- package/packages/SelectTicket/index.js +7 -0
- package/packages/SelectTicket/src/Tree/index.vue +13 -0
- package/packages/SelectTicket/src/demo/index.vue +139 -0
- package/packages/SelectTicket/src/header.js +276 -0
- package/packages/SelectTicket/src/main.vue +581 -0
- package/packages/SelectTicket/src/printDialog/dialogO.vue +116 -0
- package/packages/SelectTicket/src/printDialog/index.vue +69 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/README.MD +6 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/mixins/index.js +35 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/obverse.vue +768 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/overview.vue +115 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/printList.vue +127 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation/reverse.vue +205 -0
- package/packages/SelectTicket/src/ticketDetail/billInformation//351/231/204/345/212/240/344/277/235/350/257/201/344/277/241/346/201/257/345/255/227/346/256/265/345/257/271/347/205/247.md +246 -0
- package/packages/SelectTicket/src/ticketDetail/dialog.vue +73 -0
- package/packages/SelectTicket/src/ticketDetail/img/bankbackground(1).jpg +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/busibackground(2).jpg +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/icon.gif +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/icon2.png +0 -0
- package/packages/SelectTicket/src/ticketDetail/img/noData.png +0 -0
- package/packages/SelectTicket/src/ticketDetail/index.vue +188 -0
- package/packages/SelectTreeUnit/index.js +7 -0
- package/packages/SelectTreeUnit/src/Tree/document.svg +8 -0
- package/packages/SelectTreeUnit/src/Tree/folder.svg +9 -0
- package/packages/SelectTreeUnit/src/Tree/index.vue +239 -0
- package/packages/SelectTreeUnit/src/demo/index.vue +219 -0
- package/packages/SelectTreeUnit/src/forEachs.js +16 -0
- package/packages/SelectTreeUnit/src/main.vue +1136 -0
- package/packages/SelectTreeUnitForm/index.js +7 -0
- package/packages/SelectTreeUnitForm/src/Tree/document.svg +8 -0
- package/packages/SelectTreeUnitForm/src/Tree/folder.svg +9 -0
- package/packages/SelectTreeUnitForm/src/Tree/index.vue +254 -0
- package/packages/SelectTreeUnitForm/src/demo/index.vue +230 -0
- package/packages/SelectTreeUnitForm/src/forEachs.js +16 -0
- package/packages/SelectTreeUnitForm/src/main.vue +1068 -0
- package/packages/StreamRefill/index.js +7 -0
- package/packages/StreamRefill/src/components/FillBigDecimal.vue +50 -0
- package/packages/StreamRefill/src/components/FillDate.vue +56 -0
- package/packages/StreamRefill/src/components/FillInput.vue +36 -0
- package/packages/StreamRefill/src/components/FillMultiSelect.vue +54 -0
- package/packages/StreamRefill/src/components/FillSelect.vue +51 -0
- package/packages/StreamRefill/src/demo/index.vue +254 -0
- package/packages/StreamRefill/src/main.vue +335 -0
- package/packages/Trade/index.js +7 -0
- package/packages/Trade/src/components/all/index.vue +913 -0
- package/packages/Trade/src/components/dynamicColumnMixin.js +69 -0
- package/packages/Trade/src/components/getDCloumn.js +15 -0
- package/packages/Trade/src/components/i18n.json +3337 -0
- package/packages/Trade/src/components/pendingEvent/index.vue +934 -0
- package/packages/Trade/src/components/server-config.js +60 -0
- package/packages/Trade/src/components/setUnitName.js +10 -0
- package/packages/Trade/src/components/specialHandle.js +171 -0
- package/packages/Trade/src/components/topendingTabs.js +21 -0
- package/packages/Trade/src/demo/index.vue +43 -0
- package/packages/Trade/src/main.vue +86 -0
- package/packages/ValidateQuota/index.js +58 -0
- package/packages/ValidateQuota/src/demo/index.vue +190 -0
- package/packages/ValidateQuota/src/main.vue +71 -0
- package/packages/ZipImport/index.js +7 -0
- package/packages/ZipImport/src/demo/index.vue +139 -0
- package/packages/ZipImport/src/main.vue +330 -0
- package/packages/approvel/index.js +8 -0
- package/packages/approvel/src/demo/index.vue +28 -0
- package/packages/approvel/src/main.vue +26 -0
- package/packages/approvel/src/progress.vue +167 -0
- package/packages/approvel/src/url.json +29 -0
- package/packages/extends/ElSelect.vue +180 -0
- package/packages/imgs/list-select.png +0 -0
- package/packages/imgs/list-unselect.png +0 -0
- package/packages/imgs/list.png +0 -0
- package/packages/imgs/tree-select.png +0 -0
- package/packages/imgs/tree-unselect.png +0 -0
- package/packages/imgs/tree.png +0 -0
- package/packages/inputTag/index.js +7 -0
- package/packages/inputTag/src/demo/index.vue +355 -0
- package/packages/inputTag/src/main.vue +502 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +19 -0
- package/src/App.vue +61 -0
- package/src/api/aims.js +8 -0
- package/src/api/common.js +254 -0
- package/src/api/fileApi.js +33 -0
- package/src/api/setting.js +249 -0
- package/src/config/appSettings.js +12 -0
- package/src/config/favicon.ico +0 -0
- package/src/css/autoFill.scss +252 -0
- package/src/css/selectTreeUnit.scss +254 -0
- package/src/filter/filter.js +1 -0
- package/src/filter/index.js +274 -0
- package/src/fonts/demo.css +539 -0
- package/src/fonts/iconfont.css +21 -0
- package/src/fonts/iconfont.js +1 -0
- package/src/fonts/iconfont.json +23 -0
- package/src/fonts/iconfont.ttf +0 -0
- package/src/index.js +161 -0
- package/src/locale/format.js +47 -0
- package/src/locale/index.js +48 -0
- package/src/locale/lang/cn2hk.json +1270 -0
- package/src/locale/lang/en.js +73 -0
- package/src/locale/lang/es.js +7 -0
- package/src/locale/lang/index.js +66 -0
- package/src/locale/lang/ja.js +7 -0
- package/src/locale/lang/zh.js +74 -0
- package/src/locale/lang/zht.js +27 -0
- package/src/main.js +49 -0
- package/src/preview/page/Aside/index.vue +60 -0
- package/src/preview/router.js +107 -0
- package/src/utils/auth.js +12 -0
- package/src/utils/directive/asciiWidth.js +107 -0
- package/src/utils/directive/clickOutside.js +21 -0
- package/src/utils/directive/vtitle.js +140 -0
- package/src/utils/excel.js +538 -0
- package/src/utils/index.js +581 -0
- package/src/utils/request.js +157 -0
- package/src/utils/requestCache.js +68 -0
- package/src/utils/session.js +36 -0
- package/src/utils/thems.js +62 -0
- package/src/utils/token.js +26 -0
- package/src/utils/tools.js +317 -0
- package/src/utils/utils.js +513 -0
- package/types/favicon.ico +0 -0
- package/vue.config.js +49 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/* eslint-disable brace-style */
|
|
2
|
+
/* eslint-disable no-redeclare */
|
|
3
|
+
/* eslint-disable no-array-constructor */
|
|
4
|
+
/* eslint-disable eqeqeq */
|
|
5
|
+
import Vue from 'vue'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 金额格式化
|
|
9
|
+
* @param num 金额
|
|
10
|
+
* @param len 保留小数位数
|
|
11
|
+
* @param magnitude 数量级 ( 5 代表万 )
|
|
12
|
+
* @returns {*}
|
|
13
|
+
*/
|
|
14
|
+
Vue.filter('AmountFormat', function (num, len = 2, magnitude = 1) {
|
|
15
|
+
if (!num && num != 0) {
|
|
16
|
+
return '--'
|
|
17
|
+
}
|
|
18
|
+
// 已经格式化的数据
|
|
19
|
+
if (String(num).includes(',')) {
|
|
20
|
+
num = num.replace(/\,/g, '')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 非空校验
|
|
24
|
+
if (isNaN(Number(num)) || [null, '', undefined].includes(num)) {
|
|
25
|
+
return num
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const magnitudeObj = {
|
|
29
|
+
1: { label: '元', value: 1 },
|
|
30
|
+
5: { label: '万元', value: 1E4 },
|
|
31
|
+
6: { label: '十万元', value: 1E5 },
|
|
32
|
+
7: { label: '百万元', value: 1E6 },
|
|
33
|
+
8: { label: '千万元', value: 1E7 },
|
|
34
|
+
9: { label: '亿元', value: 1E8 }
|
|
35
|
+
}
|
|
36
|
+
let temp = +num
|
|
37
|
+
|
|
38
|
+
if (magnitude) {
|
|
39
|
+
const t = magnitudeObj[magnitude]
|
|
40
|
+
|
|
41
|
+
temp = (temp / (t.value))
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
temp = temp.toFixed(len)
|
|
45
|
+
|
|
46
|
+
// 三点一逗
|
|
47
|
+
function get_thousand_num(num) {
|
|
48
|
+
return num.toString().replace(/\d+/, function (n) { // 先提取整数部分
|
|
49
|
+
return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) { // 对整数部分添加分隔符
|
|
50
|
+
return $1 + ','
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
temp = get_thousand_num(temp)
|
|
56
|
+
|
|
57
|
+
return temp
|
|
58
|
+
})
|
|
59
|
+
// 保留2位小数点过滤器 不四舍五入
|
|
60
|
+
Vue.filter('twoDecimal', function (value) {
|
|
61
|
+
if (value) {
|
|
62
|
+
var toFixedNum = Number(value).toFixed(3)
|
|
63
|
+
var realVal = toFixedNum.substring(0, toFixedNum.toString().length - 1)
|
|
64
|
+
return realVal
|
|
65
|
+
} else {
|
|
66
|
+
return '0.00'
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
// 金额大写换算
|
|
70
|
+
Vue.filter('changeNumMoneyToChinese', function (money) {
|
|
71
|
+
if (!money) {
|
|
72
|
+
return ''
|
|
73
|
+
}
|
|
74
|
+
var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖') // 汉字的数字
|
|
75
|
+
var cnIntRadice = new Array('', '拾', '佰', '仟') // 基本单位
|
|
76
|
+
var cnIntUnits = new Array('', '万', '亿', '兆') // 对应整数部分扩展单位
|
|
77
|
+
var cnDecUnits = new Array('角', '分', '毫', '厘') // 对应小数部分单位
|
|
78
|
+
var cnInteger = '整' // 整数金额时后面跟的字符
|
|
79
|
+
var cnIntLast = '元' // 整型完以后的单位
|
|
80
|
+
var maxNum = 999999999999999.9999 // 最大处理的数字
|
|
81
|
+
var IntegerNum // 金额整数部分
|
|
82
|
+
var DecimalNum // 金额小数部分
|
|
83
|
+
var ChineseStr = '' // 输出的中文金额字符串
|
|
84
|
+
var parts // 分离金额后用的数组,预定义
|
|
85
|
+
var Symbol = '' // 正负值标记
|
|
86
|
+
|
|
87
|
+
money = parseFloat(money)
|
|
88
|
+
if (money >= maxNum) {
|
|
89
|
+
alert('超出最大处理数字')
|
|
90
|
+
return ''
|
|
91
|
+
}
|
|
92
|
+
if (money === 0) {
|
|
93
|
+
ChineseStr = cnNums[0] + cnIntLast + cnInteger
|
|
94
|
+
return ChineseStr
|
|
95
|
+
}
|
|
96
|
+
if (money < 0) {
|
|
97
|
+
money = -money
|
|
98
|
+
Symbol = '负 '
|
|
99
|
+
}
|
|
100
|
+
money = money.toString() // 转换为字符串
|
|
101
|
+
if (money.indexOf('.') === -1) {
|
|
102
|
+
IntegerNum = money
|
|
103
|
+
DecimalNum = ''
|
|
104
|
+
} else {
|
|
105
|
+
parts = money.split('.')
|
|
106
|
+
IntegerNum = parts[0]
|
|
107
|
+
DecimalNum = parts[1].substr(0, 4)
|
|
108
|
+
}
|
|
109
|
+
if (parseInt(IntegerNum, 10) > 0) {
|
|
110
|
+
// 获取整型部分转换
|
|
111
|
+
var zeroCount = 0
|
|
112
|
+
var IntLen = IntegerNum.length
|
|
113
|
+
for (var i = 0; i < IntLen; i++) {
|
|
114
|
+
var n = IntegerNum.substr(i, 1)
|
|
115
|
+
var p = IntLen - i - 1
|
|
116
|
+
var q = p / 4
|
|
117
|
+
var m = p % 4
|
|
118
|
+
if (n == '0') {
|
|
119
|
+
zeroCount++
|
|
120
|
+
} else {
|
|
121
|
+
if (zeroCount > 0) {
|
|
122
|
+
ChineseStr += cnNums[0]
|
|
123
|
+
}
|
|
124
|
+
zeroCount = 0 // 归零
|
|
125
|
+
ChineseStr += cnNums[parseInt(n)] + cnIntRadice[m]
|
|
126
|
+
}
|
|
127
|
+
if (m == 0 && zeroCount < 4) {
|
|
128
|
+
ChineseStr += cnIntUnits[q]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
ChineseStr += cnIntLast
|
|
132
|
+
// 整型部分处理完毕
|
|
133
|
+
}
|
|
134
|
+
if (DecimalNum != '') {
|
|
135
|
+
// 小数部分
|
|
136
|
+
var decLen = DecimalNum.length
|
|
137
|
+
for (var i = 0; i < decLen; i++) {
|
|
138
|
+
var n = DecimalNum.substr(i, 1)
|
|
139
|
+
if (n != '0') {
|
|
140
|
+
ChineseStr += cnNums[Number(n)] + cnDecUnits[i]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (ChineseStr == '') {
|
|
145
|
+
ChineseStr += cnNums[0] + cnIntLast + cnInteger
|
|
146
|
+
} else if (DecimalNum == '') {
|
|
147
|
+
ChineseStr += cnInteger
|
|
148
|
+
}
|
|
149
|
+
ChineseStr = Symbol + ChineseStr
|
|
150
|
+
|
|
151
|
+
return ChineseStr
|
|
152
|
+
})
|
|
153
|
+
// JS格式化数字(每三位加逗号)
|
|
154
|
+
Vue.filter('toThousands', function (str) {
|
|
155
|
+
if (!str) {
|
|
156
|
+
return '0.00'
|
|
157
|
+
}
|
|
158
|
+
var str = (str || 0).toString()
|
|
159
|
+
var newStr = ''
|
|
160
|
+
var count = 0
|
|
161
|
+
// 当数字是整数
|
|
162
|
+
if (str.indexOf('.') == -1) {
|
|
163
|
+
for (var i = str.length - 1; i >= 0; i--) {
|
|
164
|
+
if (count % 3 == 0 && count != 0) {
|
|
165
|
+
newStr = str.charAt(i) + ',' + newStr
|
|
166
|
+
} else {
|
|
167
|
+
newStr = str.charAt(i) + newStr
|
|
168
|
+
}
|
|
169
|
+
count++
|
|
170
|
+
}
|
|
171
|
+
str = newStr // 自动补小数点后两位
|
|
172
|
+
return str + '.00'
|
|
173
|
+
}
|
|
174
|
+
// 当数字带有小数
|
|
175
|
+
else {
|
|
176
|
+
for (var i = str.indexOf('.') - 1; i >= 0; i--) {
|
|
177
|
+
if (count % 3 == 0 && count != 0) {
|
|
178
|
+
newStr = str.charAt(i) + ',' + newStr
|
|
179
|
+
} else {
|
|
180
|
+
newStr = str.charAt(i) + newStr // 逐个字符相接起来
|
|
181
|
+
}
|
|
182
|
+
count++
|
|
183
|
+
}
|
|
184
|
+
str = newStr + (str + '00').substr((str + '00').indexOf('.'), 3)
|
|
185
|
+
return str
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
Vue.filter('ChangeDecimalToPercentage', function (str) {
|
|
190
|
+
if (!str) {
|
|
191
|
+
return '0.00'
|
|
192
|
+
}
|
|
193
|
+
return parseFloat(str).toFixed(2)
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
// 枚举类
|
|
197
|
+
// 受理结果
|
|
198
|
+
Vue.filter('acceptState', function (data) {
|
|
199
|
+
switch (data) {
|
|
200
|
+
case 'W01':
|
|
201
|
+
return '待申请'
|
|
202
|
+
|
|
203
|
+
case 'W02':
|
|
204
|
+
return '已申请'
|
|
205
|
+
|
|
206
|
+
case 'F01':
|
|
207
|
+
return '申请失败'
|
|
208
|
+
|
|
209
|
+
case 'W03':
|
|
210
|
+
return '待受理'
|
|
211
|
+
|
|
212
|
+
case 'S01':
|
|
213
|
+
return '同意'
|
|
214
|
+
|
|
215
|
+
case 'F02':
|
|
216
|
+
return '拒绝'
|
|
217
|
+
|
|
218
|
+
case 'F03':
|
|
219
|
+
return '失败'
|
|
220
|
+
|
|
221
|
+
case 'C01':
|
|
222
|
+
return '已撤销'
|
|
223
|
+
|
|
224
|
+
default:
|
|
225
|
+
return ''
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
// 内部审批状态
|
|
229
|
+
Vue.filter('approveState', function (data, state) {
|
|
230
|
+
if (state === 0) {
|
|
231
|
+
return '流程中'
|
|
232
|
+
}
|
|
233
|
+
switch (data) {
|
|
234
|
+
case 'A01':
|
|
235
|
+
return '待申请'
|
|
236
|
+
|
|
237
|
+
case 'I01':
|
|
238
|
+
return '流程中'
|
|
239
|
+
|
|
240
|
+
case 'R01':
|
|
241
|
+
return '已驳回'
|
|
242
|
+
|
|
243
|
+
case 'C01':
|
|
244
|
+
return '审批流已作废'
|
|
245
|
+
|
|
246
|
+
case 'E01':
|
|
247
|
+
return '审批流已结束'
|
|
248
|
+
|
|
249
|
+
default:
|
|
250
|
+
return ''
|
|
251
|
+
}
|
|
252
|
+
})
|
|
253
|
+
|
|
254
|
+
// 交易类型
|
|
255
|
+
// Vue.filter('txType', function(data) {
|
|
256
|
+
// return ''
|
|
257
|
+
// })
|
|
258
|
+
|
|
259
|
+
// 格式化子票区间
|
|
260
|
+
Vue.filter('formatCdRange', function (cdRange) {
|
|
261
|
+
if (cdRange || cdRange === 0) {
|
|
262
|
+
const data = String(cdRange).split(',') || []
|
|
263
|
+
return data.reduce((per, cur, index) => Number(per) + (index < data.length ? '-' : '') + Number(cur))
|
|
264
|
+
}
|
|
265
|
+
return '--'
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
Vue.filter('rate', function (rate, returnEmptyValue = '--') {
|
|
269
|
+
if ([null, undefined, ''].includes(rate)) {
|
|
270
|
+
return returnEmptyValue
|
|
271
|
+
} else {
|
|
272
|
+
return rate.toFixed(6)
|
|
273
|
+
}
|
|
274
|
+
})
|