gcs-ui-lib 1.2.34 → 1.2.36

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.
Files changed (35) hide show
  1. package/lib/gcs-ui-lib.common.js +3776 -4691
  2. package/lib/gcs-ui-lib.css +3 -2
  3. package/lib/gcs-ui-lib.umd.js +3776 -4691
  4. package/lib/gcs-ui-lib.umd.min.js +89 -89
  5. package/package.json +2 -9
  6. package/packages/AutoFillDetail/src/main.vue +4 -4
  7. package/packages/AutoFillDetection/src/components/SelectEntries.vue +1 -1
  8. package/packages/AutoFillDetection/src/components/THIRD_ACCOUNT.vue +1 -1
  9. package/packages/AutoFillDetection/src/components/config.js +68 -68
  10. package/packages/AutoFillDetection/src/main.vue +1 -1
  11. package/packages/AutoFillList/src/components/config.js +11 -11
  12. package/packages/AutoFillList/src/main.vue +2 -2
  13. package/packages/AutoFillRuleHistory/src/components/config.js +14 -14
  14. package/packages/AutoFillRuleHistory/src/main.vue +1 -1
  15. package/packages/AutoFillService/src/components/ConditionGroup.vue +18 -18
  16. package/packages/AutoFillService/src/components/basic.vue +2 -2
  17. package/packages/AutoFillService/src/components/config.js +1 -1
  18. package/packages/AutoFillService/src/components/fillDetail.vue +8 -8
  19. package/packages/AutoFillService/src/components/fillRules.vue +5 -5
  20. package/packages/AutoFillService/src/components/paymentCategory.vue +1 -1
  21. package/packages/AutoFillService/src/components/paymentCategoryT.vue +29 -4
  22. package/packages/MergeAutoFill/merge/merageBasic.vue +3 -3
  23. package/packages/MergeAutoFill/merge/merageFillService.vue +2 -2
  24. package/packages/MergeAutoFill/merge/merageHistoryRules.vue +1 -1
  25. package/packages/MergeAutoFill/merge/mergeFillDetail.vue +4 -4
  26. package/packages/StreamRefill/src/main.vue +1 -1
  27. package/packages/Trade/src/components/i18n.json +336 -336
  28. package/src/index.js +8 -1
  29. package/src/lang/i18n.json +1184 -0
  30. package/src/lang/mergeI18n.js +27 -0
  31. package/src/preview/router.js +0 -5
  32. package/src/utils/exportPageSnapshot.js +728 -1037
  33. package/packages/ExportPageSnapshot/index.js +0 -7
  34. package/packages/ExportPageSnapshot/src/demo/index.vue +0 -352
  35. package/packages/ExportPageSnapshot/src/main.vue +0 -108
@@ -1,7 +0,0 @@
1
- import NstcExportPageSnapshot from './src/main.vue'
2
-
3
- NstcExportPageSnapshot.install = function (Vue) {
4
- Vue.component(NstcExportPageSnapshot.name, NstcExportPageSnapshot)
5
- }
6
-
7
- export default NstcExportPageSnapshot
@@ -1,352 +0,0 @@
1
- <template>
2
- <div class="export-page-snapshot-demo">
3
- <h2>{{ $l('页面快照导出示例') }}</h2>
4
- <p class="export-page-snapshot-demo__desc">
5
- {{ $l('切换页签后导出,仅快照当前页签内容。底部提交栏与导出按钮不会出现在快照中。') }}
6
- </p>
7
-
8
- <NstcExportPageSnapshot @success="handleExportSuccess">
9
- <el-tabs v-model="activeTab" class="demo-tabs">
10
- <el-tab-pane :label="$l('大表单')" name="form">
11
- <div class="demo-page">
12
- <div class="demo-page__header">
13
- <span class="demo-page__title">{{ $l('付款申请详情') }}</span>
14
- <el-tag size="mini" type="success">{{ $l('审批中') }}</el-tag>
15
- </div>
16
-
17
- <el-form
18
- :model="form"
19
- label-width="120px"
20
- class="demo-page__form"
21
- >
22
- <div
23
- v-for="section in formSections"
24
- :key="section.title"
25
- class="demo-page__section"
26
- >
27
- <div class="demo-page__section-title">{{ section.title }}</div>
28
- <el-row :gutter="16">
29
- <el-col
30
- v-for="field in section.fields"
31
- :key="field.prop"
32
- :span="8"
33
- >
34
- <el-form-item :label="field.label">
35
- <span>{{ form[field.prop] }}</span>
36
- </el-form-item>
37
- </el-col>
38
- </el-row>
39
- </div>
40
- </el-form>
41
- </div>
42
- </el-tab-pane>
43
-
44
- <el-tab-pane :label="$l('长列表')" name="list">
45
- <div class="demo-page">
46
- <div class="demo-page__header">
47
- <span class="demo-page__title">{{ $l('付款明细列表') }}</span>
48
- <span class="demo-page__meta">{{ $l('共') }} {{ listData.length }} {{ $l('条') }}</span>
49
- </div>
50
-
51
- <el-table
52
- :data="listData"
53
- border
54
- size="mini"
55
- style="width: 100%"
56
- >
57
- <el-table-column
58
- type="index"
59
- :label="$l('序号')"
60
- width="60"
61
- align="center"
62
- fixed="left"
63
- />
64
- <el-table-column
65
- v-for="col in listColumns"
66
- :key="col.prop"
67
- :prop="col.prop"
68
- :label="col.label"
69
- :min-width="col.minWidth"
70
- :align="col.align"
71
- />
72
- </el-table>
73
- </div>
74
- </el-tab-pane>
75
- </el-tabs>
76
- </NstcExportPageSnapshot>
77
-
78
- <div class="page-button-shadow flex-box flex-c flex-v">
79
- <el-button type="primary">{{ $l('提交') }}</el-button>
80
- <el-button>{{ $l('保存') }}</el-button>
81
- </div>
82
-
83
- <div v-if="lastExport" class="export-page-snapshot-demo__result">
84
- <div class="export-page-snapshot-demo__result-title">{{ $l('最近导出') }}</div>
85
- <div>{{ $l('文件名') }}:{{ lastExport.filename }}</div>
86
- <div>{{ $l('导出时间') }}:{{ lastExport.ts }}</div>
87
- </div>
88
- </div>
89
- </template>
90
-
91
- <script>
92
- import NstcExportPageSnapshot from '../main.vue'
93
- import { $l } from 'n20-common-lib/src/utils/i18n'
94
-
95
- const FORM_FIELD_DEFS = [
96
- { prop: 'unitName', label: $l('申请单位') },
97
- { prop: 'deptName', label: $l('申请部门') },
98
- { prop: 'applicant', label: $l('申请人') },
99
- { prop: 'payDate', label: $l('付款日期') },
100
- { prop: 'currency', label: $l('币种') },
101
- { prop: 'exchangeRate', label: $l('汇率') },
102
- { prop: 'payeeName', label: $l('收款户名') },
103
- { prop: 'payeeAccount', label: $l('收款账号') },
104
- { prop: 'payeeBank', label: $l('收款开户行') },
105
- { prop: 'amount', label: $l('付款金额') },
106
- { prop: 'localAmount', label: $l('折本币金额') },
107
- { prop: 'budgetUnit', label: $l('预算单位') },
108
- { prop: 'budgetAccount', label: $l('预算科目') },
109
- { prop: 'budgetCode', label: $l('预算编号') },
110
- { prop: 'projectName', label: $l('项目名称') },
111
- { prop: 'contractNo', label: $l('合同编号') },
112
- { prop: 'invoiceNo', label: $l('发票号码') },
113
- { prop: 'paymentType', label: $l('付款类型') },
114
- { prop: 'urgencyLevel', label: $l('紧急程度') },
115
- { prop: 'settlementMethod', label: $l('结算方式') },
116
- { prop: 'purpose', label: $l('用途') },
117
- { prop: 'memo', label: $l('备注') },
118
- { prop: 'approver', label: $l('审批人') },
119
- { prop: 'approveDate', label: $l('审批日期') },
120
- { prop: 'cashFlowItem', label: $l('现金流量项') },
121
- { prop: 'costCenter', label: $l('成本中心') },
122
- { prop: 'businessType', label: $l('业务类型') },
123
- { prop: 'sourceSystem', label: $l('来源系统') },
124
- { prop: 'externalNo', label: $l('外部单号') },
125
- { prop: 'attachmentCount', label: $l('附件数量') }
126
- ]
127
-
128
- const LIST_COLUMN_DEFS = [
129
- { prop: 'orderNo', label: $l('单据编号'), minWidth: 140 },
130
- { prop: 'unitName', label: $l('单位名称'), minWidth: 160 },
131
- { prop: 'deptName', label: $l('部门'), minWidth: 120 },
132
- { prop: 'payDate', label: $l('付款日期'), minWidth: 110, align: 'center' },
133
- { prop: 'currency', label: $l('币种'), minWidth: 80, align: 'center' },
134
- { prop: 'amount', label: $l('金额'), minWidth: 120, align: 'right' },
135
- { prop: 'localAmount', label: $l('折本币金额'), minWidth: 120, align: 'right' },
136
- { prop: 'payeeName', label: $l('收款户名'), minWidth: 160 },
137
- { prop: 'payeeAccount', label: $l('收款账号'), minWidth: 180 },
138
- { prop: 'payeeBank', label: $l('开户行'), minWidth: 160 },
139
- { prop: 'budgetAccount', label: $l('预算科目'), minWidth: 140 },
140
- { prop: 'budgetCode', label: $l('预算编号'), minWidth: 180 },
141
- { prop: 'projectName', label: $l('项目名称'), minWidth: 140 },
142
- { prop: 'contractNo', label: $l('合同编号'), minWidth: 130 },
143
- { prop: 'paymentType', label: $l('付款类型'), minWidth: 100 },
144
- { prop: 'statusName', label: $l('状态'), minWidth: 90, align: 'center' },
145
- { prop: 'applicant', label: $l('申请人'), minWidth: 100 },
146
- { prop: 'approver', label: $l('审批人'), minWidth: 100 },
147
- { prop: 'memo', label: $l('备注'), minWidth: 160 },
148
- { prop: 'sourceSystem', label: $l('来源系统'), minWidth: 110 }
149
- ]
150
-
151
- function buildFormSections() {
152
- const sectionTitles = [
153
- $l('基本信息'),
154
- $l('收款信息'),
155
- $l('预算信息'),
156
- $l('审批信息')
157
- ]
158
- const chunkSize = Math.ceil(FORM_FIELD_DEFS.length / sectionTitles.length)
159
-
160
- return sectionTitles.map((title, index) => ({
161
- title,
162
- fields: FORM_FIELD_DEFS.slice(index * chunkSize, (index + 1) * chunkSize)
163
- })).filter((section) => section.fields.length)
164
- }
165
-
166
- function buildFormData() {
167
- const values = {
168
- unitName: $l('九恒星集团财务公司'),
169
- deptName: $l('资金管理部'),
170
- applicant: $l('张三'),
171
- payDate: '2026-06-17',
172
- currency: $l('人民币'),
173
- exchangeRate: '1.0000',
174
- payeeName: $l('北京某某科技有限公司'),
175
- payeeAccount: '6222 **** **** 1234',
176
- payeeBank: $l('中国工商银行北京分行'),
177
- amount: '1,258,600.00',
178
- localAmount: '1,258,600.00',
179
- budgetUnit: $l('九恒星集团'),
180
- budgetAccount: $l('固定资产购置'),
181
- budgetCode: 'BGYR20250101-102-0829100-120050-CNY',
182
- projectName: $l('2026年设备采购项目'),
183
- contractNo: 'HT-2026-00128',
184
- invoiceNo: 'INV-20260617001',
185
- paymentType: $l('对外付款'),
186
- urgencyLevel: $l('普通'),
187
- settlementMethod: $l('银企直连'),
188
- purpose: $l('2026年第二季度设备采购款'),
189
- memo: $l('含服务器、网络设备及实施服务'),
190
- approver: $l('李四'),
191
- approveDate: '2026-06-16',
192
- cashFlowItem: $l('购买商品、接受劳务支付的现金'),
193
- costCenter: $l('信息技术中心'),
194
- businessType: $l('资本性支出'),
195
- sourceSystem: $l('付款管理'),
196
- externalNo: 'PAY202606170001',
197
- attachmentCount: '3'
198
- }
199
-
200
- return FORM_FIELD_DEFS.reduce((form, field) => {
201
- form[field.prop] = values[field.prop] ?? '-'
202
- return form
203
- }, {})
204
- }
205
-
206
- function buildListData() {
207
- const statusList = [$l('待审批'), $l('审批中'), $l('已审批'), $l('已付款')]
208
-
209
- return Array.from({ length: 50 }, (_, index) => {
210
- const rowNo = index + 1
211
- const amount = ((rowNo * 1379.5) % 999999 + 1000).toFixed(2)
212
-
213
- return LIST_COLUMN_DEFS.reduce((row, col) => {
214
- const valueMap = {
215
- orderNo: `PAY202606${String(rowNo).padStart(4, '0')}`,
216
- unitName: $l('九恒星集团财务公司'),
217
- deptName: $l('资金管理部'),
218
- payDate: `2026-06-${String((rowNo % 28) + 1).padStart(2, '0')}`,
219
- currency: $l('人民币'),
220
- amount,
221
- localAmount: amount,
222
- payeeName: `${$l('供应商')}${rowNo}`,
223
- payeeAccount: `6222 **** **** ${String(1000 + rowNo).slice(-4)}`,
224
- payeeBank: $l('中国工商银行'),
225
- budgetAccount: $l('办公费用'),
226
- budgetCode: `BGYR20250101-${String(rowNo).padStart(4, '0')}`,
227
- projectName: `${$l('采购项目')}${rowNo}`,
228
- contractNo: `HT-2026-${String(rowNo).padStart(4, '0')}`,
229
- paymentType: $l('对外付款'),
230
- statusName: statusList[rowNo % statusList.length],
231
- applicant: $l('张三'),
232
- approver: $l('李四'),
233
- memo: `${$l('第')}${rowNo}${$l('笔付款明细')}`,
234
- sourceSystem: $l('付款管理')
235
- }
236
- row[col.prop] = valueMap[col.prop] ?? '-'
237
- return row
238
- }, {})
239
- })
240
- }
241
-
242
- export default {
243
- name: 'ExportPageSnapshotDemo',
244
- components: {
245
- NstcExportPageSnapshot
246
- },
247
- data() {
248
- return {
249
- activeTab: 'form',
250
- formSections: buildFormSections(),
251
- form: buildFormData(),
252
- listColumns: LIST_COLUMN_DEFS,
253
- listData: buildListData(),
254
- lastExport: null
255
- }
256
- },
257
- methods: {
258
- handleExportSuccess(result) {
259
- this.lastExport = {
260
- filename: result.filename,
261
- ts: result.ts
262
- }
263
- }
264
- }
265
- }
266
- </script>
267
-
268
- <style scoped lang="scss">
269
- .export-page-snapshot-demo {
270
- padding: 20px;
271
-
272
- h2 {
273
- margin: 0 0 8px;
274
- color: #303133;
275
- }
276
-
277
- &__desc {
278
- margin: 0 0 16px;
279
- color: #606266;
280
- line-height: 1.6;
281
- }
282
-
283
- &__result {
284
- margin-top: 16px;
285
- padding: 12px 16px;
286
- background: #f5f7fa;
287
- border: 1px solid #e4e7ed;
288
- border-radius: 4px;
289
- color: #606266;
290
- line-height: 1.8;
291
- }
292
-
293
- &__result-title {
294
- margin-bottom: 4px;
295
- color: #303133;
296
- font-weight: 600;
297
- }
298
- }
299
-
300
- .demo-tabs {
301
- ::v-deep .el-tabs__header {
302
- margin-bottom: 12px;
303
- }
304
- }
305
-
306
- .demo-page {
307
- &__header {
308
- display: flex;
309
- align-items: center;
310
- gap: 8px;
311
- margin-bottom: 16px;
312
- padding-bottom: 12px;
313
- border-bottom: 1px solid #ebeef5;
314
- }
315
-
316
- &__title {
317
- font-size: 16px;
318
- font-weight: 600;
319
- color: #303133;
320
- }
321
-
322
- &__meta {
323
- margin-left: auto;
324
- color: #909399;
325
- font-size: 13px;
326
- }
327
-
328
- &__form {
329
- margin-bottom: 0;
330
- }
331
-
332
- &__section + &__section {
333
- margin-top: 8px;
334
- }
335
-
336
- &__section-title {
337
- margin-bottom: 12px;
338
- padding-left: 8px;
339
- color: #303133;
340
- font-weight: 600;
341
- border-left: 3px solid #409eff;
342
- }
343
- }
344
-
345
- .page-button-shadow {
346
- margin-top: 16px;
347
- padding: 12px 16px;
348
- background: #fff;
349
- border: 1px solid #e4e7ed;
350
- border-radius: 4px;
351
- }
352
- </style>
@@ -1,108 +0,0 @@
1
- <template>
2
- <div class="nstc-export-page-snapshot">
3
- <div
4
- v-if="showToolbar"
5
- class="nstc-export-page-snapshot__toolbar page-snapshot-btn"
6
- >
7
- <el-button
8
- size="mini"
9
- :loading="exporting"
10
- @click="handleExportHtml"
11
- >
12
- {{ $l('导出 HTML') }}
13
- </el-button>
14
- <el-button
15
- size="mini"
16
- type="primary"
17
- :loading="exporting"
18
- @click="handleExportPdf"
19
- >
20
- {{ $l('导出 PDF') }}
21
- </el-button>
22
- </div>
23
- <div ref="pageRoot" class="nstc-export-page-snapshot__content">
24
- <slot />
25
- </div>
26
- </div>
27
- </template>
28
-
29
- <script>
30
- import { exportPageHtml, downloadPageSnapshotPdf } from '@/utils/exportPageSnapshot'
31
-
32
- export default {
33
- name: 'NstcExportPageSnapshot',
34
- props: {
35
- showToolbar: {
36
- type: Boolean,
37
- default: true
38
- },
39
- embedFonts: {
40
- type: Boolean,
41
- default: true
42
- }
43
- },
44
- data() {
45
- return {
46
- exporting: false
47
- }
48
- },
49
- methods: {
50
- getRootEl() {
51
- return this.$refs.pageRoot
52
- },
53
- async handleExportHtml() {
54
- await this.runExport(() => exportPageHtml(this.getRootEl(), {
55
- autoDownload: true,
56
- embedFonts: this.embedFonts
57
- }))
58
- },
59
- async handleExportPdf() {
60
- await this.runExport(() => downloadPageSnapshotPdf(this.getRootEl(), {
61
- embedFonts: this.embedFonts
62
- }))
63
- },
64
- async runExport(exportFn) {
65
- const rootEl = this.getRootEl()
66
- if (!rootEl) {
67
- this.$message.warning(this.$l('未找到页面内容'))
68
- return
69
- }
70
-
71
- this.exporting = true
72
- try {
73
- const result = await exportFn()
74
- if (!result?.ok) {
75
- this.$message.error(result?.message || this.$l('导出失败'))
76
- return
77
- }
78
- this.$message.success(this.$l('导出成功'))
79
- this.$emit('success', result)
80
- } catch (e) {
81
- console.warn('[NstcExportPageSnapshot] export failed', e)
82
- this.$message.error(this.$l('导出失败'))
83
- } finally {
84
- this.exporting = false
85
- }
86
- }
87
- }
88
- }
89
- </script>
90
-
91
- <style scoped lang="scss">
92
- .nstc-export-page-snapshot {
93
- position: relative;
94
- }
95
-
96
- .nstc-export-page-snapshot__toolbar {
97
- display: flex;
98
- gap: 8px;
99
- margin-bottom: 12px;
100
- }
101
-
102
- .nstc-export-page-snapshot__content {
103
- padding: 16px;
104
- background: #fff;
105
- border: 1px solid #e4e7ed;
106
- border-radius: 4px;
107
- }
108
- </style>