Handy_Cao 1 年之前
父节点
当前提交
8c887ced83

文件差异内容过多而无法显示
+ 349 - 349
public/locales/en-US.json


+ 4 - 2
src/packages/pc/views/query/internal/deliveryorder/index.vue

@@ -43,6 +43,7 @@ import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
 import { useOperation } from '@/hooks/operation'
 import { queryDeliveryOrder } from '@/services/api/order'
+import { i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
@@ -50,6 +51,7 @@ import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 
 const deliveryorderstatus1Enum = useEnum('deliveryorderstatus1') // 状态
 const dateValue = shallowRef<string[] | null>([])
+const { global: { t } } = i18n
 
 const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.DeliveryOrderRsp>({
     onClose: () => onSearch()
@@ -123,8 +125,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         },
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
     ]
 })
 

+ 4 - 2
src/packages/pc/views/query/internal/deliverytrade/index.vue

@@ -45,12 +45,14 @@ import { useDataFilter } from '@/hooks/datatable-v2'
 import { useRequest } from '@/hooks/request'
 import { useOperation } from '@/hooks/operation'
 import { querySettlementDeal } from '@/services/api/order'
+import { i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 
 const dateValue = shallowRef<string[] | null>([])
+const { global: { t } } = i18n
 
 const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.SettlementDealRsp>({
     onClose: () => onSearch()
@@ -138,8 +140,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         },
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
     ]
 })
 

+ 4 - 2
src/packages/pc/views/query/internal/liquidation/index.vue

@@ -33,12 +33,14 @@ import { useRequest } from '@/hooks/request'
 import { useMarket } from '@/hooks/market'
 import { useOperation } from '@/hooks/operation'
 import { queryCommissionSheet } from '@/services/api/order'
+import { i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 
 const { getMarketOptions } = useMarket()
+const { global: { t } } = i18n
 
 const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.CommissionSheetRsp>({
     onClose: () => onSearch()
@@ -96,8 +98,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         },
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
     ]
 })
 

+ 5 - 2
src/packages/pc/views/query/internal/offlinedelivery/index.vue

@@ -38,11 +38,14 @@ import { useDataFilter } from '@/hooks/datatable-v2'
 import { useRequest } from '@/hooks/request'
 import { useOperation } from '@/hooks/operation'
 import { queryOffline } from '@/services/api/order'
+import { i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 
+const { global: { t } } = i18n
+
 const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OfflineRsp>({
     onClose: () => onSearch()
 })
@@ -98,8 +101,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         }
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
     ]
 })
 

+ 5 - 2
src/packages/pc/views/query/internal/tradesumm/index.vue

@@ -33,11 +33,14 @@ import { useDataFilter } from '@/hooks/datatable-v2'
 import { useRequest } from '@/hooks/request'
 import { useOperation } from '@/hooks/operation'
 import { queryTradeSum } from '@/services/api/order'
+import { i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 
+const { global: { t } } = i18n
+
 const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.TradeSumRsp>({
     onClose: () => onSearch()
 })
@@ -102,8 +105,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         },
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
     ]
 })
 

+ 2 - 2
src/packages/pc/views/report/account/index.vue

@@ -100,8 +100,8 @@ const { queryParams, filterOption, getQueryParams } = useDataFilter<Model.Taacco
         }
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        //{ label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        //{ label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
     ]
 })
 

+ 4 - 2
src/packages/pc/views/report/bank/index.vue

@@ -33,12 +33,14 @@ import { useDataFilter } from '@/hooks/datatable-v2'
 import { useRequest } from '@/hooks/request'
 import { useOperation } from '@/hooks/operation'
 import { cusbankReportQuery } from '@/services/api/report'
+import { i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 
 const dateValue = shallowRef<string[] | null>([])
+const { global: { t } } = i18n
 
 const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.CommissionSheetRsp>({
     onClose: () => onSearch()
@@ -93,8 +95,8 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         },
     ],
     buttons: [
-        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
+        { label: t('operation.search'), className: 'el-button--primary', onClick: () => onSearch() },
+        { label: t('operation.reset'), className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
     ]
 })
 

+ 1 - 1
src/packages/pc/views/report/profitshare/index.vue

@@ -52,12 +52,12 @@ import { useRequest } from '@/hooks/request'
 import { formatDate } from '@/filters'
 import { shareAmountQuery } from '@/services/api/report'
 import { useOperation } from '@/hooks/operation'
+import { i18n } from '@/stores'
 import { getReportTypeList, ReportType, getQuarterList } from '@/constants/report'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
-import { i18n } from '@/stores'
 
 const roleTypeEnum = useEnum('roleType') // 角色
 

+ 85 - 1
src/packages/pc/views/report/recalculate/index.vue

@@ -1,7 +1,91 @@
 <!-- 报表查询-报表重算 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption"  :rules="filterRules">
+                <template #startDate>
+                    <el-form-item label="交易日" prop="date">
+                        <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD"
+                            start-placeholder="开始时间" end-placeholder="结束时间" />
+                    </el-form-item>
+                </template>
+                <fieldset class="g-fieldset el-form--vertical">
+                    <legend class="g-fieldset__legend">报表重算</legend>
+                    <el-form-item>
+                        <span>*选择交易日,当前交易日的所在周报表数据,月报表数据,季报表数据,年报表数据都会重算!</span>
+                    </el-form-item>
+                    <el-form-item>
+                        <span>*等待10~20分钟后查看!</span>
+                    </el-form-item>
+                </fieldset>
+            </app-filter>
+        </template>
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { ElMessage, FormRules } from 'element-plus'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useOperation } from '@/hooks/operation'
+import { rerun } from '@/services/api/report'
+import { useRequest } from '@/hooks/request'
+import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
+
+const dateValue = shallowRef<string[] | null>([])
+
+const { run } = useRequest(rerun, {
+    manual: true,
+    params: {
+        pageNum: 1,
+        pageSize: 20
+    },
+    onSuccess: () => {
+        ElMessage.success('操作成功!')
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+useOperation<Model.CommissionSheetRsp>({
+    onClose: () => onSearch()
+})
+
+// 表单验证规则
+const filterRules: FormRules = {
+    date: [{
+        required: true,
+        validator: () => {
+            return !!dateValue.value && dateValue.value.length === 2
+        }
+    }]
+}
+
+const { filterOption, getQueryParams } = useDataFilter<Model.ReturnReq>({
+    filters: [
+        {
+            field: 'startDate',
+            label: '交易日',
+        },
+    ],
+    buttons: [
+        { label: '重新计算', className: 'el-button--primary', onClick: () => onSearch() }
+    ]
+})
+
+// 处理请求参数
+const processRequiredParams = () => {
+    const qs = getQueryParams()
+    const [startDate, endDate] = dateValue.value || []
+    qs.startDate = startDate
+    qs.endDate = endDate
+    return qs
+}
+
+const onSearch = () => {
+    const qs = processRequiredParams()
+    run(qs)
+}
+
 </script>

+ 7 - 0
src/services/api/report/index.ts

@@ -155,4 +155,11 @@ export function manageDivReportQuery(options: CommonFetchOptions<{ request: Part
  */
 export function manageDivExport(options: CommonFetchOptions<{ request: Partial<Model.ManageDivExportReq>; }>) {
     return httpClient.commonRequest('/reportForm/managedivexport', 'get', options)
+}
+
+/**
+ * 报表管理-->报表重算
+ */
+export function rerun(options: CommonFetchOptions<{ request: Partial<Model.ReturnReq>; }>) {
+    return httpClient.commonRequest('/reportForm/rerun', 'get', options)
 }

+ 9 - 1
src/types/model/report.d.ts

@@ -592,7 +592,7 @@ declare namespace Model {
         tradedate: string
     }
 
-     /** 报表管理-->服务费分润报表-->导出 请求 */
+    /** 报表管理-->服务费分润报表-->导出 请求 */
      interface ManageDivExportReq {
         // 结算银行
         cusbankname?: string
@@ -601,4 +601,12 @@ declare namespace Model {
         // 开始时间
         startDate?: string
     }
+
+    /** 报表管理--> 报表重算 请求 */
+    interface ReturnReq {
+        // 结束时间
+        endDate?: string
+        // 开始时间
+        startDate?: string
+    }
 }

部分文件因为文件数量过多而无法显示