li.shaoyi il y a 1 an
Parent
commit
4dada2542b

+ 5 - 0
src/packages/pc/components/base/operation/index.less

@@ -0,0 +1,5 @@
+.app-operation {
+    &:empty {
+        display: none;
+    }
+}

+ 12 - 11
src/packages/pc/components/base/operation/index.vue

@@ -1,16 +1,13 @@
 <template>
     <div class="app-operation">
-        <template v-if="dataList.length">
-            <template v-for="(item, index) in dataList" :key="index">
-                <el-button :class="item.className" :size="size" :icon="item[defaultProps.icon]" :circle="circle" plain
-                    @click="onClick(item[defaultProps.value])">
-                    <slot :item="item" v-if="!circle">
-                        {{ item[defaultProps.label] }}
-                    </slot>
-                </el-button>
-            </template>
+        <template v-for="(item, index) in dataList" :key="index">
+            <el-button :class="item.className" :size="size" :icon="item[defaultProps.icon]" :circle="circle" plain
+                @click="onClick(item[defaultProps.value])">
+                <slot :item="item" v-if="!circle">
+                    {{ item[defaultProps.label] }}
+                </slot>
+            </el-button>
         </template>
-        <span v-else>--</span>
     </div>
 </template>
 
@@ -53,4 +50,8 @@ const defaultProps = computed(() => {
 const onClick = (value: unknown) => {
     emit('click', value)
 }
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 18 - 6
src/packages/pc/components/base/table/index.vue

@@ -16,7 +16,7 @@
     <div class="app-table__container">
       <el-table ref="tableRef" height="100%" :header-cell-class-name="selectionType" v-bind="$attrs"
         :highlight-current-row="highlightCurrentRow" scrollbar-always-on @row-click="onRowClick"
-        @expand-change="onRowClick" @select="onSelect" border>
+        @expand-change="onRowClick" @select="onSelect" @select-all="onSelect" border>
         <!-- 展开行 -->
         <el-table-column type="expand" v-if="$slots.expand">
           <template #default="{ row, $index }">
@@ -24,14 +24,15 @@
           </template>
         </el-table-column>
         <!-- 选择列 -->
-        <el-table-column type="selection" width="55" align="center" fixed v-if="selectionType" />
+        <el-table-column type="selection" :selectable="selectable" width="55" align="center" fixed
+          v-if="selectionType" />
         <!-- 序号 -->
         <el-table-column type="index" label="序号" align="center" :width="80" v-if="showIndex" />
         <!-- 数据列 -->
         <template v-for="(item, index) in columns" :key="index">
-          <el-table-column :align="item.align ?? 'center'" :min-width="120" :width="item.width" :label="item.formatLabel ? item.formatLabel() : item.label"
-            :prop="item.field" :fixed="item.fixed || false" :sortable="item.sortable"
-            :show-overflow-tooltip="item.field !== 'operate'" v-if="item.show ?? true">
+          <el-table-column :align="item.align ?? 'center'" :min-width="120" :width="item.width"
+            :label="item.formatLabel ? item.formatLabel() : item.label" :prop="item.field" :fixed="item.fixed || false"
+            :sortable="item.sortable" :show-overflow-tooltip="item.field !== 'operate'" v-if="item.show ?? true">
             <template #default="{ row, $index }">
               <slot :name="item.field" :row="row" :value="row[item.field]" :index="$index">
                 <span :class="item.className">{{ handleValue(row, item) }}</span>
@@ -62,7 +63,7 @@ export default defineComponent({
   components: {
     AppTableSetting
   },
-  emits: ['refresh', 'update:columns', 'rowClick', 'select'],
+  emits: ['refresh', 'update:columns', 'rowClick', 'select', 'selectable'],
   props: {
     columns: {
       type: Array as PropType<Model.TableColumn[]>,
@@ -107,6 +108,16 @@ export default defineComponent({
       emit('select', rows, currentRow)
     }
 
+    // 选择列是否可以勾选,通过 callback 改变选中值
+    const selectable = (row: unknown) => {
+      let isSelected  = true
+      const callback = (value: boolean) => {
+        isSelected = value
+      }
+      emit('selectable', row, callback)
+      return isSelected
+    }
+
     // 当某一行被点击时选中该行
     const onRowClick = (row: unknown) => {
       // if (props.selectionType) {
@@ -150,6 +161,7 @@ export default defineComponent({
       tableRadio,
       showTableSetting,
       onSelect,
+      selectable,
       onRowClick,
       handleValue,
       refresh,

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

@@ -2,16 +2,17 @@
 <template>
     <app-view>
         <template #header>
-            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules" :show-message="false">
+            <el-form ref="formRef" class="el-form--filter" :model="queryParams" :rules="formRules"
+                :show-message="false">
                 <el-form-item label="报表类型" prop="cycletype">
-                    <el-select v-model="queryParams.cycletype">
+                    <el-select v-model="queryParams.cycletype" @change="onTypeChange">
                         <el-option v-for="item in getReportTypeList()" :key="item.value" :label="item.label"
                             :value="item.value" />
                     </el-select>
                 </el-form-item>
-                <el-form-item label="日期" prop="cycletime">
-                    <el-date-picker :type="dateType" v-model="queryParams.cycletime" :format="dateFormat"
-                    :value-format="dateFormat" placeholder="请选择日期"  @change="onTypeChange" />
+                <el-form-item label="日期" prop="tradedate">
+                    <el-date-picker :type="dateType" v-model="queryParams.tradedate" :format="dateFormat"
+                        :value-format="dateFormat" placeholder="请选择日期" />
                 </el-form-item>
                 <el-form-item label="季度" prop="quarter" v-if="queryParams.cycletype === ReportType.Quarter">
                     <el-select v-model="queryParams.quarter">
@@ -20,11 +21,11 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="是否包含子机构" prop="isson">
-                    <el-checkbox v-model="isson" size="small" />
+                    <el-switch v-model="queryParams.isson" active-value="1" inactive-value="0" />
                 </el-form-item>
                 <el-form-item>
-                    <el-button type="primary" @click="onSearch">查询</el-button>
-                    <el-button type="primary" @click="onSearch(false)">重置</el-button>
+                    <el-button type="primary" @click="onSearch(false)">查询</el-button>
+                    <el-button type="primary" @click="onSearch(true)">重置</el-button>
                 </el-form-item>
             </el-form>
         </template>
@@ -46,25 +47,23 @@
 <script lang="ts" setup>
 import { shallowRef, computed, ref } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
 import { formatDate } from '@/filters'
 import { shareAmountQuery } from '@/services/api/report'
 import { useOperation } from '@/hooks/operation'
-import { useUserStore } from '@/stores'
 import { getReportTypeList, ReportType, getQuarterList } from '@/constants/report'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
 
+const roleTypeEnum = useEnum('roleType') // 角色
+
 const formRef = shallowRef<FormInstance>()
-const userStore = useUserStore()
-const isson = ref(true)
 
 const queryParams = ref<Partial<Model.ShareAmountQueryReq>>({
-    orgztypes: userStore.userInfo.orgztypes,
     cycletype: 0,
-    cycletime: '',
-    isson: isson.value ? 1 : 0
+    isson: 0
 })
 
 const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.ShareAmountQueryRsp>({
@@ -76,8 +75,6 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(shareA
     params: {
         pageNum: 1,
         pageSize: 20,
-        isson: isson.value ? 1 : 0,
-        orgztypes: userStore.userInfo.orgztypes
     },
     onError: (err) => {
         ElMessage.error(err)
@@ -104,34 +101,34 @@ const dateType = computed(() => {
 const dateFormat = computed(() => {
     switch (queryParams.value.cycletype) {
         case ReportType.Month:
-            return 'YYYY-MM'
+            return 'YYYYMM'
         case ReportType.Quarter:
         case ReportType.Year:
             return 'YYYY'
         default:
-            return 'YYYY-MM-DD'
+            return 'YYYYMMDD'
     }
 })
 
 const onTypeChange = (value: ReportType) => {
-    const dateValue = queryParams.value.cycletime
+    const dateValue = queryParams.value.tradedate
     if (dateValue) {
         switch (value) {
             case ReportType.Month:
-            queryParams.value.cycletime = formatDate(dateValue, 'YYYY-MM')
+                queryParams.value.tradedate = formatDate(dateValue, 'YYYYMM')
                 break
             case ReportType.Quarter:
             case ReportType.Year:
-            queryParams.value.cycletime = formatDate(dateValue, 'YYYY')
+                queryParams.value.tradedate = formatDate(dateValue, 'YYYY')
                 break
             default:
-            queryParams.value.cycletime = formatDate(dateValue, 'YYYY-MM-DD')
+                queryParams.value.tradedate = formatDate(dateValue, 'YYYYMMDD')
         }
     }
 }
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
-    { field: 'areatype', label: '角色' },
+    { field: 'areatype', label: '角色', formatValue: (val) => roleTypeEnum.getEnumTypeName(val) },
     { field: 'areaaccountid', label: '结算资金账户' },
     { field: 'goodsname', label: '商品/市场' },
     { field: 'searchtype', label: '费用类型' },
@@ -142,19 +139,17 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 
 // 表单验证规则
 const formRules: FormRules = {
-    cycletime: [{ required: true }],
+    tradedate: [{ required: true }],
+    quarter: [{ required: true }],
 }
 
 const onSearch = (clear = false) => {
-    if (!clear) {
+    if (clear) {
         queryParams.value = {
             cycletype: 0,
-            cycletime: '',
-            isson: isson.value ? 1 : 0,
-            orgztypes: userStore.userInfo.orgztypes
+            isson: 0
         }
     } else {
-        queryParams.value.isson = isson.value ? 1 : 0
         formRef.value?.validate((valid) => {
             if (valid) {
                 run(queryParams.value)
@@ -164,14 +159,6 @@ const onSearch = (clear = false) => {
 }
 
 const openComponentOnClick = (code: string) => {
-    processRequiredParams(() => openComponent(code))
-}
-
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.ShareAmountQueryReq) => void, clear = false) => {
-    queryParams.value.type = isson.value ? 1 : 0
-    queryParams.value.orgztypes = userStore.userInfo.orgztypes
-    onSearch(!clear)
+    openComponent(code)
 }
-
 </script>

+ 63 - 0
src/packages/pc/views/settlement/profitsharepay/components/details/details/index.vue

@@ -0,0 +1,63 @@
+<!-- 结算管理-分润付款确认-详情-详情 -->
+<template>
+    <app-drawer title="详情" width="800" v-model:show="show">
+        <app-table-details :data="data" :label-width="160" :cell-props="detailProps" :column="2" />
+        <template #footer>
+            <el-button @click="onCancel(false)">关闭</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { formatDate, handleNumberValue } from '@/filters'
+import { useEnum } from '@/hooks/enum'
+import { useRequest } from '@/hooks/request'
+import { settlementDetail } from '@/services/api/settlement'
+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'
+
+const props = defineProps({
+    selectedItem: {
+        type: Object as PropType<Model.ViewTradingDayRsp>,
+        required: true
+    }
+})
+
+const roleTypeEnum = useEnum('roleType') // 分润机构角色
+const ePayFlagEnum = useEnum('ePayFlag') // 支付状态
+
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+
+const { data } = useRequest(settlementDetail, {
+    params: {
+        areaid: props.selectedItem.areaid,
+        areatype: props.selectedItem.areatype,
+        tradedate: props.selectedItem.tradedate
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps: CellProp[] = [
+    { prop: 'tradedate', label: '交易日:' },
+    { prop: 'areaid', label: '分润机构:' },
+    { prop: 'areatype', label: '分润机构角色:', formatValue: (val) => roleTypeEnum.getEnumTypeName(val) },
+    { prop: 'totalcount', label: '总笔数:' },
+    { prop: 'totalfee', label: '总手续费:' },
+    { prop: 'divideamount', label: '总分润金额:' },
+    { prop: 'paystatus', label: '状态:', formatValue: (val) => ePayFlagEnum.getEnumTypeName(val) },
+    { prop: 'payerid', label: '付款人:', formatValue: (val) => handleNumberValue(val) },
+    { prop: 'paytime', label: '付款时间:', formatValue: (val) => formatDate(val) },
+    { prop: 'remark', label: '描述:' },
+]
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+</script>

+ 163 - 0
src/packages/pc/views/settlement/profitsharepay/components/details/index.vue

@@ -0,0 +1,163 @@
+<!-- 结算管理-分润付款确认-详情 -->
+<template>
+    <teleport to="#appPageTeleport">
+        <app-view>
+            <template #header>
+                <app-filter :option="filterOption" />
+            </template>
+            <app-table :data="dataList" :columns="tableColumns" selection-type="multiple" :loading="loading"
+                @select="onSelect" @selectable="onSelectable">
+                <template #headerLeft>
+                    <span>交易日:{{ record.tradedate }}</span>
+                </template>
+                <template #headerRight>
+                    <div>
+                        <el-button type="primary" @click="onBatchClick">批量确认</el-button>
+                        <el-button @click="emit('closed')">关闭</el-button>
+                    </div>
+                </template>
+                <!-- 操作 -->
+                <template #operate="{ row }">
+                    <el-button size="small" icon="Search" @click="showComponent('Details', 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>
+            <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedItem }"
+                @closed="closeComponent" v-if="componentId" />
+        </app-view>
+    </teleport>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType, defineAsyncComponent } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { useEnum } from '@/hooks/enum'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { viewTradingDay, batchPay } from '@/services/api/settlement'
+import { useUserStore } from '@/stores'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.ShareDayQueryRsp>,
+        required: true
+    },
+    queryParams: {
+        type: Object as PropType<Model.ShareDayQueryReq>,
+    }
+})
+
+const roleTypeEnum = useEnum('roleType') // 分润机构角色
+const ePayFlagEnum = useEnum('ePayFlag') // 支付状态
+
+const componentMap = new Map<string, unknown>([
+    ['Details', defineAsyncComponent(() => import('./details/index.vue'))], // 详情
+])
+
+const emit = defineEmits(['closed'])
+const userStore = useUserStore()
+const loading = shallowRef(false)
+const selectedItem = shallowRef<Model.ViewTradingDayRsp>()
+const selectedItems = shallowRef<Model.ViewTradingDayRsp[]>([])
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => onSearch())
+
+const { filterOption, getQueryParams, resetFilters } = useDataFilter<Model.ViewTradingDayReq>()
+
+const { dataList, total, pageSize, pageIndex, run } = useRequest(viewTradingDay, {
+    params: {
+        pageNum: 1,
+        pageSize: 20,
+        areatype: userStore.userInfo.releType === 1 ? undefined : 12,
+        tradedate: props.record.tradedate
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'shareorgname', label: '分润机构' },
+    { field: 'areatype', label: '分润机构角色', formatValue: (val) => roleTypeEnum.getEnumTypeName(val) },
+    { field: 'totalcount', label: '总笔数' },
+    { field: 'totalfee', label: '总手续费' },
+    { field: 'divideamount', label: '总分润金额' },
+    { field: 'paystatus', label: '状态', formatValue: (val) => ePayFlagEnum.getEnumTypeName(val) },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+filterOption.items = [
+    {
+        key: 'paystatus',
+        label: '支付状态',
+        options: () => ePayFlagEnum.getEnumOptions()
+    },
+    {
+        key: 'shareorgname',
+        label: '分润机构',
+    }
+]
+
+filterOption.buttons = [
+    { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+    { label: '重置', className: 'el-button--primary', onClick: () => resetFilters() }
+]
+
+const showComponent = (code: string, row?: Model.ViewTradingDayRsp) => {
+    selectedItem.value = row
+    openComponent(code)
+}
+
+const onSelect = (rows: Model.ViewTradingDayRsp[]) => {
+    selectedItems.value = rows
+}
+
+const onSelectable = (row: Model.ViewTradingDayRsp, callback: (value: boolean) => boolean) => {
+    row.paystatus === 1 ? callback(true) : callback(false)
+}
+
+const onSearch = () => {
+    const qs = getQueryParams()
+    run(qs)
+}
+
+// 批量确认
+const onBatchClick = () => {
+    if (selectedItems.value.length) {
+        ElMessageBox({
+            title: '提示',
+            message: '批量确认?',
+            showCancelButton: true,
+            beforeClose: (action, instance, done) => {
+                if (action === 'confirm') {
+                    instance.confirmButtonLoading = true
+                    batchPay({
+                        data: {
+                            areaids: selectedItems.value.map((e) => e.areaid).join(','),
+                            tradedate: props.record.tradedate
+                        }
+                    }).then((res) => {
+                        ElMessage.warning(res.message)
+                        onSearch()
+                    }).catch((err) => {
+                        ElMessage.error('确认失败:' + err)
+                    }).finally(() => {
+                        done()
+                    })
+                } else {
+                    done()
+                }
+            }
+        })
+    } else {
+        ElMessage.warning('请勾选要确认的分润付款')
+    }
+}
+</script>

+ 27 - 25
src/packages/pc/views/settlement/profitsharepay/index.vue

@@ -2,9 +2,26 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter :options="filterOptons" />
+            <el-form ref="formRef" class="el-form--filter">
+                <el-form-item label="日期" prop="date">
+                    <el-date-picker v-model="queryParams.tradedate" placeholder="请选择" value-format="YYYYMMDD" />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="onSearch()">查询</el-button>
+                    <el-button type="primary" @click="queryParams.tradedate = ''">重置</el-button>
+                </el-form-item>
+            </el-form>
         </template>
-        <app-table :data="dataList" showIndex :columns="tableColumns" :loading="loading">
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getFilteredButtons(['settlement_profitsharepay_export'])"
+                    @click="openComponent" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="getFilteredButtons(['settlement_profitsharepay_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" />
@@ -16,20 +33,18 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { ref } from 'vue'
 import { ElMessage } from 'element-plus'
 import { useRequest } from '@/hooks/request'
-import { useDataFilter } from '@/hooks/datatable'
 import { sharedayquery } from '@/services/api/settlement'
 import { useOperation } from '@/hooks/operation'
 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 queryParams = shallowRef<Model.ShareDayQueryReq>()
-const { filterOptons, getQueryParams } = useDataFilter<Model.ShareDayQueryReq>()
+const queryParams = ref<Model.ShareDayQueryReq>({})
 
-const { componentMap, componentId, record, closeComponent } = useOperation<Model.ShareDayQueryReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getFilteredButtons } = useOperation<Model.ShareDayQueryReq>({
     onClose: () => onSearch()
 })
 
@@ -43,28 +58,15 @@ const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(shared
     }
 })
 
-const tableColumns = shallowRef<Model.TableColumn[]>([
+const tableColumns = ref<Model.TableColumn[]>([
     { field: 'tradedate', label: '交易日' },
     { field: 'totalcount', label: '总笔数	' },
     { field: 'divideamount', label: '总分润金额	' },
     { field: 'totalpay', label: '总已付	' },
-    { field: 'operate', label: '操作' }
+    { field: 'operate', label: '操作', fixed: 'right' }
 ])
 
-filterOptons.buttonList = [
-    { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
-    { label: '重置', className: 'el-button--primary', onClick: () => onSearch(true) }
-]
-
-// 处理请求参数
-const processRequiredParams = (callback: (params: Model.ShareDayQueryReq) => void, clear = false) => {
-    const qs = getQueryParams(clear)
-    queryParams.value = qs
-    callback(qs)
+const onSearch = () => {
+    run(queryParams.value)
 }
-
-const onSearch = (clear = false) => {
-    processRequiredParams((qs) => run(qs), clear)
-}
-
 </script>

+ 8 - 1
src/services/api/report/index.ts

@@ -1,5 +1,8 @@
 import httpClient from '@/services/http'
 import { CommonFetchOptions } from '@/services/http/types'
+import { useUserStore } from '@/stores'
+
+const userStore = useUserStore()
 
 /**
  * 报表管理-->经纪会员报表
@@ -26,7 +29,11 @@ export function queryRefUserSelect(options: CommonFetchOptions<{ request: Model.
 /**
  * 报表管理-->分润报表
  */
-export function shareAmountQuery(options: CommonFetchOptions<{ request: Model.ShareAmountQueryReq; response: Model.ShareAmountQueryRsp[]; }>) {
+export function shareAmountQuery(options: CommonFetchOptions<{ request: Partial<Model.ShareAmountQueryReq>; response: Model.ShareAmountQueryRsp[]; }>) {
+    options.data = {
+        orgztypes: userStore.userInfo.orgztypes,
+        ...options.data
+    }
     return httpClient.commonRequest('/reportForm/shareAmountQuery', 'get', options)
 }
 

+ 3 - 3
src/services/api/settlement/index.ts

@@ -11,14 +11,14 @@ export function batchPay(options: CommonFetchOptions<{ request: Model.BatchPayRe
 /**
  * 结算管理-->二级分润付款确认-->查看交易日详情-->详情
  */
-export function detail(options: CommonFetchOptions<{ request: Model.DetailReq; }>) {
+export function settlementDetail(options: CommonFetchOptions<{ request: Model.SettlementDetailReq; response: Model.SettlementDetailRsp; }>) {
     return httpClient.commonRequest('/settlement/detail', 'get', options)
 }
 
 /**
  * 结算管理-->二级分润付款确认-->导出(交易所管理员才有此功能)
  */
-export function settlementExport(options: CommonFetchOptions<{ request: Model.ExportReq; }>) {
+export function settlementExport(options: CommonFetchOptions<{ request: Model.SettlementExportReq; }>) {
     return httpClient.commonRequest('/settlement/export', 'get', options)
 }
 
@@ -32,6 +32,6 @@ export function sharedayquery(options: CommonFetchOptions<{ request: Model.Share
 /**
  * 结算管理-->二级分润付款确认-->查看交易日详情
  */
-export function viewTradingDay(options: CommonFetchOptions<{ request: Model.ViewTradingDayReq; response: Model.ViewTradingDayRsp }>) {
+export function viewTradingDay(options: CommonFetchOptions<{ request: Model.ViewTradingDayReq; response: Model.ViewTradingDayRsp[] }>) {
     return httpClient.commonRequest('/settlement/viewTradingDay', 'get', options)
 }

+ 13 - 13
src/types/model/report.d.ts

@@ -68,20 +68,20 @@ declare namespace Model {
 
     /** 报表管理-->分润报表 请求 */
     interface ShareAmountQueryReq {
-        areaid?: number  // 所属机构
-        areaname?: string
-        cycletime?: string
-        cycletype?: number  // 报表类型
-        ismarketing?: number
-        isson?: number // 是否包含子机构
+        areaid: number  // 所属机构
+        areaname: string
+        cycletime: string
+        cycletype: number  // 报表类型
+        ismarketing: number
+        isson: number // 是否包含子机构
         orgztypes: string  // 管理员所属机构角色类型
-        pageNum?: number  // 页码
-        pageSize?: number  // 页大小
-        parentuserid?: number
-        quarter?: number // 季度
-        searchtype?: number
-        tradedate?: string  // 日 期
-        yxareauserid?: number // 所属营销中心
+        pageNum: number  // 页码
+        pageSize: number  // 页大小
+        parentuserid: number
+        quarter: number // 季度
+        searchtype: number
+        tradedate: string  // 日 期
+        yxareauserid: number // 所属营销中心
     }
 
     /** 报表管理-->分润报表 响应 */

+ 31 - 12
src/types/model/settlement.d.ts

@@ -1,28 +1,46 @@
 declare namespace Model {
     /** 结算管理-->二级分润付款确认-->查看交易日详情-->批量确认 请求 */
     interface BatchPayReq {
-        areaids?: string  
+        areaids?: string
         tradedate?: string
     }
 
     /** 结算管理-->二级分润付款确认-->查看交易日详情-->详情 请求 */
-    interface DetailReq {
-        areaid?: number  
-        areatype: number  
-        tradedate?: string 
+    interface SettlementDetailReq {
+        areaid?: number
+        areatype: number
+        tradedate?: string
+    }
+
+    /** 结算管理-->二级分润付款确认-->查看交易日详情-->详情 响应 */
+    interface SettlementDetailRsp {
+        accountcurrencyid: number; // 源账户币种ID
+        areaaccountid: number; // 机构角色结算资金账号
+        areaid: number; // 分润机构ID
+        areatype: number; // 分润机构角色 - 1:交易所 2:运营机构 3:营销中心 4:仓库机构 5:三方服务机构 6:自营会员 7:纪经会员 8:做市会员 9:产业会员 10:金融机构 11:商城店铺 12:子机构 13:报价商 14:积分服务商 15:供货商 16:圈内会员 17:物流机构
+        divideamount: number; // 分成金额
+        parentaccountid: number; // 父机构结算资金账号(二级分润)
+        parentuserid: number; // 父机构ID(二级分润)
+        payerid: number; // 付款人
+        paystatus: number; // 付款状态 - 1:待审核 2:待付款 3:已付款 4:待复审 5:线下支付
+        paytime: string; // 付款时间
+        remark: string; // 描述
+        totalcount: number; // 总笔数
+        totalfee: number; // 总手续费
+        tradedate: string; // 交易日
     }
 
     /** 结算管理-->二级分润付款确认-->导出(交易所管理员才有此功能) 请求 */
-    interface ExportReq {
-        tradedate?: string 
+    interface SettlementExportReq {
+        tradedate?: string
     }
 
-     /** 结算管理-->二级分润付款确认-->获取列表(tradedate时间格式yyyymmdd,reletype = 1 areatype传null) 请求 */
+    /** 结算管理-->二级分润付款确认-->获取列表(tradedate时间格式yyyymmdd,reletype = 1 areatype传null) 请求 */
     interface ShareDayQueryReq {
-        areatype?: number 
+        areatype?: number
         pageNum?: number // 页码
         pageSize?: number  // 页大小 
-        tradedate?: number  // 交易日
+        tradedate?: string  // 交易日
     }
 
     /** 结算管理-->二级分润付款确认-->获取列表(tradedate时间格式yyyymmdd,reletype = 1 areatype传null) 响应 */
@@ -35,11 +53,11 @@ declare namespace Model {
 
     /** 结算管理-->二级分润付款确认-->查看交易日详情 请求 */
     interface ViewTradingDayReq {
-        accountcurrencyid?: number 
+        accountcurrencyid?: number
         areatype?: number  // reletype = 1 areatype传null 分润机构角色 - 1:交易所 2:运营机构 3:营销中心 4:仓库机构 5:三方服务机构 6:自营会员 7:纪经会员 8:做市会员 9:产业会员 10:金融机构 11:商城店铺 12:子机构 13:报价商 14:积分服务商 15:供货商 16:圈内会员 17:物流机构
         pageNum?: number  // 页码
         pageSize?: number  // 页大小 
-        parentuserid?: number  
+        parentuserid?: number
         paystatus?: number  // 支付状态
         shareorgname?: string // 分润机构
         tradedate?: string // 交易日
@@ -47,6 +65,7 @@ declare namespace Model {
 
     /** 结算管理-->二级分润付款确认-->查看交易日详情 响应 */
     interface ViewTradingDayRsp {
+        areaid: number;
         areatype: number  // 分润机构角色
         divideamount: number // 总分润金额
         paystatus: number // 状态