li.shaoyi 1 рік тому
батько
коміт
62eb21f212

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

@@ -19,7 +19,8 @@ import AppRemoteSelect from '@pc/components/base/remote-select/index.vue'
 
 const props = defineProps({
     modelValue: [Number, String],
-    marketId: Number,
+    marketid: Number,
+    trademodels: String,
     status: String
 })
 
@@ -32,6 +33,8 @@ const selectedValue = computed({
 
 const { dataList, loading, run } = useRequest(queryGoodsSelect, {
     params: {
+        trademodels: props.trademodels,
+        marketId: props.marketid,
         goodsStatusIds: props.status
     }
 })
@@ -39,9 +42,7 @@ const { dataList, loading, run } = useRequest(queryGoodsSelect, {
 const onReset = () => {
     if (!loading.value) {
         selectedValue.value = undefined
-        run({
-            marketId: props.marketId
-        })
+        run()
     }
 }
 
@@ -49,7 +50,6 @@ const remoteMethod = (query: string) => {
     if (!loading.value) {
         if (query) {
             run({
-                marketId: props.marketId,
                 searchCode: query
             })
         } else if (!dataList.value.length) {

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

@@ -21,7 +21,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item :label="t('query.order.goodssumm.goodsid')" prop="goodsid">
-                    <app-select-goods v-model="queryParams.goodsid" :market-id="queryParams.marketid" status="3,6,7" />
+                    <app-select-goods v-model="queryParams.goodsid" :marketid="queryParams.marketid" status="3,6,7" />
                 </el-form-item>
                 <el-form-item :label="t('query.order.goodssumm.excludeaccountidsstr')" prop="excludeaccountidsstr">
                     <el-input v-model="queryParams.excludeaccountidsstr" :placeholder="t('query.order.goodssumm.tips1')" style="width: 260px;" />

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

@@ -11,7 +11,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item :label="t('query.order.institutionsumm.goodsid')" prop="goodsid">
-                    <app-select-goods v-model="queryParams.goodsid" :market-id="marketId" status="3,6,7" />
+                    <app-select-goods v-model="queryParams.goodsid" :marketid="marketId" status="3,6,7" />
                 </el-form-item>
                 <el-form-item :label="t('query.order.institutionsumm.date')" prop="date">
                     <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD"

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

@@ -15,6 +15,16 @@
                             start-placeholder="开始时间" end-placeholder="结束时间" />
                     </el-form-item>
                 </template>
+                <template #goodsid="{ item }">
+                    <el-form-item :label="item.label" prop="goodsid">
+                        <app-select-goods v-model="item.value" trademodels="52" status="3,6,7" />
+                    </el-form-item>
+                </template>
+                <template #areauserid="{ item }">
+                    <el-form-item :label="item.label" prop="areauserid">
+                        <app-select-member v-model="item.value" />
+                    </el-form-item>
+                </template>
             </app-filter>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
@@ -49,6 +59,8 @@ 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 AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 
 const dateValue = shallowRef<string[] | null>([])
 
@@ -103,8 +115,7 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         },
         {
             field: 'goodsid',
-            label: '商品',
-            placeholder: '请输入商品ID'
+            label: '商品'
         },
         {
             field: 'buyorsell',
@@ -118,7 +129,6 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         {
             field: 'areauserid',
             label: '所属机构',
-            placeholder: '请输入资金账户ID'
         },
         {
             field: 'tradetype',

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

@@ -0,0 +1,126 @@
+<!-- 查询管理-订单管理-交收单管理 -->
+<template>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption">
+                <template #startdate="{ item }">
+                    <el-form-item :label="item.label" prop="startdate">
+                        <el-date-picker v-model="item.value" value-format="YYYYMMDD" placeholder="请选择" />
+                    </el-form-item>
+                </template>
+            </app-filter>
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getActionButtons(['query_order_delivery_export'])"
+                    @click="(code: string) => openComponent(code)" />
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small" :data-list="handleOperateButtons(row)"
+                    @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 { getBuyOrSellList, BuyOrSell } from '@/constants/order'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryDeliveryOrderList } 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 { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.DeliveryOrderListRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryDeliveryOrderList, {
+    params: {
+        pageNum: 1,
+        pageSize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'deliveryorderid', label: '交收单号' },
+    { field: 'username', label: '申请人' },
+    { field: 'goodsdisplay', label: '交收商品' },
+    { field: 'buyorselldisplay', label: '方向' },
+    { field: 'deliveryqty', label: '申请交收数量' },
+    { field: 'sucdeliveryqty', label: '实际交收数量' },
+    { field: 'deliveryprice', label: '交收价格' },
+    { field: 'deliveryamount', label: '交收货款' },
+    { field: 'matchname', label: '对手方' },
+    { field: 'reqtime', label: '申请时间' },
+    { field: 'orderstatusdisplay', label: '交收状态' },
+    { field: 'operate', label: '操作', width: 180, fixed: 'right' }
+])
+
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.DeliveryOrderListReq>({
+    filters: [
+        {
+            field: 'deliveryorderstatus',
+            label: '单据状态',
+            options: () => []
+        },
+        {
+            field: 'deliverygoodsname',
+            label: '交收商品'
+        },
+        {
+            field: 'accountname',
+            label: '账户'
+        },
+        {
+            field: 'startdate',
+            label: '申请日期'
+        },
+        {
+            field: 'buyorsell',
+            label: '方向',
+            options: () => getBuyOrSellList()
+        },
+    ],
+    buttons: [
+        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+        { label: '重置', className: 'el-button--primary', validateEvent: false, onClick: () => resetFilters() }
+    ]
+})
+
+// 处理操作按钮
+const handleOperateButtons = (row: Model.DeliveryOrderListRsp) => {
+    const buttons = ['query_order_delivery_details']
+
+    if (row.orderstatus === 2) {
+        buttons.push('query_order_delivery_confirm', 'query_order_delivery_cancel')
+        if (row.buyorsell === BuyOrSell.Sell) {
+            buttons.push('query_order_delivery_pay')
+        }
+    } else if (row.orderstatus === 9) {
+        buttons.push('query_order_delivery_pay')
+    }
+
+    return getActionButtons(buttons)
+}
+
+const onSearch = () => {
+    const qs = getQueryParams()
+    run(qs)
+}
+</script>

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

@@ -5,7 +5,7 @@
             <app-filter :option="filterOption">
                 <template #parantareaid="{ item }">
                     <el-form-item :label="item.label" prop="parantareaid">
-                        <app-select-investor v-model="item.value" usertype="2" />
+                        <app-select-investor v-model="item.value" />
                     </el-form-item>
                 </template>
                 <template #validholderqty="{ item }">

+ 149 - 1
src/packages/pc/views/query/order/report/index.vue

@@ -1,7 +1,155 @@
 <!-- 查询管理-订单管理-订单日报表 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption" :rules="filterRules">
+                <template #startDate="{ item }">
+                    <el-form-item :label="item.label" prop="date">
+                        <el-date-picker type="daterange" v-model="dateValue" value-format="YYYYMMDD"
+                            start-placeholder="开始时间" end-placeholder="结束时间" />
+                    </el-form-item>
+                </template>
+                <template #goodsid="{ item }">
+                    <el-form-item :label="item.label" prop="goodsid">
+                        <app-select-goods v-model="item.value" trademodels="52" status="3,6,7" />
+                    </el-form-item>
+                </template>
+                <template #areauserid="{ item }">
+                    <el-form-item :label="item.label" prop="areauserid">
+                        <app-select-member v-model="item.value" usertype="2" />
+                    </el-form-item>
+                </template>
+                <template #currentUserId="{ item }">
+                    <el-form-item :label="item.label" prop="currentUserId">
+                        <app-select-investor v-model="item.value" />
+                    </el-form-item>
+                </template>
+            </app-filter>
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getActionButtons(['query_order_report_export'])"
+                    @click="(code: string) => openComponent(code)" />
+            </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 { useDataFilter } from '@/hooks/datatable-v2'
+import { useRequest } from '@/hooks/request'
+import { useOperation } from '@/hooks/operation'
+import { queryOrderDate } 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 AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
+import AppSelectInvestor from '@pc/components/modules/select-investor/index.vue'
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
+
+const dateValue = shallowRef<string[] | null>([])
+
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrderDateRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryOrderDate, {
+    manual: true,
+    params: {
+        pageNum: 1,
+        pageSize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'reckondate', label: '日期' },
+    { field: 'tradeid', label: '订单号' },
+    { field: 'userfullname', label: '客户' },
+    { field: 'areafullname', label: '所属会员' },
+    { field: 'goodsfullname', label: '商品/代码' },
+    { field: 'buyorselldisplay', label: '方向' },
+    { field: 'holderprice', label: '订单价格' },
+    { field: 'opennum', label: '原始数量' },
+    { field: 'tradeamount', label: '原始金额' },
+    { field: 'holdernum', label: '订单数量' },
+    { field: 'holderamount', label: '订单金额' },
+    { field: 'payeddeposit', label: '占用资金' },
+    { field: 'freezenum', label: '冻结数量' },
+    { field: 'deliverynum', label: '交收数量' },
+    { field: 'closepl', label: '终止盈亏' },
+    { field: 'floatpl', label: '浮动盈亏' },
+    { field: 'depositratedisplay', label: '风险率' },
+    { field: 'operatorcode', label: '操作人' }
+])
+
+// 表单验证规则
+const filterRules: FormRules = {
+    date: [{
+        required: true,
+        validator: () => {
+            return !!dateValue.value && dateValue.value.length === 2
+        }
+    }]
+}
+
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.OrderDateReq>({
+    filters: [
+        {
+            field: 'startDate',
+            label: '日期',
+            required: true
+        },
+        {
+            field: 'goodsid',
+            label: '商品'
+        },
+        {
+            field: 'tradeid',
+            label: '订单号'
+        },
+        {
+            field: 'currentUserId',
+            label: '交易商'
+        },
+        {
+            field: 'areauserid',
+            label: '所属会员'
+        },
+    ],
+    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>

+ 7 - 2
src/packages/pc/views/query/order/terminate/index.vue

@@ -15,6 +15,11 @@
                             start-placeholder="开始时间" end-placeholder="结束时间" />
                     </el-form-item>
                 </template>
+                <template #goodsid="{ item }">
+                    <el-form-item :label="item.label" prop="goodsid">
+                        <app-select-goods v-model="item.value" trademodels="52" status="3,6,7" />
+                    </el-form-item>
+                </template>
             </app-filter>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
@@ -40,7 +45,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { ElMessage, FormRules } from 'element-plus'
-import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
+import { getBuyOrSellList } from '@/constants/order'
 import { useDataFilter } from '@/hooks/datatable-v2'
 import { useRequest } from '@/hooks/request'
 import { useOperation } from '@/hooks/operation'
@@ -49,6 +54,7 @@ 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 AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
 
 const dateValue = shallowRef<string[] | null>([])
 
@@ -99,7 +105,6 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
         {
             field: 'goodsid',
             label: '商品',
-            placeholder: '请输入商品ID'
         },
         {
             field: 'holderbuyorsell',

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

@@ -368,4 +368,18 @@ export function queryDeliveryOrderListDetail(options: CommonFetchOptions<{ reque
  */
 export function deliveryOrderListExport(options: CommonFetchOptions<{ request: Model.DeliveryOrderListReq; response: string; }>) {
     return httpClient.commonRequest('/queryOrder/deliveryOrderExport', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单日报表 --> 获取列表
+ */
+export function queryOrderDate(options: CommonFetchOptions<{ request: Model.OrderDateReq; response: Model.OrderDateRsp[]; }>) {
+    return httpClient.commonRequest('/queryOrder/queryOrderDate', 'get', options)
+}
+
+/**
+ * 订单管理--> 订单日报表 --> 导出
+ */
+export function orderDateExport(options: CommonFetchOptions<{ request: Model.OrderDateReq; response: string; }>) {
+    return httpClient.commonRequest('/queryOrder/orderDateExport', 'get', options)
 }

+ 1 - 0
src/types/model/common.d.ts

@@ -138,6 +138,7 @@ declare namespace Model {
         goodsStatusIds?: string;
         marketId?: number;
         searchCode?: string;
+        trademodels?: string;
     }
 
     /** 商品查询下拉框 响应 */

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

@@ -1797,6 +1797,7 @@ declare namespace Model {
 
     /** 订单管理--> 交收单管理 --> 获取列表 响应 */
     interface DeliveryOrderListRsp {
+        buyorsell: number;
         buyorselldisplay: string; // 方向
         cancledeliveryqty: number; // 撤销交收数量
         closetime: string; // 完成时间
@@ -1808,7 +1809,9 @@ declare namespace Model {
         deliveryqty: number; // 申请交收数量
         goodsdisplay: string; // 交收商品
         goodunitid: string;
+        marketid: number;
         matchname: string; // 对手方
+        orderstatus: number;
         orderstatusdisplay: string; // 交收状态
         remark: string; // 备注
         reqtime: string; // 申请时间
@@ -1841,4 +1844,38 @@ declare namespace Model {
         sucdeliveryqty: number; // 实际交收数量
         username: string; // 申请人
     }
+
+    /** 订单管理--> 订单日报表 --> 获取列表 */
+    interface OrderDateReq {
+        areauserid?: number; // 所属会员
+        currentUserId?: number; // 交易商
+        endDate?: string; // 结束日期
+        goodsid?: number; // 商品
+        startDate?: string; // 开始日期
+        tradeid?: string; // 订单号
+        pageNum: number; // 页码
+        pageSize: number; // 页大小
+    }
+
+    /** 订单管理--> 订单日报表 --> 获取列表 */
+    interface OrderDateRsp {
+        areafullname: string; // 所属会员
+        buyorselldisplay: string; // 方向
+        closepl: number; // 终止盈亏
+        deliverynum: string; // 交收数量
+        depositratedisplay: number; // 风险率
+        floatpl: number; // 浮动盈亏
+        freezenum: string; // 冻结数量
+        goodsfullname: string; // 商品/代码
+        holderamount: number; // 订单金额
+        holdernum: string; // 订单数量
+        holderprice: number; // 订单价格
+        opennum: string; // 原始数量
+        operatorcode: string; // 操作人
+        payeddeposit: number; // 占用资金
+        reckondate: string; // 日期
+        tradeamount: number; // 原始金额
+        tradeid: string; // 订单号
+        userfullname: string; // 客户
+    }
 }