li.shaoyi 1 jaar geleden
bovenliggende
commit
0e2cd3412a

+ 2 - 2
src/packages/pc/assets/themes/default/variable.less

@@ -55,11 +55,11 @@
         }
 
         .el-select {
-            width: 160px;
+            width: 180px;
         }
 
         .el-input {
-            width: 160px;
+            width: 180px;
         }
 
         .el-range-editor {

+ 1 - 1
src/packages/pc/views/account/tradeacct/components/sign/edit/index.vue

@@ -29,7 +29,7 @@
                     <el-input v-model="formData.bankaccountname" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item label="手机号" prop="mobilephone">
-                    <el-input v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--horizontal" v-if="expandableList.length">

+ 2 - 2
src/packages/pc/views/investor/user/open/components/edit/index.vue

@@ -100,10 +100,10 @@
                 </el-form-item>
             </template>
             <el-form-item label="手机号" prop="mobilephone">
-                <el-input v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
+                <el-input type="number" v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
             </el-form-item>
             <el-form-item label="联系电话" prop="telphone">
-                <el-input v-model="formData.telphone" maxlength="50" placeholder="请输入" />
+                <el-input type="number" v-model="formData.telphone" maxlength="50" placeholder="请输入" />
             </el-form-item>
             <el-form-item label="邮政编码" prop="postalcode">
                 <el-input v-model="formData.postalcode" maxlength="50" placeholder="请输入" />

+ 2 - 2
src/packages/pc/views/member/institution/open/components/edit/index.vue

@@ -68,10 +68,10 @@
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item label="手机号" prop="mobilephone">
-                    <el-input v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item label="联系电话" prop="telphone">
-                    <el-input v-model="formData.telphone" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.telphone" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" label="地区" prop="provinceid">
                     <app-region class="el-form-item--col" v-model:province="formData.provinceid"

+ 2 - 2
src/packages/pc/views/member/subinstitution/manage/components/edit/index.vue

@@ -74,10 +74,10 @@
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item label="手机号" prop="mobile">
-                    <el-input v-model="formData.mobile" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.mobile" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item label="联系电话" prop="telphone">
-                    <el-input v-model="formData.telphone" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.telphone" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" label="地区" prop="provinceid">
                     <app-region class="el-form-item--col" v-model:province="formData.provinceid"

+ 2 - 2
src/packages/pc/views/member/subinstitution/user/components/edit/index.vue

@@ -71,10 +71,10 @@
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item label="手机号" prop="mobilephone">
-                    <el-input v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.mobilephone" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item label="联系电话" prop="telphone">
-                    <el-input v-model="formData.telphone" maxlength="50" placeholder="请输入" />
+                    <el-input type="number" v-model="formData.telphone" maxlength="50" placeholder="请输入" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" label="地区" prop="provinceid">
                     <app-region class="el-form-item--col" v-model:province="formData.provinceid"

+ 81 - 49
src/packages/pc/views/query/order/accountsumm/index.vue

@@ -2,7 +2,40 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter :options="filterOptons" />
+            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules"
+                :show-message="false">
+                <el-form-item label="市场" prop="marketid">
+                    <el-select v-model="queryParams.marketid">
+                        <template v-for="item in getMarketOptions([15, 40, 41, 48, 51, 71, 97, 99], true)" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="汇总方式" prop="summode">
+                    <el-select v-model="queryParams.summode">
+                        <el-option label="按账户汇总" :value="1" />
+                        <el-option label="按账户+日期汇总" :value="2" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="日期" prop="date">
+                    <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD" start-placeholder="开始"
+                        end-placeholder="结束" @change="onDateChange" />
+                </el-form-item>
+                <el-form-item label="商品" prop="goodsid">
+                    <el-input type="number" v-model="queryParams.goodsid" placeholder="请输入商品ID" />
+                </el-form-item>
+                <el-form-item label="交易商" prop="accountid">
+                    <el-input type="number" v-model="queryParams.accountid" placeholder="输入交易商ID" />
+                </el-form-item>
+                <el-form-item label="排除资金账户" prop="excludeaccountidsstr">
+                    <el-input v-model="queryParams.excludeaccountidsstr" placeholder="请输入完整资金账户,多个逗号分隔"
+                        style="width: 260px;" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch(false)">查询</el-button>
+                    <el-button type="primary" @click="onSearch(true)">重置</el-button>
+                </el-form-item>
+            </el-form>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
             <template #headerLeft>
@@ -20,22 +53,24 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { ElMessage } from 'element-plus'
+import { ref } from 'vue'
+import { FormInstance, FormRules } from 'element-plus'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
-import { useDataFilter } from '@/hooks/datatable'
 import { useOperation } from '@/hooks/operation'
 import { accountTransactions } from '@/services/api/order'
 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'
 import AppOperation from '@pc/components/base/operation/index.vue'
 
 const { getMarketOptions } = useMarket()
-const queryParams = shallowRef<Model.AccountTransactionsReq>()
 
-const { filterOptons, getQueryParams } = useDataFilter<Model.AccountTransactionsReq>()
+const formRef = ref<FormInstance>()
+const dateValue = ref<string[]>([])
+
+const queryParams = ref<Partial<Model.AccountTransactionsReq>>({
+    summode: 1
+})
 
 const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.AccountTransactionsReq>({
     onClose: () => onSearch()
@@ -46,11 +81,10 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(accoun
     params: {
         pageNum: 1,
         pageSize: 20,
-        // isHis: 0,
     }
 })
 
-const tableColumns = shallowRef<Model.TableColumn[]>([
+const tableColumns = ref<Model.TableColumn[]>([
     { field: 'tradeDate', label: '交易日' },
     { field: 'userfullname', label: '账户' },
     { field: 'goodsfullname', label: '商品代码名称' },
@@ -62,51 +96,49 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'chargesum', label: '总手续费' }
 ])
 
-filterOptons.inputList = [
-    { label: '商品', keys: ['goodsid'] },
-    { label: '账户', keys: ['accountid'] },
-]
-
-filterOptons.selectList = [
-    {
-        key: 'marketid',
-        label: '市场',
-        locked: true,
-        options: () => getMarketOptions([15, 97, 99], true),
-    },
-    {
-        key: 'summode',
-        label: '汇总方式',
-        selectedValue: 0,
-        locked: true,
-        options: () => [
-            { label: '按账户汇总', value: 0 },
-            { label: '按账户+日期汇总', value: 1 },
-        ],
-    }
-]
-
-filterOptons.buttonList = [
-    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
-]
-
-const onSearch = (clear = false) => {
-    processRequiredParams((qs) => run(qs), clear)
+// 表单验证规则
+const formRules: FormRules = {
+    marketid: [{ required: true }],
+    //goodsid: [{ required: true }],
+    date: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (dateValue.value.length === 2) {
+                callback()
+            } else {
+                callback(new Error('请选择日期'))
+            }
+        },
+    }],
 }
 
-const openComponentOnClick = (code: string) => {
-    processRequiredParams(() => openComponent(code))
+// 选择日期
+const onDateChange = () => {
+    const [startDate, endDate] = dateValue.value
+    queryParams.value.startdate = startDate
+    queryParams.value.enddate = endDate
 }
 
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.AccountTransactionsReq) => void, clear = false) => {
-    const qs = getQueryParams(clear)
-    if (qs.marketid) {
-        queryParams.value = qs
-        callback(qs)
+const onSearch = (clear = false) => {
+    if (clear) {
+        queryParams.value = {
+            summode: 1,
+        }
+        dateValue.value = []
     } else {
-        ElMessage.warning('请选择市场')
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                run(queryParams.value)
+            }
+        })
     }
 }
+
+const openComponentOnClick = (code: string) => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            openComponent(code)
+        }
+    })
+}
 </script>

+ 3 - 3
src/packages/pc/views/query/order/goodssumm/index.vue

@@ -6,7 +6,7 @@
                 :show-message="false">
                 <el-form-item label="市场" prop="marketid">
                     <el-select v-model="queryParams.marketid">
-                        <el-option v-for="item in marketOptions" :key="item.value" :label="item.label"
+                        <el-option v-for="item in getMarketOptions()" :key="item.value" :label="item.label"
                             :value="item.value" />
                     </el-select>
                 </el-form-item>
@@ -24,7 +24,7 @@
                     <app-select-goods v-model="queryParams.goodsid" :market-id="queryParams.marketid" status="3,6,7" />
                 </el-form-item>
                 <el-form-item label="排除资金账户" prop="excludeaccountidsstr">
-                    <el-input v-model="queryParams.excludeaccountidsstr" placeholder="请输入完整资金账户,多个逗号分隔" />
+                    <el-input v-model="queryParams.excludeaccountidsstr" placeholder="请输入完整资金账户,多个逗号分隔" style="width: 260px;" />
                 </el-form-item>
                 <el-form-item>
                     <el-button type="primary" @click="onSearch">查询</el-button>
@@ -58,7 +58,7 @@ import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 import AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
 
-const { marketOptions } = useMarket()
+const { getMarketOptions } = useMarket()
 const formRef = shallowRef<FormInstance>()
 const dateValue = shallowRef<string[]>([])
 const queryParams = reactive<Model.GoodsTradeReq>({

+ 3 - 3
src/packages/pc/views/query/order/institutionsumm/index.vue

@@ -6,8 +6,8 @@
                 :show-message="false">
                 <el-form-item label="市场">
                     <el-select v-model="marketId">
-                        <el-option v-for="item in marketOptions" :key="item.value" :label="item.label"
-                            :value="item.value" />
+                        <el-option v-for="item in getMarketOptions([15, 40, 41, 48, 51, 71, 97, 99], true)"
+                            :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                 </el-form-item>
                 <el-form-item label="商品" prop="goodsid">
@@ -53,7 +53,7 @@ import AppOperation from '@pc/components/base/operation/index.vue'
 import AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 
-const { marketOptions } = useMarket()
+const { getMarketOptions } = useMarket()
 const formRef = shallowRef<FormInstance>()
 const marketId = shallowRef<number>()
 const dateValue = shallowRef<string[]>([])

+ 10 - 9
src/packages/pc/views/query/order/order/components/details/index.vue

@@ -48,6 +48,12 @@ const refresh = shallowRef(false)
 const buildtypeEnum = useEnum('buildtype')
 // 委托状态
 const orderstatusEnum = useEnum('orderstatus')
+// 有效期类型
+const ValidTypeEnum = useEnum('ValidType')
+// 取价方式
+const Pricemode2Enum = useEnum('Pricemode2')
+// 操作类型
+const orderoperatetypeEnum = useEnum('orderoperatetype')
 
 const { data } = useRequest(queryCommissionSheetDetail, {
     params: {
@@ -86,13 +92,12 @@ const detailProps1 = computed<CellProp[]>(() => {
         { prop: 'openqty', label: '开仓数量:' },
         { prop: 'closeqty', label: '平仓数量:' },
         { prop: 'cancelqty', label: '撤单数量:' },
-        { prop: 'pricemode', label: '取价方式:', show: !isTradeMode18Or26 },
-        { prop: 'validtype', label: '有效期类型:', show: !isTradeMode18Or26 },
+        { prop: 'pricemode', label: '取价方式:', formatValue: (val) => Pricemode2Enum.getEnumTypeName(val), show: !isTradeMode18Or26 },
+        { prop: 'validtype', label: '有效期类型:', formatValue: (val) => ValidTypeEnum.getEnumTypeName(val), show: !isTradeMode18Or26 },
         { prop: 'validtime', label: '有效期限:', show: !isTradeMode18Or26 },
-        { prop: 'operatetype', label: '操作类型:', show: !isTradeMode18Or26 },
+        { prop: 'operatetype', label: '操作类型:', formatValue: (val) => orderoperatetypeEnum.getEnumTypeName(val), show: !isTradeMode18Or26 },
         { prop: 'orderstatus', label: '委托状态:', formatValue: (val) => orderstatusEnum.getEnumTypeName(val) },
         { prop: 'ordertime', label: '委托时间:', formatValue: (val) => formatDate(val) },
-        { prop: 'ordersrc', label: '委托来源:' },
         { prop: 'clientticket', label: '客户端流水号:' },
         { prop: 'cancelorderid', label: '撤单单号:', show: !!cancelorderid },
         { prop: 'preorderid', label: '关联预埋单号:', show: !!preorderid },
@@ -104,11 +109,7 @@ const detailProps1 = computed<CellProp[]>(() => {
 })
 
 const detailProps2 = computed<CellProp[]>(() => {
-    const {
-        buildtype = 0,
-        orderstatus = 0,
-        marginalgorithm,
-    } = data.value ?? {}
+    const { buildtype = 0, orderstatus = 0, marginalgorithm } = data.value ?? {}
     const isBuildType1Or3 = [1, 3].includes(buildtype)
     const isBuildType2Or3 = [2, 3].includes(buildtype)
 

+ 110 - 63
src/packages/pc/views/query/order/order/index.vue

@@ -2,7 +2,57 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter :options="filterOptons" />
+            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules"
+                :show-message="false">
+                <el-form-item label="市场" prop="marketId">
+                    <el-select v-model="queryParams.marketId" @change="onMarketChange">
+                        <template v-for="item in getMarketOptions([15, 97, 99], true)" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="查询类型" prop="isHis">
+                    <el-select v-model="queryParams.isHis" @change="onTypeChange">
+                        <el-option label="当前" :value="0" />
+                        <el-option label="历史" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="日期" prop="date" v-if="queryParams.isHis === 1">
+                    <el-date-picker type="daterange" v-model="dateValue" value-format="YYYY-MM-DD"
+                        start-placeholder="开始" end-placeholder="结束" @change="onDateChange" />
+                </el-form-item>
+                <el-form-item label="单据类型" prop="buildType">
+                    <el-select v-model="queryParams.buildType" clearable>
+                        <template v-for="item in buildtypeEnum.getEnumOptions()" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="状态" prop="orderStatus">
+                    <el-select v-model="queryParams.orderStatus" clearable>
+                        <template v-for="item in orderstatusEnum.getEnumOptions()" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="委托单号" prop="orderId">
+                    <el-input type="number" v-model="queryParams.orderId" placeholder="请输入" />
+                </el-form-item>
+                <el-form-item label="商品" prop="goodsId">
+                    <el-input type="number" v-model="queryParams.goodsId" placeholder="请输入商品ID" />
+                </el-form-item>
+                <el-form-item label="账户" prop="accountName">
+                    <el-input type="number" v-model="queryParams.accountName" placeholder="输入账户ID" />
+                </el-form-item>
+                <el-form-item label="排除资金账户" prop="excludeAccountIdsStr">
+                    <el-input v-model="queryParams.excludeAccountIdsStr" placeholder="请输入完整资金账户,多个逗号分隔"
+                        style="width: 260px;" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch(false)">查询</el-button>
+                    <el-button type="primary" @click="onSearch(true)">重置</el-button>
+                </el-form-item>
+            </el-form>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
             <template #headerLeft>
@@ -25,18 +75,16 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { ElMessage } from 'element-plus'
+import { ref } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { formatDate } from '@/filters'
 import { getBuyOrSellName } from '@/constants/order'
 import { useEnum } from '@/hooks/enum'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
-import { useDataFilter } from '@/hooks/datatable'
 import { useOperation } from '@/hooks/operation'
 import { queryCommissionSheet } from '@/services/api/order'
 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'
 import AppOperation from '@pc/components/base/operation/index.vue'
 
@@ -46,8 +94,12 @@ const buildtypeEnum = useEnum('buildtype')
 // 委托状态
 const orderstatusEnum = useEnum('orderstatus')
 
-const queryParams = shallowRef<Model.CommissionSheetReq>()
-const { filterOptons, getQueryParams } = useDataFilter<Model.CommissionSheetReq>()
+const formRef = ref<FormInstance>()
+const dateValue = ref<string[]>([])
+
+const queryParams = ref<Partial<Model.CommissionSheetReq>>({
+    isHis: 0
+})
 
 const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.CommissionSheetRsp>({
     onClose: () => onSearch()
@@ -57,16 +109,14 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryC
     manual: true,
     params: {
         pageNum: 1,
-        pageSize: 20,
-        isHis: 0,
-        tradeMode: 0
+        pageSize: 20
     },
     onError: (err) => {
         ElMessage.error(err)
     }
 })
 
-const tableColumns = shallowRef<Model.TableColumn[]>([
+const tableColumns = ref<Model.TableColumn[]>([
     { field: 'orderId', label: '委托单号' },
     { field: 'accountNameId', label: '账户' },
     { field: 'goodsCodeName', label: '商品代码/名称' },
@@ -81,65 +131,62 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'operate', label: '操作', fixed: 'right' }
 ])
 
-filterOptons.inputList = [
-    { label: '商品', keys: ['goodsId'] },
-    { label: '委托单号', keys: ['orderId'] },
-    { label: '账户', keys: ['accountName'] },
-    { label: '排除资金账户', keys: ['excludeAccountIdsStr'] },
-]
-
-filterOptons.selectList = [
-    {
-        key: 'marketId',
-        label: '市场',
-        locked: true,
-        options: () => getMarketOptions([15, 97, 99], true),
-    },
-    {
-        key: 'isHis',
-        label: '查询类型',
-        selectedValue: 0,
-        locked: true,
-        options: () => [
-            { label: '当前', value: 0 },
-            { label: '历史', value: 1 },
-        ],
-    },
-    {
-        key: 'buildType',
-        label: '单据类型',
-        options: () => buildtypeEnum.getEnumOptions(),
-    },
-    {
-        key: 'orderStatus',
-        label: '状态',
-        options: () => [],
-    }
-]
+// 表单验证规则
+const formRules: FormRules = {
+    marketId: [{ required: true }],
+    date: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (dateValue.value.length === 2) {
+                callback()
+            } else {
+                callback(new Error('请选择日期'))
+            }
+        },
+    }],
+}
 
-filterOptons.buttonList = [
-    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
-]
+// 选择市场
+const onMarketChange = (value: number) => {
+    const market = getMarketById(value)
+    queryParams.value.tradeMode = market?.trademode
+}
 
-const onSearch = (clear = false) => {
-    processRequiredParams((qs) => run(qs), clear)
+// 选择查询类型
+const onTypeChange = (value: number) => {
+    if (!value) {
+        dateValue.value = []
+        onDateChange()
+    }
 }
 
-const openComponentOnClick = (code: string) => {
-    processRequiredParams(() => openComponent(code))
+// 选择日期
+const onDateChange = () => {
+    const [startDate, endDate] = dateValue.value
+    queryParams.value.startDateHis = startDate
+    queryParams.value.endDateHis = endDate
 }
 
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.CommissionSheetReq) => void, clear = false) => {
-    const qs = getQueryParams(clear)
-    const market = getMarketById(qs.marketId)
-    if (market) {
-        qs.tradeMode = market.trademode
-        queryParams.value = qs
-        callback(qs)
+const onSearch = (clear = false) => {
+    if (clear) {
+        queryParams.value = {
+            isHis: 0,
+        }
+        dateValue.value = []
     } else {
-        ElMessage.warning('请选择市场')
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                run(queryParams.value)
+            }
+        })
     }
 }
+
+const openComponentOnClick = (code: string) => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            openComponent(code)
+        }
+    })
+}
 </script>

+ 110 - 57
src/packages/pc/views/query/order/position/index.vue

@@ -2,7 +2,56 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter :options="filterOptons" />
+            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules"
+                :show-message="false">
+                <el-form-item label="市场" prop="marketId">
+                    <el-select v-model="queryParams.marketId">
+                        <template v-for="item in getMarketOptions([15, 40, 41, 48, 51, 71, 97, 99], true)"
+                            :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="方向" prop="buyOrSell">
+                    <el-select v-model="queryParams.buyOrSell" clearable>
+                        <template v-for="item in getBuyOrSellList()" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="单据类型" prop="isHis">
+                    <el-select v-model="queryParams.isHis" @change="onTypeChange">
+                        <el-option label="当前" :value="0" />
+                        <el-option label="历史" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="日期" prop="date" v-if="queryParams.isHis === 1">
+                    <el-date-picker type="daterange" v-model="dateValue" value-format="YYYY-MM-DD"
+                        start-placeholder="开始" end-placeholder="结束" @change="onDateChange" />
+                </el-form-item>
+                <el-form-item label="成交单号" prop="tradeId">
+                    <el-input type="number" v-model="queryParams.tradeId" placeholder="请输入" />
+                </el-form-item>
+                <el-form-item label="商品" prop="goodsId">
+                    <el-input type="number" v-model="queryParams.goodsId" placeholder="请输入商品ID" />
+                </el-form-item>
+                <el-form-item label="登录账号" prop="loginId">
+                    <el-input v-model="queryParams.loginId" placeholder="请输入" />
+                </el-form-item>
+                <el-form-item label="账户" prop="loginId">
+                    <el-input v-model="queryParams.accountId" placeholder="输入账户或名称" />
+                </el-form-item>
+                <el-form-item label="所属机构" prop="parentAreaId">
+                    <el-input type="number" v-model="queryParams.parentAreaId" placeholder="请输入机构ID" />
+                </el-form-item>
+                <el-form-item label="有效持仓" prop="validHolderQty">
+                    <el-switch v-model="queryParams.validHolderQty" active-value="1" inactive-value="0" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch(false)">查询</el-button>
+                    <el-button type="primary" @click="onSearch(true)">重置</el-button>
+                </el-form-item>
+            </el-form>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
             <template #headerLeft>
@@ -25,24 +74,31 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { ElMessage } from 'element-plus'
+import { ref } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { formatDate } from '@/filters'
 import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
+import { useEnum } from '@/hooks/enum'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
-import { useDataFilter } from '@/hooks/datatable'
 import { useOperation } from '@/hooks/operation'
 import { queryPositionSheet } from '@/services/api/order'
 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'
 import AppOperation from '@pc/components/base/operation/index.vue'
 
 const { getMarketOptions } = useMarket()
-const queryParams = shallowRef<Model.PositionSheetReq>()
 
-const { filterOptons, getQueryParams } = useDataFilter<Model.PositionSheetReq>()
+// 机构类型
+const usertype2Enum = useEnum('usertype2')
+
+const formRef = ref<FormInstance>()
+const dateValue = ref<string[]>([])
+
+const queryParams = ref<Partial<Model.PositionSheetReq>>({
+    isHis: 0,
+    validHolderQty: '1'
+})
 
 const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.PositionSheetRsp>({
     onClose: () => onSearch()
@@ -52,15 +108,14 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryP
     manual: true,
     params: {
         pageNum: 1,
-        pageSize: 20,
-        isHis: 0,
+        pageSize: 20
     },
     onError: (err) => {
         ElMessage.error(err)
     }
 })
 
-const tableColumns = shallowRef<Model.TableColumn[]>([
+const tableColumns = ref<Model.TableColumn[]>([
     { field: 'tradeid', label: '成交单号' },
     { field: 'tradedate', label: '交易日' },
     { field: 'accountNameId', label: '账户' },
@@ -75,66 +130,64 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'actuallYplS', label: '浮动损益' },
     { field: 'holderdays', label: 'T+N' },
     { field: 'tradetime', label: '交易时间', formatValue: (val) => formatDate(val) },
-    { field: 'usertype', label: '账户类型' },
+    { field: 'usertype', label: '账户类型', formatValue: (val) => usertype2Enum.getEnumTypeName(val) },
     { field: 'memberusername', label: '所属会员' },
     { field: 'parentusername', label: '所属上级' },
     { field: 'marketname', label: '市场' },
     { field: 'operate', label: '操作', fixed: 'right' }
 ])
 
-filterOptons.inputList = [
-    { label: '商品', keys: ['goodsId'] },
-    { label: '登录账号', keys: ['loginId'] },
-    { label: '成交单号', keys: ['tradeId'] },
-    { label: '所属机构', keys: ['parentAreaId'] },
-    { label: '账户', keys: ['accountId'] },
-]
+// 表单验证规则
+const formRules: FormRules = {
+    marketId: [{ required: true }],
+    date: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (dateValue.value.length === 2) {
+                callback()
+            } else {
+                callback(new Error('请选择日期'))
+            }
+        },
+    }],
+}
 
-filterOptons.selectList = [
-    {
-        key: 'marketId',
-        label: '市场',
-        locked: true,
-        options: () => getMarketOptions(),
-    },
-    {
-        key: 'isHis',
-        label: '单据类型',
-        selectedValue: 0,
-        locked: true,
-        options: () => [
-            { label: '当前', value: 0 },
-            { label: '历史', value: 1 },
-        ],
-    },
-    {
-        key: 'buyOrSell',
-        label: '方向',
-        options: () => getBuyOrSellList(),
+// 选择单据类型
+const onTypeChange = (value: number) => {
+    if (!value) {
+        dateValue.value = []
+        onDateChange()
     }
-]
-
-filterOptons.buttonList = [
-    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
-]
-
-const onSearch = (clear = false) => {
-    processRequiredParams((qs) => run(qs), clear)
 }
 
-const openComponentOnClick = (code: string) => {
-    processRequiredParams(() => openComponent(code))
+// 选择日期
+const onDateChange = () => {
+    const [startDate, endDate] = dateValue.value
+    queryParams.value.startDate = startDate
+    queryParams.value.endDate = endDate
 }
 
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.ContractSheetReq) => void, clear = false) => {
-    const qs = getQueryParams(clear)
-    if (qs.marketId) {
-        queryParams.value = qs
-        callback(qs)
+const onSearch = (clear = false) => {
+    if (clear) {
+        queryParams.value = {
+            isHis: 0,
+            validHolderQty: '1'
+        }
+        dateValue.value = []
     } else {
-        ElMessage.warning('请选择市场')
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                run(queryParams.value)
+            }
+        })
     }
 }
+
+const openComponentOnClick = (code: string) => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            openComponent(code)
+        }
+    })
+}
 </script>

+ 3 - 3
src/packages/pc/views/query/order/trade/components/details/index.vue

@@ -37,8 +37,8 @@ const props = defineProps({
 const show = shallowRef(true)
 const refresh = shallowRef(false)
 
-// 成交单类型
-const buildtypeEnum = useEnum('buildtype')
+const buildtypeEnum = useEnum('buildtype') // 成交单类型
+const tradetypeEnum = useEnum('tradetype') // 成交类别
 
 const { data } = useRequest(queryContractSheetDetailDetail, {
     params: {
@@ -75,7 +75,7 @@ const detailProps1 = computed<CellProp[]>(() => {
         { prop: 'tradeqty', label: '成交数量:' },
         { prop: 'tradeamount', label: '成交金额:' },
         { prop: 'closepl', label: '平仓盈亏:' },
-        { prop: 'tradetype', label: '成交类别:' },
+        { prop: 'tradetype', label: '成交类别:', formatValue: (val) => tradetypeEnum.getEnumTypeName(val) },
         { prop: 'tradetime', label: '成交时间:', formatValue: (val) => formatDate(val) },
         { prop: 'matchaccountname', label: '对手账户:', formatValue: (val) => val && `${val} (${matchaccountid})` },
         { prop: 'refgoodsid', label: '参考商品:', show: isTradeMode46 },

+ 124 - 70
src/packages/pc/views/query/order/trade/index.vue

@@ -2,7 +2,73 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter :options="filterOptons" />
+            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules"
+                :show-message="false">
+                <el-form-item label="市场" prop="marketId">
+                    <el-select v-model="queryParams.marketId">
+                        <template v-for="item in getMarketOptions([15, 97, 99], true)" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="查询类型" prop="isHis">
+                    <el-select v-model="queryParams.isHis" @change="onTypeChange">
+                        <el-option label="当前" :value="0" />
+                        <el-option label="历史" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="日期" prop="date" v-if="queryParams.isHis === 1">
+                    <el-date-picker type="daterange" v-model="dateValue" value-format="YYYY-MM-DD"
+                        start-placeholder="开始" end-placeholder="结束" @change="onDateChange" />
+                </el-form-item>
+                <el-form-item label="方向" prop="buyOrSell">
+                    <el-select v-model="queryParams.buyOrSell" clearable>
+                        <template v-for="item in getBuyOrSellList()" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="类型" prop="buildType">
+                    <el-select v-model="queryParams.buildType" clearable>
+                        <template v-for="item in buildtypeEnum.getEnumOptions()" :key="item.value">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="成交类别" prop="tradeTypes">
+                    <el-select v-model="queryParams.tradeTypes" clearable>
+                        <el-option label="交易成交" value="1,2,10" />
+                        <el-option label="交收成交" value="3,4" />
+                        <el-option label="风控斩仓" value="6" />
+                        <el-option label="协议成交" value="7,9,11" />
+                        <el-option label="持仓过户" value="29" />
+                        <el-option label="系统强平" value="12" />
+                        <el-option label="其他成交" value="5,8,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="手续费" prop="feeSearchType">
+                    <el-select v-model="queryParams.feeSearchType" clearable>
+                        <el-option label="等于0" :value="1" />
+                        <el-option label="不等于0" :value="2" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="成交单号" prop="tradeId">
+                    <el-input type="number" v-model="queryParams.tradeId" placeholder="请输入" />
+                </el-form-item>
+                <el-form-item label="商品" prop="goodsId">
+                    <el-input type="number" v-model="queryParams.goodsId" placeholder="请输入商品ID" />
+                </el-form-item>
+                <el-form-item label="账户" prop="accountId">
+                    <el-input type="number" v-model="queryParams.accountId" placeholder="请输入账户ID" />
+                </el-form-item>
+                <el-form-item label="所属机构" prop="areaUserName">
+                    <el-input v-model="queryParams.areaUserName" placeholder="请输入代码或名称" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch(false)">查询</el-button>
+                    <el-button type="primary" @click="onSearch(true)">重置</el-button>
+                </el-form-item>
+            </el-form>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
             <template #headerLeft>
@@ -25,26 +91,29 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { ElMessage } from 'element-plus'
+import { ref } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { formatDate } from '@/filters'
 import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
 import { useEnum } from '@/hooks/enum'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
-import { useDataFilter } from '@/hooks/datatable'
 import { useOperation } from '@/hooks/operation'
 import { queryContractSheet } from '@/services/api/order'
 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'
 import AppOperation from '@pc/components/base/operation/index.vue'
 
 const { getMarketOptions } = useMarket()
 const buildtypeEnum = useEnum('buildtype') // 单据类型
-const queryParams = shallowRef<Model.ContractSheetReq>()
+const tradetypeEnum = useEnum('tradetype') // 成交类别
 
-const { filterOptons, getQueryParams } = useDataFilter<Model.ContractSheetReq>()
+const formRef = ref<FormInstance>()
+const dateValue = ref<string[]>([])
+
+const queryParams = ref<Partial<Model.ContractSheetReq>>({
+    isHis: 0
+})
 
 const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.ContractSheetRsp>({
     onClose: () => onSearch()
@@ -55,11 +124,13 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryC
     params: {
         pageNum: 1,
         pageSize: 20,
-        isHis: 0,
+    },
+    onError: (err) => {
+        ElMessage.error(err)
     }
 })
 
-const tableColumns = shallowRef<Model.TableColumn[]>([
+const tableColumns = ref<Model.TableColumn[]>([
     { field: 'tradeid', label: '成交单号' },
     { field: 'loginid', label: '登录账号' },
     { field: 'accountid', label: '资金账户' },
@@ -68,7 +139,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'goodsCodeName', label: '商品代码/名称' },
     { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
     { field: 'buildtype', label: '类型', formatValue: (val) => buildtypeEnum.getEnumTypeName(val) },
-    { field: 'tradetype', label: '成交类别' },
+    { field: 'tradetype', label: '成交类别', formatValue: (val) => tradetypeEnum.getEnumTypeName(val) },
     { field: 'tradeprice', label: '成交价格' },
     { field: 'tradeqty', label: '成交数量' },
     { field: 'tradeamount', label: '成交金额' },
@@ -78,73 +149,56 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'operate', label: '操作', fixed: 'right' }
 ])
 
-filterOptons.inputList = [
-    { label: '商品', keys: ['goodsId'] },
-    { label: '成交单号', keys: ['tradeId'] },
-    { label: '账户', keys: ['accountId'] },
-    { label: '所属机构', keys: ['areaUserName'] },
-]
+// 表单验证规则
+const formRules: FormRules = {
+    marketId: [{ required: true }],
+    date: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (dateValue.value.length === 2) {
+                callback()
+            } else {
+                callback(new Error('请选择日期'))
+            }
+        },
+    }],
+}
 
-filterOptons.selectList = [
-    {
-        key: 'marketId',
-        label: '市场',
-        locked: true,
-        options: () => getMarketOptions([15, 97, 99], true),
-    },
-    {
-        key: 'isHis',
-        label: '查询类型',
-        selectedValue: 0,
-        locked: true,
-        options: () => [
-            { label: '当前', value: 0 },
-            { label: '历史', value: 1 },
-        ],
-    },
-    {
-        key: 'buyOrSell',
-        label: '方向',
-        options: () => getBuyOrSellList(),
-    },
-    {
-        key: 'buildType',
-        label: '类型',
-        options: () => buildtypeEnum.getEnumOptions(),
-    },
-    {
-        key: 'tradeTypes',
-        label: '成交类别',
-        options: () => [],
-    },
-    {
-        key: 'feeSearchType',
-        label: '手续费',
-        options: () => [],
+// 选择查询类型
+const onTypeChange = (value: number) => {
+    if (!value) {
+        dateValue.value = []
+        onDateChange()
     }
-]
-
-filterOptons.buttonList = [
-    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
-]
-
-const onSearch = (clear = false) => {
-    processRequiredParams((qs) => run(qs), clear)
 }
 
-const openComponentOnClick = (code: string) => {
-    processRequiredParams(() => openComponent(code))
+// 选择日期
+const onDateChange = () => {
+    const [startDate, endDate] = dateValue.value
+    queryParams.value.startDateHis = startDate
+    queryParams.value.endDateHis = endDate
 }
 
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.ContractSheetReq) => void, clear = false) => {
-    const qs = getQueryParams(clear)
-    if (qs.marketId) {
-        queryParams.value = qs
-        callback(qs)
+const onSearch = (clear = false) => {
+    if (clear) {
+        queryParams.value = {
+            isHis: 0,
+        }
+        dateValue.value = []
     } else {
-        ElMessage.warning('请选择市场')
+        formRef.value?.validate((valid) => {
+            if (valid) {
+                run(queryParams.value)
+            }
+        })
     }
 }
+
+const openComponentOnClick = (code: string) => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            openComponent(code)
+        }
+    })
+}
 </script>

+ 0 - 100
src/packages/pc/views/query/order/tradesumm/index.vue

@@ -1,108 +1,8 @@
 <!-- 查询管理-内部订单查询-成交汇总查询 -->
 <template>
     <app-view>
-        <template #header>
-            <app-filter :options="filterOptons" />
-        </template>
-        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
-            <template #headerLeft>
-                <app-operation :data-list="getFilteredButtons(['query_order_tradesumm_export'])"
-                    @click="openComponentOnClick" />
-            </template>
-            <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="{ record, queryParams }" @closed="closeComponent"
-            v-if="componentId" />
     </app-view>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { ElMessage } from 'element-plus'
-import { useMarket } from '@/hooks/market'
-import { useRequest } from '@/hooks/request'
-import { useDataFilter } from '@/hooks/datatable'
-import { useOperation } from '@/hooks/operation'
-import { queryGoodsTrade } from '@/services/api/order'
-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'
-import AppOperation from '@pc/components/base/operation/index.vue'
-
-const { getMarketOptions } = useMarket()
-const queryParams = shallowRef<Model.GoodsTradeReq>()
-
-const { filterOptons, getQueryParams } = useDataFilter<Model.GoodsTradeReq>()
-
-const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.GoodsTradeReq>({
-    onClose: () => onSearch()
-})
-
-const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryGoodsTrade, {
-    manual: true,
-    params: {
-        pageNum: 1,
-        pageSize: 20,
-    }
-})
-
-const tableColumns = shallowRef<Model.TableColumn[]>([
-    { field: 'tradeDate', label: '交易日' },
-    { field: 'goodsfullname', label: '商品代码名称' },
-    { field: 'tradeqtysum	', label: '总成交量' },
-    { field: 'tradeamountsum', label: '总成交额' },
-    { field: 'closeplsum', label: '总转让损益' },
-    { field: 'chargesum', label: '总手续费' }
-])
-
-filterOptons.inputList = [
-    { label: '商品', keys: ['goodsid'] },
-    { label: '排除资金账户', keys: ['excludeaccountidsstr'] },
-]
-
-filterOptons.selectList = [
-    {
-        key: 'marketid',
-        label: '市场',
-        locked: true,
-        options: () => getMarketOptions([15, 97, 99], true),
-    },
-    {
-        key: 'summode',
-        label: '汇总方式',
-        selectedValue: 0,
-        locked: true,
-        options: () => [
-            { label: '按商品汇总', value: 0 },
-            { label: '按商品+日期汇总', value: 1 },
-        ],
-    },
-]
-
-filterOptons.buttonList = [
-    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
-]
-
-const onSearch = (clear = false) => {
-    processRequiredParams((qs) => run(qs), clear)
-}
-
-const openComponentOnClick = (code: string) => {
-    processRequiredParams(() => openComponent(code))
-}
-
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.GoodsTradeReq) => void, clear = false) => {
-    const qs = getQueryParams(clear)
-    if (qs.marketid) {
-        queryParams.value = qs
-        callback(qs)
-    } else {
-        ElMessage.warning('请选择市场')
-    }
-}
 </script>

+ 1 - 1
src/services/api/admin/index.ts

@@ -11,7 +11,7 @@ export function querySystemmanager(options: CommonFetchOptions<{ request: Model.
     if (options.data) {
         options.data.releType = userStore.userInfo.releType.toString()
     }
-    return httpClient.commonRequest('/systemmanager/query', 'post', options)
+    return httpClient.commonRequest('/systemmanager/query', 'get', options)
 }
 
 /**

+ 6 - 3
src/services/api/order/index.ts

@@ -7,7 +7,7 @@ const userStore = useUserStore()
 /**
  * 委托单查询
  */
-export function queryCommissionSheet(options: CommonFetchOptions<{ request: Model.CommissionSheetReq; response: Model.CommissionSheetRsp[]; }>) {
+export function queryCommissionSheet(options: CommonFetchOptions<{ request: Partial<Model.CommissionSheetReq>; response: Model.CommissionSheetRsp[]; }>) {
     if (options.data) {
         options.data.orgztypes = userStore.userInfo.orgztypes
     }
@@ -31,7 +31,7 @@ export function commissionExport(options: CommonFetchOptions<{ request: Model.Co
 /**
  * 成交单查询
  */
-export function queryContractSheet(options: CommonFetchOptions<{ request: Model.ContractSheetReq; response: Model.ContractSheetRsp[]; }>) {
+export function queryContractSheet(options: CommonFetchOptions<{ request: Partial<Model.ContractSheetReq>; response: Model.ContractSheetRsp[]; }>) {
     if (options.data) {
         options.data.orgztypes = userStore.userInfo.orgztypes
     }
@@ -55,7 +55,10 @@ export function contractExport(options: CommonFetchOptions<{ request: Model.Cont
 /**
  * 持仓单查询
  */
-export function queryPositionSheet(options: CommonFetchOptions<{ request: Model.PositionSheetReq; response: Model.PositionSheetRsp[]; }>) {
+export function queryPositionSheet(options: CommonFetchOptions<{ request: Partial<Model.PositionSheetReq>; response: Model.PositionSheetRsp[]; }>) {
+    if (options.data) {
+        options.data.orgztypes = userStore.userInfo.orgztypes
+    }
     return httpClient.commonRequest('/query/positionSheet', 'get', options)
 }
 

+ 43 - 43
src/types/model/order.d.ts

@@ -1,25 +1,25 @@
 declare namespace Model {
     /** 委托单查询 请求 */
     interface CommissionSheetReq {
-        accountId?: number; // 资金账号id
-        accountName?: string; // 账户名 operatetype == 2
-        buildType?: number; // 单据类型 buildtype
-        buyOrSell?: number; // 方向 buyOrSell operatetype == 2
-        endDateHis?: string; // 结束时间
-        excludeAccountIdsStr?: string; // 排除资金账户
-        goodsId?: number; // 商品id operatetype == 2
+        accountId: number; // 资金账号id
+        accountName: string; // 账户名 operatetype == 2
+        buildType: number; // 单据类型 buildtype
+        buyOrSell: number; // 方向 buyOrSell operatetype == 2
+        endDateHis: string; // 结束时间
+        excludeAccountIdsStr: string; // 排除资金账户
+        goodsId: number; // 商品id operatetype == 2
         isHis: number; // 查询类型 1历史 0当前
-        marketId?: number; // 市场id operatetype == 2
-        operateType?: number; // operatetype=0查询所有 operatetype=2查询斩仓记录
-        orderId?: number; // 委托单号 operatetype == 2
-        orderStatus?: number; // 委托状态
-        orgztypes?: string; // 权限控制
+        marketId: number; // 市场id operatetype == 2
+        operateType: number; // operatetype=0查询所有 operatetype=2查询斩仓记录
+        orderId: number; // 委托单号 operatetype == 2
+        orderStatus: number; // 委托状态
+        orgztypes: string; // 权限控制
         pageNum: number; // 页码
         pageSize: number; // 页大小
-        searchStatus?: number; // 状态 1 已成交 2 未成交
-        sortField?: number; // 排序 1委托方向 2委托价格 3委托数量 4成交数量 5委托时间
-        sortType?: number; // 排序 1 降序 0 升序
-        startDateHis?: string; // 开始时间
+        searchStatus: number; // 状态 1 已成交 2 未成交
+        sortField: number; // 排序 1委托方向 2委托价格 3委托数量 4成交数量 5委托时间
+        sortType: number; // 排序 1 降序 0 升序
+        startDateHis: string; // 开始时间
         tradeMode: number;
     }
 
@@ -132,24 +132,24 @@ declare namespace Model {
 
     /** 成交单查询 请求 */
     interface ContractSheetReq {
-        accountId?: number; // 资金账号id
-        areaUserName?: string; // 所属机构
-        areaUserid?: number;
-        buildType?: number; // 类型 buildtype
-        buyOrSell?: number; // 方向 buyOrSell
-        endDateHis?: string; // 结束时间
-        feeSearchType?: string; // 所属机构 1:等于0,2:不等于0
-        goodsId?: number; // 商品id
+        accountId: number; // 资金账号id
+        areaUserName: string; // 所属机构
+        areaUserid: number;
+        buildType: number; // 类型 buildtype
+        buyOrSell: number; // 方向 buyOrSell
+        endDateHis: string; // 结束时间
+        feeSearchType: string; // 所属机构 1:等于0,2:不等于0
+        goodsId: number; // 商品id
         isHis: number; // 查询类型 1历史 0当前
-        marketId?: number; // 市场id
-        orgztypes?: string; // 权限控制
+        marketId: number; // 市场id
+        orgztypes: string; // 权限控制
         pageNum: number; // 页码
         pageSize: number; // 页大小
-        sortField?: number; // 排序 1委托方向 2委托价格 3委托数量 4成交数量 5委托时间
-        sortType?: number; // 排序 1 降序 0 升序
-        startDateHis?: string; // 开始时间
-        tradeId?: string; // 成交单号
-        tradeTypes?: string; // 成交类别
+        sortField: number; // 排序 1委托方向 2委托价格 3委托数量 4成交数量 5委托时间
+        sortType: number; // 排序 1 降序 0 升序
+        startDateHis: string; // 开始时间
+        tradeId: string; // 成交单号
+        tradeTypes: string; // 成交类别
     }
 
     /** 成交单查询 响应 */
@@ -232,21 +232,21 @@ declare namespace Model {
 
     /** 持仓单查询 请求 */
     interface PositionSheetReq {
-        accountId?: number; // 资金账号id
-        areaUserid?: number;
-        buyOrSell?: number; // 方向 buyOrSell
-        endDate?: string; // 结束时间
-        goodsId?: number; // 商品id
+        accountId: number; // 资金账号id
+        areaUserid: number;
+        buyOrSell: number; // 方向 buyOrSell
+        endDate: string; // 结束时间
+        goodsId: number; // 商品id
         isHis: number; // 查询类型 1历史 0当前
-        loginId?: number; // 登入账号
-        marketId?: number; // 市场id
-        orgztypes?: string; // 权限控制
+        loginId: number; // 登入账号
+        marketId: number; // 市场id
+        orgztypes: string; // 权限控制
         pageNum: number; // 页码
         pageSize: number; // 页大小
-        parentAreaId?: number; // 所属机构
-        startDate?: string; // 开始时间
-        tradeId?: string; // 成交单号
-        validHolderQty?: string; // 有效持仓
+        parentAreaId: number; // 所属机构
+        startDate: string; // 开始时间
+        tradeId: string; // 成交单号
+        validHolderQty: string; // 有效持仓
     }
 
     /** 持仓单查询 响应 */