Ver Fonte

feat:ib- 申请历史

ljc há 2 meses atrás
pai
commit
ccd5f72c53

+ 1 - 1
composables/useMenuSplit.ts

@@ -235,7 +235,7 @@ export function useMenuSplit() {
     const ibBaseMenus = computed<MenuItem[]>(() => [
         {
             isOpenMenu: false,
-            path: '/',
+            path: '/pages/ib/index',
             label: 'Home.page_ib.item1',
             icon: 'crm-mb',
         },

+ 0 - 4
pages/ib/agentList.vue

@@ -8,10 +8,6 @@
           <uni-easyinput v-model="search.cId" placeholder="CID" />
         </view>
         <view class="search-bar">
-          <button type="primary" class="search-button" @click="addSub">
-            <cwg-icon name="icon_add" :size="18" color="#fff"></cwg-icon>
-            {{t('Ib.Report.Title5')}}
-          </button>
         </view>
       </view>
       <cwg-tabel

+ 438 - 0
pages/ib/const/recording.ts

@@ -0,0 +1,438 @@
+import { t } from '@/utils/i18n'
+
+export const columnList  = {
+  1: [
+    { prop: 'platform', label: t('Ib.Recording.Platform') },
+    {
+      prop: 'accountType', label: t('Ib.Recording.AccountType'),
+      type: 'tag',
+      tagMap: {
+        1: t('AccountType.ClassicAccount'),
+        2: t('AccountType.SeniorAccount'),
+        7: t('AccountType.StandardAccount'),
+        8: t('AccountType.CentAccount'),
+      },
+    },
+    { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
+    {
+      prop: 'leverage', label: t('Ib.Recording.Lever'),
+      formatter: ({ row }) => row.leverage ? `1:${row.leverage}` : '--',
+    },
+    { prop: 'commission', label: t('Ib.Recording.Commission') },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Ib.Recording.Status'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    {
+      prop: 'approveDesc', label: t('Ib.Recording.Note'),
+      slot: 'approveDesc',
+    },
+  ],
+  2: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    {
+      prop: 'oldLeverage', label: t('Ib.Recording.OldLever'),
+      formatter: ({ row }) => row.oldLeverage ? `1:${row.oldLeverage}` : '--',
+    },
+    {
+      prop: 'newLeverage', label: t('Ib.Recording.NewLever'),
+      formatter: ({ row }) => row.newLeverage ? `1:${row.newLeverage}` : '--',
+    },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Ib.Recording.Status'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    {
+      prop: 'approveDesc', label: t('Ib.Recording.Note'),
+      slot: 'approveDesc',
+    },
+  ],
+  3: [
+    { prop: 'ibNo', label: t('Ib.Recording.TransferAccounts') },
+    { prop: 'to', label: t('Ib.Recording.IntoAccount') },
+    { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
+    {
+      prop: 'amount', label: t('Ib.Recording.Amount'),
+      formatter: ({ row }) => numberFormat(row.amount ?? 0),
+    },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Ib.Recording.Status'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    {
+      prop: 'approveDesc', label: t('Ib.Recording.Note'),
+      slot: 'approveDesc',
+    },
+  ],
+  4: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    {
+      prop: 'loginType', label: t('Ib.Recording.AccountType'),
+      type: 'tag',
+      tagMap: {
+        1: t('AccountType.ClassicAccount'),
+        2: t('AccountType.SeniorAccount'),
+        7: t('AccountType.StandardAccount'),
+        8: t('AccountType.CentAccount'),
+      },
+    },
+    { prop: 'title', label: t('Label.Describe') },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Ib.Recording.Status'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    {
+      prop: 'approveDesc', label: t('Ib.Recording.Note'),
+      slot: 'approveDesc',
+    },
+  ],
+  5: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    {
+      prop: 'oldPoint', label: t('Ib.Recording.OldPoint'),
+      formatter: ({ row }) => row.oldPoint || '0',
+    },
+    {
+      prop: 'newPoint', label: t('Ib.Recording.NewPoint'),
+      formatter: ({ row }) => row.newPoint || '0',
+    },
+    {
+      prop: 'oldHide', label: t('Drawer.Label.OldHide'),
+      formatter: ({ row }) => row.oldHide || '0',
+    },
+    {
+      prop: 'newHide', label: t('Drawer.Label.NewHide'),
+      formatter: ({ row }) => row.newHide || '0',
+    },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Ib.Recording.Status'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    {
+      prop: 'approveDesc', label: t('Ib.Recording.Note'),
+      slot: 'approveDesc',
+    },
+  ],
+  6: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    { prop: 'oldAgentIbNo', label: t('Ib.Recording.OldBelong') },
+    { prop: 'newAgentIbNo', label: t('Ib.Recording.NewBelong') },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Ib.Recording.Status'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    { prop: 'approveDesc', label: t('Ib.Recording.Note') },
+  ],
+  7: [
+    { prop: 'typeName', label: t('Label.Type') },
+    { prop: 'newPercent', label: t('Label.NewPercentage') },
+    { prop: 'newClassicFx', label: t('Label.NewClassicForex') },
+    { prop: 'newVipFx', label: t('Label.NewAdvancedForex') },
+    { prop: 'newClassicCfd', label: t('Label.NewClassicCFD') },
+    { prop: 'newVipCfd', label: t('Label.NewAdvancedCFD') },
+    { prop: 'newComPointOne', label: t('Label.NewCommission10') },
+    { prop: 'newComPointTwo', label: t('Label.NewCommission20') },
+    { prop: 'newComPointThree', label: t('Label.NewCommission30') },
+    { prop: 'newInstantFx', label: t('Label.NewSpeedForex') },
+    { prop: 'newInstantMetal', label: t('Label.NewSpeedMetal') },
+  ],
+  8: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'ibNo', label: t('Label.IBAccount') },
+    {
+      prop: 'amount', label: t('Label.AmountMoney'),
+      formatter: ({ row }) => numberFormat(row.amount ?? '--'),
+    },
+    { prop: 'currency', label: t('Label.Currency') },
+    { prop: 'serial', label: t('Label.SerialNumber') },
+    {
+      prop: 'remitChannelName', label: t('Label.WithdrawalWay'),
+      slot: 'remitChannelName',
+    },
+    { prop: 'addTime', label: t('Label.ApplyTime') },
+    {
+      prop: 'status', label: t('Label.State'),
+      slot: 'status',
+    },
+    {
+      prop: 'approveDesc', label: t('Label.Note'),
+      slot: 'approveDesc',
+    },
+  ],
+  9: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'mam', label: 'MAM' },
+    { prop: 'platform', label: t('Label.Platform') },
+    { prop: 'sub', label: t('Ib.Settings.HangUndo') },
+    {
+      prop: 'type', label: t('Label.Type'),
+      type: 'tag',
+      tagMap: {
+        1: t('Ib.Settings.Hang'),
+        2: t('Ib.Settings.Undo'),
+      },
+    },
+    { prop: 'addTime', label: t('Label.ApplyTime') },
+    {
+      prop: 'status', label: t('Label.State'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    { prop: 'approveDesc', label: t('Label.Note'), slot: 'approveDesc' },
+  ],
+  10: [
+    { prop: 'withdrawLogin', label: t('Custom.Recording.TransferAccounts') },
+    { prop: 'depositLogin', label: t('Custom.Recording.IntoAccount') },
+    { prop: 'withdrawCurrency', label: t('Custom.Recording.CurrencyType') },
+    {
+      prop: 'withdrawAmount', label: t('Custom.Recording.Amount'),
+      formatter: ({ row }) => numberFormat(row.withdrawAmount ?? '--'),
+    },
+    { prop: 'addTime', label: t('Custom.Recording.ApplicationDate') },
+    {
+      prop: 'status', label: t('Custom.Recording.Status'),
+      formatter: ({ row }) => {
+        if (row.status == 1) {
+          return t('State.ToBeProcessed')
+        }
+        if (row.status == 2 && row.withdrawStatus == 2 &&
+          row.depositStatus == 2) {
+          return t('State.Completed')
+        }
+        if (row.status == 2 && (row.withdrawStatus == 1 ||
+          row.depositStatus == 1)) {
+          return t('State.InTheProcessing')
+        }
+        if (row.status == 3 || row.withdrawStatus == 3 || row.depositStatus == 3) {
+          return t('State.Refused')
+        }
+      },
+    },
+    { prop: 'approveDesc', label: t('Custom.Recording.Note'), slot: 'approveDesc' },
+  ],
+  11: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'pIbNo', label: t('Label.AttributionNumber') },
+    { prop: 'email', label: t('Label.Email') },
+    { prop: 'addTime', label: t('Label.ApplyTime') },
+    { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
+    { prop: 'accountId', label: t('Ib.PammManager.accountId') },
+    { prop: 'percent', label: t('Ib.PammManager.percent') },
+    {
+      prop: 'status', label: t('Label.State'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    { prop: 'approveDesc', label: t('Label.Descr'), slot: 'approveDesc' },
+  ],
+  12: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'pIbNo', label: t('Label.AttributionNumber') },
+    { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
+    { prop: 'accountId', label: t('Ib.PammManager.accountId') },
+    { prop: 'percent', label: t('Ib.PammManager.percent') },
+    { prop: 'platform', label: t('Label.Platform') },
+    { prop: 'addTime', label: t('Label.ApplyTime') },
+    { prop: 'sub', label: t('Label.ApplicationAccount') },
+    {
+      prop: 'type', label: t('Label.Type'),
+      type: 'tag',
+      tagMap: {
+        1: t('Ib.Settings.Hang'),
+        2: t('Ib.Settings.Undo'),
+      },
+    },
+    {
+      prop: 'status', label: t('Label.State'),
+      type: 'tag',
+      tagMap: {
+        1: t('State.ToBeProcessed'),
+        2: t('State.Completed'),
+        3: t('State.Refused'),
+      },
+    },
+    { prop: 'approveDesc', label: t('Label.Descr'), slot: 'approveDesc' },
+    { prop: 'approveTime', label: t('Label.ProcessingDate') },
+  ],
+  13: [
+    { prop: 'withdrawIbNo', label: t('AmountLabel.item4') },
+    { prop: 'depositIbNo', label: t('AmountLabel.item5') },
+    {
+      prop: 'amount', label: t('Ib.Recording.Amount'),
+      formatter: ({ row }) => numberFormat(row.amount ?? '--'),
+    },
+    { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
+    { prop: 'addTime', label: t('Ib.Recording.ApplicationDate') },
+    { prop: 'approveDesc', label: t('Ib.Recording.Note'), slot: 'approveDesc' },
+  ],
+}
+
+export const mobileList  = {
+  1: [
+    { prop: 'platform', label: t('Ib.Recording.Platform') },
+    {
+      prop: 'accountType', label: t('Ib.Recording.AccountType'),
+      type: 'tag',
+      tagMap: {
+        1: t('AccountType.ClassicAccount'),
+        2: t('AccountType.SeniorAccount'),
+        7: t('AccountType.StandardAccount'),
+        8: t('AccountType.CentAccount'),
+      },
+    },
+    { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
+
+  ],
+  2: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    {
+      prop: 'oldLeverage', label: t('Ib.Recording.OldLever'),
+      formatter: ({ row }) => row.oldLeverage ? `1:${row.oldLeverage}` : '--',
+    },
+    {
+      prop: 'newLeverage', label: t('Ib.Recording.NewLever'),
+      formatter: ({ row }) => row.newLeverage ? `1:${row.newLeverage}` : '--',
+    },
+  ],
+  3: [
+    { prop: 'ibNo', label: t('Ib.Recording.TransferAccounts') },
+    { prop: 'to', label: t('Ib.Recording.IntoAccount') },
+    { prop: 'currency', label: t('Ib.Recording.CurrencyType') },
+
+  ],
+  4: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    {
+      prop: 'loginType', label: t('Ib.Recording.AccountType'),
+      type: 'tag',
+      tagMap: {
+        1: t('AccountType.ClassicAccount'),
+        2: t('AccountType.SeniorAccount'),
+        7: t('AccountType.StandardAccount'),
+        8: t('AccountType.CentAccount'),
+      },
+    },
+    { prop: 'title', label: t('Label.Describe') },
+  ],
+  5: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    {
+      prop: 'oldPoint', label: t('Ib.Recording.OldPoint'),
+      formatter: ({ row }) => row.oldPoint || '0',
+    },
+    {
+      prop: 'newPoint', label: t('Ib.Recording.NewPoint'),
+      formatter: ({ row }) => row.newPoint || '0',
+    },
+  ],
+  6: [
+    { prop: 'login', label: t('Ib.Recording.TradingAccount') },
+    { prop: 'oldAgentIbNo', label: t('Ib.Recording.OldBelong') },
+    { prop: 'newAgentIbNo', label: t('Ib.Recording.NewBelong') },
+  ],
+  7: [
+    { prop: 'typeName', label: t('Label.Type') },
+    { prop: 'newPercent', label: t('Label.NewPercentage') },
+    { prop: 'newClassicFx', label: t('Label.NewClassicForex') },
+  ],
+  8: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'ibNo', label: t('Label.IBAccount') },
+    {
+      prop: 'amount', label: t('Label.AmountMoney'),
+      formatter: ({ row }) => numberFormat(row.amount ?? '--'),
+    },
+
+  ],
+  9: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'mam', label: 'MAM' },
+    { prop: 'platform', label: t('Label.Platform') },
+  ],
+  10: [
+    { prop: 'withdrawLogin', label: t('Custom.Recording.TransferAccounts') },
+    { prop: 'depositLogin', label: t('Custom.Recording.IntoAccount') },
+    { prop: 'withdrawCurrency', label: t('Custom.Recording.CurrencyType') },
+  ],
+  11: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'pIbNo', label: t('Label.AttributionNumber') },
+    { prop: 'email', label: t('Label.Email') },
+  ],
+  12: [
+    { prop: 'cId', label: t('Label.CidAccount') },
+    { prop: 'pIbNo', label: t('Label.AttributionNumber') },
+    { prop: 'ownerId', label: t('Ib.PammManager.ownerId') },
+
+  ],
+  13: [
+    { prop: 'withdrawIbNo', label: t('AmountLabel.item4') },
+    { prop: 'depositIbNo', label: t('AmountLabel.item5') },
+    {
+      prop: 'amount', label: t('Ib.Recording.Amount'),
+      formatter: ({ row }) => numberFormat(row.amount ?? '--'),
+    },
+  ],
+}
+
+
+// api 列表
+export const apiList = {
+  1: 'mamApplyList',
+  2: 'mamLeverageApplyList',
+  3: 'agentBalanceTransferList',
+  4: 'CustomRecordAccount',
+  5: 'customCommissionApplyList',
+  6: 'agentBelongChangeList',
+  7: 'agentPointChangeList',
+  8: 'agentWithdrawList',
+  9: 'mamSubsApplyRecording',
+  10: 'agentTransferList',
+  11: 'mamApplyList',
+  12: 'mamSubsApplyRecording',
+  13: 'agentBalanceCommissionSearchList',
+}

+ 186 - 15
pages/ib/recording.vue

@@ -1,23 +1,194 @@
 <template>
-    <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
-        <cwg-header :title="t('Home.page_ib.item7')" />
-        <view class="account-section">
+  <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
+    <cwg-header :title="t('Home.page_ib.item7')" />
+
+    <view class="account-content">
+      <view class="search-content">
+        <view class="search-bar">
+          <cwg-combox v-model:value="search.types" :options="typeList"
+                      :placeholder="t('placeholder.choose')" />
+          <uni-datetime-picker type="daterange" v-model="search.date"
+                               :placeholder="t('placeholder.Start') + ' - ' + t('placeholder.End')"
+                               @change="handleDateChange" />
         </view>
-    </cwg-page-wrapper>
+        <view />
+      </view>
+      <cwg-tabel
+        ref="tableRef"
+        :columns="columns"
+        :mobilePrimaryFields="mobilePrimaryFields"
+        :queryParams="search"
+        :api="listApi"
+        :show-operation="true"
+        :showPagination="true"
+      >
+        <template #approveDesc="{row}">
+          <text v-if="reasons[row.approveDesc]">
+            {{
+              isZh ? reasons[row.approveDesc].content : reasons[row.approveDesc].enContent
+            }}
+          </text>
+          <text v-else>{{ row.approveDesc }}</text>
+        </template>
+        <template #remitChannelName="{row}">
+          <text>
+            {{
+              isZh ? row.remitChannelName || '--' : row.remitChannelEnName || '--'
+            }}
+          </text>
+        </template>
+        <template #status="{row}">
+          <text v-if="row.status == 1">
+            {{ t('State.ToBeProcessed') }}
+          </text>
+          <text v-if="row.status == 2&&row.submitStatus == 2">
+            {{ t('State.Completed') }}
+          </text>
+          <text v-if="row.status == 2&&row.submitStatus != 2">
+            {{ t('State.InTheProcessing') }}
+          </text>
+          <text v-if="row.status == 3 || row.callbackStatus == 2">
+            {{ t('State.Refused') }}
+          </text>
+          <text v-if="row.status == 5">
+            {{ t('State.Cancelled') }}
+          </text>
+          <button v-if="row.status == 1" @click.stop="cancel(row.id)">
+            {{ t('Btn.Cancel') }}
+          </button>
+        </template>
+        <template #action="{ row }">
+          <cwg-dropdown :menu-list="menuList(row)" @menuClick="handleMenuClick">
+            <view class="pc-header-btn">
+              <cwg-icon name="crm-ellipsis" :size="24" />
+            </view>
+          </cwg-dropdown>
+        </template>
+      </cwg-tabel>
+    </view>
+  </cwg-page-wrapper>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
-import { onLoad } from '@dcloudio/uni-app'
-import { useI18n } from 'vue-i18n' // uni-app 中已集成,但需配置
-import { customApi } from '@/service/custom'
-import { financialApi } from '@/service/financial'
-import Config from '@/config/index'
-import AddBankDialog from '@/components/AddBankDialog.vue';
-import PaymentMethodsList from './components/PaymentMethodsList.vue'
-const { t, locale } = useI18n()
-const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
+  // 账户管理
+  import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
+  import { onLoad } from '@dcloudio/uni-app'
+  import { useI18n } from 'vue-i18n' // uni-app 中已集成,但需配置
+  import { customApi } from '@/service/custom'
+  import { financialApi } from '@/service/financial'
+  import Config from '@/config/index'
+  import { ibApi } from '@/service/ib'
+  import { apiList, columnList, mobileList } from '@/pages/ib/const/recording'
+  import { useFilters } from '@/composables/useFilters'
+  import { useConfirm } from '@/hooks/useConfirm'
+
+  const confirm = useConfirm()
+  const { numberFormat, numberDecimal } = useFilters()
+  const { t, locale } = useI18n()
+  const lang = locale.value
+  const reasons = ref({})
+  let { Code } = Config
+  const typeList = ref([
+    { text: t('Ib.Recording.NewAccount'), value: 1 },
+    { text: t('Ib.Recording.LeverageApply'), value: 2 },
+    { text: t('Ib.Recording.InternalTransfer'), value: 3 },
+    { text: t('Ib.Recording.ActivitiesApply'), value: 4 },
+    { text: t('Ib.Recording.MaidAdjust'), value: 5 },
+    { text: t('Ib.Recording.BelongingAdjust'), value: 6 },
+    { text: t('Ib.Recording.CommissionAllocation'), value: 7 },
+    { text: t('Custom.Withdraw.Title'), value: 8 },
+    { text: t('Ib.Recording.MamHangUndo'), value: 9 },
+    { text: t('Home.page_ib.item9'), value: 10 },
+    { text: t('Ib.PammManager.title2'), value: 11 },
+    { text: t('Ib.PammManager.title3'), value: 12 },
+    { text: t('Ib.Transfer.IbAccountTransfer'), value: 13 },
+  ])
+
+  const search = ref({
+    types: 1,
+    date: '',
+    startDate: '',
+    endDate: '',
+  })
+  const isZh = computed(() => {
+    ['cn', 'zhHant'].indexOf(lang) != -1
+  })
+  // 表格列配置 根据types 切换
+  const columns = computed(() => {
+    return columnList[search.value.types]
+  })
+
+  const mobilePrimaryFields = computed(() => {
+    return [
+      ...mobileList[search.value.types],
+      {
+        prop: 'more',
+        type: 'more',
+        width: 20,
+        align: 'right',
+      }
+    ]
+  })
+
+  // 接口 根据types 切换
+  const listApi = computed(() => {
+    return ibApi[apiList[search.value.types]]
+  })
+  //获取原因列表
+  const searchReasons = async () => {
+    let res = await customApi.reasonsRefusalList({ type: nviewl })
+    if (res.code == Code.StatusOK) {
+      if (res.data == nviewl) {
+        reasons.value = {}
+      } else {
+        reasons.value = res.data
+      }
+    } else {
+      uni.showToast({
+        title: res.msg,
+        icon: 'none',
+      })
+    }
+  }
+
+  const handleDateChange = (val) => {
+    search.value.startDate = val[0]
+    search.value.endDate = val[1]
+  }
+  const cancel = async (id) => {
+    try {
+      await confirm({
+        title: t('Msg.SystemPrompt'),
+        content: t('Msg.Cancle'),
+        confirmText: t('Btn.item6'),
+        cancelText: t('Btn.item7'),
+      })
+      let res = await ibApi.withdrawCancel({ id })
+      if (res.code == Code.StatusOK) {
+        uni.showToast({
+          title: t('Msg.Success'),
+          icon: 'success',
+        })
+      } else {
+        uni.showToast({
+          title: res.msg,
+          icon: 'none',
+        })
+      }
+    } catch (err) {
+
+    }
+  }
+
+  onMounted(() => {
+    searchReasons()
+  })
 </script>
 <style lang="scss" scoped>
-@import "@/uni.scss";
+  @import "@/uni.scss";
+
+  .search-content {
+    display: flex;
+    justify-content: space-between;
+  }
 </style>

+ 1 - 1
pages/ib/subsList.vue

@@ -181,7 +181,7 @@
   .search-button{
     display: flex;
     align-items: center;
-    height: px2rpx(36);
     line-height: px2rpx(36);
+    min-width: px2rpx(120);
   }
 </style>

+ 6 - 0
utils/i18n.ts

@@ -0,0 +1,6 @@
+// src/utils/i18n.ts
+import { i18n } from '@/main'
+
+export function t(key: string, options?: any): string {
+  return i18n.global.t(key, options)
+}