li.shaoyi hai 1 ano
pai
achega
11b13d5de9
Modificáronse 25 ficheiros con 1445 adicións e 213 borrados
  1. 1 1
      src/hooks/datatable-v2/types.ts
  2. 0 0
      src/packages/pc/components/base/remote-select/index.less
  3. 45 0
      src/packages/pc/components/base/remote-select/index.vue
  4. 1 1
      src/packages/pc/components/base/table-filter-v2/index.vue
  5. 27 47
      src/packages/pc/components/modules/select-account/index.vue
  6. 32 50
      src/packages/pc/components/modules/select-goods/index.vue
  7. 31 53
      src/packages/pc/components/modules/select-investor/index.vue
  8. 0 0
      src/packages/pc/components/modules/select-member/index.less
  9. 31 55
      src/packages/pc/components/modules/select-member/index.vue
  10. 0 0
      src/packages/pc/views/query/internal/offlinedelivery/components/cancel/index.vue
  11. 1 1
      src/packages/pc/views/query/internal/offlinedelivery/index.vue
  12. 161 0
      src/packages/pc/views/query/order/close/index.vue
  13. 95 0
      src/packages/pc/views/query/order/delivery/components/cancel/index.vue
  14. 81 0
      src/packages/pc/views/query/order/delivery/components/confirm/index.vue
  15. 63 0
      src/packages/pc/views/query/order/delivery/components/details/index.vue
  16. 51 0
      src/packages/pc/views/query/order/delivery/components/pay/index.vue
  17. 6 0
      src/packages/pc/views/query/order/index.vue
  18. 125 0
      src/packages/pc/views/query/order/list/index.vue
  19. 133 0
      src/packages/pc/views/query/order/monitor/index.vue
  20. 7 0
      src/packages/pc/views/query/order/report/index.vue
  21. 151 0
      src/packages/pc/views/query/order/terminate/index.vue
  22. 5 1
      src/services/api/common/index.ts
  23. 91 0
      src/services/api/order/index.ts
  24. 4 4
      src/types/model/common.d.ts
  25. 303 0
      src/types/model/order.d.ts

+ 1 - 1
src/hooks/datatable-v2/types.ts

@@ -11,7 +11,7 @@ export interface FilterData<T> {
  */
 export interface FilterOption<T, K extends keyof T> {
     filters: FilterItem<T, K>[];
-    buttons: ActionButton[];
+    buttons?: ActionButton[];
 }
 
 /** 

+ 0 - 0
src/packages/pc/components/modules/select-investor/index.less → src/packages/pc/components/base/remote-select/index.less


+ 45 - 0
src/packages/pc/components/base/remote-select/index.vue

@@ -0,0 +1,45 @@
+<!-- 远程下拉选择器 -->
+<template>
+    <el-select class="app-remote-select" :empty-values="emptyValues" :placeholder="placeholder" remote filterable
+        clearable>
+        <template #header>
+            <el-button text bg size="small" @click="$emit('reset')">重置</el-button>
+        </template>
+        <el-option v-for="(item, index) in options" :key="index" :label="item[defaultProps.label]"
+            :value="item[defaultProps.value]">
+            <slot :option="item" :index="index"></slot>
+        </el-option>
+    </el-select>
+</template>
+
+<script lang="ts" setup>
+import { computed, PropType } from 'vue'
+
+const props = defineProps({
+    options: {
+        type: Array as any, // eslint-disable-next-line
+        required: true
+    },
+    optionProps: {
+        type: Object as PropType<{ label?: string; value?: string; }>,
+        default: () => ({})
+    },
+    emptyValues: {
+        type: Array,
+        default: () => ([null, undefined, 0])
+    },
+    placeholder: {
+        type: String,
+        default: '请输入'
+    }
+})
+
+const defaultProps = computed(() => ({
+    ...{ label: 'label', value: 'value' },
+    ...props.optionProps
+}))
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 1 - 1
src/packages/pc/components/base/table-filter-v2/index.vue

@@ -14,7 +14,7 @@
       </slot>
     </template>
     <slot name="after"></slot>
-    <el-form-item v-if="option.filters.length">
+    <el-form-item v-if="option.filters.length && option.buttons">
       <el-button :class="item.className" v-for="(item, index) in option.buttons" :key="index" :disabled="loading"
         @click="handleButtonClick(item)">{{ item.label }}
       </el-button>

+ 27 - 47
src/packages/pc/components/modules/select-account/index.vue

@@ -1,77 +1,57 @@
 <!-- 资金账户下拉列表 -->
 <template>
-    <div class="el-form-item--col">
-        <el-select ref="selectRef" v-model="selectedValue" :empty-values="[null, undefined, 0]" :loading="loading"
-            :placeholder="placeholder" :remote-method="remoteMethod" @change="onChange" remote filterable clearable>
-            <el-option v-for="item in dataList" :key="item.accountid" :label="item.accountid" :value="item.accountid">
-                <div style="display: flex;justify-content: space-between;">
-                    <span>{{ item.accountid }}</span>
-                    <span>{{ item.relatedname }}</span>
-                </div>
-            </el-option>
-        </el-select>
-        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
-    </div>
+    <app-remote-select v-model="selectedValue" :options="dataList"
+        :option-props="{ label: 'relatedname', value: 'accountid' }" :remote-method="remoteMethod" @change="onChange"
+        @reset="onReset">
+        <template #default="{ option }">
+            <div style="display: flex;justify-content: space-between;">
+                <span>{{ option.accountid }}</span>
+                <span>{{ option.relatedname }}</span>
+            </div>
+        </template>
+    </app-remote-select>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, computed, toRaw } from 'vue'
-import { ElMessage } from 'element-plus'
+import { computed, toRaw } from 'vue'
 import { useRequest } from '@/hooks/request'
 import { queryTAAccountChildrenSelect } from '@/services/api/report'
+import AppRemoteSelect from '@pc/components/base/remote-select/index.vue'
 
 const props = defineProps({
-    modelValue: [Number, String],
-    placeholder: {
-        type: String,
-        default: '请输入'
-    }
+    modelValue: [Number, String]
 })
 
 const emit = defineEmits(['update:modelValue', 'change'])
 
-const selectRef = shallowRef()
-
 const selectedValue = computed({
     get: () => props.modelValue,
     set: (val) => emit('update:modelValue', val)
 })
 
-const { dataList, loading, runAsync } = useRequest(queryTAAccountChildrenSelect, {
-    manual: true
-})
+const { dataList, loading, run } = useRequest(queryTAAccountChildrenSelect)
 
-const onPlus = () => {
+const onReset = () => {
     if (!loading.value) {
-        loading.value = true
-        runAsync().then((res) => {
-            if (res.data.length) {
-                selectRef.value.toggleMenu()
-            } else {
-                ElMessage.warning('暂无数据')
-            }
-        }).catch((err) => {
-            ElMessage.error(err)
-        }).finally(() => {
-            loading.value = false
-        })
+        selectedValue.value = undefined
+        run()
     }
 }
 
 const remoteMethod = (query: string) => {
-    if (query) {
-        loading.value = true
-        runAsync({
-            searchcode: query
-        }).finally(() => {
-            loading.value = false
-        })
+    if (!loading.value) {
+        if (query) {
+            run({
+                searchcode: query
+            })
+        } else if (!dataList.value.length) {
+            onReset()
+        }
     }
 }
 
-const onChange = (id?: number) => {
-    const item = dataList.value.find((e) => e.accountid === id)
-    dataList.value = []
+const onChange = (value?: number) => {
+    const item = dataList.value.find((e) => e.accountid === value)
     emit('change', toRaw(item))
 }
 </script>

+ 32 - 50
src/packages/pc/components/modules/select-goods/index.vue

@@ -1,83 +1,65 @@
 <template>
-    <div class="el-form-item--col">
-        <el-select ref="selectRef" v-model="selectedValue" :empty-values="[null, undefined, 0]" :loading="loading"
-            :placeholder="placeholder" :remote-method="remoteMethod" @change="onChange" remote filterable clearable>
-            <el-option v-for="item in dataList" :key="item.goodsId" :label="item.goodsName" :value="item.goodsId">
-                <div style="display: flex;justify-content: space-between;">
-                    <span>{{ item.goodsCode }}</span>
-                    <span>{{ item.goodsName }}</span>
-                </div>
-            </el-option>
-        </el-select>
-        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
-    </div>
+    <app-remote-select v-model="selectedValue" :options="dataList"
+        :option-props="{ label: 'goodsName', value: 'goodsId' }" :remote-method="remoteMethod" @change="onChange"
+        @reset="onReset">
+        <template #default="{ option }">
+            <div style="display: flex;justify-content: space-between;">
+                <span>{{ option.goodsCode }}</span>
+                <span>{{ option.goodsName }}</span>
+            </div>
+        </template>
+    </app-remote-select>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, computed, toRaw } from 'vue'
-import { ElMessage } from 'element-plus'
+import { computed, toRaw } from 'vue'
 import { useRequest } from '@/hooks/request'
 import { queryGoodsSelect } from '@/services/api/common'
+import AppRemoteSelect from '@pc/components/base/remote-select/index.vue'
 
 const props = defineProps({
     modelValue: [Number, String],
     marketId: Number,
-    status: String,
-    placeholder: {
-        type: String,
-        default: '输入商品代码或名称'
-    }
+    status: String
 })
 
 const emit = defineEmits(['update:modelValue', 'change'])
 
-const selectRef = shallowRef()
-
 const selectedValue = computed({
     get: () => props.modelValue,
     set: (val) => emit('update:modelValue', val)
 })
 
-const { dataList, loading, runAsync } = useRequest(queryGoodsSelect, {
-    manual: true
+const { dataList, loading, run } = useRequest(queryGoodsSelect, {
+    params: {
+        goodsStatusIds: props.status
+    }
 })
 
-const onPlus = () => {
+const onReset = () => {
     if (!loading.value) {
-        loading.value = true
-        runAsync({
-            marketId: props.marketId,
-            goodsStatusIds: props.status
-        }).then((res) => {
-            if (res.data.length) {
-                selectRef.value.toggleMenu()
-            } else {
-                ElMessage.warning('暂无数据')
-            }
-        }).catch((err) => {
-            ElMessage.error(err)
-        }).finally(() => {
-            loading.value = false
+        selectedValue.value = undefined
+        run({
+            marketId: props.marketId
         })
     }
 }
 
 const remoteMethod = (query: string) => {
-    if (query) {
-        loading.value = true
-        runAsync({
-            marketId: props.marketId,
-            goodsStatusIds: props.status,
-            searchCode: query
-        }).finally(() => {
-            loading.value = false
-        })
+    if (!loading.value) {
+        if (query) {
+            run({
+                marketId: props.marketId,
+                searchCode: query
+            })
+        } else if (!dataList.value.length) {
+            onReset()
+        }
     }
 }
 
-const onChange = (id?: number) => {
-    const item = dataList.value.find((e) => e.goodsId === id)
-    dataList.value = []
+const onChange = (value?: number) => {
+    const item = dataList.value.find((e) => e.goodsId === value)
     emit('change', toRaw(item))
 }
 </script>

+ 31 - 53
src/packages/pc/components/modules/select-investor/index.vue

@@ -1,79 +1,57 @@
 <!-- 子机构开户下拉查询推荐人 -->
 <template>
-    <div class="el-form-item--col">
-        <el-select ref="selectRef" v-model="selectedValue" :loading="loading" :placeholder="placeholder"
-            :remote-method="remoteMethod" @change="dataList = []" remote filterable clearable>
-            <el-option v-for="item in dataList" :key="item.userId" :label="item.accountName" :value="item.userId">
-                <div style="display: flex;justify-content: space-between;">
-                    <span>{{ item.userId }}</span>
-                    <span>{{ item.accountName }}</span>
-                </div>
-            </el-option>
-        </el-select>
-        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
-    </div>
+    <app-remote-select v-model="selectedValue" :options="dataList"
+        :option-props="{ label: 'accountName', value: 'userId' }" :remote-method="remoteMethod" @change="onChange"
+        @reset="onReset">
+        <template #default="{ option }">
+            <div style="display: flex;justify-content: space-between;">
+                <span>{{ option.userId }}</span>
+                <span>{{ option.accountName }}</span>
+            </div>
+        </template>
+    </app-remote-select>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, computed } from 'vue'
-import { ElMessage } from 'element-plus'
+import { computed, toRaw } from 'vue'
 import { useRequest } from '@/hooks/request'
 import { queryInvestorSelect } from '@/services/api/common'
-import { useUserStore } from '@/stores'
+import AppRemoteSelect from '@pc/components/base/remote-select/index.vue'
 
 const props = defineProps({
-    modelValue: String,
-    placeholder: {
-        type: String,
-        default: '请输入'
-    }
+    modelValue: String
 })
 
-const emit = defineEmits(['update:modelValue'])
-const userStore = useUserStore()
-const selectRef = shallowRef()
+const emit = defineEmits(['update:modelValue', 'change'])
 
 const selectedValue = computed({
     get: () => props.modelValue,
     set: (val) => emit('update:modelValue', val)
 })
 
-const { dataList, loading, runAsync } = useRequest(queryInvestorSelect, {
-    manual: true,
-    params: {
-        orgzTypes: userStore.userInfo.orgztypes
-    }
-})
+const { dataList, loading, run } = useRequest(queryInvestorSelect)
 
-const onPlus = () => {
+const onReset = () => {
     if (!loading.value) {
-        loading.value = true
-        runAsync().then((res) => {
-            if (res.data.length) {
-                selectRef.value.toggleMenu()
-            } else {
-                ElMessage.warning('暂无数据')
-            }
-        }).catch((err)=>{
-            ElMessage.error(err)
-        }).finally(() => {
-            loading.value = false
-        })
+        selectedValue.value = undefined
+        run()
     }
 }
 
 const remoteMethod = (query: string) => {
-    if (query) {
-        loading.value = true
-        runAsync({
-            searchName: query
-        }).finally(() => {
-            loading.value = false
-        })
+    if (!loading.value) {
+        if (query) {
+            run({
+                searchName: query
+            })
+        } else if (!dataList.value.length) {
+            onReset()
+        }
     }
 }
-</script>
 
-<style lang="less">
-@import './index.less';
-</style>
+const onChange = (value?: number) => {
+    const item = dataList.value.find((e) => e.userId === value)
+    emit('change', toRaw(item))
+}
+</script>

+ 0 - 0
src/packages/pc/components/modules/select-member/index.less


+ 31 - 55
src/packages/pc/components/modules/select-member/index.vue

@@ -1,86 +1,62 @@
 <template>
-    <div class="el-form-item--col">
-        <el-select ref="selectRef" v-model="selectedValue" :empty-values="[null, undefined, 0]" :disabled="disabled"
-            :loading="loading" :placeholder="placeholder" :remote-method="remoteMethod" @change="onChange" remote
-            filterable clearable>
-            <el-option v-for="item in dataList" :key="item.userid" :label="item.accountname" :value="item.userid">
-                <div style="display: flex;justify-content: space-between;">
-                    <span>{{ item.userid }}</span>
-                    <span>{{ item.accountname }}</span>
-                </div>
-            </el-option>
-        </el-select>
-        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
-    </div>
+    <app-remote-select v-model="selectedValue" :options="dataList"
+        :option-props="{ label: 'accountname', value: 'userid' }" :disabled="disabled" :remote-method="remoteMethod"
+        @change="onChange" @reset="onReset">
+        <template #default="{ option }">
+            <div style="display: flex;justify-content: space-between;">
+                <span>{{ option.userid }}</span>
+                <span>{{ option.accountname }}</span>
+            </div>
+        </template>
+    </app-remote-select>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, computed, toRaw } from 'vue'
-import { ElMessage } from 'element-plus'
+import { computed, toRaw } from 'vue'
 import { useRequest } from '@/hooks/request'
 import { queryOrganSelect } from '@/services/api/common'
+import AppRemoteSelect from '@pc/components/base/remote-select/index.vue'
 
 const props = defineProps({
     modelValue: [Number, String],
     usertype: String,
-    disabled: Boolean,
-    placeholder: {
-        type: String,
-        default: '请输入'
-    }
+    disabled: Boolean
 })
 
 const emit = defineEmits(['update:modelValue', 'change'])
 
-const selectRef = shallowRef()
-
 const selectedValue = computed({
     get: () => props.modelValue,
     set: (val) => emit('update:modelValue', val)
 })
 
-const { dataList, loading, runAsync } = useRequest(queryOrganSelect, {
-    manual: true
+const { dataList, loading, run } = useRequest(queryOrganSelect, {
+    params: {
+        usertype: props.usertype
+    }
 })
 
-const onPlus = () => {
+const onReset = () => {
     if (!loading.value) {
-        loading.value = true
-        runAsync({
-            usertype: props.usertype
-        }).then((res) => {
-            if (res.data.length) {
-                selectRef.value.toggleMenu()
-            } else {
-                ElMessage.warning('暂无数据')
-            }
-        }).catch((err) => {
-            ElMessage.error(err)
-        }).finally(() => {
-            loading.value = false
-        })
+        selectedValue.value = undefined
+        run()
     }
 }
 
 const remoteMethod = (query: string) => {
-    if (query) {
-        loading.value = true
-        runAsync({
-            usertype: props.usertype,
-            searchcode: query
-        }).finally(() => {
-            loading.value = false
-        })
+    if (!loading.value) {
+        if (query) {
+            run({
+                searchcode: query
+            })
+        } else if (!dataList.value.length) {
+            onReset()
+        }
     }
 }
 
-const onChange = (id?: number) => {
-    const item = dataList.value.find((e) => e.userid === id)
-    dataList.value = []
+const onChange = (value?: number) => {
+    const item = dataList.value.find((e) => e.userid === value)
     emit('change', toRaw(item))
 }
-</script>
-
-<style lang="less">
-@import './index.less';
-</style>
+</script>

+ 0 - 0
src/packages/pc/views/query/internal/offlinedelivery/components/close/index.vue → src/packages/pc/views/query/internal/offlinedelivery/components/cancel/index.vue


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

@@ -111,7 +111,7 @@ const handleOperateButtons = (row: Model.OfflineRsp) => {
     const buttons = ['query_internal_offlinedelivery_details']
 
     if (row.orderstatus === 2) {
-        buttons.push('query_internal_offlinedelivery_confirm', 'query_internal_offlinedelivery_close')
+        buttons.push('query_internal_offlinedelivery_confirm', 'query_internal_offlinedelivery_cancel')
         if (row.buyorsell === BuyOrSell.Sell) {
             buttons.push('query_internal_offlinedelivery_pay')
         }

+ 161 - 0
src/packages/pc/views/query/order/close/index.vue

@@ -0,0 +1,161 @@
+<!-- 查询管理-订单管理-终止单查询 -->
+<template>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption" :rules="filterRules">
+                <template #ishis="{ item }">
+                    <el-form-item :label="item.label" prop="ishis">
+                        <el-select v-model="item.value">
+                            <el-option v-for="option in item.options?.()" :key="option.value" :label="option.label"
+                                :value="option.value" />
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="日期" prop="date" v-if="item.value === 1">
+                        <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD"
+                            start-placeholder="开始时间" end-placeholder="结束时间" />
+                    </el-form-item>
+                </template>
+            </app-filter>
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getActionButtons(['query_internal_deliverytrade_export'])"
+                    @click="(code: string) => openComponent(code)" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="getActionButtons(['query_internal_deliverytrade_details'])"
+                    @click="(code: string) => openComponent(code, row)" circle />
+            </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, FormRules } from 'element-plus'
+import { getBuyOrSellList } from '@/constants/order'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryTerOrder } from '@/services/api/order'
+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 { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.TerOrderRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryTerOrder, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        ishis: 0
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'opentradeid', label: '订单号' },
+    { field: 'loginid', label: '登录账号' },
+    { field: 'currentname', label: '用户' },
+    { field: 'goodsfullname', label: '商品/代码' },
+    { field: 'buyorselldisplay', label: '订单方向' },
+    { field: 'opennum', label: '订单数量' },
+    { field: 'openprice', label: '订单价格' },
+    { field: 'closenum', label: '终止数量' },
+    { field: 'closeprice', label: '终止价格' },
+    { field: 'closepl', label: '终止盈亏' },
+    { field: 'repayeddeposit', label: '释放占用资金' },
+    { field: 'tradetypedisplay', label: '终止类型' },
+    { field: 'tradetime', label: '订单时间' },
+    { field: 'closetime', label: '终止时间' },
+    { field: 'closeid', label: '终止单号' }
+])
+
+// 表单验证规则
+const filterRules: FormRules = {
+    date: [{
+        required: true,
+        validator: () => {
+            return !!dateValue.value && dateValue.value.length === 2
+        }
+    }]
+}
+
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.TerOrderReq>({
+    filters: [
+        {
+            field: 'account',
+            label: '客户',
+        },
+        {
+            field: 'goodsid',
+            label: '商品',
+            placeholder: '请输入商品ID'
+        },
+        {
+            field: 'buyorsell',
+            label: '方向',
+            options: () => getBuyOrSellList()
+        },
+        {
+            field: 'tradeid',
+            label: '订单号',
+        },
+        {
+            field: 'areauserid',
+            label: '所属机构',
+            placeholder: '请输入资金账户ID'
+        },
+        {
+            field: 'tradetype',
+            label: '终止类型',
+        },
+        {
+            field: 'ishis',
+            label: '查询类型',
+            value: 0,
+            options: () => [
+                { label: '当前', value: 0 },
+                { label: '历史', value: 1 }
+            ]
+        },
+    ],
+    buttons: [
+        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
+    ]
+})
+
+// 处理请求参数
+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)
+}
+
+const onReset = () => {
+    dateValue.value = []
+    resetFilters()
+}
+</script>

+ 95 - 0
src/packages/pc/views/query/order/delivery/components/cancel/index.vue

@@ -0,0 +1,95 @@
+<!-- 查询管理-订单管理-交收单管理-失败 -->
+<template>
+    <app-drawer title="详细" width="960" v-model:show="show">
+        <app-table-details :data="data" :label-width="160" :cell-props="detailProps1" :column="2">
+            <template #auditremark>
+                <el-input ref="inputRef" type="textarea" :rows="3" placeholder="必填" v-model="formData.auditremark" />
+            </template>
+        </app-table-details>
+        <template #footer>
+            <el-button @click="onCancel(false)">{{ t('operation.close') }}</el-button>
+            <el-button type="primary" @click="onSubmit">交收失败</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, reactive, PropType } from 'vue'
+import { ElMessage, InputInstance } from 'element-plus'
+import { formatDate } from '@/filters'
+import { getBuyOrSellName } from '@/constants/order'
+import { useRequest } from '@/hooks/request'
+import { queryOfflineDetail, offlineFail } from '@/services/api/order'
+import { CellProp } from '@pc/components/base/table-details/types'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
+import { i18n } from '@/stores'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.DeliveryOrderListRsp>,
+        required: true
+    }
+})
+
+const { t } = i18n.global
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+const loading = shallowRef(false)
+const inputRef = shallowRef<InputInstance>()
+
+const formData = reactive<Model.offlineFailReq>({
+    auditremark: '',
+    deliveryorderid: props.record.deliveryorderid,
+    marketid: props.record.marketid
+})
+
+const { data } = useRequest(queryOfflineDetail, {
+    params: {
+        deliveryorderid: props.record.deliveryorderid
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps1: CellProp[] = [
+    { prop: 'deliveryorderid', label: '交收单号:' },
+    { prop: 'username', label: '申请人:' },
+    { prop: 'goodsdisplay', label: '交收商品:' },
+    { prop: 'buyorsell', label: '方向:', formatValue: (val) => getBuyOrSellName(val) },
+    { prop: 'deliveryqty', label: '交收数量:' },
+    { prop: 'deliveryprice', label: '交收价格:' },
+    { prop: 'deliveryamount', label: '交收货款:' },
+    { prop: 'matchname', label: '对手方:' },
+    { prop: 'deliveryinfo', label: '交收信息:' },
+    { prop: 'reqtime', label: '申请时间:', formatValue: (val) => formatDate(val) },
+    { prop: 'orderstatusdisplay', label: '交收状态:' },
+    { prop: 'auditremark', label: '备注:', required: true }
+]
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    if (formData.auditremark) {
+        loading.value = true
+        offlineFail({
+            data: formData
+        }).then(() => {
+            ElMessage.success('提交成功')
+            onCancel(true)
+        }).catch((err) => {
+            ElMessage.error('提交失败:' + err)
+            onCancel()
+        }).finally(() => {
+            loading.value = false
+        })
+    } else {
+        inputRef.value?.focus()
+        ElMessage.warning('请输入备注')
+    }
+}
+</script>

+ 81 - 0
src/packages/pc/views/query/order/delivery/components/confirm/index.vue

@@ -0,0 +1,81 @@
+<!-- 查询管理-订单管理-交收单管理-确认 -->
+<template>
+    <app-drawer title="详细" width="960" v-model:show="show">
+        <app-table-details :data="data" :label-width="160" :cell-props="detailProps1" :column="2" />
+        <template #footer>
+            <el-button @click="onCancel(false)">{{ t('operation.close') }}</el-button>
+            <el-button type="primary" @click="onSubmit">确认交收</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { formatDate } from '@/filters'
+import { getBuyOrSellName } from '@/constants/order'
+import { useRequest } from '@/hooks/request'
+import { queryOfflineDetail, offlineClose } from '@/services/api/order'
+import { CellProp } from '@pc/components/base/table-details/types'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
+import { i18n } from '@/stores'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.DeliveryOrderListRsp>,
+        required: true
+    }
+})
+
+const { t } = i18n.global
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+const loading = shallowRef(false)
+
+const { data } = useRequest(queryOfflineDetail, {
+    params: {
+        deliveryorderid: props.record.deliveryorderid
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps1: CellProp[] = [
+    { prop: 'deliveryorderid', label: '交收单号:' },
+    { prop: 'username', label: '申请人:' },
+    { prop: 'goodsdisplay', label: '交收商品:' },
+    { prop: 'buyorsell', label: '方向:', formatValue: (val) => getBuyOrSellName(val) },
+    { prop: 'deliveryqty', label: '交收数量:' },
+    { prop: 'deliveryprice', label: '交收价格:' },
+    { prop: 'deliveryamount', label: '交收货款:' },
+    { prop: 'matchname', label: '对手方:' },
+    { prop: 'deliveryinfo', label: '交收信息:' },
+    { prop: 'reqtime', label: '申请时间:', formatValue: (val) => formatDate(val) },
+    { prop: 'orderstatusdisplay', label: '交收状态:' }
+]
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    loading.value = true
+    offlineClose({
+        data: {
+            deliveryorderid: props.record.deliveryorderid,
+            marketid: props.record.marketid
+        }
+    }).then(() => {
+        ElMessage.success('提交成功')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error('提交失败:' + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
+</script>

+ 63 - 0
src/packages/pc/views/query/order/delivery/components/details/index.vue

@@ -0,0 +1,63 @@
+<!-- 查询管理-订单管理-交收单管理-详情 -->
+<template>
+    <app-drawer title="详细" width="960" v-model:show="show">
+        <app-table-details :data="data" :label-width="160" :cell-props="detailProps1" :column="2" />
+        <template #footer>
+            <el-button @click="onCancel">{{ t('operation.close') }}</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryDeliveryOrderListDetail } from '@/services/api/order'
+import { CellProp } from '@pc/components/base/table-details/types'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
+import { i18n } from '@/stores'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.DeliveryOrderListRsp>,
+        required: true
+    }
+})
+
+const { t } = i18n.global
+const show = shallowRef(true)
+
+const { data } = useRequest(queryDeliveryOrderListDetail, {
+    params: {
+        deliveryorderid: props.record.deliveryorderid
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps1: CellProp[] = [
+    { prop: 'deliveryorderid', label: '交收单号:' },
+    { prop: 'username', label: '申请人:' },
+    { prop: 'goodsdisplay', label: '交收商品:' },
+    { prop: 'buyorselldisplay', label: '方向:' },
+    { prop: 'deliveryqty', label: '申请交收数量:' },
+    { prop: 'sucdeliveryqty', label: '实际交收数量:' },
+    { prop: 'cancledeliveryqty', label: '撤销交收数量:' },
+    { prop: 'deliveryprice', label: '交收价格:' },
+    { prop: 'deliveryamount', label: '交收货款:' },
+    { prop: 'matchname', label: '对手方:' },
+    { prop: 'deliveryinfo', label: '交收信息:' },
+    { prop: 'reqtime', label: '申请时间:', formatValue: (val) => formatDate(val) },
+    { prop: 'orderstatusdisplay', label: '交收状态:' },
+    { prop: 'remark', label: '备注:' },
+    { prop: 'deliverycharge', label: '交收手续费:' },
+    { prop: 'closetime', label: '完成时间:', formatValue: (val) => formatDate(val) },
+]
+
+const onCancel = () => {
+    show.value = false
+}
+</script>

+ 51 - 0
src/packages/pc/views/query/order/delivery/components/pay/index.vue

@@ -0,0 +1,51 @@
+<!-- 查询管理-订单管理-交收单管理-支付 -->
+<template>
+    <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
+        <div class="g-text-message">确认交收服务商向卖方支付货款?</div>
+        <template #footer>
+            <el-button @click="onCancel(false)">取消</el-button>
+            <el-button type="primary" @click="onSubmit">确认</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { sellGoods } from '@/services/api/order'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.DeliveryOrderListRsp>,
+        required: true
+    }
+})
+
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+const loading = shallowRef(false)
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    loading.value = true
+    sellGoods({
+        data: {
+            deliveryorderid: props.record.deliveryorderid,
+            marketid: props.record.marketid
+        }
+    }).then(() => {
+        ElMessage.success('提交成功')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error('提交失败:' + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
+</script>

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

@@ -0,0 +1,6 @@
+<template>
+    <router-view />
+</template>
+
+<script lang="ts" setup>
+</script>

+ 125 - 0
src/packages/pc/views/query/order/list/index.vue

@@ -0,0 +1,125 @@
+<!-- 查询管理-订单管理-订单查询 -->
+<template>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption">
+                <template #parantareaid="{ item }">
+                    <el-form-item :label="item.label" prop="parantareaid">
+                        <app-select-investor v-model="item.value" usertype="2" />
+                    </el-form-item>
+                </template>
+                <template #validholderqty="{ item }">
+                    <el-form-item :label="item.label" prop="validholderqty">
+                        <el-switch v-model="item.value" :active-value="1" :inactive-value="0" />
+                    </el-form-item>
+                </template>
+            </app-filter>
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getActionButtons(['query_order_list_export'])"
+                    @click="(code: string) => openComponent(code)" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="getActionButtons(['query_order_list_details'])"
+                    @click="(code: string) => openComponent(code, row)" circle />
+            </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 { formatDate } from '@/filters'
+import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryOrder } from '@/services/api/order'
+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 AppSelectInvestor from '@pc/components/modules/select-investor/index.vue'
+
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrderRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryOrder, {
+    params: {
+        pageNum: 1,
+        pageSize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'tradeid', label: '订单号' },
+    { field: 'accountname', label: '客户' },
+    { field: 'membername', label: '所属机构' },
+    { field: 'goodscode', label: '商品/代码' },
+    { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
+    { field: 'holderprice', label: '订单价格' },
+    { field: 'opennum', label: '原始数量' },
+    { field: 'holdernum', label: '订单数量' },
+    { field: 'freezenum', label: '冻结数量' },
+    { field: 'depositratedisplay', label: '风险率' },
+    { field: 'holderamount', label: '订单金额' },
+    { field: 'payeddeposit', label: '占用资金' },
+    { field: 'tradetimestr', label: '订单时间', formatValue: (val) => formatDate(val) },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.OrderReq>({
+    filters: [
+        {
+            field: 'accountname',
+            label: '客户'
+        },
+        {
+            field: 'goodsid',
+            label: '商品',
+            placeholder: '请输入商品ID'
+        },
+        {
+            field: 'buyorsell',
+            label: '方向',
+            options: () => getBuyOrSellList()
+        },
+        {
+            field: 'tradeid',
+            label: '订单号'
+        },
+        {
+            field: 'parantareaid',
+            label: '所属机构',
+            placeholder: '请输入机构ID'
+        },
+        {
+            field: 'validholderqty',
+            label: '有效持仓',
+            value: 1
+        },
+    ],
+    buttons: [
+        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
+    ]
+})
+
+const onSearch = () => {
+    const qs = getQueryParams()
+    run(qs)
+}
+</script>

+ 133 - 0
src/packages/pc/views/query/order/monitor/index.vue

@@ -0,0 +1,133 @@
+<!-- 查询管理-订单管理-订单监控 -->
+<template>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption">
+                <template #risk="{ item }">
+                    <el-form-item :label="item.label" prop="risk">
+                        ><el-input-number v-model="item.value" placeholder="请输入" />% (默认>50%;下次刷新: {{ countDown.time }})
+                    </el-form-item>
+                </template>
+                <el-form-item>
+                    <el-button type="primary" @click="countDown.stop" v-if="countDown.status.value">停止监控</el-button>
+                    <el-button type="primary" @click="startCountDown" v-else>开始监控</el-button>
+                </el-form-item>
+            </app-filter>
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <ul style="display: flex;gap: 20px;" v-if="data">
+                    <li>
+                        <span>买总数量:</span>
+                        <span>{{ data.buyBackCount }}</span>
+                    </li>
+                    <li>
+                        <span>卖总数量:</span>
+                        <span>{{ data.sellCount }}</span>
+                    </li>
+                    <li>
+                        <span>净总数量:</span>
+                        <span>{{ data.netcurpositionqty }}</span>
+                    </li>
+                    <li>
+                        <span>订单均价:</span>
+                        <span>{{ data.avgholderprice }}</span>
+                    </li>
+                    <li>
+                        <span>总浮动结余:</span>
+                        <span>{{ data.floatpl }}</span>
+                    </li>
+                </ul>
+            </template>
+            <template #footer>
+                <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
+                    @change="onSearch" />
+            </template>
+        </app-table>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { ElMessage } from 'element-plus'
+import { getBuyOrSellList } from '@/constants/order'
+import { useCountDown } from '@/hooks/countdown'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useRequest } from '@/hooks/request'
+import { monitorddjk, monitorddjkCount } from '@/services/api/order'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
+
+const countDown = useCountDown(10)
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'userfullname', label: '客户' },
+    { field: 'goodsfullname', label: '商品/代码' },
+    { field: 'buyorselldisplay', label: '方向' },
+    { field: 'tradetimestr', label: '订单时间' },
+    { field: 'holderprice', label: '订单价格' },
+    { field: 'lastprice', label: '现价' },
+    { field: 'depositratedisplay', label: '风险率' },
+    { field: 'floatpl', label: '浮动盈亏' },
+    { field: 'holdernum', label: '订单数量' },
+    { field: 'freezenum', label: '冻结数量' },
+    { field: 'holderamount', label: '订单金额' },
+    { field: 'payeddeposit', label: '占用资金' },
+    { field: 'tradeid', label: '订单号' }
+])
+
+const { queryParams, filterOption, getQueryParams } = useDataFilter<Model.MonitorddjkReq>({
+    filters: [
+        {
+            field: 'risk',
+            label: '监控当前风险率',
+            value: 50
+        },
+        {
+            field: 'goodsfullname',
+            label: '商品'
+        },
+        {
+            field: 'buyorsell',
+            label: '方向',
+            options: () => getBuyOrSellList()
+        },
+        {
+            field: 'userfullname',
+            label: '客户'
+        },
+        {
+            field: 'parentusername',
+            label: '所属机构'
+        }
+    ]
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run: getMonitorddjk } = useRequest(monitorddjk, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        risk: queryParams.value.risk
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const { data, run: getMonitorddjkCount } = useRequest(monitorddjkCount, {
+    params: {
+        risk: queryParams.value.risk
+    }
+})
+
+const onSearch = () => {
+    const qs = getQueryParams()
+    getMonitorddjk(qs)
+    getMonitorddjkCount(qs)
+}
+
+const startCountDown = () => {
+    countDown.start(() => onSearch())
+}
+</script>

+ 7 - 0
src/packages/pc/views/query/order/report/index.vue

@@ -0,0 +1,7 @@
+<!-- 查询管理-订单管理-订单日报表 -->
+<template>
+    <app-view></app-view>
+</template>
+
+<script lang="ts" setup>
+</script>

+ 151 - 0
src/packages/pc/views/query/order/terminate/index.vue

@@ -0,0 +1,151 @@
+<!-- 查询管理-订单管理-强制终止单 -->
+<template>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption" :rules="filterRules">
+                <template #ishis="{ item }">
+                    <el-form-item :label="item.label" prop="ishis">
+                        <el-select v-model="item.value">
+                            <el-option v-for="option in item.options?.()" :key="option.value" :label="option.label"
+                                :value="option.value" />
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="日期" prop="date" v-if="item.value === 1">
+                        <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD"
+                            start-placeholder="开始时间" end-placeholder="结束时间" />
+                    </el-form-item>
+                </template>
+            </app-filter>
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getActionButtons(['query_internal_deliverytrade_export'])"
+                    @click="(code: string) => openComponent(code)" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="getActionButtons(['query_internal_deliverytrade_details'])"
+                    @click="(code: string) => openComponent(code, row)" circle />
+            </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, FormRules } from 'element-plus'
+import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryForcedOrder } from '@/services/api/order'
+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 { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.ForcedOrderRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryForcedOrder, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        ishis: 0
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'opentradeid', label: '订单号' },
+    { field: 'userfullname', label: '客户' },
+    { field: 'memberfullname', label: '所属会员' },
+    { field: 'goodsfullname', label: '商品/代码' },
+    { field: 'holderbuyorsell', label: '订单方向' },
+    { field: 'openprice', label: '订单价格' },
+    { field: 'opennum', label: '订单数量' },
+    { field: 'opentime', label: '订单时间' },
+    { field: 'closeprice', label: '终止价格' },
+    { field: 'closenum', label: '终止数量' },
+    { field: 'closepl', label: '终止盈亏' },
+    { field: 'depositrate', label: '风险率' },
+    { field: 'closetime', label: '终止时间' },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+// 表单验证规则
+const filterRules: FormRules = {
+    date: [{
+        required: true,
+        validator: () => {
+            return !!dateValue.value && dateValue.value.length === 2
+        }
+    }]
+}
+
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.ForcedOrderReq>({
+    filters: [
+        {
+            field: 'goodsid',
+            label: '商品',
+            placeholder: '请输入商品ID'
+        },
+        {
+            field: 'holderbuyorsell',
+            label: '方向',
+            options: () => getBuyOrSellList()
+        },
+        {
+            field: 'opentradeid',
+            label: '订单号'
+        },
+        {
+            field: 'accountname',
+            label: '用户'
+        },
+        {
+            field: 'ishis',
+            label: '查询类型',
+            value: 0,
+            options: () => [
+                { label: '当前', value: 0 },
+                { label: '历史', value: 1 }
+            ]
+        },
+    ],
+    buttons: [
+        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => onReset() }
+    ]
+})
+
+// 处理请求参数
+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)
+}
+
+const onReset = () => {
+    dateValue.value = []
+    resetFilters()
+}
+</script>

+ 5 - 1
src/services/api/common/index.ts

@@ -21,7 +21,11 @@ export function queryOrganSelect(options: CommonFetchOptions<{ request: Model.Or
 /**
  * 子机构开户下拉查询推荐人
  */
-export function queryInvestorSelect(options: CommonFetchOptions<{ request: Model.InvestorSelectReq; response: Model.InvestorSelectRsp[]; }>) {
+export function queryInvestorSelect(options: CommonFetchOptions<{ request: Model.InvestorSelectReq; response: Model.InvestorSelectRsp[]; }> = {}) {
+    options.data = {
+        orgzTypes: userStore.userInfo.orgztypes,
+        ...options.data
+    }
     return httpClient.commonRequest('/common/queryInvestorSelect', 'get', options)
 }
 

+ 91 - 0
src/services/api/order/index.ts

@@ -277,4 +277,95 @@ export function offlineFail(options: CommonFetchOptions<{ request: Model.offline
  */
 export function sellGoods(options: CommonFetchOptions<{ request: Model.sellGoodsReq; }>) {
     return httpClient.commonRequest('/query/sellGoods', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单监控 --> 获取列表
+ */
+export function monitorddjk(options: CommonFetchOptions<{ request: Model.MonitorddjkReq; response: Model.MonitorddjkRsp[]; }>) {
+    return httpClient.commonRequest('/queryOrder/monitorddjk', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单监控 --> 获取总数居
+ */
+export function monitorddjkCount(options: CommonFetchOptions<{ request: Omit<Model.MonitorddjkReq, 'pageNum' | 'pageSize'>; response: Model.monitorddjkCountRsp; }>) {
+    return httpClient.commonRequest('/queryOrder/monitorddjkCount', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单查询 --> 获取列表
+ */
+export function queryOrder(options: CommonFetchOptions<{ request: Model.OrderReq; response: Model.OrderRsp[]; }>) {
+    return httpClient.commonRequest('/queryOrder/query', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单查询 --> 获取详情
+ */
+export function queryOrderDetail(options: CommonFetchOptions<{ request: Model.OrderDetailReq; response: Model.OrderDetailRsp; }>) {
+    return httpClient.commonRequest('/queryOrder/queryDetail', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单查询 --> 导出
+ */
+export function orderExport(options: CommonFetchOptions<{ request: Model.OrderReq; response: string; }>) {
+    return httpClient.commonRequest('/queryOrder/export', 'get', options)
+}
+
+/**
+ * 订单管理--> 终止单查询 --> 获取列表
+ */
+export function queryTerOrder(options: CommonFetchOptions<{ request: Model.TerOrderReq; response: Model.TerOrderRsp[]; }>) {
+    return httpClient.commonRequest('/queryOrder/queryTerOrder', 'get', options)
+}
+
+/**
+ * 订单管理--> 终止单查询 --> 获取列表
+ */
+export function terOrderExport(options: CommonFetchOptions<{ request: Model.TerOrderReq; response: string; }>) {
+    return httpClient.commonRequest('/queryOrder/terOrderExport', 'get', options)
+}
+
+/**
+ * 订单管理--> 强制终止单 --> 获取列表
+ */
+export function queryForcedOrder(options: CommonFetchOptions<{ request: Model.ForcedOrderReq; response: Model.ForcedOrderRsp[]; }>) {
+    return httpClient.commonRequest('/queryOrder/queryForcedOrder', 'get', options)
+}
+
+/**
+ * 订单管理--> 强制终止单 --> 斩仓恢复
+ */
+export function forcedOrderRecover(options: CommonFetchOptions<{ request: Model.ForcedOrderRecoverReq; }>) {
+    return httpClient.commonRequest('/queryOrder/forcedOrderRecover', 'get', options)
+}
+
+/**
+ * 订单管理--> 强制终止单 --> 导出
+ */
+export function forcedOrderExport(options: CommonFetchOptions<{ request: Model.ForcedOrderReq; response: string; }>) {
+    return httpClient.commonRequest('/queryOrder/forcedOrderExport', 'get', options)
+}
+
+/**
+ * 订单管理--> 交收单管理 --> 获取列表
+ */
+export function queryDeliveryOrderList(options: CommonFetchOptions<{ request: Model.DeliveryOrderListReq; response: Model.DeliveryOrderListRsp[]; }>) {
+    return httpClient.commonRequest('/queryOrder/queryDeliveryOrder', 'get', options)
+}
+
+/**
+ * 订单管理--> 交收单管理 --> 获取详情
+ */
+export function queryDeliveryOrderListDetail(options: CommonFetchOptions<{ request: Model.DeliveryOrderListDetailReq; response: Model.DeliveryOrderListDetailRsp; }>) {
+    return httpClient.commonRequest('/queryOrder/deliveryOrderDetail', 'get', options)
+}
+
+/**
+ * 订单管理--> 交收单管理 --> 导出
+ */
+export function deliveryOrderListExport(options: CommonFetchOptions<{ request: Model.DeliveryOrderListReq; response: string; }>) {
+    return httpClient.commonRequest('/queryOrder/deliveryOrderExport', 'get', options)
 }

+ 4 - 4
src/types/model/common.d.ts

@@ -18,7 +18,7 @@ declare namespace Model {
     interface InvestorSelectReq {
         accountStatus?: string;
         areaIds?: string;
-        orgzTypes: string; // 管理员所属机构角色类型
+        orgzTypes?: string; // 管理员所属机构角色类型
         parentUserid?: number;
         rolesCount?: number;
         searchName?: string; // 用户名
@@ -135,9 +135,9 @@ declare namespace Model {
 
     /** 商品查询下拉框 请求 */
     interface GoodsSelectReq {
-        goodsStatusIds: string;
-        marketId: number;
-        searchCode: string;
+        goodsStatusIds?: string;
+        marketId?: number;
+        searchCode?: string;
     }
 
     /** 商品查询下拉框 响应 */

+ 303 - 0
src/types/model/order.d.ts

@@ -1538,4 +1538,307 @@ declare namespace Model {
         deliveryorderid: string;
         marketid: number;
     }
+
+    /** 订单管理--> 订单监控 --> 获取列表 请求 */
+    interface MonitorddjkReq {
+        buyorsell?: number; // 方向
+        goodsfullname?: string; // 商品
+        pageNum: number; // 页码
+        pageSize: number; // 页大小
+        parentusername?: string; // 所属机构
+        risk?: number; // 监控当前风险率
+        userfullname?: string; // 客户
+    }
+
+    /** 订单管理--> 订单监控 --> 获取列表 响应 */
+    interface MonitorddjkRsp {
+        agreeunit: number;
+        avgholderprice: string;
+        buyBackCount: number;
+        buyorsell: number;
+        buyorselldisplay: string; // 方向
+        callatefee: number;
+        cutdepositrate: number;
+        cutprice: string;
+        depositrate: number;
+        depositratedisplay: string; // 风险率
+        floatpl: number; // 浮动盈亏
+        freezenum: string; // 冻结数量
+        freezeqty: number;
+        goodsfullname: string; // 商品/代码
+        holddays: number;
+        holderamount: number; // 订单金额
+        holdernum: string; // 订单数量
+        holderprice: number; // 订单价格
+        holderqty: number;
+        lastprice: string; // 现价
+        memberusername: string;
+        pageNo: number;
+        pageSize: number;
+        parentareaid: number;
+        parentusername: string;
+        payeddeposit: number; // 占用资金
+        promptdepositrate: number;
+        promptprice: string;
+        restockdeposit: number;
+        risk: number;
+        sellCount: number;
+        totalamount: number;
+        tradeid: string; // 订单号
+        tradetimestr: string; // 订单时间
+        userfullname: string; // 客户
+        userid: number;
+    }
+
+    /** 订单管理--> 订单监控 --> 获取总数居 响应 */
+    interface monitorddjkCountRsp {
+        avgholderprice: string; // 订单均价
+        buyBackCount: number; // 买总数量
+        floatpl: number; // 总浮动结余
+        netcurpositionqty: number; // 净总数量
+        sellCount: number; // 卖总数量
+    }
+
+    /** 订单管理--> 订单查询 --> 获取列表 请求 */
+    interface OrderReq {
+        accountname?: string; // 签署状态
+        areauserid?: number;
+        buyorsell?: number; // 方向
+        goodsid?: string; // 商品
+        pageNum: number; // 页码
+        pageSize: number; // 页大小
+        parantareaid?: number; // 所属机构
+        tradeid?: string; // 订单号
+        validholderqty?: number; // 签署状态
+    }
+
+    /** 订单管理--> 订单查询 --> 获取列表 请求 */
+    interface OrderRsp {
+        accountname: string; // 客户
+        adddepositrate: number; // 追加定金率
+        agreeunit: number;
+        buyorsell: number; // 方向
+        callatefee: number; // 已计滞纳金
+        canautoadddeposit: number; // 允许自动补定金
+        canautorefunddeposit: number; // 允许自动退定金
+        closepl: number; // 转让结余
+        closeprice: string; // 现价
+        cutdepositrate: number; // 斩仓定金率
+        cutprice: number; // 斩仓价格(预)
+        decimalplace: number;
+        deliverynum: number; // 交收数量
+        deliveryqty: number;
+        depositratedisplay: number; // 风险率
+        floatpl: string; // 浮动结余
+        freezenum: string; // 冻结数量
+        goodscode: string;
+        goodsname: string; // 商品/代码
+        goodsunitid: string;
+        holddays: number; // 持仓天数
+        holderamount: number; // 订单金额
+        holdernum: string; // 订单数量
+        holderprice: number; // 订单价格
+        holderqty: number;
+        membername: string; // 所属机构
+        opennum: string; // 原始数量
+        openqty: number;
+        oripayeddeposit: number; // 原始已付定金
+        orirestockdeposit: number; // 原始补充定金
+        parentname: string; // 上级机构
+        payeddeposit: number; // 占用资金/已付金额
+        payedlatefee: number; // 已付滞纳金
+        promptdepositrate: number; // 提示定金率
+        promptprice: number; // 提示价格(预)
+        restockdeposit: number; // 补充定金
+        tradeamount: number; // 原始金额
+        tradeid: string; // 订单号
+        trademode: number;
+        tradetimestr: number; // 订单时间
+    }
+
+    /** 订单管理--> 订单查询 --> 获取详情 请求 */
+    interface OrderDetailReq {
+        tradeid: string; // 订单号
+    }
+
+    /** 订单管理--> 订单查询 --> 获取详情 响应 */
+    interface OrderDetailRsp {
+        accountname: string; // 客户
+        adddepositrate: number; // 追加定金率
+        agreeunit: number;
+        buyorsell: number; // 方向
+        callatefee: number; // 已计滞纳金
+        canautoadddeposit: number; // 允许自动补定金
+        canautorefunddeposit: number; // 允许自动退定金
+        closepl: number; // 转让结余
+        closeprice: string; // 现价
+        cutdepositrate: number; // 斩仓定金率
+        cutprice: number; // 斩仓价格(预)
+        decimalplace: number;
+        deliverynum: number; // 交收数量
+        deliveryqty: number;
+        depositratedisplay: number; // 风险率
+        floatpl: string; // 浮动结余
+        freezenum: string; // 冻结数量
+        goodscode: string;
+        goodsname: string; // 商品/代码
+        goodsunitid: string;
+        holddays: number; // 持仓天数
+        holderamount: number; // 订单金额
+        holdernum: string; // 订单数量
+        holderprice: number; // 订单价格
+        holderqty: number;
+        membername: string; // 所属机构
+        opennum: string; // 原始数量
+        openqty: number;
+        oripayeddeposit: number; // 原始已付定金
+        orirestockdeposit: number; // 原始补充定金
+        parentname: string; // 上级机构
+        payeddeposit: number; // 占用资金/已付金额
+        payedlatefee: number; // 已付滞纳金
+        promptdepositrate: number; // 提示定金率
+        promptprice: number; // 提示价格(预)
+        restockdeposit: number; // 补充定金
+        tradeamount: number; // 原始金额
+        tradeid: string; // 订单号
+        trademode: number;
+        tradetimestr: number; // 订单时间
+    }
+
+    /** 订单管理--> 终止单查询 --> 获取列表 请求 */
+    interface TerOrderReq {
+        account?: string; // 客户
+        areauserid?: number;
+        buyorsell?: number; // 方向
+        enddate?: string; // 结束日期
+        filterTrademodeList?: number[];
+        goodsid?: number; // 商品
+        ishis: number; // 查询类型
+        pageNum: number; // 页码
+        pageSize: number; // 页大小
+        startdate?: string; // 开始日期
+        tradeid?: string; // 订单号
+        tradetype?: number; // 终止类型
+    }
+
+    /** 订单管理--> 终止单查询 --> 获取列表 响应 */
+    interface TerOrderRsp {
+        buyorselldisplay: string; // 订单方向
+        closeid: string; // 终止单号
+        closenum: number; // 终止数量
+        closepl: number; // 终止盈亏
+        closeprice: number; // 终止价格
+        closetime: string; // 终止时间
+        currentname: string; // 用户
+        goodsfullname: string; // 商品/代码
+        loginid: string; // 登录账号
+        opennum: number; // 订单数量
+        openprice: number; // 订单价格
+        opentradeid: string; // 订单号
+        repayeddeposit: number; // 释放占用资金
+        tradetime: string; // 订单时间
+        tradetypedisplay: string; // 终止类型
+    }
+
+    /** 订单管理--> 强制终止单 --> 获取列表 请求 */
+    interface ForcedOrderReq {
+        accountname?: string; // 客户
+        closeid?: string;
+        enddate?: string; // 结束日期
+        goodsid?: number; // 商品
+        holderbuyorsell?: number; // 方向
+        ishis: number; // 查询类型
+        opentradeid?: string; // 订单号
+        pageNum: number; // 页码
+        pageSize: number; // 页大小
+        startdate?: string; // 开始日期
+    }
+
+    /** 订单管理--> 强制终止单 --> 获取列表 响应 */
+    interface ForcedOrderRsp {
+        accountid: number;
+        buyorsell: number;
+        closeid: string;
+        closenum: string; // 终止数量
+        closepl: number; // 终止盈亏
+        closeprice: number; // 终止价格
+        closetime: string; // 终止时间
+        depositrate: number; // 风险率
+        goodsfullname: string; // 商品/代码
+        holderbuyorsell: string; // 订单方向
+        marketid: number;
+        memberfullname: string; // 所属会员
+        opennum: string; // 订单数量
+        openprice: number; // 订单价格
+        opentime: string; // 订单时间
+        opentradeid: string; // 订单号
+        tradeid: string;
+        userfullname: string; // 客户
+        userid: number;
+    }
+
+    /** 订单管理--> 强制终止单 --> 斩仓恢复 请求 */
+    interface ForcedOrderRecoverReq {
+        closeid: string;
+    }
+
+    /** 订单管理--> 交收单管理 --> 获取列表 请求 */
+    interface DeliveryOrderListReq {
+        accountname?: string; // 账户
+        buyorsell?: number; // 方向
+        deliverygoodsname?: string; // 交收商品
+        deliveryorderid?: string;
+        deliveryorderstatus?: number; // 单据状态
+        matchuserid?: number;
+        pageNum: number; // 页码
+        pageSize: number; // 页大小
+        startdate?: string; // 开始日期
+    }
+
+    /** 订单管理--> 交收单管理 --> 获取列表 响应 */
+    interface DeliveryOrderListRsp {
+        buyorselldisplay: string; // 方向
+        cancledeliveryqty: number; // 撤销交收数量
+        closetime: string; // 完成时间
+        deliveryamount: number; // 交收货款
+        deliverycharge: number; // 交收手续费
+        deliveryinfo: string; // 交收信息
+        deliveryorderid: string; // 交收单号
+        deliveryprice: number; // 交收价格
+        deliveryqty: number; // 申请交收数量
+        goodsdisplay: string; // 交收商品
+        goodunitid: string;
+        matchname: string; // 对手方
+        orderstatusdisplay: string; // 交收状态
+        remark: string; // 备注
+        reqtime: string; // 申请时间
+        sucdeliveryqty: number; // 实际交收数量
+        username: string; // 申请人
+    }
+
+    /** 订单管理--> 交收单管理 --> 获取详情 请求 */
+    interface DeliveryOrderListDetailReq {
+        deliveryorderid: string;
+    }
+
+    /** 订单管理--> 交收单管理 --> 获取详情 响应 */
+    interface DeliveryOrderListDetailRsp {
+        buyorselldisplay: number; // 方向
+        cancledeliveryqty: number; // 撤销交收数量
+        closetime: string; // 完成时间
+        deliveryamount: number; // 交收货款
+        deliverycharge: number; // 交收手续费
+        deliveryinfo: string; // 交收信息
+        deliveryorderid: string; // 交收单号
+        deliveryprice: number; // 交收价格
+        deliveryqty: number; // 申请交收数量
+        goodsdisplay: string; // 交收商品
+        goodunitid: string;
+        matchname: string; // 对手方
+        orderstatusdisplay: number; // 交收状态
+        remark: string; // 备注
+        reqtime: string; // 申请时间
+        sucdeliveryqty: number; // 实际交收数量
+        username: string; // 申请人
+    }
 }