li.shaoyi 1 рік тому
батько
коміт
c5cb3e9edb
25 змінених файлів з 1345 додано та 48 видалено
  1. 26 0
      src/constants/profitshare.ts
  2. 22 0
      src/packages/pc/assets/themes/default/variable.less
  3. 2 1
      src/packages/pc/components/base/table-details/index.vue
  4. 1 1
      src/packages/pc/components/modules/select-account/index.vue
  5. 1 1
      src/packages/pc/components/modules/select-bank/index.vue
  6. 83 0
      src/packages/pc/components/modules/select-goods/index.vue
  7. 1 1
      src/packages/pc/components/modules/select-investor/index.vue
  8. 1 1
      src/packages/pc/components/modules/select-member/index.vue
  9. 50 0
      src/packages/pc/views/profitshare/institution/config/components/delete/index.vue
  10. 50 0
      src/packages/pc/views/profitshare/institution/group/components/delete/index.vue
  11. 91 0
      src/packages/pc/views/profitshare/institution/group/components/edit/index.vue
  12. 123 0
      src/packages/pc/views/profitshare/institution/group/components/member/index.vue
  13. 76 1
      src/packages/pc/views/profitshare/institution/group/index.vue
  14. 2 13
      src/packages/pc/views/query/order/accountsumm/index.vue
  15. 118 1
      src/packages/pc/views/query/order/goodssumm/index.vue
  16. 115 1
      src/packages/pc/views/query/order/institutionsumm/index.vue
  17. 1 6
      src/packages/pc/views/query/order/tradesumm/index.vue
  18. 109 0
      src/packages/pc/views/query/warehouse_receipt_order/order/components/details/index.vue
  19. 134 1
      src/packages/pc/views/query/warehouse_receipt_order/order/index.vue
  20. 126 1
      src/packages/pc/views/query/warehouse_receipt_order/trade/index.vue
  21. 1 0
      src/packages/pc/views/report/account/index.vue
  22. 72 0
      src/services/api/profitshare/index.ts
  23. 2 2
      src/types/model/common.d.ts
  24. 19 17
      src/types/model/order.d.ts
  25. 119 0
      src/types/model/profitshare.d.ts

+ 26 - 0
src/constants/profitshare.ts

@@ -0,0 +1,26 @@
+/**
+ * 分润分组类型
+ */
+export enum ProfitShareGroup {
+    SubInstitution = 1, // 子机构分润分组
+}
+
+/**
+ * 获取分润分组类型列表
+ * @returns 
+ */
+export function getProfitShareGroupList() {
+    return [
+        { label: '子机构分润分组', value: ProfitShareGroup.SubInstitution }
+    ]
+}
+
+/**
+ * 获取分润分组类型名称
+ * @param value 
+ * @returns 
+ */
+export function getProfitShareGroupName(value?: number) {
+    const item = getProfitShareGroupList().find((e) => e.value === value)
+    return item?.label ?? value
+}

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

@@ -45,6 +45,28 @@
         }
     }
 
+    &--filter {
+        display: flex;
+        flex-wrap: wrap;
+        gap: 12px;
+
+        .el-form-item {
+            margin: 0;
+        }
+
+        .el-select {
+            width: 160px;
+        }
+
+        .el-input {
+            width: 160px;
+        }
+
+        .el-range-editor {
+            width: 300px;
+        }
+    }
+
     &--vertical,
     &--horizontal {
         .el-form-item {

+ 2 - 1
src/packages/pc/components/base/table-details/index.vue

@@ -5,7 +5,7 @@
                 {{ title }}
             </slot>
         </legend>
-        <table cellspacing="0" cellpadding="0" :style="tableStyle">
+        <table class="app-table-details__table" cellspacing="0" cellpadding="0" :style="tableStyle">
             <tbody>
                 <tr v-for="(items, i) in cellGroup" :key="i">
                     <template v-for="(item, n) in items" :key="n">
@@ -24,6 +24,7 @@
                 </tr>
             </tbody>
         </table>
+        <slot></slot>
     </fieldset>
 </template>
 

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

@@ -9,7 +9,7 @@
                 </div>
             </el-option>
         </el-select>
-        <el-button icon="Plus" link @click="onPlus" />
+        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
     </div>
 </template>
 

+ 1 - 1
src/packages/pc/components/modules/select-bank/index.vue

@@ -4,7 +4,7 @@
             value-key="bankId" :remote-method="remoteMethod" @change="onChange" remote filterable clearable>
             <el-option v-for="item in dataList" :key="item.bankId" :label="item.bankName" :value="item" />
         </el-select>
-        <el-button icon="Plus" link @click="onPlus" />
+        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
     </div>
 </template>
 

+ 83 - 0
src/packages/pc/components/modules/select-goods/index.vue

@@ -0,0 +1,83 @@
+<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>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, computed, toRaw } from 'vue'
+import { ElMessage } from 'element-plus'
+import { useRequest } from '@/hooks/request'
+import { queryGoodsSelect } from '@/services/api/common'
+
+const props = defineProps({
+    modelValue: [Number, String],
+    marketId: Number,
+    status: String,
+    placeholder: {
+        type: String,
+        default: '输入商品代码或名称'
+    }
+})
+
+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 onPlus = () => {
+    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
+        })
+    }
+}
+
+const remoteMethod = (query: string) => {
+    if (query) {
+        loading.value = true
+        runAsync({
+            marketId: props.marketId,
+            goodsStatusIds: props.status,
+            searchCode: query
+        }).finally(() => {
+            loading.value = false
+        })
+    }
+}
+
+const onChange = (id?: number) => {
+    const item = dataList.value.find((e) => e.goodsId === id)
+    dataList.value = []
+    emit('change', toRaw(item))
+}
+</script>

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

@@ -9,7 +9,7 @@
                 </div>
             </el-option>
         </el-select>
-        <el-button icon="Plus" link @click="onPlus" />
+        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
     </div>
 </template>
 

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

@@ -10,7 +10,7 @@
                 </div>
             </el-option>
         </el-select>
-        <el-button icon="Plus" link @click="onPlus" />
+        <!-- <el-button icon="Plus" link @click="onPlus" /> -->
     </div>
 </template>
 

+ 50 - 0
src/packages/pc/views/profitshare/institution/config/components/delete/index.vue

@@ -0,0 +1,50 @@
+<!-- 分润管理-机构分润配置-子机构分组管理-删除 -->
+<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 { profitShareDelete } from '@/services/api/profitshare'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.ProfitShareQueryPageRsp>,
+        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
+    profitShareDelete({
+        data: {
+            groupId: props.selectedRow.subareagroupid
+        }
+    }).then(() => {
+        ElMessage.success('删除成功')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error('删除失败:' + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
+</script>

+ 50 - 0
src/packages/pc/views/profitshare/institution/group/components/delete/index.vue

@@ -0,0 +1,50 @@
+<!-- 分润管理-机构分润配置-子机构分组管理-删除 -->
+<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 { profitShareDelete } from '@/services/api/profitshare'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.ProfitShareQueryPageRsp>,
+        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
+    profitShareDelete({
+        data: {
+            groupId: props.selectedRow.subareagroupid
+        }
+    }).then(() => {
+        ElMessage.success('删除成功')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error('删除失败:' + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
+</script>

+ 91 - 0
src/packages/pc/views/profitshare/institution/group/components/edit/index.vue

@@ -0,0 +1,91 @@
+<!-- 分润管理-机构分润配置-子机构分组管理-编辑 -->
+<template>
+    <app-drawer title="编辑" width="480" v-model:show="show" :refresh="refresh" :loading="loading">
+        <el-form ref="formRef" class="el-form--vertical" label-width="80px" :model="formData" :rules="formRules"
+            :show-message="false">
+            <el-form-item label="分组类型" prop="subareagrouptype">
+                <el-select v-model="formData.subareagrouptype">
+                    <el-option :label="getProfitShareGroupName(ProfitShareGroup.SubInstitution)"
+                        :value="ProfitShareGroup.SubInstitution" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="名称" prop="subareagroupname">
+                <el-input v-model="formData.subareagroupname" placeholder="请输入" />
+            </el-form-item>
+            <el-form-item label="备注" prop="remark">
+                <el-input type="textarea" v-model="formData.remark" maxlength="200" :rows="2" placeholder="请输入" />
+            </el-form-item>
+        </el-form>
+        <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 { ref, PropType, toRaw, onMounted } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { ProfitShareGroup, getProfitShareGroupName } from '@/constants/profitshare'
+import { profitShareDeal } from '@/services/api/profitshare'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.ProfitShareQueryPageRsp>
+    }
+})
+
+const formRef = ref<FormInstance>()
+const show = ref(true)
+const refresh = ref(false)
+const loading = ref(false)
+
+const formData = ref<Model.ProfitShareDealReq>({
+    remark: '',
+    subareagroupname: '',
+    subareagrouptype: ProfitShareGroup.SubInstitution
+})
+
+// 表单验证规则
+const formRules: FormRules = {
+    subareagrouptype: [{ required: true }],
+    subareagroupname: [{ required: true }],
+}
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            const rawData = toRaw(formData.value)
+            loading.value = true
+            profitShareDeal({
+                data: rawData
+            }).then(() => {
+                ElMessage.success('保存成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('保存失败:' + err)
+            }).finally(() => {
+                loading.value = false
+            })
+        }
+    })
+}
+
+onMounted(() => {
+    const params = props.selectedRow
+    if (params) {
+        formData.value = {
+            subareagroupid: params.subareagroupid,
+            remark: params.remark,
+            subareagroupname: params.subareagroupname,
+            subareagrouptype: params.subareagrouptype
+        }
+    }
+})
+</script>

+ 123 - 0
src/packages/pc/views/profitshare/institution/group/components/member/index.vue

@@ -0,0 +1,123 @@
+<!-- 分润管理-机构分润配置-子机构分组管理-会员列表 -->
+<template>
+    <teleport to="#appPageTeleport">
+        <app-view>
+            <app-table :data="dataList" v-model:columns="tableColumns">
+                <template #headerLeft>
+                    <span>分组:{{ selectedRow.subareagroupname }}</span>
+                </template>
+                <template #headerRight>
+                    <div style="display: flex;">
+                        <el-select v-model="formData.userid" :empty-values="[null, undefined, 0]" filterable
+                            style="width: 180px;margin-right: 12px;">
+                            <el-option v-for="item in userList" :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 type="primary" :loading="loading" @click="onSubmit">添加</el-button>
+                        <el-button @click="emit('closed')">关闭</el-button>
+                    </div>
+                </template>
+                <!-- 操作 -->
+                <template #operate="{ row }">
+                    <el-button size="small" icon="Delete" @click="onDelete(row)" circle plain />
+                </template>
+                <template #footer>
+                    <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
+                        @change="run" />
+                </template>
+            </app-table>
+        </app-view>
+    </teleport>
+</template>
+
+<script lang="ts" setup>
+import { ref, PropType } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { useRequest } from '@/hooks/request'
+import { profitShareMemberQuery, profitShareGroupOrgan, profitShareMemberAdd, profitShareDeleteMember } from '@/services/api/profitshare'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.ProfitShareQueryPageRsp>,
+        required: true
+    }
+})
+
+const emit = defineEmits(['closed'])
+const loading = ref(false)
+
+const formData = ref<Model.ProfitShareMemberAddReq>({
+    subareagroupid: props.selectedRow.subareagroupid,
+    userid: 0
+})
+
+const { dataList: userList, run: getUserList } = useRequest(profitShareGroupOrgan)
+
+const { dataList, total, pageSize, pageIndex, run } = useRequest(profitShareMemberQuery, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        subareagroupid: props.selectedRow.subareagroupid
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = ref<Model.TableColumn[]>([
+    { field: 'accountname', label: '子机构' },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+// 添加
+const onSubmit = () => {
+    loading.value = true
+    profitShareMemberAdd({
+        data: formData.value
+    }).then(() => {
+        ElMessage.success('添加成功')
+        formData.value.userid = 0
+        run()
+        getUserList()
+    }).catch((err) => {
+        ElMessage.error('添加失败:' + err)
+    }).finally(() => {
+        loading.value = false
+    })
+}
+
+// 删除
+const onDelete = (row: Model.ProfitShareMemberQueryRsp) => {
+    ElMessageBox({
+        title: '提示',
+        message: '确认删除分组子机构?',
+        showCancelButton: true,
+        beforeClose: (action, instance, done) => {
+            if (action === 'confirm') {
+                instance.confirmButtonLoading = true
+                profitShareDeleteMember({
+                    data: {
+                        userid: row.userid
+                    }
+                }).then(() => {
+                    ElMessage.success('删除成功')
+                    done()
+                    run()
+                    getUserList()
+                }).catch((err) => {
+                    ElMessage.error('删除失败:' + err)
+                })
+            } else {
+                done()
+            }
+        }
+    })
+}
+</script>

+ 76 - 1
src/packages/pc/views/profitshare/institution/group/index.vue

@@ -1,7 +1,82 @@
 <!-- 分润管理-机构分润配置-子机构分组管理 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :options="filterOptons" />
+        </template>
+        <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getFilteredButtons(['profitshare_institution_group_add'])"
+                    @click="openComponent" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small"
+                    :data-list="getFilteredButtons(['profitshare_institution_group_modify', 'profitshare_institution_group_member', 'profitshare_institution_group_delete'])"
+                    @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="{ selectedRow }" @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 { getProfitShareGroupName } from '@/constants/profitshare'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { useOperation } from '@/hooks/operation'
+import { profitShareQueryPage } from '@/services/api/profitshare'
+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 { filterOptons, getQueryParams } = useDataFilter<Model.ProfitShareQueryPageReq>()
+
+const { componentMap, componentId, selectedRow, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.ProfitShareQueryPageRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(profitShareQueryPage, {
+    params: {
+        pageNum: 1,
+        pageSize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'subareagroupname', label: '名称' },
+    { field: 'subareagrouptype', label: '分组类型', formatValue: (val) => getProfitShareGroupName(val) },
+    { field: 'remark', label: '备注' },
+    { field: 'username', label: '创建人' },
+    { field: 'createtime', label: '创建时间', formatValue: (val) => formatDate(val) },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+filterOptons.inputList = [
+    {
+        label: '名称', keys: ['subareagroupname']
+    }
+]
+
+filterOptons.buttonList = [
+    { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+    { lable: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
+]
+
+const onSearch = (clear = false) => {
+    const qs = getQueryParams(clear)
+    run(qs)
+}
 </script>

+ 2 - 13
src/packages/pc/views/query/order/accountsumm/index.vue

@@ -6,14 +6,9 @@
         </template>
         <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
             <template #headerLeft>
-                <app-operation :data-list="getFilteredButtons(['query_order_trade_export'])"
+                <app-operation :data-list="getFilteredButtons(['query_order_accountsumm_export'])"
                     @click="openComponentOnClick" />
             </template>
-            <!-- 操作 -->
-            <template #operate="{ row }">
-                <app-operation size="small" :data-list="getFilteredButtons(['query_order_trade_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" />
@@ -27,7 +22,6 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { ElMessage } from 'element-plus'
-import { useEnum } from '@/hooks/enum'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
 import { useDataFilter } from '@/hooks/datatable'
@@ -39,7 +33,6 @@ import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 
 const { marketOptions, registerMarketReadyCallback } = useMarket()
-const buildtypeEnum = useEnum('buildtype') // 单据类型
 const queryParams = shallowRef<Model.AccountTransactionsReq>()
 
 const { filterOptons, getQueryParams } = useDataFilter<Model.AccountTransactionsReq>()
@@ -53,6 +46,7 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(accoun
     params: {
         pageNum: 1,
         pageSize: 20,
+        // isHis: 0,
     }
 })
 
@@ -70,7 +64,6 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 
 filterOptons.inputList = [
     { label: '商品', keys: ['goodsid'] },
-    { label: '排除资金账户', keys: ['excludeaccountidsstr'] },
     { label: '账户', keys: ['accountid'] },
 ]
 
@@ -120,8 +113,4 @@ const processRequiredParams = (callback: (params: Model.AccountTransactionsReq)
 registerMarketReadyCallback(() => {
     filterOptons.selectList[0].options = marketOptions.value.filter((e) => ![15, 97, 99].includes(e.value))
 })
-
-buildtypeEnum.registerEnumReadyCallback(() => {
-    filterOptons.selectList[3].options = buildtypeEnum.enumOptions.value
-})
 </script>

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

@@ -1,7 +1,124 @@
 <!-- 查询管理-内部订单查询-商品成交汇总 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <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">
+                        <el-option v-for="item in marketOptions" :key="item.value" :label="item.label"
+                            :value="item.value" />
+                    </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="结束日期" />
+                </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="goodsid">
+                    <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-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch">查询</el-button>
+                </el-form-item>
+            </el-form>
+        </template>
+        <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getFilteredButtons(['query_order_goodssumm_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="{ selectedRow, queryParams }" @closed="closeComponent"
+            v-if="componentId" />
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { reactive, shallowRef } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { useMarket } from '@/hooks/market'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryGoodsTrade } 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 AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
+
+const { marketOptions } = useMarket()
+const formRef = shallowRef<FormInstance>()
+const dateValue = shallowRef<string[]>([])
+const queryParams = reactive<Model.GoodsTradeReq>({
+    pageNum: 1,
+    pageSize: 20,
+    summode: 1
+})
+
+const { componentMap, componentId, selectedRow, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.GoodsTradeRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryGoodsTrade, {
+    manual: true,
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'tradeDate', label: '交易日' },
+    { field: 'goodsfullname', label: '商品代码名称' },
+    { field: 'tradeqtysum', label: '总成交量' },
+    { field: 'tradeamountsum', label: '总成交额' },
+    { field: 'closeplsum', label: '总转让损益' },
+    { field: 'chargesum', label: '总手续费' },
+])
+
+// 表单验证规则
+const formRules: FormRules = {
+    marketid: [{ required: true }],
+    date: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (dateValue.value.length === 2) {
+                callback()
+            } else {
+                callback(new Error('请选择日期'))
+            }
+        },
+    }],
+}
+
+const onSearch = (clear = false) => {
+    processRequiredParams((qs) => run(qs), clear)
+}
+
+const openComponentOnClick = (code: string) => {
+    processRequiredParams(() => openComponent(code))
+}
+
+// 处理请求参数
+const processRequiredParams = (callback: (params: Model.InvestorOrderReq) => void, clear = false) => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            const [startDate, endDate] = dateValue.value
+            queryParams.startdate = startDate
+            queryParams.enddate = endDate
+            callback(queryParams)
+        }
+    })
+}
 </script>

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

@@ -1,7 +1,121 @@
 <!-- 查询管理-内部订单查询-机构成交汇总 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules"
+                :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-select>
+                </el-form-item>
+                <el-form-item label="商品" prop="goodsid">
+                    <app-select-goods v-model="queryParams.goodsid" :market-id="marketId" status="3,6,7" />
+                </el-form-item>
+                <el-form-item label="日期" prop="date">
+                    <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD"
+                        start-placeholder="开始日期" end-placeholder="结束日期" />
+                </el-form-item>
+                <el-form-item label="所属机构" prop="parentuserid">
+                    <app-select-member v-model="queryParams.parentuserid" usertype="2,3" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch">查询</el-button>
+                </el-form-item>
+            </el-form>
+        </template>
+        <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getFilteredButtons(['query_order_institutionsumm_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="{ selectedRow, queryParams }" @closed="closeComponent"
+            v-if="componentId" />
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { reactive, shallowRef } from 'vue'
+import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { useMarket } from '@/hooks/market'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryInvestor } 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 AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
+
+const { marketOptions } = useMarket()
+const formRef = shallowRef<FormInstance>()
+const marketId = shallowRef<number>()
+const dateValue = shallowRef<string[]>([])
+const queryParams = reactive<Model.InvestorOrderReq>({
+    pageNum: 1,
+    pageSize: 20
+})
+
+const { componentMap, componentId, selectedRow, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.InvestorOrderRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryInvestor, {
+    manual: true,
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'userid', label: '账户ID' },
+    { field: 'accountname', label: '账户名称' },
+    { field: 'goodscode', label: '商品代码' },
+    { field: 'goodsname', label: '商品名称' },
+    { field: 'tradeqtysum', label: '总成交量' },
+    { field: 'tradeamountsum', label: '总成交额' },
+    { field: 'chargesum', label: '总转让损益' },
+    { field: 'chargesum', label: '总手续费' },
+])
+
+// 表单验证规则
+const formRules: FormRules = {
+    goodsid: [{ required: true }],
+    date: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (dateValue.value.length === 2) {
+                callback()
+            } else {
+                callback(new Error('请选择日期'))
+            }
+        },
+    }],
+}
+
+const onSearch = (clear = false) => {
+    processRequiredParams((qs) => run(qs), clear)
+}
+
+const openComponentOnClick = (code: string) => {
+    processRequiredParams(() => openComponent(code))
+}
+
+// 处理请求参数
+const processRequiredParams = (callback: (params: Model.InvestorOrderReq) => void, clear = false) => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            const [startDate, endDate] = dateValue.value
+            queryParams.startdate = startDate
+            queryParams.enddate = endDate
+            callback(queryParams)
+        }
+    })
+}
 </script>

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

@@ -6,14 +6,9 @@
         </template>
         <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
             <template #headerLeft>
-                <app-operation :data-list="getFilteredButtons(['query_order_goodstrade_export'])"
+                <app-operation :data-list="getFilteredButtons(['query_order_tradesumm_export'])"
                     @click="openComponentOnClick" />
             </template>
-            <!-- 操作 -->
-            <template #operate="{ row }">
-                <app-operation size="small" :data-list="getFilteredButtons(['query_order_goodstrade_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" />

+ 109 - 0
src/packages/pc/views/query/warehouse_receipt_order/order/components/details/index.vue

@@ -0,0 +1,109 @@
+<!-- 查询管理-仓单类订单查询-委托单查询-详情 -->
+<template>
+    <app-drawer title="详情" width="960" v-model:show="show">
+        <app-table-details title="基本信息" :data="data?.wrTradeOrderDetail" :label-width="180" :cell-props="detailProps1"
+            :column="2" />
+        <app-table-details title="价格信息" :data="data?.wrTradeOrderDetail" :label-width="180" :cell-props="detailProps2"
+            :column="2" v-if="data?.wrTradeOrderDetail.wrtradetype === 1">
+            <app-table :data="data.wrTradeGoodsConfigs" v-model:columns="tableColumns"
+                v-if="data.wrTradeOrderDetail.wrpricetype == 2" />
+        </app-table-details>
+        <!-- <app-table-details title="对手信息" :data="data?.wrTradeOrderDetail" :label-width="180" :cell-props="detailProps1"
+            :column="2" v-if="data?.wrTradeOrderDetail.isspecified === 1" /> -->
+        <template #footer>
+            <el-button @click="onCancel(false)">关闭</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType, computed } from 'vue'
+import { ElMessage } from 'element-plus'
+import { formatDate } from '@/filters'
+import { getBuyOrSellName } from '@/constants/order'
+import { useEnum } from '@/hooks/enum'
+import { useRequest } from '@/hooks/request'
+import { tradeOrderView } from '@/services/api/order'
+import { CellProp } from '@pc/components/base/table-details/types'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WarehouseQueryRsp>,
+        required: true
+    }
+})
+
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+
+// 委托类型
+const wrtradetype2Enum = useEnum('wrtradetype2')
+// 状态
+const wrTradeOrderStatusEnum = useEnum('WRTradeOrderStatus')
+
+const { data } = useRequest(tradeOrderView, {
+    params: {
+        ishis: props.selectedRow.ishis,
+        wrtradeorderid: props.selectedRow.wrtradeorderid
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps1 = computed<CellProp[]>(() => {
+    const { userName, wrFactorTypeName, wrstandardname, marketName } = data.value ?? {}
+    return [
+        { prop: 'tradedate', label: '交易日:' },
+        { prop: 'wrtradeorderid', label: '委托单号:', formatValue: () => props.selectedRow.wrtradeorderid },
+        { prop: 'userName', label: '用户名称:', formatValue: () => userName },
+        { prop: 'accountid', label: '资金账号:' },
+        { prop: 'wrtradetype', label: '单据类型:', formatValue: (val) => wrtradetype2Enum.getEnumTypeName(val) },
+        { prop: 'buyorsell', label: '方向:', formatValue: (val) => getBuyOrSellName(val) },
+        { prop: 'isspecified', label: '是否指定对手:' },
+        { prop: 'wrstandardname', label: '现货商品:', formatValue: () => wrstandardname },
+        { prop: 'wrFactorTypeName', label: '仓单:', formatValue: () => wrFactorTypeName },
+        { prop: 'marketName', label: '市场:', formatValue: () => marketName },
+        { prop: 'orderqty', label: '委托数量:' },
+        { prop: 'tradeqty', label: '成交数量:' },
+        { prop: 'wrtradeorderstatus', label: '状态:', formatValue: (val) => wrTradeOrderStatusEnum.getEnumTypeName(val) },
+        { prop: 'ordertime', label: '委托时间:', formatValue: (val) => formatDate(val) },
+        { prop: 'attachment1', label: '附件1:' },
+        { prop: 'attachment2', label: '附件2:' },
+        { prop: 'remark', label: '备注:' },
+    ]
+})
+
+const detailProps2 = computed(() => {
+    const { goodsUnitName, isyijia, wrTradeOrderDetail } = data.value ?? {}
+    const result: CellProp[] = [
+        { prop: 'goodsUnitName', label: '价格设置:', formatValue: () => goodsUnitName && `元/${goodsUnitName}` },
+        { prop: 'canbargain', label: '是否议价:', show: !!isyijia },
+        { prop: 'wrpricetype', label: '价格方式:' },
+        { prop: 'fixedprice', label: '固定价格:', show: wrTradeOrderDetail?.wrpricetype === 1 },
+    ]
+    if (wrTradeOrderDetail?.wrpricetype == 2 && wrTradeOrderDetail?.wrtradetype === 1) {
+        result.push(
+            { prop: 'pricedisplaymode', label: '显示方式:' },
+            { prop: 'pricemove', label: '升贴水:' },
+            { prop: 'pricefactor', label: '价格系数:' },
+        )
+    }
+    return result
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'goodscode', label: '商品' },
+    { field: 'pricefactor', label: '商品价格系数' },
+    { field: 'weightratio', label: '商品重量系数' },
+    { field: 'pricemove', label: '升贴水' },
+])
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+</script>

+ 134 - 1
src/packages/pc/views/query/warehouse_receipt_order/order/index.vue

@@ -1,7 +1,140 @@
 <!-- 查询管理-仓单类订单查询-委托单查询 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :options="filterOptons" />
+        </template>
+        <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getFilteredButtons(['query_wrorder_order_export'])"
+                    @click="openComponentOnClick" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="getFilteredButtons(['query_wrorder_order_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="{ selectedRow, 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 { useEnum } from '@/hooks/enum'
+import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
+import { useMarket } from '@/hooks/market'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { useOperation } from '@/hooks/operation'
+import { warehouseQuery } 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 wrtradetype2Enum = useEnum('wrtradetype2')
+// 状态
+const wrTradeOrderStatusEnum = useEnum('WRTradeOrderStatus')
+
+const { marketOptions, registerMarketReadyCallback } = useMarket()
+const queryParams = shallowRef<Model.WarehouseQueryReq>()
+
+const { filterOptons, getQueryParams } = useDataFilter<Model.WarehouseQueryReq>()
+
+const { componentMap, componentId, selectedRow, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.WarehouseQueryRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(warehouseQuery, {
+    manual: true,
+    params: {
+        pagenum: 1,
+        pagesize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'accountid', label: '资金账户' },
+    { field: 'wrtradeorderid', label: '委托单号' },
+    { field: 'userid', label: '会员或交易商' },
+    { field: 'marketname', label: '市场' },
+    { field: 'wrtradetype', label: '委托类型', formatValue: (val) => wrtradetype2Enum.getEnumTypeName(val) },
+    { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
+    { field: 'wrstandard', label: '代码/名称' },
+    { field: 'wrfactortypename', label: '属性' },
+    { field: 'orderqtyname', label: '委托数量' },
+    { field: 'tradeqtyname', label: '成交数量' },
+    { field: 'wrtradeorderstatus', label: '状态', formatValue: (val) => wrTradeOrderStatusEnum.getEnumTypeName(val) },
+    { field: 'validtime', label: '有效时间' },
+    { field: 'ordertime', label: '委托时间' },
+    { field: 'tradedate', label: '交易日', formatValue: (val) => formatDate(val) },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+filterOptons.selectList = [
+    {
+        key: 'marketid',
+        label: '市场',
+        locked: true,
+        options: [],
+    },
+    {
+        key: 'wrtradetype',
+        label: '类型',
+        options: [],
+    },
+    {
+        key: 'buyorsell',
+        label: '方向',
+        options: getBuyOrSellList(),
+    }
+]
+
+filterOptons.inputList = [
+    { label: '委托单号', keys: ['tradeid'] },
+]
+
+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.WarehouseQueryReq) => void, clear = false) => {
+    const qs = getQueryParams(clear)
+    if (qs.marketid) {
+        queryParams.value = qs
+        callback(qs)
+    } else {
+        ElMessage.warning('请选择市场')
+    }
+}
+
+registerMarketReadyCallback(() => {
+    filterOptons.selectList[0].options = marketOptions.value
+})
+
+wrtradetype2Enum.registerEnumReadyCallback(() => {
+    filterOptons.selectList[1].options = wrtradetype2Enum.enumOptions.value
+})
 </script>

+ 126 - 1
src/packages/pc/views/query/warehouse_receipt_order/trade/index.vue

@@ -1,7 +1,132 @@
 <!-- 查询管理-仓单类订单查询-成交单查询 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :options="filterOptons" />
+        </template>
+        <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getFilteredButtons(['query_wrorder_trade_export'])"
+                    @click="openComponentOnClick" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="getFilteredButtons(['query_wrorder_trade_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="{ selectedRow, 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 { useMarket } from '@/hooks/market'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { useOperation } from '@/hooks/operation'
+import { queryTradeOrder } 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 { marketOptions, registerMarketReadyCallback } = useMarket()
+const queryParams = shallowRef<Model.TradeOrderReq>()
+
+const { filterOptons, getQueryParams } = useDataFilter<Model.TradeOrderReq>()
+
+const { componentMap, componentId, selectedRow, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.TradeOrderRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryTradeOrder, {
+    manual: true,
+    params: {
+        pagenum: 1,
+        pagesize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'accountid', label: '资金账户' },
+    { field: 'wrtradeorderid', label: '成交单号' },
+    { field: 'userid', label: '会员或交易商' },
+    { field: 'marketname', label: '市场' },
+    { field: 'wrtradetype', label: '委托类型' },
+    { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
+    { field: 'wrstandard', label: '代码/名称' },
+    { field: 'wrfactortypename', label: '属性' },
+    { field: 'orderqtyname', label: '数量' },
+    { field: 'realtradeqtyname', label: '实际数量' },
+    { field: 'tradeprice', label: '成交价格' },
+    { field: 'realtradeamount', label: '实际金额' },
+    { field: 'performanceplanid', label: '履约编号' },
+    { field: 'handlestatus', label: '履约状态' },
+    { field: 'tradetime', label: '成交时间' },
+    { field: 'tradedate', label: '交易日', formatValue: (val) => formatDate(val) },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+filterOptons.selectList = [
+    {
+        key: 'marketid',
+        label: '市场',
+        locked: true,
+        options: [],
+    },
+    {
+        key: 'wrtradetype',
+        label: '类型',
+        options: [],
+    },
+    {
+        key: 'buyorsell',
+        label: '方向',
+        options: getBuyOrSellList(),
+    }
+]
+
+filterOptons.inputList = [
+    { label: '成交单号', keys: ['tradeid'] },
+]
+
+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.WarehouseQueryReq) => void, clear = false) => {
+    const qs = getQueryParams(clear)
+    if (qs.marketid) {
+        queryParams.value = qs
+        callback(qs)
+    } else {
+        ElMessage.warning('请选择市场')
+    }
+}
+
+registerMarketReadyCallback(() => {
+    filterOptons.selectList[0].options = marketOptions.value
+})
 </script>

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

@@ -153,6 +153,7 @@ const onAccountChange = (item?: Model.TAAccountChildrenSelectRsp) => {
 }
 
 const onSearch = () => {
+    params.pageNum = 1
     formRef.value?.validate((valid) => {
         if (valid) {
             setTimeout(() => {

+ 72 - 0
src/services/api/profitshare/index.ts

@@ -0,0 +1,72 @@
+import httpClient from '@/services/http'
+import { CommonFetchOptions } from '@/services/http/types'
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->新增、修改
+ */
+export function profitShareDeal(options: CommonFetchOptions<{ request: Model.ProfitShareDealReq; }>) {
+    return httpClient.commonRequest('/profitShar/deal', 'post', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->删除
+ */
+export function profitShareDelete(options: CommonFetchOptions<{ request: Model.ProfitShareDeleteReq; }>) {
+    return httpClient.commonRequest('/profitShar/delete', 'get', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->会员列表-->删除
+ */
+export function profitShareDeleteMember(options: CommonFetchOptions<{ request: Model.ProfitShareDeleteMemberReq; }>) {
+    return httpClient.commonRequest('/profitShar/deleteMember', 'get', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分润配置-->删除
+ */
+export function profitShareDeleteSOrganSec(options: CommonFetchOptions<{ request: Model.ProfitShareDeleteSOrganSecReq; }>) {
+    return httpClient.commonRequest('/profitShar/deleteSOrganSec', 'get', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分润配置-->新增、修改
+ */
+export function profitShareDelSOrganSec(options: CommonFetchOptions<{ request: Model.ProfitShareDelSOrganSecReq; }>) {
+    return httpClient.commonRequest('/profitShar/delSOrganSec', 'post', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->会员列表-->机构获取
+ */
+export function profitShareGroupOrgan(options: CommonFetchOptions<{ response: Model.ProfitShareGroupOrganRsp[]; }>) {
+    return httpClient.commonRequest('/profitShar/groupOrgan', 'get', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分润配置-->获取所有已配置信息
+ */
+export function initProfitShare(options: CommonFetchOptions<{ response: Model.InitProfitShareRsp; }>) {
+    return httpClient.commonRequest('/profitShar/initProfitShar', 'get', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->会员列表-->新增
+ */
+export function profitShareMemberAdd(options: CommonFetchOptions<{ request: Model.ProfitShareMemberAddReq; }>) {
+    return httpClient.commonRequest('/profitShar/memberAdd', 'post', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->会员列表
+ */
+export function profitShareMemberQuery(options: CommonFetchOptions<{ request: Model.ProfitShareMemberQueryReq; response: Model.ProfitShareMemberQueryRsp[]; }>) {
+    return httpClient.commonRequest('/profitShar/memberQuery', 'get', options)
+}
+
+/**
+ * 分润管理-->机构分润配置-->子机构分组管理-->获取列表
+ */
+export function profitShareQueryPage(options: CommonFetchOptions<{ request: Model.ProfitShareQueryPageReq; response: Model.ProfitShareQueryPageRsp[]; }>) {
+    return httpClient.commonRequest('/profitShar/queryPage', 'get', options)
+}

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

@@ -136,14 +136,14 @@ declare namespace Model {
     /** 商品查询下拉框 请求 */
     interface GoodsSelectReq {
         goodsStatusIds: string;
-        marketId: string;
+        marketId: number;
         searchCode: string;
     }
 
     /** 商品查询下拉框 响应 */
     interface GoodsSelectRsp {
         goodsCode: string; // 商品代码
-        goodsId: string; // id
+        goodsId: number; // id
         goodsName: string; // 商品名称
     }
 

+ 19 - 17
src/types/model/order.d.ts

@@ -499,7 +499,7 @@ declare namespace Model {
 
     /** 仓单查询--> 仓单汇总查询查询 --> 初始化仓单标准以及仓库 响应 */
     interface InitWarehouseRsp {
-        warehouseInfoList: [{
+        warehouseInfoList: {
             // 详细地址
             address: string; 
             // 所属机构
@@ -538,9 +538,9 @@ declare namespace Model {
             warehousestatus: number
             // 仓库类型 - 1 厂库 2 自有库 3 合作库
             warehousetype: number
-        }]
+        }[]
         // 总转让损益
-        wrStandardList: [{
+        wrStandardList: {
             // 所属机构
             areauserid: number
             // Banner图(逗号分隔)
@@ -597,7 +597,7 @@ declare namespace Model {
             wrstandardid: number
             // 现货商品名称
             wrstandardname: string
-        }];
+        }[];
     }
 
     /** 内部订单查询--> 机构成交汇总 --> 获取列表 请求 */
@@ -640,11 +640,13 @@ declare namespace Model {
 
     /** 仓单类订单查询--> 成交单查询 --> 获取列表 请求 */
     interface TradeOrderReq {
-        // 会员或交易商代码/名称
+        // 会员或交易商代码/名称
         accountname?: string; 
         // 方向
-        buyOrSell?: number; 
-        // 结束时间
+        buyorsell?: number; 
+        // 状态
+        handlestatus?: number; 
+        // 结束世界
         hisenddate?: string; 
         // 开始时间
         hisstartdate?: string; 
@@ -653,15 +655,15 @@ declare namespace Model {
         // 市场id
         marketid?: number; 
         // 页码
-        pageNum?: number; 
+        pagenum?: number; 
         // 页大小
-        pageSize?: number; 
+        pagesize?: number; 
         // 成交单号
         tradeid?: string; 
         // 
-        userid?: number;
+        userid?: number; 
         // 类型
-        wrtradetype?: number; 
+        wrtradetype?: number;
     }
 
     /** 仓单查询--> 仓单汇总查询查询 --> 获取列表 响应 */
@@ -842,7 +844,7 @@ declare namespace Model {
             userid: number
         }
         // 贸易对手表
-        performancesteptemplateList: [{
+        performancesteptemplateList: {
             // AutoID
             autoid: number
             // 是否自动 - 0:不自动 1:自动 - [ 默认均自动执行; 仅 1:买方支付3:买方自提 5:买方确认货 7:买方确认票 可不自动]
@@ -861,13 +863,13 @@ declare namespace Model {
             stepvalue: number
             // 履约计划模板ID
             templateid: number
-        }]
+        }[]
         // 
         userName: string
         // 
         wrFactorTypeName: string
         // 对应的商品配置信息
-        wrTradeGoodsConfigs: [{
+        wrTradeGoodsConfigs: {
             // 商品代码
             goodscode: string
             // 商品ID
@@ -881,14 +883,14 @@ declare namespace Model {
             // 仓单贸易委托单ID(挂牌委托)
             wrtradeorderid: number
             
-        }]
+        }[]
         // 贸易对手表
-        wrTradeMatchDetails: [{
+        wrTradeMatchDetails: {
             // 对手用户ID
             matchuserid: number
             // 仓单贸易委托单ID(挂牌委托)
             wrtradeorderid: number
-        }]
+        }[]
         wrTradeOrderDetail: {
             // 资金账号
             accountid: number

+ 119 - 0
src/types/model/profitshare.d.ts

@@ -0,0 +1,119 @@
+declare namespace Model {
+    /** 分润管理-->机构分润配置-->子机构分组管理-->新增、修改 请求 */
+    interface ProfitShareDealReq {
+        remark: string; // 备注
+        subareagroupid?: number; // id
+        subareagroupname: string; // 分组名称
+        subareagrouptype: number; // 分组类型
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->删除 请求 */
+    interface ProfitShareDeleteReq {
+        groupId: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->会员列表-->删除 请求 */
+    interface ProfitShareDeleteMemberReq {
+        userid: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分润配置-->删除 请求 */
+    interface ProfitShareDeleteSOrganSecReq {
+        dividefeetype: number;
+        marketid: number;
+        subareagroupid: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分润配置-->新增、修改 请求 */
+    interface ProfitShareDelSOrganSecReq {
+        dividefeetype: number; // 分润费用类型
+        dividemode: number; // 分润方式
+        dividetype: number; // 分润算法
+        dividevalue: number; // 分润值
+        isedit: number; // 新增0 修改1
+        marketid: number; // 市场
+        subareagroupid: number; // 分组
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->获取列表 请求 */
+    interface ProfitShareQueryPageReq {
+        pageNum: number;
+        pageSize: number;
+        subareagroupname?: string;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->获取列表 响应 */
+    interface ProfitShareQueryPageRsp {
+        createtime: string; // 创建时间
+        remark: string; // 备注
+        subareagroupid: number; // id
+        subareagroupname: string; // 名称
+        subareagrouptype: number; // 分组类型
+        username: string; // 创建人
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->会员列表 请求 */
+    interface ProfitShareMemberQueryReq {
+        pageNum: number;
+        pageSize: number;
+        subareagroupid: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->会员列表 响应 */
+    interface ProfitShareMemberQueryRsp {
+        accountname: string; // 子机构
+        userid: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->会员列表-->机构获取 响应 */
+    interface ProfitShareGroupOrganRsp {
+        accountname: string;
+        userid: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分组管理-->会员列表-->新增 请求 */
+    interface ProfitShareMemberAddReq {
+        subareagroupid: number;
+        userid: number;
+    }
+
+    /** 分润管理-->机构分润配置-->子机构分润配置-->获取所有已配置信息 响应 */
+    interface InitProfitShareRsp {
+        dividefeetype1: number;
+        dividefeetype1name: string;
+        dividefeetype6: number;
+        dividefeetype6name: string;
+        dividefeetype9: number;
+        dividefeetype9name: string;
+        ft1: {
+            [number]: InitProfitShareConfig[];
+        };
+        ft2: InitProfitShareConfig[];
+        ft3: {
+            [number]: InitProfitShareConfig[];
+        };
+        mks: {
+            buyspotrighttype: number;
+            marketid: number;
+            marketname: string;
+            roletype: number;
+            spotrighttype: number;
+            trademode: number;
+            tradeproperty: number;
+        }[];
+    }
+
+    interface InitProfitShareConfig {
+        createtime: string; // 创建时间
+        creatorid: number; // 创建人
+        dividefeetype: number; // 分润费用类型 - 1:交易手续费-投资者会员部分(101,102, 201, 202) 6:交割手续费-投资者会员部分(205,206)
+        dividemode: number; // 分润方式(比率分时使用) - 1:统一分 2:逐级分
+        dividetype: number; // 分配算法 - 1:比率 2:固定(暂不支持)
+        dividevalue: number; // 分润值
+        goodsid: number; // 商品ID - 0表示到市场
+        marketid: number; // 市场ID 交易手续费:市场ID;交收手续费:0;出入金手续费:渠道ID
+        subareagroupid: number; // 子机构分组ID
+        subareagroupname: string;
+        username: string;
+    }
+}