ソースを参照

Merge branch 'master' of http://192.168.31.240:3000/MTP2.0_New/MTP2.0_NEWMANAGE_WEB

li.shaoyi 1 年間 前
コミット
01fcfeede5

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

@@ -1,7 +1,76 @@
 <!-- 报表查询-经纪会员报表 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :options="filterOptons" />
+        </template>
+        <app-table :data="dataList" showIndex v-model:columns="tableColumns" :loading="loading">
+            <template #footer>
+                <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
+                    @change="onSearch" />
+            </template>
+        </app-table>
+        <component :is="componentMap.get(componentId)" v-bind="{ selectedRow, queryParams }" @closed="closeComponent"
+            v-if="componentId" />
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { ElMessage } from 'element-plus'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { orgReportQuery } from '@/services/api/report'
+import { useOperation } from '@/hooks/operation'
+import { useUserStore } from '@/stores'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+
+const queryParams = shallowRef<Model.OrgReportQueryReq>()
+const { filterOptons, getQueryParams } = useDataFilter<Model.OrgReportQueryReq>()
+const userStore = useUserStore()
+
+const { componentMap, componentId, selectedRow, closeComponent } = useOperation<Model.OrgReportQueryReq>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(orgReportQuery, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        orgztypes: userStore.userInfo.orgztypes
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'cycleTime', label: '日期' },
+    { field: 'accountName', label: '经纪会员' },
+    { field: 'investorTotalNum', label: '交易商开户数量' },
+    { field: 'investorTrialNum', label: '交易商开户待初审数量' },
+    { field: 'investorRetrialNum', label: '交易商开户待复审数量' },
+    { field: 'investorAmount', label: '期末余额' },
+    { field: 'investorusedmargin', label: '占用保证金' },
+    { field: 'investorClosePl', label: '转让损益' },
+    { field: 'investorReckonPl', label: '结算损益' },
+    { field: 'investorBuyDeliveryAmount', label: '交收金额' },
+    { field: 'investorBuyTradeQty', label: '买交易数量' },
+    { field: 'investorSellTradeQty', label: '卖交易数量' },
+    { field: 'investorBuyHoldQty', label: '买持仓数量' },
+    { field: 'investorSellHoldQty', label: '卖持仓数量' }
+])
+
+filterOptons.buttonList = [
+    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
+]
+
+const onSearch = (clear = false) => {
+    const qs = getQueryParams(clear)
+    run(qs)
+}
+
 </script>

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

@@ -1,7 +1,69 @@
 <!-- 报表查询-分润报表 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :options="filterOptons" />
+        </template>
+        <app-table :data="dataList" showIndex v-model:columns="tableColumns" :loading="loading">
+            <template #footer>
+                <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
+                    @change="onSearch" />
+            </template>
+        </app-table>
+        <component :is="componentMap.get(componentId)" v-bind="{ selectedRow, queryParams }" @closed="closeComponent"
+            v-if="componentId" />
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { ElMessage } from 'element-plus'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { shareAmountQuery } from '@/services/api/report'
+import { useOperation } from '@/hooks/operation'
+import { useUserStore } from '@/stores'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+
+const queryParams = shallowRef<Model.ShareAmountQueryReq>()
+const { filterOptons, getQueryParams } = useDataFilter<Model.ShareAmountQueryReq>()
+const userStore = useUserStore()
+
+const { componentMap, componentId, selectedRow, closeComponent } = useOperation<Model.ShareAmountQueryReq>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(shareAmountQuery, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        orgztypes: userStore.userInfo.orgztypes
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'areatype', label: '角色' },
+    { field: 'areaaccountid', label: '结算资金账户' },
+    { field: 'goodsname', label: '商品/市场' },
+    { field: 'searchtype', label: '费用类型' },
+    { field: 'totalcount', label: '总笔数' },
+    { field: 'totalfee', label: '总手续费' },
+    { field: 'divideamount', label: '分润金额' }
+])
+
+filterOptons.buttonList = [
+    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
+]
+
+const onSearch = (clear = false) => {
+    const qs = getQueryParams(clear)
+    run(qs)
+}
+
 </script>

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

@@ -1,7 +1,70 @@
 <!-- 报表查询-推荐成交报表 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :options="filterOptons" />
+        </template>
+        <app-table :data="dataList" showIndex v-model:columns="tableColumns" :loading="loading">
+            <template #footer>
+                <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
+                    @change="onSearch" />
+            </template>
+        </app-table>
+        <component :is="componentMap.get(componentId)" v-bind="{ selectedRow, queryParams }" @closed="closeComponent"
+            v-if="componentId" />
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { ElMessage } from 'element-plus'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { queryTrade } from '@/services/api/report'
+import { useOperation } from '@/hooks/operation'
+import { useUserStore } from '@/stores'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+
+const queryParams = shallowRef<Model.TradeReq>()
+const { filterOptons, getQueryParams } = useDataFilter<Model.TradeReq>()
+const userStore = useUserStore()
+
+const { componentMap, componentId, selectedRow, closeComponent } = useOperation<Model.TradeReq>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryTrade, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        orgztypes: userStore.userInfo.orgztypes
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'goodsname', label: '商品代码/名称	' },
+    { field: 'marketname', label: '市场' },
+    { field: 'tradeqty', label: '成交量' },
+    { field: 'openqty', label: '订立数量' },
+    { field: 'closeqty', label: '转让数量' },
+    { field: 'tradeamount', label: '成交金额' },
+    { field: 'opencharge', label: '订立手续费' },
+    { field: 'closecharge', label: '转让手续费' }
+])
+
+filterOptons.buttonList = [
+    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
+]
+
+const onSearch = (clear = false) => {
+    const qs = getQueryParams(clear)
+    run(qs)
+}
+
 </script>