vue3-element-plus-app-chu 0.0.19 → 0.0.20

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": "vue3-element-plus-app-chu",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="art-table-header">
2
+ <div class="art-table-header" :class="`art-table-header--${localSettings.size}`">
3
3
  <div class="art-table-header__left">
4
4
  <slot name="title">
5
5
  <span v-if="title" class="art-table-header__title">{{ title }}</span>
@@ -36,6 +36,7 @@
36
36
 
37
37
  <ElDropdown
38
38
  v-if="shouldShow('size')"
39
+ :size="localSettings.size"
39
40
  trigger="click"
40
41
  :teleported="false"
41
42
  @command="changeSize"
@@ -121,6 +122,7 @@
121
122
 
122
123
  <ElCheckbox
123
124
  class="art-table-header__column-check"
125
+ :size="localSettings.size"
124
126
  :model-value="getColumnVisibility(column)"
125
127
  :disabled="column.disabled"
126
128
  @update:model-value="changeVisibility(index, $event)"
@@ -177,6 +179,7 @@
177
179
  <div class="art-table-header__settings">
178
180
  <ElCheckbox
179
181
  v-if="showZebra"
182
+ :size="localSettings.size"
180
183
  :model-value="localSettings.stripe"
181
184
  @update:model-value="changeBooleanSetting('stripe', $event)"
182
185
  >
@@ -184,6 +187,7 @@
184
187
  </ElCheckbox>
185
188
  <ElCheckbox
186
189
  v-if="showBorder"
190
+ :size="localSettings.size"
187
191
  :model-value="localSettings.border"
188
192
  @update:model-value="changeBooleanSetting('border', $event)"
189
193
  >
@@ -191,6 +195,7 @@
191
195
  </ElCheckbox>
192
196
  <ElCheckbox
193
197
  v-if="showHeaderBackground"
198
+ :size="localSettings.size"
194
199
  :model-value="localSettings.headerBackground"
195
200
  @update:model-value="changeBooleanSetting('headerBackground', $event)"
196
201
  >
@@ -400,6 +405,10 @@ function clearDrag() {
400
405
 
401
406
  <style scoped>
402
407
  .art-table-header {
408
+ --art-table-control-size: 32px;
409
+ --art-table-move-width: 26px;
410
+ --art-table-move-height: 28px;
411
+ --art-table-column-height: 34px;
403
412
  display: flex;
404
413
  align-items: center;
405
414
  justify-content: space-between;
@@ -409,6 +418,20 @@ function clearDrag() {
409
418
  color: var(--art-table-text-color, var(--el-text-color-primary, #303133));
410
419
  }
411
420
 
421
+ .art-table-header--small {
422
+ --art-table-control-size: 24px;
423
+ --art-table-move-width: 22px;
424
+ --art-table-move-height: 24px;
425
+ --art-table-column-height: 26px;
426
+ }
427
+
428
+ .art-table-header--large {
429
+ --art-table-control-size: 40px;
430
+ --art-table-move-width: 30px;
431
+ --art-table-move-height: 32px;
432
+ --art-table-column-height: 42px;
433
+ }
434
+
412
435
  .art-table-header__left,
413
436
  .art-table-header__right {
414
437
  display: flex;
@@ -435,8 +458,8 @@ function clearDrag() {
435
458
  align-items: center;
436
459
  justify-content: center;
437
460
  flex-shrink: 0;
438
- width: 32px;
439
- height: 32px;
461
+ width: var(--art-table-control-size);
462
+ height: var(--art-table-control-size);
440
463
  padding: 0;
441
464
  border: 0;
442
465
  border-radius: var(--art-table-toolbar-radius, 6px);
@@ -479,7 +502,7 @@ function clearDrag() {
479
502
  display: flex;
480
503
  align-items: center;
481
504
  gap: 8px;
482
- min-height: 34px;
505
+ min-height: var(--art-table-column-height);
483
506
  padding: 0 4px;
484
507
  border-radius: 4px;
485
508
  background: transparent;
@@ -523,8 +546,8 @@ function clearDrag() {
523
546
  }
524
547
 
525
548
  .art-table-header__move {
526
- width: 22px;
527
- height: 24px;
549
+ width: var(--art-table-move-width);
550
+ height: var(--art-table-move-height);
528
551
  border-radius: 4px;
529
552
  background: transparent;
530
553
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  `src/view/dcps` 下每个业务页面统一保持三个文件,不再拆分子组件、工具文件:
4
4
 
5
- 跨页面共用的运行时配置(默认查询日期、审批人等)和公共日期工具统一放在 `src/view/dcps/runtime.ts`,页面按需通过 `../runtime`(分组子页面为 `../../runtime`)引入;各页面不再内联重复定义。
5
+ 跨页面共用的运行时配置统一放在 `src/view/dcps/runtime.ts`,仅默认导出一个对象,包含 `date`(共用业务日期,格式为 `YYYYMMDD`)、`approverId`(工号)和 `approverName`(姓名)。日期在模块加载时按上海时区生成一次,预报、匡算、核销及授权查询的默认日期均使用同一个 `date`;授权日期范围的开始和结束默认都取该值。页面通过 `import dcpsRuntime from '../runtime'`(分组子页面为 `../../runtime`)引入,不再单独导出日期工具或模块配置。
6
6
 
7
7
  一级菜单为分组时,页面放在该分组目录下。例如“注资/预注资管理”的两个页面分别位于 `funding/injection/` 和 `funding/balance/`,各自保留下面三个文件。
8
8
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
3
- import { ElMessage } from 'element-plus'
3
+ import { ElConfigProvider, ElMessage } from 'element-plus'
4
4
  import { ArtDataTable, type ColumnOption, type PaginationOptions, type TableSettings } from '@/components/table'
5
5
  import API from './api'
6
- import { authRuntime } from '../runtime'
6
+ import dcpsRuntime from '../runtime'
7
7
  import type { AuthorizationFilters, AuthorizationQueryParams, AuthorizationTask } from './typs'
8
8
 
9
9
  defineOptions({ name: 'DcpsAuthPage' })
@@ -21,8 +21,8 @@ const defaultFilters: AuthorizationFilters = {
21
21
  }
22
22
  // 默认创建日期范围:[开始日期, 结束日期],格式为 YYYYMMDD,查询重置时使用。
23
23
  const defaultDates: [string, string] = [
24
- authRuntime.createTmBegin,
25
- authRuntime.createTmEnd,
24
+ dcpsRuntime.date,
25
+ dcpsRuntime.date,
26
26
  ]
27
27
 
28
28
  // 重复输入项共用一份配置,依次为字段、名称和长度限制。
@@ -270,8 +270,8 @@ const getQueryFilters = () => ({
270
270
  payeeName: filters.value.payeeName.trim(), // 收款人名称。
271
271
  platfSeqNo: filters.value.platfSeqNo.trim(), // 平台流水号。
272
272
  taskSts: filters.value.taskSts, // 任务状态,空值表示全部。
273
- createTmBegin: dateRange.value?.[0] || authRuntime.createTmBegin, // 创建开始日期,格式为 YYYYMMDD,未选择时取默认值。
274
- createTmEnd: dateRange.value?.[1] || dateRange.value?.[0] || authRuntime.createTmEnd, // 创建结束日期,格式为 YYYYMMDD,缺失时回退到开始日期或默认值。
273
+ createTmBegin: dateRange.value?.[0] || dcpsRuntime.date, // 创建开始日期,格式为 YYYYMMDD,未选择时取默认值。
274
+ createTmEnd: dateRange.value?.[1] || dateRange.value?.[0] || dcpsRuntime.date, // 创建结束日期,格式为 YYYYMMDD,缺失时回退到开始日期或默认值。
275
275
  })
276
276
  // 仅查询、重置时更新;翻页和刷新沿用这份条件。
277
277
  let appliedQuery = getQueryFilters()
@@ -355,8 +355,8 @@ const openDecisionDialog = (task: any) => {
355
355
  const submitDecision = async (decision: Decision) => {
356
356
  const platfSeqNo = selectedTask.value?.platfSeqNo?.trim() // 本次审批任务的平台流水号,用于唯一定位任务。
357
357
  if (!canApprove(selectedTask.value) || !platfSeqNo || pendingDecision.value || loading.value) return
358
- const approverId = authRuntime.approverId.trim() // 本次提交的审批人工号,同时作为公共用户标识。
359
- const approverName = authRuntime.approverName.trim() // 本次提交的审批人姓名。
358
+ const approverId = dcpsRuntime.approverId.trim() // 本次提交的审批人工号,同时作为公共用户标识。
359
+ const approverName = dcpsRuntime.approverName.trim() // 本次提交的审批人姓名。
360
360
  const remarkText = remark.value.trim() // 去除首尾空白后的备注或拒绝原因。
361
361
  if (!approverId || !approverName) {
362
362
  ElMessage.warning('审批人信息未设置')
@@ -406,6 +406,7 @@ onBeforeUnmount(() => {
406
406
  </script>
407
407
 
408
408
  <template>
409
+ <ElConfigProvider :size="tableSettings.size">
409
410
  <main class="dcps-page">
410
411
  <!-- 查询条件:控件尺寸跟随表格设置,卡片内边距为 10px,点击查询生效。 -->
411
412
  <el-card v-show="showSearchBar" class="authorization-search" shadow="never" :body-style="{ padding: '10px' }">
@@ -474,7 +475,6 @@ onBeforeUnmount(() => {
474
475
  <el-button
475
476
  text
476
477
  bg
477
- size="small"
478
478
  type="primary"
479
479
  :disabled="!canApprove(row) || loading || !!pendingDecision"
480
480
  @click.stop="openDecisionDialog(row)"
@@ -535,9 +535,8 @@ onBeforeUnmount(() => {
535
535
  </el-scrollbar>
536
536
 
537
537
  <template #footer>
538
- <el-button size="small" @click="detailDialogVisible = false">关闭</el-button>
538
+ <el-button @click="detailDialogVisible = false">关闭</el-button>
539
539
  <el-button
540
- size="small"
541
540
  type="primary"
542
541
  :disabled="loading || !!pendingDecision || !canApprove(detailTask)"
543
542
  @click="openDecisionDialog(detailTask)"
@@ -571,12 +570,12 @@ onBeforeUnmount(() => {
571
570
  <el-row :gutter="14">
572
571
  <el-col :xs="24" :sm="12">
573
572
  <el-form-item label="审批人工号">
574
- <el-input :model-value="authRuntime.approverId" disabled />
573
+ <el-input :model-value="dcpsRuntime.approverId" disabled />
575
574
  </el-form-item>
576
575
  </el-col>
577
576
  <el-col :xs="24" :sm="12">
578
577
  <el-form-item label="审批人姓名">
579
- <el-input :model-value="authRuntime.approverName" readonly />
578
+ <el-input :model-value="dcpsRuntime.approverName" readonly />
580
579
  </el-form-item>
581
580
  </el-col>
582
581
  </el-row>
@@ -608,6 +607,7 @@ onBeforeUnmount(() => {
608
607
  </template>
609
608
  </el-dialog>
610
609
  </main>
610
+ </ElConfigProvider>
611
611
  </template>
612
612
 
613
613
  <style scoped>
@@ -1,14 +1,16 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
3
- import { ElMessage } from 'element-plus'
3
+ import { ElConfigProvider, ElMessage } from 'element-plus'
4
4
  import API from './api'
5
- import { getToday } from '../runtime'
5
+ import dcpsRuntime from '../runtime'
6
6
  import type {
7
7
  EstimationAmounts, EstimationCell, EstimationPredRow, EstimationQueryParams, EstimationTranRow,
8
8
  } from './typs'
9
9
 
10
10
  defineOptions({ name: 'DcpsEstimationPage' })
11
11
 
12
+ const tableSize = 'small'
13
+
12
14
  // 数字人民币头寸匡算页面:
13
15
  // 查询条件为交易日期加上今日预计调拨收入、支出金额;交易日期变化后调用
14
16
  // 历史预计调拨金额接口(140503004)预填金额,允许手工调整后重新匡算。
@@ -150,7 +152,7 @@ const cellOf = (position: string): EstimationCell => ({
150
152
  })
151
153
 
152
154
  // 查询条件:日期默认当天;预计调拨收支金额由历史接口预填。
153
- const queryForm = reactive({ tranDate: getToday(), predictAllotInAmt: '', predictAllotOutAmt: '' })
155
+ const queryForm = reactive({ tranDate: dcpsRuntime.date, predictAllotInAmt: '', predictAllotOutAmt: '' })
154
156
  // 各金额输入的校验提示,空字符串表示没有错误。
155
157
  const formError = reactive({ predictAllotInAmt: '', predictAllotOutAmt: '' })
156
158
 
@@ -340,6 +342,7 @@ onBeforeUnmount(() => {
340
342
  </script>
341
343
 
342
344
  <template>
345
+ <ElConfigProvider :size="tableSize">
343
346
  <main class="dcps-page">
344
347
  <!-- 顶部操作区:交易日期选择与导出、查询入口(收支金额在下方表格内填写)。 -->
345
348
  <el-card class="estimation-header" shadow="never" :body-style="{ padding: '10px 14px' }">
@@ -542,7 +545,7 @@ onBeforeUnmount(() => {
542
545
  <div v-loading="detailLoading" class="detail-tables">
543
546
  <!-- 预报信息明细;列表为空时展示统一空态。 -->
544
547
  <div class="dialog-section-title">预报信息</div>
545
- <el-table :data="detailPredList" size="small" border max-height="240px" empty-text="暂无预报信息">
548
+ <el-table :data="detailPredList" :size="tableSize" border max-height="240px" empty-text="暂无预报信息">
546
549
  <el-table-column label="预报流水号" min-width="150" show-overflow-tooltip>
547
550
  <template #default="{ row }">{{ displayText(row.predRefNo) }}</template>
548
551
  </el-table-column>
@@ -580,7 +583,7 @@ onBeforeUnmount(() => {
580
583
 
581
584
  <!-- 流水信息明细;失败的详情可重新打开弹窗重试。 -->
582
585
  <div class="dialog-section-title">流水信息</div>
583
- <el-table :data="detailTranList" size="small" border max-height="240px" empty-text="暂无流水信息">
586
+ <el-table :data="detailTranList" :size="tableSize" border max-height="240px" empty-text="暂无流水信息">
584
587
  <el-table-column label="交易参考号" min-width="150" show-overflow-tooltip>
585
588
  <template #default="{ row }">{{ displayText(row.refNo) }}</template>
586
589
  </el-table-column>
@@ -622,6 +625,7 @@ onBeforeUnmount(() => {
622
625
  </template>
623
626
  </el-dialog>
624
627
  </main>
628
+ </ElConfigProvider>
625
629
  </template>
626
630
 
627
631
  <style scoped>
@@ -22,9 +22,9 @@ const recallForecastRow = (predRefNo?: string): ForecastRowType | null => {
22
22
  <script setup lang="ts">
23
23
  import { computed, onActivated, onBeforeUnmount, reactive, ref, watch } from 'vue'
24
24
  import { useRouter } from 'vue-router'
25
- import { ElMessage, ElMessageBox } from 'element-plus'
25
+ import { ElConfigProvider, ElMessage, ElMessageBox } from 'element-plus'
26
26
  import API from './api'
27
- import { forecastRuntime, getToday } from '../runtime'
27
+ import dcpsRuntime from '../runtime'
28
28
  import { ArtDataTable, type ColumnOption, type PaginationOptions, type TableSettings } from '@/components/table'
29
29
  import type {
30
30
  ForecastCreateBody,
@@ -145,14 +145,13 @@ const compareAmounts = (left: string, right: string): number => {
145
145
  return aValue < bValue ? -1 : aValue > bValue ? 1 : 0
146
146
  }
147
147
 
148
- /** 新增和导入使用的表单初始值;日期默认取当天。 */
148
+ /** 新增和导入使用的表单初始值;日期取共用运行时配置。 */
149
149
  const createFormValues = (): ForecastFormValues => {
150
- const today = getToday()
151
150
  return {
152
151
  billDate: '', billNo: '', busiType: '', clientName: '', clientType: '',
153
152
  competAcct: '', competName: '', custInfoSeq: '', groundBranch: '', groundBranchName: '',
154
- linkMan: '', payChannel: '', payDirec: '', phoneNo: '', predAmt: '', predDate: today,
155
- predName: '', predOrgName: '', purpose: '', remark: '', tranDate: today,
153
+ linkMan: '', payChannel: '', payDirec: '', phoneNo: '', predAmt: '', predDate: dcpsRuntime.date,
154
+ predName: '', predOrgName: '', purpose: '', remark: '', tranDate: dcpsRuntime.date,
156
155
  }
157
156
  }
158
157
 
@@ -214,7 +213,7 @@ onBeforeUnmount(() => { disposed = true })
214
213
 
215
214
  type ListMutation = 'delete' | null
216
215
  const createFilters = (): ForecastFilters => ({
217
- tranDate: forecastRuntime.tranDate, clientName: '', competName: '', payDirec: '', busiType: '', payChannel: '',
216
+ tranDate: dcpsRuntime.date, clientName: '', competName: '', payDirec: '', busiType: '', payChannel: '',
218
217
  groundBranch: '', predStatus: '', verifyStatus: '', startTransAmt: '', endTransAmt: '', sortRule: '',
219
218
  })
220
219
  const listFilters = ref(createFilters())
@@ -372,6 +371,7 @@ async function deleteRecords(records: ForecastRow[]) {
372
371
  try {
373
372
  await ElMessageBox.confirm(`确认删除选中的 ${references.length} 条预报记录?删除后将重新查询列表。`, '删除预报', {
374
373
  confirmButtonText: '确认删除', cancelButtonText: '取消', type: 'warning', distinguishCancelAndClose: true,
374
+ buttonSize: listTableSettings.value.size,
375
375
  })
376
376
  if (disposed) return
377
377
  ensureSuccess(await API.deleteApi(references), '删除预报失败')
@@ -482,8 +482,8 @@ const fieldPlaceholder = (field: EditorField) => {
482
482
  const initializeForm = () => {
483
483
  const nextValues = createFormValues()
484
484
  if (editorMode.value === 'create') {
485
- nextValues.tranDate = props.tranDate || getToday()
486
- nextValues.predDate = getToday()
485
+ nextValues.tranDate = props.tranDate || dcpsRuntime.date
486
+ nextValues.predDate = dcpsRuntime.date
487
487
  } else {
488
488
  for (const key of Object.keys(nextValues) as FieldKey[]) {
489
489
  const value = initialFieldValue(key)
@@ -678,6 +678,7 @@ onActivated(() => {
678
678
  </script>
679
679
 
680
680
  <template>
681
+ <ElConfigProvider :size="listTableSettings.size">
681
682
  <!-- 新增 / 修改页 -->
682
683
  <main v-if="isEditor" class="page-shell">
683
684
  <el-card class="shell-header" shadow="never" :body-style="{ padding: '10px' }">
@@ -700,7 +701,7 @@ onActivated(() => {
700
701
  </el-alert>
701
702
  <template v-else>
702
703
  <p class="editor-note">金额单位为元,方向、业务类型、支付渠道和客户类型按业务代码填写。</p>
703
- <el-form :model="form" size="small" label-position="top" :disabled="editorDisabled" @submit.prevent="submit">
704
+ <el-form :model="form" label-position="top" :disabled="editorDisabled" @submit.prevent="submit">
704
705
  <section v-for="group in visibleGroups" :key="group.title" class="editor-group" :aria-label="group.title">
705
706
  <h3>{{ group.title }}</h3>
706
707
  <div class="editor-fields">
@@ -780,7 +781,7 @@ onActivated(() => {
780
781
  <div v-loading="detailLoading" class="detail-scroll">
781
782
  <div v-if="detailError" class="detail-error" role="alert">
782
783
  <el-alert :title="detailError" type="error" :closable="false" show-icon />
783
- <el-button size="small" :disabled="detailLoading" @click="loadDetail">重新加载</el-button>
784
+ <el-button :disabled="detailLoading" @click="loadDetail">重新加载</el-button>
784
785
  </div>
785
786
  <div v-else-if="detail" class="detail-content">
786
787
  <!-- group 为当前详情分组,fields 中的每项对应一个字段。 -->
@@ -879,6 +880,7 @@ onActivated(() => {
879
880
  </ArtDataTable>
880
881
  </div>
881
882
  </main>
883
+ </ElConfigProvider>
882
884
  </template>
883
885
 
884
886
  <style scoped>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
3
- import { ElMessage } from 'element-plus'
3
+ import { ElConfigProvider, ElMessage } from 'element-plus'
4
4
  import { ArtDataTable, type ColumnOption, type PaginationOptions, type TableSettings } from '@/components/table'
5
5
  import API from './api'
6
6
  import type { InjectionFilters, InjectionQueryParams, InjectionRecord } from './typs'
@@ -318,6 +318,7 @@ onBeforeUnmount(() => {
318
318
  </script>
319
319
 
320
320
  <template>
321
+ <ElConfigProvider :size="tableSettings.size">
321
322
  <main class="dcps-page">
322
323
  <!-- 查询条件:控件尺寸跟随表格设置,卡片内边距为 10px,点击查询生效。 -->
323
324
  <el-card v-show="showSearchBar" class="injection-search" shadow="never" :body-style="{ padding: '10px' }">
@@ -415,6 +416,7 @@ onBeforeUnmount(() => {
415
416
  </template>
416
417
  </el-dialog>
417
418
  </main>
419
+ </ElConfigProvider>
418
420
  </template>
419
421
 
420
422
  <style scoped>
@@ -1,35 +1,16 @@
1
1
  /**
2
- * dcps 各页面共用的运行时配置;默认日期、审批人等全局默认值统一维护在本文件,
3
- * 页面通过 `../runtime`(或分组子页面的 `../../runtime`)按需引入。
2
+ * DCPS 各页面共用的运行时配置,仅默认导出一个对象。
3
+ * 页面通过 `import dcpsRuntime from '../runtime'` 引入;分组子页面使用 `../../runtime`。
4
4
  */
5
5
 
6
- /**
7
- * 业务日期始终按上海时区生成,不依赖浏览器所在时区,格式为 YYYYMMDD。
8
- * 供各页面的默认查询日期和新增表单初始值使用。
9
- */
10
- export const getToday = (): string => {
11
- const parts = new Intl.DateTimeFormat('en-CA', {
12
- timeZone: 'Asia/Shanghai', year: 'numeric', month: '2-digit', day: '2-digit',
13
- }).formatToParts(new Date())
14
- const read = (type: Intl.DateTimeFormatPartTypes) => parts.find((part) => part.type === type)?.value || ''
15
- return read('year') + read('month') + read('day')
16
- }
17
-
18
- /** 预报页面的默认查询日期;日期格式为 YYYYMMDD。 */
19
- export const forecastRuntime = {
20
- tranDate: getToday(), // 默认交易日期,查询和重置时使用。
21
- }
22
-
23
- /** 授权页面的审批人和默认创建日期;日期格式为 YYYYMMDD,当前使用固定日期。 */
24
- export const authRuntime = {
25
- approverId: '10092', // 审批人工号。
26
- approverName: '王干事', // 审批人姓名。
27
- createTmBegin: '20261012', // 默认创建开始日期。
28
- createTmEnd: '20261012', // 默认创建结束日期。
29
- }
6
+ // 模块加载时按上海时区生成一次日期,所有页面共用,格式为 YYYYMMDD。
7
+ const dateParts = new Intl.DateTimeFormat('en-CA', {
8
+ timeZone: 'Asia/Shanghai', year: 'numeric', month: '2-digit', day: '2-digit',
9
+ }).formatToParts(new Date())
10
+ const readDatePart = (type: Intl.DateTimeFormatPartTypes) => dateParts.find((part) => part.type === type)?.value || ''
30
11
 
31
- /** 按模块名聚合的运行时配置;也可从本文件直接引入单个模块的配置。 */
32
12
  export default {
33
- forecast: forecastRuntime,
34
- auth: authRuntime,
13
+ date: readDatePart('year') + readDatePart('month') + readDatePart('day'), // 共用业务日期。
14
+ approverId: '10092', // 工号。
15
+ approverName: '王干事', // 姓名。
35
16
  }
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
3
- import { ElMessage, ElMessageBox } from 'element-plus'
3
+ import { ElConfigProvider, ElMessage, ElMessageBox } from 'element-plus'
4
4
  import API from './api'
5
- import { getToday } from '../runtime'
5
+ import dcpsRuntime from '../runtime'
6
6
  import { ArtDataTable, type ColumnOption, type PaginationOptions, type TableSettings } from '@/components/table'
7
7
  import type {
8
8
  CancelWriteOffPredItem, EditVerifyFormValues, FlowRow, ForecastRow, WriteOffFlowInput, WriteOffForecastItem, WriteOffItemInput,
@@ -246,7 +246,10 @@ const cancelWriteOff = async () => {
246
246
  await ElMessageBox.confirm(
247
247
  `确认撤销选中的${summaryParts.join('、')}核销?撤销后将重新查询两个列表。`,
248
248
  '撤销核销',
249
- { confirmButtonText: '确认撤销', cancelButtonText: '取消', type: 'warning', distinguishCancelAndClose: true },
249
+ {
250
+ confirmButtonText: '确认撤销', cancelButtonText: '取消', type: 'warning',
251
+ buttonSize: forecastTableSettings.value.size, distinguishCancelAndClose: true,
252
+ },
250
253
  )
251
254
  } catch { // 用户取消或关闭确认框时静默返回。
252
255
  return
@@ -305,7 +308,7 @@ type ForecastAppliedQuery = {
305
308
 
306
309
  // 默认查询条件;空字符串和空数组表示不限制该条件,重置时恢复此配置。
307
310
  const createForecastFilters = () => ({
308
- tranDate: getToday(),
311
+ tranDate: dcpsRuntime.date,
309
312
  acctNo: '',
310
313
  banchPre: '',
311
314
  busiType: '',
@@ -317,7 +320,7 @@ const createForecastFilters = () => ({
317
320
  verifyStatusList: [] as string[],
318
321
  })
319
322
  const forecastFilters = ref(createForecastFilters())
320
- let forecastAppliedQuery: ForecastAppliedQuery = { tranDate: getToday() }
323
+ let forecastAppliedQuery: ForecastAppliedQuery = { tranDate: dcpsRuntime.date }
321
324
 
322
325
  // 重复输入项共用一份配置,依次为字段、名称和输入框长度限制。
323
326
  const forecastTextFilters = [
@@ -514,7 +517,7 @@ type FlowAppliedQuery = {
514
517
 
515
518
  // 默认查询条件;空字符串表示不限制该条件,重置时恢复此配置。
516
519
  const createFlowFilters = () => ({
517
- tranDate: getToday(),
520
+ tranDate: dcpsRuntime.date,
518
521
  orgName: '',
519
522
  payerName: '',
520
523
  payeeName: '',
@@ -524,7 +527,7 @@ const createFlowFilters = () => ({
524
527
  verifyStatus: '',
525
528
  })
526
529
  const flowFilters = ref(createFlowFilters())
527
- let flowAppliedQuery: FlowAppliedQuery = { tranDate: getToday() }
530
+ let flowAppliedQuery: FlowAppliedQuery = { tranDate: dcpsRuntime.date }
528
531
 
529
532
  // 重复输入项共用一份配置,依次为字段、名称和输入框长度限制。
530
533
  const flowTextFilters = [
@@ -678,6 +681,7 @@ onBeforeUnmount(() => {
678
681
  </script>
679
682
 
680
683
  <template>
684
+ <ElConfigProvider :size="forecastTableSettings.size">
681
685
  <main class="dcps-page">
682
686
  <!-- 上方:预报信息表格,核销、撤销核销按钮统一放在本表格工具栏。 -->
683
687
  <section class="view-region">
@@ -810,6 +814,7 @@ onBeforeUnmount(() => {
810
814
  </section>
811
815
 
812
816
  <!-- 下方:流水信息表格,勾选行与预报勾选合并提交核销或撤销核销。 -->
817
+ <ElConfigProvider :size="flowTableSettings.size">
813
818
  <section class="view-region">
814
819
  <!-- 查询条件:控件尺寸跟随表格设置,卡片内边距为 10px,点击查询生效。 -->
815
820
  <el-card v-show="flowShowSearchBar" class="write-off-search" shadow="never" :body-style="{ padding: '10px' }">
@@ -875,6 +880,7 @@ onBeforeUnmount(() => {
875
880
  </ArtDataTable>
876
881
  </div>
877
882
  </section>
883
+ </ElConfigProvider>
878
884
 
879
885
  <!-- 核销弹窗:预报信息逐条确认核销金额,流水信息按原值一并提交。 -->
880
886
  <el-dialog
@@ -888,21 +894,21 @@ onBeforeUnmount(() => {
888
894
  append-to-body
889
895
  >
890
896
  <div class="dialog-section-title">预报信息</div>
891
- <el-table :data="writeOffPredItems" size="small" border max-height="260px">
897
+ <el-table :data="writeOffPredItems" :size="forecastTableSettings.size" border max-height="260px">
892
898
  <el-table-column label="预报流水号" prop="predRefNo" min-width="190" show-overflow-tooltip />
893
899
  <el-table-column label="预报金额(元)" width="160" align="right">
894
900
  <template #default="{ row }"><span class="amount-cell">{{ formatAmount(row.predAmt) }}</span></template>
895
901
  </el-table-column>
896
902
  <el-table-column label="核销金额(元)" width="200">
897
903
  <template #default="{ row }">
898
- <el-input v-model="row.amount" size="small" inputmode="decimal" :maxlength="40" placeholder="输入核销金额" />
904
+ <el-input v-model="row.amount" inputmode="decimal" :maxlength="40" placeholder="输入核销金额" />
899
905
  </template>
900
906
  </el-table-column>
901
907
  </el-table>
902
908
 
903
909
  <template v-if="writeOffFlowItems.length">
904
910
  <div class="dialog-section-title">流水信息</div>
905
- <el-table :data="writeOffFlowItems" size="small" border max-height="220px">
911
+ <el-table :data="writeOffFlowItems" :size="flowTableSettings.size" border max-height="220px">
906
912
  <el-table-column label="流水号" prop="refNo" min-width="190" show-overflow-tooltip />
907
913
  <el-table-column label="交易金额(元)" width="180" align="right">
908
914
  <template #default="{ row }"><span class="amount-cell">{{ formatAmount(row.tranAmt) }}</span></template>
@@ -918,6 +924,7 @@ onBeforeUnmount(() => {
918
924
  </template>
919
925
  </el-dialog>
920
926
  </main>
927
+ </ElConfigProvider>
921
928
  </template>
922
929
 
923
930
  <style scoped>