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,513 @@
|
|
|
1
|
+
import { fomatZero } from './tools'
|
|
2
|
+
import { $l } from 'n20-common-lib/src/utils/i18n'
|
|
3
|
+
/**
|
|
4
|
+
* @param {Array} routes 通过路由列表得到菜单列表
|
|
5
|
+
* @returns {Array}
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export function getMenuByRouter(routes) {
|
|
9
|
+
let arrs = []
|
|
10
|
+
for (let i = 0, len = routes.length; i < len; i++) {
|
|
11
|
+
const item = routes[i]
|
|
12
|
+
if (item.path === '*' || (item.meta && item.meta.hidden)) continue
|
|
13
|
+
if (item.path === '/' && hasChild(item)) {
|
|
14
|
+
arrs = getMenuByRouter(item.children)
|
|
15
|
+
} else {
|
|
16
|
+
arrs.push({
|
|
17
|
+
path: item.path,
|
|
18
|
+
name: item.name,
|
|
19
|
+
meta: item.meta,
|
|
20
|
+
children: hasChild(item) ? getMenuByRouter(item.children) : []
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return arrs
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const hasChild = item => {
|
|
28
|
+
return item.children && item.children.length !== 0
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 保留n位小数,默认保留2位
|
|
33
|
+
* @param value
|
|
34
|
+
* @param n 保留的小数位数
|
|
35
|
+
* @return String
|
|
36
|
+
*/
|
|
37
|
+
export const toDecimal = (value, n = 2) => {
|
|
38
|
+
value = parseFloat(value)
|
|
39
|
+
if (isNaN(value)) {
|
|
40
|
+
return false
|
|
41
|
+
}
|
|
42
|
+
// 四舍五入
|
|
43
|
+
value = Math.round(value * 10 * n) / (10 * n)
|
|
44
|
+
value = value.toString()
|
|
45
|
+
let index = value.indexOf('.')
|
|
46
|
+
if (index === -1) {
|
|
47
|
+
value += '.'
|
|
48
|
+
index = value.indexOf('.')
|
|
49
|
+
}
|
|
50
|
+
// 循环计算小数位数是否满足条件n
|
|
51
|
+
while (value.length - 1 - index < n) {
|
|
52
|
+
value += '0'
|
|
53
|
+
}
|
|
54
|
+
return value
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//金额控制必须大于0 且不能为负数
|
|
58
|
+
export const validAmount = (rule, value, cb) => {
|
|
59
|
+
if([null,undefined,''].includes(value)) {
|
|
60
|
+
cb(new Error($l('请输入付款金额')));
|
|
61
|
+
} else{
|
|
62
|
+
if (parseFloat(value) > 0) {
|
|
63
|
+
let valL = (value + "").split(".")[0];
|
|
64
|
+
if (valL.length > 13) {
|
|
65
|
+
cb(new Error($l('小数点前最多能输入13位')));
|
|
66
|
+
} else {
|
|
67
|
+
cb();
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
cb(new Error($l('付款金额需大于0')));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 深度克隆
|
|
77
|
+
* @param target
|
|
78
|
+
* @return {}
|
|
79
|
+
*/
|
|
80
|
+
export const deepClone = (target, map = new Map()) => {
|
|
81
|
+
// 检测数据的类型
|
|
82
|
+
if (typeof target === 'object' && target !== null) {
|
|
83
|
+
// 克隆数据之前, 进行判断, 数据之前是否克隆过
|
|
84
|
+
const cache = map.get(target)
|
|
85
|
+
if (cache) {
|
|
86
|
+
return cache
|
|
87
|
+
}
|
|
88
|
+
// 判断目标数据的类型
|
|
89
|
+
const isArray = Array.isArray(target)
|
|
90
|
+
// 创建一个容器
|
|
91
|
+
const result = isArray ? [] : {}
|
|
92
|
+
// 将新的结果存入到容器中
|
|
93
|
+
map.set(target, result)
|
|
94
|
+
// 如果目标数据为数组
|
|
95
|
+
if (isArray) {
|
|
96
|
+
// forEach 遍历
|
|
97
|
+
target.forEach((item, index) => {
|
|
98
|
+
result[index] = deepClone(item, map)
|
|
99
|
+
})
|
|
100
|
+
} else {
|
|
101
|
+
// 如果是对象, 获取所有的键名, 然后 forEach 遍历
|
|
102
|
+
Object.keys(target).forEach(key => {
|
|
103
|
+
result[key] = deepClone(target[key], map)
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
return result
|
|
107
|
+
} else {
|
|
108
|
+
return target
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 后端txType 转前端selectKey 方法
|
|
113
|
+
export const translateTxType = value => {
|
|
114
|
+
switch (value) {
|
|
115
|
+
/* 企业
|
|
116
|
+
*/
|
|
117
|
+
// 出票受理
|
|
118
|
+
case 'BTP0101':
|
|
119
|
+
return { selectKey: 'ticketIssuanceAcceptance', type: 'business' }
|
|
120
|
+
// 提示承兑
|
|
121
|
+
case 'BTP03':
|
|
122
|
+
return { selectKey: 'promptAcceptance', type: 'business' }
|
|
123
|
+
// 承兑受理
|
|
124
|
+
case 'BTP04':
|
|
125
|
+
return { selectKey: 'acceptance', type: 'business' }
|
|
126
|
+
// 提示收票
|
|
127
|
+
case 'BTP05':
|
|
128
|
+
return { selectKey: 'promptToCollectTickets', type: 'business' }
|
|
129
|
+
// 解付受理
|
|
130
|
+
case 'BTR12':
|
|
131
|
+
return { selectKey: 'receiptOfPayment', type: 'business' }
|
|
132
|
+
// 追索回复
|
|
133
|
+
case 'BTR14':
|
|
134
|
+
return { selectKey: 'recourseResponse', type: 'business' }
|
|
135
|
+
// 贴现签收
|
|
136
|
+
case 'BTR08':
|
|
137
|
+
return { selectKey: 'discountSign', type: 'business' }
|
|
138
|
+
// 贴现赎回申请
|
|
139
|
+
case 'BTR09':
|
|
140
|
+
return { selectKey: 'discountRedemptionApplication', type: 'business' }
|
|
141
|
+
// 质押签收
|
|
142
|
+
case 'BTR04':
|
|
143
|
+
return { selectKey: 'pledgeReceipt', type: 'business' }
|
|
144
|
+
// 质押解除申请
|
|
145
|
+
case 'BTR05':
|
|
146
|
+
return { selectKey: 'pledgeReleaseApplication', type: 'business' }
|
|
147
|
+
// 保证申请
|
|
148
|
+
case 'BTR16':
|
|
149
|
+
return { selectKey: 'guaranteeApplication', type: 'business' }
|
|
150
|
+
// 保证签收
|
|
151
|
+
case 'BTR17':
|
|
152
|
+
return { selectKey: 'guaranteeAcceptance', type: 'business' }
|
|
153
|
+
// 提示付款
|
|
154
|
+
case 'BTR11':
|
|
155
|
+
return { selectKey: 'promptForPayment', type: 'business' }
|
|
156
|
+
// 追索申请
|
|
157
|
+
case 'BTR13':
|
|
158
|
+
return { selectKey: 'noticeOfRecourse', type: 'business' }
|
|
159
|
+
// 同意清偿
|
|
160
|
+
case 'BTR15':
|
|
161
|
+
return { selectKey: 'agreeToPayOff', type: 'business' }
|
|
162
|
+
// 业务撤销
|
|
163
|
+
case 'BTS12':
|
|
164
|
+
return { selectKey: 'businessCancel', type: 'business' }
|
|
165
|
+
/* 网银
|
|
166
|
+
*/
|
|
167
|
+
// 开票申请
|
|
168
|
+
case 'ETP01':
|
|
169
|
+
return { selectKey: 'invoicingApplication', type: 'ebank' }
|
|
170
|
+
// 提示承兑
|
|
171
|
+
case 'ETP02':
|
|
172
|
+
return { selectKey: 'promptAcceptance', type: 'ebank' }
|
|
173
|
+
// 提示收票
|
|
174
|
+
case 'ETP03':
|
|
175
|
+
return { selectKey: 'promptToCollectTickets', type: 'ebank' }
|
|
176
|
+
// 票据作废
|
|
177
|
+
case 'ETP04':
|
|
178
|
+
return { selectKey: 'voidTheBill', type: 'ebank' }
|
|
179
|
+
// 票据签收
|
|
180
|
+
case 'ETR01':
|
|
181
|
+
return { selectKey: 'receiptOfBills', type: 'ebank' }
|
|
182
|
+
// 提示付款
|
|
183
|
+
case 'ETR08':
|
|
184
|
+
return { selectKey: 'promptForPayment', type: 'ebank' }
|
|
185
|
+
// 追索申请
|
|
186
|
+
case 'ETR09':
|
|
187
|
+
return { selectKey: 'noticeOfRecourse', type: 'ebank' }
|
|
188
|
+
// 同意清偿
|
|
189
|
+
case 'ETR10':
|
|
190
|
+
return { selectKey: 'acceagreeToPayOffptance', type: 'ebank' }
|
|
191
|
+
// 贴现申请
|
|
192
|
+
case 'ETR0600':
|
|
193
|
+
return { selectKey: 'discountApplication', type: 'ebank' }
|
|
194
|
+
// 贴现赎回签收
|
|
195
|
+
case 'ETR07':
|
|
196
|
+
return { selectKey: 'discountRedemptionSign', type: 'ebank' }
|
|
197
|
+
// 背书申请
|
|
198
|
+
case 'ETR02':
|
|
199
|
+
return { selectKey: 'endorsementApplication', type: 'ebank' }
|
|
200
|
+
// 背书签收
|
|
201
|
+
case 'ETR03':
|
|
202
|
+
return { selectKey: 'bookmarkCollectionAcceptance', type: 'ebank' }
|
|
203
|
+
// 保证申请
|
|
204
|
+
case 'ETR11':
|
|
205
|
+
return { selectKey: 'guaranteeApplication', type: 'ebank' }
|
|
206
|
+
// 保证签收
|
|
207
|
+
case 'ETR12':
|
|
208
|
+
return { selectKey: 'guaranteeAcceptance', type: 'ebank' }
|
|
209
|
+
// 承兑受理
|
|
210
|
+
case 'ETP05':
|
|
211
|
+
return { selectKey: 'acceptance', type: 'ebank' }
|
|
212
|
+
// 解付受理
|
|
213
|
+
case 'ETP06':
|
|
214
|
+
return { selectKey: 'receiptOfPayment', type: 'ebank' }
|
|
215
|
+
// 质押申请
|
|
216
|
+
case 'ETR04':
|
|
217
|
+
return { selectKey: 'pledgeApplication', type: 'ebank' }
|
|
218
|
+
// 质押解除签收
|
|
219
|
+
case 'ETR05':
|
|
220
|
+
return { selectKey: 'signForReleaseOfPledge', type: 'ebank' }
|
|
221
|
+
// 追索回复
|
|
222
|
+
case 'ETR13':
|
|
223
|
+
return { selectKey: 'recourseResponse', type: 'ebank' }
|
|
224
|
+
// 业务撤销
|
|
225
|
+
case 'ETS12':
|
|
226
|
+
return { selectKey: 'businessCancel', type: 'ebank' }
|
|
227
|
+
default:
|
|
228
|
+
break
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// 解决js计算精度缺失的问题
|
|
233
|
+
export const formatFloat = num => {
|
|
234
|
+
Math.formatFloat = function (f, digit) {
|
|
235
|
+
const m = Math.pow(10, digit)
|
|
236
|
+
return Math.round(f * m, 10) / m
|
|
237
|
+
}
|
|
238
|
+
return Math.formatFloat(num, 2)
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* 解决两个数相乘精度丢失问题
|
|
242
|
+
* @param a
|
|
243
|
+
* @param b
|
|
244
|
+
* @returns {Number}
|
|
245
|
+
*/
|
|
246
|
+
export function floatMul(a, b) {
|
|
247
|
+
var c = 0,
|
|
248
|
+
d = a.toString(),
|
|
249
|
+
e = b.toString();
|
|
250
|
+
try {
|
|
251
|
+
c += d.split(".")[1].length;
|
|
252
|
+
} catch (f) { }
|
|
253
|
+
try {
|
|
254
|
+
c += e.split(".")[1].length;
|
|
255
|
+
} catch (f) { }
|
|
256
|
+
return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* 解决两个数相除精度丢失问题
|
|
260
|
+
* @param a
|
|
261
|
+
* @param b
|
|
262
|
+
* @returns
|
|
263
|
+
*/
|
|
264
|
+
export function floatDiv(a, b) {
|
|
265
|
+
var c, d, e = 0,
|
|
266
|
+
f = 0;
|
|
267
|
+
try {
|
|
268
|
+
e = a.toString().split(".")[1].length;
|
|
269
|
+
} catch (g) { }
|
|
270
|
+
try {
|
|
271
|
+
f = b.toString().split(".")[1].length;
|
|
272
|
+
} catch (g) { }
|
|
273
|
+
return c = Number(a.toString().replace(".", "")), d = Number(b.toString().replace(".", "")), floatMul(c / d, Math.pow(10, f - e));
|
|
274
|
+
}
|
|
275
|
+
// 格式化子票区间
|
|
276
|
+
export const formatCdRange = cdRange => {
|
|
277
|
+
if (cdRange || cdRange === 0) {
|
|
278
|
+
const data = String(cdRange).split(',') || []
|
|
279
|
+
return data.reduce((per, cur, index) => Number(per) + (index < data.length ? '-' : '') + Number(cur))
|
|
280
|
+
}
|
|
281
|
+
return '--'
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export function formatCdRangeFix(cdRange) {
|
|
285
|
+
const [cdRangeStart, cdRangeEnd] = cdRange
|
|
286
|
+
const cdrange = fomatZero(cdRangeStart, 12) + ',' + fomatZero(cdRangeEnd, 12)
|
|
287
|
+
return cdrange
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* 随机字串
|
|
291
|
+
*/
|
|
292
|
+
export function randomString(num) {
|
|
293
|
+
num = num || 32
|
|
294
|
+
var t = ''
|
|
295
|
+
t = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
|
|
296
|
+
|
|
297
|
+
const a = t.length
|
|
298
|
+
let n = ''
|
|
299
|
+
for (let i = 0; i < num; i++) n += t.charAt(Math.floor(Math.random() * a))
|
|
300
|
+
return n
|
|
301
|
+
}
|
|
302
|
+
export const formatCellValue = value => {
|
|
303
|
+
return ['', null, undefined].includes(value) ? '--' : value
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Parse the time to string
|
|
307
|
+
* @param {(Object|string|number)} time
|
|
308
|
+
* @param {string} cFormat
|
|
309
|
+
* @returns {string | null}
|
|
310
|
+
*/
|
|
311
|
+
export function parseTime(time, cFormat = '{y}-{m}-{d} {h}:{i}:{s}') {
|
|
312
|
+
if (arguments.length === 0 || !time) {
|
|
313
|
+
return null
|
|
314
|
+
}
|
|
315
|
+
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
|
|
316
|
+
let date
|
|
317
|
+
if (typeof time === 'object') {
|
|
318
|
+
date = time
|
|
319
|
+
} else {
|
|
320
|
+
if (typeof time === 'string') {
|
|
321
|
+
if (/^[0-9]+$/.test(time)) {
|
|
322
|
+
// support "1548221490638"
|
|
323
|
+
time = parseInt(time)
|
|
324
|
+
} else {
|
|
325
|
+
// support safari
|
|
326
|
+
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
|
|
327
|
+
time = time.replace(new RegExp(/-/gm), '/')
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (typeof time === 'number' && time.toString().length === 10) {
|
|
332
|
+
time = time * 1000
|
|
333
|
+
}
|
|
334
|
+
date = new Date(time)
|
|
335
|
+
}
|
|
336
|
+
const formatObj = {
|
|
337
|
+
y: date.getFullYear(),
|
|
338
|
+
m: date.getMonth() + 1,
|
|
339
|
+
d: date.getDate(),
|
|
340
|
+
h: date.getHours(),
|
|
341
|
+
i: date.getMinutes(),
|
|
342
|
+
s: date.getSeconds(),
|
|
343
|
+
a: date.getDay()
|
|
344
|
+
}
|
|
345
|
+
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
|
346
|
+
const value = formatObj[key]
|
|
347
|
+
// Note: getDay() returns 0 on Sunday
|
|
348
|
+
if (key === 'a') {
|
|
349
|
+
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
|
350
|
+
}
|
|
351
|
+
return value.toString().padStart(2, '0')
|
|
352
|
+
})
|
|
353
|
+
return time_str
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* 金额格式化
|
|
358
|
+
* @param num 金额
|
|
359
|
+
* @param len 保留小数位数
|
|
360
|
+
* @param magnitude 数量级 ( 5 代表万 )
|
|
361
|
+
* @returns {*}
|
|
362
|
+
*/
|
|
363
|
+
export function amountFormat(num, len = 2, magnitude = 1) {
|
|
364
|
+
// 已经格式化的数据
|
|
365
|
+
if (String(num).includes(',')) {
|
|
366
|
+
num = num.replace(/\,/g, '')
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// 非空校验
|
|
370
|
+
if (isNaN(Number(num)) || [null, '', undefined].includes(num)) {
|
|
371
|
+
// return num;
|
|
372
|
+
return '--'
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const magnitudeObj = {
|
|
376
|
+
1: { label: '元', value: 1 },
|
|
377
|
+
5: { label: '万元', value: 1e4 },
|
|
378
|
+
6: { label: '十万元', value: 1e5 },
|
|
379
|
+
7: { label: '百万元', value: 1e6 },
|
|
380
|
+
8: { label: '千万元', value: 1e7 },
|
|
381
|
+
9: { label: '亿元', value: 1e8 }
|
|
382
|
+
}
|
|
383
|
+
let temp = +num
|
|
384
|
+
|
|
385
|
+
if (magnitude) {
|
|
386
|
+
const t = magnitudeObj[magnitude]
|
|
387
|
+
|
|
388
|
+
temp = temp / t.value
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
temp = temp.toFixed(len)
|
|
392
|
+
|
|
393
|
+
// 三点一逗
|
|
394
|
+
function get_thousand_num(num) {
|
|
395
|
+
return num.toString().replace(/\d+/, function (n) {
|
|
396
|
+
// 先提取整数部分
|
|
397
|
+
return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) {
|
|
398
|
+
// 对整数部分添加分隔符
|
|
399
|
+
return $1 + ','
|
|
400
|
+
})
|
|
401
|
+
})
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
temp = get_thousand_num(temp)
|
|
405
|
+
|
|
406
|
+
return temp
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export function getAmountWord(money) {
|
|
410
|
+
if(money<0 || ['',null,undefined].includes(money)) return ''
|
|
411
|
+
|
|
412
|
+
//汉字的数字
|
|
413
|
+
const cnNums = new Array(
|
|
414
|
+
$l("零"),
|
|
415
|
+
$l("壹"),
|
|
416
|
+
$l("贰"),
|
|
417
|
+
$l("叁"),
|
|
418
|
+
$l("肆"),
|
|
419
|
+
$l("伍"),
|
|
420
|
+
$l("陆"),
|
|
421
|
+
$l("柒"),
|
|
422
|
+
$l("捌"),
|
|
423
|
+
$l("玖")
|
|
424
|
+
);
|
|
425
|
+
//基本单位
|
|
426
|
+
var cnIntRadice = new Array("", $l("拾"), $l("佰"), $l("仟"));
|
|
427
|
+
//对应整数部分扩展单位
|
|
428
|
+
var cnIntUnits = new Array("", $l("万"), $l("亿"), $l("兆"));
|
|
429
|
+
//对应小数部分单位
|
|
430
|
+
var cnDecUnits = new Array($l("角"), $l("分"), $l("毫"), $l("厘"));
|
|
431
|
+
//整数金额时后面跟的字符
|
|
432
|
+
var cnInteger = $l("整");
|
|
433
|
+
//整型完以后的单位
|
|
434
|
+
var cnIntLast = $l("元");
|
|
435
|
+
//最大处理的数字
|
|
436
|
+
var maxNum = 999999999999999.9999;
|
|
437
|
+
//金额整数部分
|
|
438
|
+
var integerNum;
|
|
439
|
+
//金额小数部分
|
|
440
|
+
var decimalNum;
|
|
441
|
+
//输出的中文金额字符串
|
|
442
|
+
var chineseStr = "";
|
|
443
|
+
//分离金额后用的数组,预定义
|
|
444
|
+
var parts;
|
|
445
|
+
if (money == "") {
|
|
446
|
+
return "";
|
|
447
|
+
}
|
|
448
|
+
money = parseFloat(parseFloat(money).toFixed(2));
|
|
449
|
+
if (money >= maxNum) {
|
|
450
|
+
//超出最大处理数字
|
|
451
|
+
return "";
|
|
452
|
+
}
|
|
453
|
+
if (money == 0) {
|
|
454
|
+
chineseStr = cnNums[0] + cnIntLast + cnInteger;
|
|
455
|
+
return chineseStr;
|
|
456
|
+
}
|
|
457
|
+
//转换为字符串
|
|
458
|
+
money = money.toString();
|
|
459
|
+
if (money.indexOf(".") == -1) {
|
|
460
|
+
integerNum = money;
|
|
461
|
+
decimalNum = "";
|
|
462
|
+
} else {
|
|
463
|
+
parts = money.split(".");
|
|
464
|
+
integerNum = parts[0];
|
|
465
|
+
decimalNum = parts[1].substr(0, 4);
|
|
466
|
+
}
|
|
467
|
+
//获取整型部分转换
|
|
468
|
+
if (parseInt(integerNum, 10) > 0) {
|
|
469
|
+
var zeroCount = 0;
|
|
470
|
+
var IntLen = integerNum.length;
|
|
471
|
+
for (var i = 0; i < IntLen; i++) {
|
|
472
|
+
var n = integerNum.substr(i, 1);
|
|
473
|
+
var p = IntLen - i - 1;
|
|
474
|
+
var q = p / 4;
|
|
475
|
+
var m = p % 4;
|
|
476
|
+
if (n == "0") {
|
|
477
|
+
zeroCount++;
|
|
478
|
+
} else {
|
|
479
|
+
if (zeroCount > 0) {
|
|
480
|
+
chineseStr += cnNums[0];
|
|
481
|
+
}
|
|
482
|
+
//归零
|
|
483
|
+
zeroCount = 0;
|
|
484
|
+
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
|
|
485
|
+
}
|
|
486
|
+
if (m == 0 && zeroCount < 4) {
|
|
487
|
+
chineseStr += cnIntUnits[q];
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
chineseStr += cnIntLast;
|
|
491
|
+
}
|
|
492
|
+
//小数部分
|
|
493
|
+
if (decimalNum != "") {
|
|
494
|
+
var decLen = decimalNum.length;
|
|
495
|
+
for (var i = 0; i < decLen; i++) {
|
|
496
|
+
var n = decimalNum.substr(i, 1);
|
|
497
|
+
if (n != "0") {
|
|
498
|
+
chineseStr += cnNums[Number(n)] + cnDecUnits[i];
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
if (chineseStr == "") {
|
|
503
|
+
chineseStr += cnNums[0] + cnIntLast + cnInteger;
|
|
504
|
+
} else if (decimalNum == "") {
|
|
505
|
+
chineseStr += cnInteger;
|
|
506
|
+
}
|
|
507
|
+
return chineseStr;
|
|
508
|
+
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export function filterDefaultColumn(originArr) {
|
|
512
|
+
return originArr.filter(item => item.isDefault || item.type==='index' || item.type==='selection' || item.static === 'next' || item.static === 'pre')
|
|
513
|
+
}
|
|
Binary file
|
package/vue.config.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const { ureConfig, chainConfig } = require('./_webpack.config')
|
|
2
|
+
|
|
3
|
+
const path = require('path')
|
|
4
|
+
|
|
5
|
+
const resolve = (dir) => {
|
|
6
|
+
if (!dir) throw new Error('Directory parameter is required')
|
|
7
|
+
return path.join(__dirname, dir)
|
|
8
|
+
}
|
|
9
|
+
// 反向代理地址
|
|
10
|
+
const developURL = 'http://192.168.20.24'
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
lintOnSave: false,
|
|
14
|
+
runtimeCompiler: true,
|
|
15
|
+
filenameHashing: true, // 生产文件名带hash
|
|
16
|
+
productionSourceMap: false,
|
|
17
|
+
transpileDependencies: [
|
|
18
|
+
"n20-common-lib",
|
|
19
|
+
"element-ui"
|
|
20
|
+
],
|
|
21
|
+
devServer: {
|
|
22
|
+
proxy: {
|
|
23
|
+
'/api': {
|
|
24
|
+
target: developURL,
|
|
25
|
+
changeOrigin: true
|
|
26
|
+
},
|
|
27
|
+
'/bems': { //计划
|
|
28
|
+
target: developURL,
|
|
29
|
+
changeOrigin: true,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
configureWebpack: config => {
|
|
34
|
+
return ureConfig
|
|
35
|
+
},
|
|
36
|
+
css: {
|
|
37
|
+
// extract: true,
|
|
38
|
+
sourceMap: true
|
|
39
|
+
},
|
|
40
|
+
chainWebpack: config => {
|
|
41
|
+
/* https://github.com/neutrinojs/webpack-chain */
|
|
42
|
+
config.merge(chainConfig)
|
|
43
|
+
// 禁用 thread-loader 来解决构建问题
|
|
44
|
+
config.module.rule('vue').uses.delete('thread-loader')
|
|
45
|
+
config.module.rule('js').uses.delete('thread-loader')
|
|
46
|
+
config.module.rule('ts').uses.delete('thread-loader')
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
}
|