verce-vue-test 0.0.123 → 0.0.124

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": "verce-vue-test",
3
- "version": "0.0.123",
3
+ "version": "0.0.124",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -24,6 +24,7 @@
24
24
  "author": "",
25
25
  "license": "ISC",
26
26
  "dependencies": {
27
+ "dayjs": "^1.11.20",
27
28
  "echarts": "^6.1.0",
28
29
  "element-plus": "2.2.27",
29
30
  "pinia": "2.1.7",
@@ -306,7 +306,8 @@ function buildForeignPositionForecastMutationBody(value: ForecastEditorValue) {
306
306
  payDirec: value.payDirection.trim(),
307
307
  paymentRoute: value.paymentRoute.trim(),
308
308
  phoneNo: value.phoneNumber.trim(),
309
- predAmt: String(value.predAmount).replaceAll(',', ''),
309
+ // 旧 JSP 去除千分位后仍保留两位小数,新增和修改报文保持相同格式。
310
+ predAmt: value.predAmount.toFixed(2),
310
311
  predCode: value.forecasterCode.trim(),
311
312
  predDate: toMutationDate(value.forecastTime),
312
313
  predDept: value.forecastDepartment.trim(),
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import dayjs from 'dayjs'
2
3
  import { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'
3
4
  import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
4
5
  import {
@@ -531,16 +532,14 @@ function handleCorporateCustomerSelect() {
531
532
 
532
533
  function handleValueDateChange(value: string) {
533
534
  if (!value || !form.currency) return
534
- const date = new Date(`${value}T12:00:00`)
535
- if (date.getDay() === 0 || date.getDay() === 6) {
535
+ const weekday = dayjs(value).day()
536
+ if (weekday === 0 || weekday === 6) {
536
537
  ElMessage.warning(`当前所选日期为币种 [${form.currency}] 的节假日`)
537
538
  }
538
539
  }
539
540
 
540
541
  function disablePastDate(date: Date) {
541
- const today = new Date()
542
- today.setHours(0, 0, 0, 0)
543
- return date.getTime() < today.getTime()
542
+ return dayjs(date).isBefore(dayjs(), 'day')
544
543
  }
545
544
 
546
545
  async function handleSubmit() {
@@ -548,7 +547,7 @@ async function handleSubmit() {
548
547
  const valid = await formRef.value?.validate().catch(() => false)
549
548
  if (!valid) return
550
549
 
551
- if (forecastDate.value > form.valueDate) {
550
+ if (dayjs(forecastDate.value).isAfter(dayjs(form.valueDate), 'day')) {
552
551
  ElMessage.warning('预报日期不能晚于起息日')
553
552
  return
554
553
  }
@@ -633,6 +632,7 @@ onBeforeUnmount(() => {
633
632
  filterable
634
633
  remote
635
634
  reserve-keyword
635
+ :allow-create="false"
636
636
  :remote-method="searchOrganizations"
637
637
  :loading="organizationLoading"
638
638
  placeholder="请选择机构"
@@ -648,19 +648,19 @@ onBeforeUnmount(() => {
648
648
  </el-form-item>
649
649
 
650
650
  <el-form-item label="预报人员">
651
- <el-input :model-value="forecasterName" readonly />
651
+ <el-input class="legacy-readonly-input" :model-value="forecasterName" readonly />
652
652
  </el-form-item>
653
653
 
654
654
  <el-form-item label="预报机构">
655
- <el-input :model-value="forecastDepartment" readonly />
655
+ <el-input class="legacy-readonly-input" :model-value="forecastDepartment" readonly />
656
656
  </el-form-item>
657
657
 
658
658
  <el-form-item label="预报日期">
659
- <el-input :model-value="forecastDate" readonly />
659
+ <el-input class="legacy-readonly-input" :model-value="forecastDate" readonly />
660
660
  </el-form-item>
661
661
 
662
662
  <el-form-item label="联系电话">
663
- <el-input :model-value="phoneNumber" readonly />
663
+ <el-input class="legacy-readonly-input" :model-value="phoneNumber" readonly />
664
664
  </el-form-item>
665
665
 
666
666
  <el-form-item label="起息日" prop="valueDate">
@@ -669,6 +669,7 @@ onBeforeUnmount(() => {
669
669
  type="date"
670
670
  value-format="YYYY-MM-DD"
671
671
  format="YYYY-MM-DD"
672
+ :editable="false"
672
673
  :disabled-date="disablePastDate"
673
674
  placeholder="请选择"
674
675
  @change="handleValueDateChange"
@@ -680,7 +681,13 @@ onBeforeUnmount(() => {
680
681
  </el-form-item>
681
682
 
682
683
  <el-form-item label="币种" prop="currency" class="editor-row-start">
683
- <el-select v-model="form.currency" filterable placeholder="请选择" @change="handleCurrencyChange">
684
+ <el-select
685
+ v-model="form.currency"
686
+ filterable
687
+ :allow-create="false"
688
+ placeholder="请选择"
689
+ @change="handleCurrencyChange"
690
+ >
684
691
  <el-option v-for="option in currencyOptions" :key="option.value" v-bind="option" />
685
692
  </el-select>
686
693
  </el-form-item>
@@ -823,6 +830,7 @@ onBeforeUnmount(() => {
823
830
  :loading="accountBankLoading"
824
831
  :placeholder="bankAccountDisabled ? '请先选择汇款路径' : '请选择'"
825
832
  filterable
833
+ :allow-create="false"
826
834
  clearable
827
835
  :persistent="false"
828
836
  @visible-change="handleAccountBankVisibleChange"
@@ -898,6 +906,13 @@ onBeforeUnmount(() => {
898
906
  background: #f3f6fb;
899
907
  }
900
908
 
909
+ .forecast-editor-form {
910
+ box-sizing: border-box;
911
+ width: 100%;
912
+ max-width: 1440px;
913
+ margin: 0 auto;
914
+ }
915
+
901
916
  .editor-sections {
902
917
  display: grid;
903
918
  gap: 12px;
@@ -1023,6 +1038,17 @@ onBeforeUnmount(() => {
1023
1038
  -webkit-text-fill-color: #8a94a3;
1024
1039
  }
1025
1040
 
1041
+ .forecast-editor-form :deep(.legacy-readonly-input .el-input__wrapper) {
1042
+ cursor: not-allowed;
1043
+ background: #f7f9fc;
1044
+ box-shadow: 0 0 0 1px #e2e7ee inset;
1045
+ }
1046
+
1047
+ .forecast-editor-form :deep(.legacy-readonly-input .el-input__inner) {
1048
+ cursor: not-allowed;
1049
+ color: #8a94a3;
1050
+ }
1051
+
1026
1052
  .forecast-editor-form :deep(.el-form-item__error) {
1027
1053
  position: static;
1028
1054
  box-sizing: border-box;