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

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.
@@ -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>