n20-common-lib 2.6.9 → 2.6.10-beta
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 +4 -3
- package/src/assets/css/cl-file-upload-table.scss +8 -1
- package/src/assets/css/cl-layout-header.scss +34 -5
- package/src/assets/css/cl-message.scss +55 -1
- package/src/components/AdvancedFilter/formItemRender.vue +6 -3
- package/src/components/AdvancedFilter/index.vue +34 -13
- package/src/components/AdvancedFilter/utils.js +8 -0
- package/src/components/Anchor/index.vue +5 -1
- package/src/components/ApprovalButtons/showAppOpi.vue +1 -0
- package/src/components/DateSelect/index.vue +1 -1
- package/src/components/Dialog/index.vue +5 -0
- package/src/components/ElectronicArchive/index.vue +884 -0
- package/src/components/FileImport/index.vue +6 -0
- package/src/components/FileUploadTable/index.vue +1 -1
- package/src/components/Filters/index.vue +1 -1
- package/src/components/InputNumber/numberRange.vue +2 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +9 -8
- package/src/components/Layout/HeaderWrap/index.vue +10 -0
- package/src/components/Layout/HeaderWrap/indexN.vue +19 -4
- package/src/components/SelectDatePickerPro/index.vue +13 -13
- package/src/components/TablePro/filterContent.vue +279 -0
- package/src/components/TablePro/filterContent_tree.vue +172 -0
- package/src/components/TablePro/index.js +30 -0
- package/src/components/TablePro/index.vue +3 -2
- package/src/components/Tree/index.vue +6 -1
- package/src/components/Upload/index.vue +5 -0
- package/src/components/Upload/uploadMsg.vue +7 -5
- package/src/components/operatingStatus/index.vue +5 -3
- package/src/index.js +6 -1
- package/src/utils/amountInWords.js +17 -100
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="my-filter-content">
|
|
3
|
+
<div class="my-fc-search">
|
|
4
|
+
<div class="my-fc-search-top">
|
|
5
|
+
<el-input v-model="filterText" placeholder="输入关键字进行过滤" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="my-fc-search-content">
|
|
8
|
+
<template v-if="data.length">
|
|
9
|
+
<el-tree
|
|
10
|
+
ref="tree"
|
|
11
|
+
class="filter-tree"
|
|
12
|
+
:data="data"
|
|
13
|
+
:props="defaultProps"
|
|
14
|
+
:show-checkbox="filterMultiple"
|
|
15
|
+
default-expand-all
|
|
16
|
+
:default-checked-keys="defaultCheckedKeys"
|
|
17
|
+
:filter-node-method="filterNode"
|
|
18
|
+
node-key="value"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
<template v-else>
|
|
22
|
+
<div class="my-fc-search-empty">无匹配项</div>
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="flex-box flex-c m-t-s" style="width: 100%">
|
|
27
|
+
<el-button type="primary" size="mini" @click="confirmFilterEvent">确认</el-button>
|
|
28
|
+
<el-button plan size="mini" @click="resetFilterEvent">重置</el-button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: 'FilterContent',
|
|
36
|
+
props: {
|
|
37
|
+
params: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => {
|
|
40
|
+
return {}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
demo1: {
|
|
47
|
+
isAll: false,
|
|
48
|
+
option: null,
|
|
49
|
+
colValList: [],
|
|
50
|
+
valList: []
|
|
51
|
+
},
|
|
52
|
+
filterText: '',
|
|
53
|
+
defaultProps: {
|
|
54
|
+
children: 'children',
|
|
55
|
+
label: 'label'
|
|
56
|
+
},
|
|
57
|
+
data: [],
|
|
58
|
+
filterMultiple: false,
|
|
59
|
+
defaultCheckedKeys: []
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
watch: {
|
|
63
|
+
filterText(val) {
|
|
64
|
+
this.$refs.tree.filter(val)
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
mounted() {
|
|
68
|
+
this.load()
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
// 顶部筛选
|
|
72
|
+
filterNode(value, data) {
|
|
73
|
+
if (!value) return true
|
|
74
|
+
return data.label.indexOf(value) !== -1
|
|
75
|
+
},
|
|
76
|
+
load() {
|
|
77
|
+
const params = this.params
|
|
78
|
+
const { column } = params
|
|
79
|
+
if (column.filterMultiple) {
|
|
80
|
+
this.filterMultiple = column.filterMultiple
|
|
81
|
+
}
|
|
82
|
+
if (column.filters) {
|
|
83
|
+
// 多选
|
|
84
|
+
if (column.filterMultiple) {
|
|
85
|
+
this.data = [
|
|
86
|
+
{
|
|
87
|
+
value: 0,
|
|
88
|
+
label: '全部',
|
|
89
|
+
children: column.filters
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
//单选
|
|
93
|
+
} else {
|
|
94
|
+
this.data = column.filters
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
confirmFilterEvent() {
|
|
100
|
+
const { $panel, column } = this.params
|
|
101
|
+
const vals = this.$refs.tree.getCheckedKeys() || this.$refs.tree.getCurrentKey()
|
|
102
|
+
this.defaultCheckedKeys = vals
|
|
103
|
+
column.filters.map((item) => {
|
|
104
|
+
item.data = { vals: vals }
|
|
105
|
+
if (vals.includes(item.value)) {
|
|
106
|
+
item.checked = true
|
|
107
|
+
item._checked = true
|
|
108
|
+
} else {
|
|
109
|
+
item.checked = false
|
|
110
|
+
item._checked = false
|
|
111
|
+
}
|
|
112
|
+
return item
|
|
113
|
+
})
|
|
114
|
+
$panel.confirmFilter()
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
resetFilterEvent() {
|
|
118
|
+
const params = this.params
|
|
119
|
+
if (params) {
|
|
120
|
+
const { $panel } = params
|
|
121
|
+
$panel.resetFilter()
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<style>
|
|
129
|
+
.my-filter-content {
|
|
130
|
+
padding: 10px;
|
|
131
|
+
user-select: none;
|
|
132
|
+
}
|
|
133
|
+
.my-filter-content .my-fc-search .my-fc-search-top {
|
|
134
|
+
position: relative;
|
|
135
|
+
padding: 5px 0;
|
|
136
|
+
}
|
|
137
|
+
.my-filter-content .my-fc-search .my-fc-search-top > input {
|
|
138
|
+
border: 1px solid #ababab;
|
|
139
|
+
padding: 0 20px 0 2px;
|
|
140
|
+
width: 200px;
|
|
141
|
+
height: 22px;
|
|
142
|
+
line-height: 22px;
|
|
143
|
+
}
|
|
144
|
+
.my-filter-content .my-fc-search .my-fc-search-content {
|
|
145
|
+
padding: 2px 10px;
|
|
146
|
+
}
|
|
147
|
+
.my-filter-content .my-fc-search-empty {
|
|
148
|
+
text-align: center;
|
|
149
|
+
padding: 20px 0;
|
|
150
|
+
}
|
|
151
|
+
.my-filter-content .my-fc-search-list {
|
|
152
|
+
margin: 0;
|
|
153
|
+
padding: 0;
|
|
154
|
+
list-style: none;
|
|
155
|
+
}
|
|
156
|
+
.my-filter-content .my-fc-search-list-body {
|
|
157
|
+
overflow: auto;
|
|
158
|
+
height: 120px;
|
|
159
|
+
}
|
|
160
|
+
.my-filter-content .my-fc-search-list .my-fc-search-item {
|
|
161
|
+
padding: 2px 0;
|
|
162
|
+
display: block;
|
|
163
|
+
}
|
|
164
|
+
.my-filter-content .my-fc-footer {
|
|
165
|
+
text-align: right;
|
|
166
|
+
padding-top: 10px;
|
|
167
|
+
}
|
|
168
|
+
.my-filter-content .my-fc-footer button {
|
|
169
|
+
padding: 0 15px;
|
|
170
|
+
margin-left: 15px;
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import vxeTable from 'vxe-table'
|
|
2
2
|
import 'vxe-table/lib/style.css'
|
|
3
|
+
import filterContent from './filterContent.vue'
|
|
3
4
|
import numerify from 'numerify'
|
|
4
5
|
import dayjs from 'dayjs'
|
|
5
6
|
|
|
7
|
+
// 创建一个简单的输入框筛选
|
|
8
|
+
vxeTable.renderer.add('FilterInput', {
|
|
9
|
+
// 筛选模板
|
|
10
|
+
renderFilter(h, renderOpts, params) {
|
|
11
|
+
return <filterContent params={params}></filterContent>
|
|
12
|
+
},
|
|
13
|
+
// 不显示底部按钮,使用自定义的按钮
|
|
14
|
+
showFilterFooter: false,
|
|
15
|
+
// 重置数据方法
|
|
16
|
+
filterResetMethod({ options }) {
|
|
17
|
+
options.forEach((option) => {
|
|
18
|
+
option.data = ''
|
|
19
|
+
})
|
|
20
|
+
},
|
|
21
|
+
// 重置筛选复原方法(当未点击确认时,该选项将被恢复为默认值)
|
|
22
|
+
filterRecoverMethod({ option }) {
|
|
23
|
+
option.data = ''
|
|
24
|
+
},
|
|
25
|
+
// 筛选方法
|
|
26
|
+
filterMethod({ option, row, column }) {
|
|
27
|
+
const { data } = option
|
|
28
|
+
const cellValue = row[column.property]
|
|
29
|
+
if (cellValue) {
|
|
30
|
+
return cellValue.indexOf(data) > -1
|
|
31
|
+
}
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
|
|
6
36
|
// 自定义全局的格式化处理函数
|
|
7
37
|
vxeTable.formats.mixin({
|
|
8
38
|
// 格式化内容 为空转为--
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
:key="'vxe-table-' + i"
|
|
67
67
|
:formatter="subItem.formatter ? subItem.formatter : 'formatName'"
|
|
68
68
|
:filters="subItem.filters"
|
|
69
|
-
:filter-render="subItem.filterRender"
|
|
69
|
+
:filter-render="{ name: 'FilterInput', ...subItem.filterRender }"
|
|
70
70
|
:title="subItem.label"
|
|
71
71
|
:field="subItem.prop"
|
|
72
72
|
v-bind="subItem"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
:class-name="`${item.wrap && `vxe-table-custom-wrap`} ${item.bold && `font-w600`}`"
|
|
80
80
|
:formatter="item.formatter ? item.formatter : 'formatName'"
|
|
81
81
|
:filters="item.filters"
|
|
82
|
-
:filter-render="item.filterRender"
|
|
82
|
+
:filter-render="{ name: 'FilterInput', ...item.filterRender }"
|
|
83
83
|
:title="item.label"
|
|
84
84
|
:field="item.prop"
|
|
85
85
|
v-bind="item"
|
|
@@ -234,6 +234,7 @@ export default {
|
|
|
234
234
|
this.$emit('sort-change-method', orders)
|
|
235
235
|
},
|
|
236
236
|
filterChange(data) {
|
|
237
|
+
console.log(data)
|
|
237
238
|
const { filterList } = data
|
|
238
239
|
// 输出全部条件
|
|
239
240
|
const obj = {}
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
class="cl-tree-item-label text-ellipsis"
|
|
30
30
|
>
|
|
31
31
|
{{ (data[props.value] ? '(' + data[props.value] + ') ' : '') + data[props.label] }}
|
|
32
|
-
{{
|
|
32
|
+
{{
|
|
33
|
+
data && data[props.children] && data[props.children].length > 0
|
|
34
|
+
? '(' + data[props.children].length + ')'
|
|
35
|
+
: ''
|
|
36
|
+
}}
|
|
33
37
|
</div>
|
|
34
38
|
</div>
|
|
35
39
|
<el-button
|
|
@@ -55,6 +59,7 @@
|
|
|
55
59
|
@click="handleChecked(node, data)"
|
|
56
60
|
>{{ $lc('只勾选本层级') }}</el-button
|
|
57
61
|
>
|
|
62
|
+
<slot v-else name="right" :node="node" :data="data"></slot>
|
|
58
63
|
</div>
|
|
59
64
|
</el-tree>
|
|
60
65
|
</template>
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
:percent="percent"
|
|
43
43
|
:width="width"
|
|
44
44
|
title="文件导入"
|
|
45
|
+
:showErrorExport="showErrorExport"
|
|
45
46
|
:pagination="pagination"
|
|
46
47
|
:footer-btn="footer"
|
|
47
48
|
:validate-result="validateResult"
|
|
@@ -169,6 +170,10 @@ export default {
|
|
|
169
170
|
footer: {
|
|
170
171
|
type: Object,
|
|
171
172
|
default: undefined
|
|
173
|
+
},
|
|
174
|
+
showErrorExport: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: false
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
data() {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<div class="bd-a">
|
|
50
50
|
<div class="flex-box flex-lr flex-v m-t m-b p-l p-r">
|
|
51
51
|
<span>{{ '无效数据详情' | $lc }}</span>
|
|
52
|
-
<el-button type="text" @click="importError">{{ '导出错误数据' | $lc }}</el-button>
|
|
52
|
+
<el-button type="text" v-if="showErrorExport" @click="importError">{{ '导出错误数据' | $lc }}</el-button>
|
|
53
53
|
</div>
|
|
54
54
|
<el-table ref="tables" :key="index" :data="errorListC" border style="width: 100%" height="300px">
|
|
55
55
|
<el-table-column
|
|
@@ -161,6 +161,10 @@ export default {
|
|
|
161
161
|
hidePercent: {
|
|
162
162
|
type: Boolean,
|
|
163
163
|
default: false
|
|
164
|
+
},
|
|
165
|
+
showErrorExport: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false
|
|
164
168
|
}
|
|
165
169
|
},
|
|
166
170
|
filters: {
|
|
@@ -182,7 +186,7 @@ export default {
|
|
|
182
186
|
errorList: {
|
|
183
187
|
handler() {
|
|
184
188
|
this.errorListC = this.errorList
|
|
185
|
-
this.page.total =
|
|
189
|
+
this.page.total = this.tableData.length
|
|
186
190
|
}
|
|
187
191
|
},
|
|
188
192
|
page: {
|
|
@@ -222,8 +226,7 @@ export default {
|
|
|
222
226
|
this.tableData = cloneDeep(_errorList)
|
|
223
227
|
const startIndex = (this.page.current - 1) * this.page.pageSize
|
|
224
228
|
const endIndex = startIndex + this.page.pageSize
|
|
225
|
-
|
|
226
|
-
return dto
|
|
229
|
+
return this.pagination ? this.tableData.slice(startIndex, endIndex) : this.tableData
|
|
227
230
|
} else {
|
|
228
231
|
return undefined
|
|
229
232
|
}
|
|
@@ -250,7 +253,6 @@ export default {
|
|
|
250
253
|
const startIndex = (this.page.current - 1) * this.page.pageSize
|
|
251
254
|
const endIndex = startIndex + this.page.pageSize
|
|
252
255
|
this.errorListC = this.tableData.slice(startIndex, endIndex)
|
|
253
|
-
|
|
254
256
|
this.index += 1
|
|
255
257
|
this.$nextTick(() => {
|
|
256
258
|
this.$refs.tables.doLayout()
|
|
@@ -79,12 +79,14 @@ export default {
|
|
|
79
79
|
|
|
80
80
|
<style scoped>
|
|
81
81
|
.el-carousel {
|
|
82
|
-
width:
|
|
82
|
+
min-width: 220px;
|
|
83
83
|
}
|
|
84
|
-
.el-carousel__item
|
|
84
|
+
.el-carousel__item {
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: center;
|
|
85
88
|
font-size: 14px;
|
|
86
89
|
opacity: 0.75;
|
|
87
|
-
line-height: 50px;
|
|
88
90
|
margin: 0;
|
|
89
91
|
}
|
|
90
92
|
.el-carousel__item:nth-child(n) {
|
package/src/index.js
CHANGED
|
@@ -65,6 +65,7 @@ import WornPagination from './components/WornPagination/index.vue'
|
|
|
65
65
|
import AdvancedFilter from './components/AdvancedFilter/index.vue'
|
|
66
66
|
import SelectTreePro from './components/SelectTree/pro.vue'
|
|
67
67
|
import Tree from './components/Tree/index.vue'
|
|
68
|
+
import ElectronicArchive from './components/ElectronicArchive/index.vue'
|
|
68
69
|
|
|
69
70
|
// 新版日期选择框
|
|
70
71
|
import BusiDatePicker from './components/DateSelect/busiDate.vue'
|
|
@@ -118,6 +119,7 @@ import list2tree from './utils/list2tree'
|
|
|
118
119
|
import { msgPor, msgboxPor } from './utils/msgboxPor.js'
|
|
119
120
|
import N from './utils/numberPor.js' // 扩展Number
|
|
120
121
|
import { closeTab, linkGo, linkPush } from './utils/urlToGo'
|
|
122
|
+
|
|
121
123
|
function numerify(input, formatType, roundingFunction) {
|
|
122
124
|
return _numerify(input, formatType, roundingFunction)
|
|
123
125
|
}
|
|
@@ -202,6 +204,7 @@ const components = [
|
|
|
202
204
|
Tree,
|
|
203
205
|
SelectTreePro,
|
|
204
206
|
AdvancedFilter,
|
|
207
|
+
ElectronicArchive,
|
|
205
208
|
/* old */
|
|
206
209
|
TableO,
|
|
207
210
|
FiltersO,
|
|
@@ -213,7 +216,7 @@ const components = [
|
|
|
213
216
|
operatingStatus
|
|
214
217
|
]
|
|
215
218
|
|
|
216
|
-
const install = function
|
|
219
|
+
const install = function(Vue, opts = { prefix: 'Cl', i18nConfig: {} }) {
|
|
217
220
|
components.forEach((component) => {
|
|
218
221
|
let name = component.name
|
|
219
222
|
if (!name) return console.error('必须设置组件名称:', component)
|
|
@@ -254,6 +257,7 @@ export default {
|
|
|
254
257
|
const linkClose = closeTab
|
|
255
258
|
export {
|
|
256
259
|
$l,
|
|
260
|
+
|
|
257
261
|
AdvancedFilter,
|
|
258
262
|
Anchor,
|
|
259
263
|
AnchorItem,
|
|
@@ -280,6 +284,7 @@ export {
|
|
|
280
284
|
Dialog,
|
|
281
285
|
Diff,
|
|
282
286
|
DragList,
|
|
287
|
+
ElectronicArchive,
|
|
283
288
|
Empty,
|
|
284
289
|
EventBubble,
|
|
285
290
|
Expandable,
|
|
@@ -1,104 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* @param {number|string} amount 需转换的金额
|
|
4
|
-
*/
|
|
5
|
-
export function convert(money) {
|
|
6
|
-
//汉字的数字
|
|
7
|
-
var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖')
|
|
8
|
-
//基本单位
|
|
9
|
-
var cnIntRadice = new Array('', '拾', '佰', '仟')
|
|
10
|
-
//对应整数部分扩展单位
|
|
11
|
-
var cnIntUnits = new Array('', '万', '亿', '兆')
|
|
12
|
-
//对应小数部分单位
|
|
13
|
-
var cnDecUnits = new Array('角', '分', '毫', '厘')
|
|
14
|
-
//整数金额时后面跟的字符
|
|
15
|
-
var cnInteger = '整'
|
|
16
|
-
//整型完以后的单位
|
|
17
|
-
var cnIntLast = '元'
|
|
18
|
-
//最大处理的数字
|
|
19
|
-
var maxNum = 999999999999999.9999
|
|
20
|
-
//金额整数部分
|
|
21
|
-
var integerNum
|
|
22
|
-
//金额小数部分
|
|
23
|
-
var decimalNum
|
|
24
|
-
//输出的中文金额字符串
|
|
25
|
-
var chineseStr = ''
|
|
26
|
-
var minusStr = '负'
|
|
27
|
-
var minusFlag = false
|
|
28
|
-
//分离金额后用的数组,预定义
|
|
29
|
-
var parts
|
|
30
|
-
if (money == '') {
|
|
31
|
-
return ''
|
|
32
|
-
}
|
|
33
|
-
money = parseFloat(money)
|
|
34
|
-
if (money >= maxNum) {
|
|
35
|
-
//超出最大处理数字
|
|
36
|
-
return ''
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (money == 0) {
|
|
40
|
-
chineseStr = cnNums[0] + cnIntLast
|
|
41
|
-
return chineseStr
|
|
42
|
-
}
|
|
1
|
+
import Nzh from 'nzh'
|
|
43
2
|
|
|
44
|
-
|
|
45
|
-
money
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
3
|
+
export const convert = (
|
|
4
|
+
money,
|
|
5
|
+
options = {
|
|
6
|
+
ch: '零壹贰叁肆伍陆柒捌玖', // 数字字符
|
|
7
|
+
ch_u: '个拾佰仟万亿兆京', // 数位单位字符,万以下十进制,万以上万进制,个位不能省略
|
|
8
|
+
ch_f: '负', // 负字符
|
|
9
|
+
ch_d: '点', // 小数点字符
|
|
10
|
+
m_u: '元角分厘', // 金额单位
|
|
11
|
+
m_t: '', // 金额前缀
|
|
12
|
+
m_z: '整' // 金额无小数后缀
|
|
13
|
+
}
|
|
14
|
+
) => {
|
|
15
|
+
if (money === undefined || money === null) {
|
|
16
|
+
return money
|
|
53
17
|
} else {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
decimalNum = parts[1].substr(0, 4)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
//获取整型部分转换
|
|
60
|
-
if (parseInt(integerNum, 10) > 0) {
|
|
61
|
-
var zeroCount = 0
|
|
62
|
-
var IntLen = integerNum.length
|
|
63
|
-
for (var i = 0; i < IntLen; i++) {
|
|
64
|
-
var n = integerNum.substr(i, 1)
|
|
65
|
-
var p = IntLen - i - 1
|
|
66
|
-
var q = p / 4
|
|
67
|
-
var m = p % 4
|
|
68
|
-
if (n == '0') {
|
|
69
|
-
zeroCount++
|
|
70
|
-
} else {
|
|
71
|
-
if (zeroCount > 0) {
|
|
72
|
-
chineseStr += cnNums[0]
|
|
73
|
-
}
|
|
74
|
-
//归零
|
|
75
|
-
zeroCount = 0
|
|
76
|
-
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]
|
|
77
|
-
}
|
|
78
|
-
if (m == 0 && zeroCount < 4) {
|
|
79
|
-
chineseStr += cnIntUnits[q]
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
chineseStr += cnIntLast
|
|
83
|
-
}
|
|
84
|
-
//小数部分
|
|
85
|
-
if (decimalNum != '') {
|
|
86
|
-
var decLen = decimalNum.length
|
|
87
|
-
for (var i = 0; i < decLen; i++) {
|
|
88
|
-
var n = decimalNum.substr(i, 1)
|
|
89
|
-
if (n != '0') {
|
|
90
|
-
chineseStr += cnNums[Number(n)] + cnDecUnits[i]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (chineseStr == '') {
|
|
95
|
-
chineseStr += cnNums[0] + cnIntLast + cnInteger
|
|
96
|
-
} else if (decimalNum == '') {
|
|
97
|
-
chineseStr += cnInteger
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (minusFlag) {
|
|
101
|
-
chineseStr = minusStr + chineseStr
|
|
18
|
+
var nzh = new Nzh(options)
|
|
19
|
+
return nzh.toMoney(money)
|
|
102
20
|
}
|
|
103
|
-
return chineseStr
|
|
104
21
|
}
|