zhou.xiaoning 2 年之前
父节点
当前提交
7855c7823b

+ 17 - 0
src/constants/order.ts

@@ -410,4 +410,21 @@ export function getListingSelectTypeList() {
 export function getListingSelectTypeName(value: number) {
     const enums = getListingSelectTypeList()
     return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取交收单状态2类型列表
+ * @returns 
+ */
+ export function getDeliveryStatusList() {
+    return getEnumTypeList('deliveryStatus')
+}
+
+/**
+ * 获取交收单状态2类型名称
+ * @returns 
+ */
+export function getDeliveryStatusName(value: number) {
+    const enums = getDeliveryStatusList()
+    return getEnumTypeName(enums, value)
 }

+ 114 - 0
src/packages/sbyj/views/delivery/components/processing/list/index.vue

@@ -0,0 +1,114 @@
+<!-- 水贝亿爵-我的交收-进行中 -->
+<template>
+    <app-view>
+        <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+        :page-count="pageCount" @refresh="run">
+        <div class="g-order-list">
+            <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                <div class="g-order-list__titlebar">
+                    <div class="left">
+                        <h5> {{ item.buyOrSell === BuyOrSell.Buy ? '买料交收单:' : '卖料交收单:' }}{{ item.deliveryorderID
+                        }} </h5>
+                    </div>
+                    <div class="right">
+                        <span >{{ getDeliveryStatusName(item.deliveryStatus) }}</span>
+                    </div>
+                </div>
+                <div class="g-order-list__content">
+                    <ul>
+                        <li>
+                            <span>商品名称:</span>
+                            <span>{{ item.goodsname }}</span>
+                        </li>
+                        <li>
+                            <span>交收重量:</span>
+                            <span>{{ item.deliveryQty }}{{
+                                getGoodsUnitName(item.goodunitid) }}</span>
+                        </li>
+                        <li>
+                            <span>升贴水:</span>
+                            <span>{{ item.deliveryPremium }}</span>
+                        </li>
+                        <li>
+                            <span>交收价格:</span>
+                            <span>{{ item.deliveryPrice }}</span>
+                        </li>
+                        <li>
+                            <span>总货款:</span>
+                            <span>{{ item.deliveryAmount }}</span>
+                        </li>
+                        <li>
+                            <span>已付货款:</span>
+                            <span>{{ item.payedAmount }}</span>
+                        </li>
+                        <li>
+                            <span>冻结货款:</span>
+                            <span>{{ item.freezeAmount }}</span>
+                        </li>
+                        <li>
+                            <span>申请时间:</span>
+                            <span>{{ item.reqTime }}</span>
+                        </li>
+                    </ul>
+                </div>
+                <div class="g-order-list__btnbar">
+                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                    <Button size="small" round>货款明细</Button>
+                    <Button size="small" round>确认</Button>
+                    <Button size="small" round>付款</Button>
+                </div>
+            </div>
+        </div>
+        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+            v-if="componentId" />
+            </app-pull-refresh>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+
+import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent } from 'vue'
+import { BuyOrSell } from '@/constants/order'
+import { formatDate, formatDecimal, parsePercent, handleNumberValue } from '@/filters'
+import { getGoodsUnitName } from '@/constants/unit'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { queryMyTradeGoodsDeliveryOfflines } from '@/services/api/order'
+import { Button } from 'vant'
+import AppPullRefresh from '@/packages/sbyj/components/base/pull-refresh/index.vue'
+import { getDeliveryStatusName } from '@/constants/order'
+
+const dataList = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp[]>([])
+const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../../../detail/index.vue'))], // 详情
+])
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliveryOfflines, {
+    params: {
+        pagesize: 20,
+        status: '2,3,4,5',
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOfflineRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+
+</script>

+ 1 - 1
src/stores/modules/enum.ts

@@ -12,7 +12,7 @@ export interface EnumType {
     disabled?: boolean;
 }
 
-const enumKeys = ['clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype'] as const
+const enumKeys = ['deliveryStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()
 

+ 68 - 63
src/types/model/order.d.ts

@@ -1553,72 +1553,77 @@ declare namespace Model {
         pagesize?: number
         /// 用户id
         userid?: number
-        /// 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
-        deliverystatus: number
+        /// 格式:1,2,3 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
+        status?: string
     }
 
     /* 查询我的交收 回复*/
     interface MyTradeGoodsDeliveryOfflineRsp {
         /// 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        deliveryorderID?: number;
+        deliveryorderID: number;
         /// 申请用户ID
-        userID?: number;
+        userID: number;
         /// 账户ID
-        accountID?: number;
+        accountID: number;
         /// 商品ID
-        goodsID?: number;
+        goodsID: number;
         /// 市场ID
-        marketID?: number;
+        marketID: number;
         /// 交收方向 - 0:买 1:卖
-        buyOrSell?: number;
+        buyOrSell: number;
         /// 交收手数
-        deliveryLot?: number;
+        deliveryLot: number;
         /// 交收数量 (手数*合约乘数)
-        deliveryQty?: number;
+        deliveryQty: number;
         /// 交收信息
-        deliveryInfo?: string;
+        deliveryInfo: string;
         /// 对手方UserID
-        matchUserID?: number;
+        matchUserID: number;
         /// 对手方AccountID
-        matchAccountID?: number;
+        matchAccountID: number;
         /// 申请时间
-        reqTime?: string;
+        reqTime: string;
         /// 申请交易日
-        reqTradeDate?: string;
+        reqTradeDate: string;
         /// 线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus
-        orderStatus?: number;
+        orderStatus: number;
         /// 交收价格
-        deliveryPrice?: number;
+        deliveryPrice: number;
         /// 交收货款
-        deliveryAmount?: number;
+        deliveryAmount: number;
         /// 完成时间
-        closeTime?: Date;
+        closeTime: Date;
         /// 完成交易日
-        closeTradeDate?: string;
+        closeTradeDate: string;
         /// 交割手续费
-        deliveryCharge?: number;
+        deliveryCharge: number;
         /// 手续费收取方式  1:比率  2:固定
-        feeAlgorithm?: number;
+        feeAlgorithm: number;
         /// 会员手续费设置值
-        memberChargeValue?: number;
+        memberChargeValue: number;
         /// 交易所手续费设置值
-        exchChargeValue?: number;
+        exchChargeValue: number;
         /// 处理状态
-        handleStatus?: number;
+        handleStatus: number;
         /// 交收升贴水(每单位)
-        deliveryPremium?: number;
+        deliveryPremium: number;
         /// 交收总货款 = 交收货款 + 交收升贴水 * 交收数量
-        deliveryTotalAmount?: number;
+        deliveryTotalAmount: number;
         /// 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
-        deliveryStatus?: number;
+        deliveryStatus: number;
         /// 确认截止时间(买交收)
-        toConfirmTime?: Date;
+        toConfirmTime: Date;
         /// 付款截止时间(买交收)
-        toPayTime?: Date;
+        toPayTime: Date;
         /// 已付货款
-        payedAmount?: number;
+        payedAmount: number;
         /// 冻结货款
-        freezeAmount?: number;
+        freezeAmount: number;
+        goodscode: string;//商品代码(内部)
+        goodsname: string;//商品名称
+        goodunitid: number;//报价单位ID
+        agreeunit: number;//合约单位
+        decimalplace: number;//报价小数位
     }
 
     /* 查询我的交收-订单明细 请求*/
@@ -1636,31 +1641,31 @@ declare namespace Model {
     /* 查询我的交收-订单明细 回复*/
     interface MyDeliveryofflinedetailRsp {
         /// 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        deliverydetailid?: number;
+        deliverydetailid: number;
         /// 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        deliveryorderid?: number;
+        deliveryorderid: number;
         /// 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        tradeid?: number;
+        tradeid: number;
         /// 方向 - 0:买 1:卖
-        buyorsell?: number;
+        buyorsell: number;
         /// 用户ID
-        userid?: number;
+        userid: number;
         /// 账号ID
-        accountid?: number;
+        accountid: number;
         /// 持仓手数
-        holdlot?: number;
+        holdlot: number;
         /// 持仓数量(手数*合约乘数)
-        holdqty?: number;
+        holdqty: number;
         /// 申请交收手数
-        deliverylot?: number;
+        deliverylot: number;
         /// 申请交收数量 (手数*合约乘数)
-        deliveryqty?: number;
+        deliveryqty: number;
         /// 交收价格
-        deliveryprice?: number;
+        deliveryprice: number;
         /// 交收货款
-        deliveryamount?: number;
+        deliveryamount: number;
         /// 创建时间
-        createtime?: string;
+        createtime: string;
     }
 
     /* 查询我的交收-操作流水 请求*/
@@ -1684,41 +1689,41 @@ declare namespace Model {
      */
     interface MyDeliveryOfflineOperateLogRsp {
         /// 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        operatelogid?: number;
+        operatelogid: number;
         /// 交收单ID
-        deliveryorderid?: number;
+        deliveryorderid: number;
         /// 操作类型 - 1:交收流程 2:付款流水
-        operatetype?: number;
+        operatetype: number;
         /// 当前交收状态(OperateType=1时) -  枚举deliveryStatus
-        curdeliverystatus?: number;
+        curdeliverystatus: number;
         /// 操作后交收状态(OperateType=1时) -  枚举deliveryStatus
-        aftdeliverystatus?: number;
+        aftdeliverystatus: number;
         /// 操作人来源 - 1:管理端 2:终端 3:系统
-        operatorsrc?: number;
+        operatorsrc: number;
         /// 操作人ID - systemmanager的autoid 或 loginaccount的loginid
-        operatorid?: number;
+        operatorid: number;
         /// 操作人账号 - systemmanager的logincode 或 loginaccount的logincode,无则用loginid
-        operatoraccount?: string;
+        operatoraccount: string;
         /// 操作人名称 - systemmanager的username 或 loginaccount的logincode,无则用loginid
-        operatorname?: string;
+        operatorname: string;
         /// 操作备注
-        remark?: string;
+        remark: string;
         /// 操作时间
-        operatetime?: string;
+        operatetime: string;
         /// 文件名称
-        filename?: string;
+        filename: string;
         /// 文件地址
-        fileaddress?: string;
+        fileaddress: string;
         /// 付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode
-        deliverypaymode?: number;
+        deliverypaymode: number;
         /// 付款金额
-        payamount?: number;
+        payamount: number;
         /// 确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus
-        confirmstatus?: number;
+        confirmstatus: number;
         /// 确认人
-        confirmid?: number;
+        confirmid: number;
         /// 确认时间
-        confirmtime?: string;
+        confirmtime: string;
     }
 
 }