Browse Source

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi 2 years ago
parent
commit
1116629cb9
34 changed files with 1713 additions and 76 deletions
  1. 120 0
      src/business/performance/index.ts
  2. 14 10
      src/business/trade/index.ts
  3. 9 0
      src/constants/funcode.ts
  4. 62 0
      src/constants/order.ts
  5. 36 0
      src/packages/mobile/views/goods/detail/Index.less
  6. 46 16
      src/packages/mobile/views/goods/detail/Index.vue
  7. 6 2
      src/packages/mobile/views/goods/detail/components/delisting/Index.vue
  8. 12 5
      src/packages/mobile/views/goods/detail/components/listing/Index.vue
  9. 14 0
      src/packages/mobile/views/order/list/Index.vue
  10. 55 0
      src/packages/mobile/views/order/list/components/hislistingorder/detail/Index.vue
  11. 149 0
      src/packages/mobile/views/order/list/components/hislistingorder/list/Index.vue
  12. 56 0
      src/packages/mobile/views/order/list/components/hislistingtrade/detail/Index.vue
  13. 145 0
      src/packages/mobile/views/order/list/components/hislistingtrade/list/Index.vue
  14. 1 1
      src/packages/mobile/views/order/list/components/hisswaporder/list/Index.vue
  15. 1 1
      src/packages/mobile/views/order/list/components/hisswaptrade/list/Index.vue
  16. 83 0
      src/packages/mobile/views/order/list/components/listingorder/detail/Index.vue
  17. 131 0
      src/packages/mobile/views/order/list/components/listingorder/list/Index.vue
  18. 56 0
      src/packages/mobile/views/order/list/components/listingtrade/detail/Index.vue
  19. 98 0
      src/packages/mobile/views/order/list/components/listingtrade/list/Index.vue
  20. 122 9
      src/packages/mobile/views/order/performance/Index.vue
  21. 0 0
      src/packages/mobile/views/order/performance/components/breach/Index.vue
  22. 0 0
      src/packages/mobile/views/order/performance/components/detail/Index.vue
  23. 0 0
      src/packages/mobile/views/order/performance/components/modify/Index.vue
  24. 13 3
      src/packages/mobile/views/order/position/components/goods/close/Index.vue
  25. 2 2
      src/packages/mobile/views/order/position/components/goods/delivery/Index.vue
  26. 1 1
      src/packages/mobile/views/pricing/list/Index.vue
  27. 36 0
      src/packages/mobile/views/swap/detail/Index.less
  28. 50 23
      src/packages/mobile/views/swap/detail/Index.vue
  29. 1 1
      src/packages/mobile/views/swap/detail/components/delisting/Index.vue
  30. 86 0
      src/services/api/performance/index.ts
  31. 1 1
      src/stores/modules/enum.ts
  32. 195 0
      src/types/model/performance.d.ts
  33. 111 0
      src/types/proto/performance.d.ts
  34. 1 1
      src/types/proto/trade.d.ts

+ 120 - 0
src/business/performance/index.ts

@@ -0,0 +1,120 @@
+import { ref, shallowRef } from 'vue'
+import {
+    performanceContractedApply,
+    performanceManualConfirm,
+    performanceModifyContact,
+    performanceDelayApply
+} from '@/services/api/performance'
+
+
+// 违约申请请求
+export function usePerformanceContractedApply() {
+    const loading = shallowRef(false)
+
+    const formData = ref<Partial<Proto.PerformanceContractedApplyReq>>({
+        
+    })
+
+    const formSubmit = async () => {
+        try {
+            loading.value = true
+            return await performanceContractedApply({
+                data: {
+                    ...formData.value,
+                }
+            })
+        } finally {
+            loading.value = false
+        }
+    }
+
+    return {
+        loading,
+        formData,
+        formSubmit,
+    }
+}
+
+// 履约手动确认请求
+export function usePerformanceManualConfirm() {
+    const loading = shallowRef(false)
+
+    const formData = ref<Partial<Proto.PerformanceManualConfirmReq>>({
+        
+    })
+
+    const formSubmit = async () => {
+        try {
+            loading.value = true
+            return await performanceManualConfirm({
+                data: {
+                    ...formData.value,
+                }
+            })
+        } finally {
+            loading.value = false
+        }
+    }
+
+    return {
+        loading,
+        formData,
+        formSubmit,
+    }
+}
+
+// 履约修改联络信息请求
+export function usePerformanceModifyContact() {
+    const loading = shallowRef(false)
+
+    const formData = ref<Partial<Proto.PerformanceModifyContactReq>>({
+        
+    })
+
+    const formSubmit = async () => {
+        try {
+            loading.value = true
+            return await performanceModifyContact({
+                data: {
+                    ...formData.value,
+                }
+            })
+        } finally {
+            loading.value = false
+        }
+    }
+
+    return {
+        loading,
+        formData,
+        formSubmit,
+    }
+}
+
+// 延期申请请求
+export function usePerformanceDelayApply() {
+    const loading = shallowRef(false)
+
+    const formData = ref<Partial<Proto.PerformanceDelayApplyReq>>({
+        
+    })
+
+    const formSubmit = async () => {
+        try {
+            loading.value = true
+            return await performanceDelayApply({
+                data: {
+                    ...formData.value,
+                }
+            })
+        } finally {
+            loading.value = false
+        }
+    }
+
+    return {
+        loading,
+        formData,
+        formSubmit,
+    }
+}

+ 14 - 10
src/business/trade/index.ts

@@ -243,20 +243,23 @@ export function useSpotPresaleTransferDesting() {
 export function useWrListingCancelOrder() {
     const loading = shallowRef(false)
 
-    const cancelSubmit = async (id: string, buyorsell: number) => {
+    /// 接口请求
+    const formData = reactive<Proto.WRListingCancelOrderReq>({
+        UserID: loginStore.userId,
+        AccountID: accountStore.accountId,
+        OperatorID: loginStore.loginId,
+        OrderSrc: OrderSrc.ORDERSRC_CLIENT,
+        ClientOrderTime: formatDate(new Date().toISOString()),
+        ClientSerialNo: v4(),
+        ClientType: ClientType.Web,
+    })
+
+    const cancelSubmit = async () => {
         try {
             loading.value = true
             return await wrListingCancelOrder({
                 data: {
-                    UserID: loginStore.userId,
-                    AccountID: accountStore.accountId,
-                    OperatorID: loginStore.loginId,
-                    OrderSrc: OrderSrc.ORDERSRC_CLIENT,
-                    OldWRTradeOrderID: Long.fromString(id),
-                    ClientOrderTime: formatDate(new Date().toISOString()),
-                    ClientSerialNo: v4(),
-                    ClientType: ClientType.Web,
-                    BuyOrSell: buyorsell,
+                    ...formData,
                 }
             })
         } finally {
@@ -266,6 +269,7 @@ export function useWrListingCancelOrder() {
 
     return {
         loading,
+        formData,
         cancelSubmit
     }
 }

+ 9 - 0
src/constants/funcode.ts

@@ -104,4 +104,13 @@ export enum FunCode {
     HoldAppendDepositRsp = 196720, // 持仓追加定金接口应答
     OfflineDeliveryReq = 196723,   // 线下交收申请请求
     OfflineDeliveryRsp = 196724,   // 线下交收申请请求
+
+    PerformanceContractedApplyReq       = 1310729, // 违约申请请求
+    PerformanceContractedApplyRsp       = 1310730, // 违约申请应答
+    PerformanceDelayApplyReq            = 1310725, // 延期申请请求
+    PerformanceDelayApplyRsp            = 1310726, // 延期申请应答
+    PerformanceManualConfirmReq         = 1310723, // 履约手动确认请求
+    PerformanceManualConfirmRsp         = 1310724, // 履约手动确认应答
+    PerformanceModifyContactReq         = 1310735, // 履约修改联络信息请求
+    PerformanceModifyContactRsp         = 1310736, // 履约修改联络信息回应
 } 

+ 62 - 0
src/constants/order.ts

@@ -27,6 +27,12 @@ export enum PriceMode {
     Limit = 2, // 限价
 }
 
+/// 仓单贸易类型
+export enum WrTradeType {
+    Liting = 1,
+    DeListing = 2,
+}
+
 /**
  * 获取买卖方向列表
  * @returns 
@@ -38,6 +44,19 @@ export function getBuyOrSellList() {
     ]
 }
 
+
+/**
+ * 获取仓单贸易类型列表
+ * @returns 
+ */
+export function getWrTradeTypeList() {
+    return [
+        { label: '挂牌', value: WrTradeType.Liting },
+        { label: '摘牌', value: WrTradeType.DeListing },
+    ]
+}
+
+
 /**
  * 获取	委托单据类型列表
  * @returns 
@@ -58,6 +77,15 @@ export function getBuyOrSellName(value: number) {
     return getEnumTypeName(getBuyOrSellList(), value)
 }
 
+
+/**
+ * 获取仓单贸易类型名称
+ * @returns 
+ */
+export function getWrTradeTypeName(value: number) {
+    return getEnumTypeName(getWrTradeTypeList(), value)
+}
+
 /**
  * 获取买卖方向名称
  * @returns 
@@ -191,4 +219,38 @@ export function getPricemode2List() {
 export function getPricemode2Name(value: number) {
     const enums = getPricemode2List()
     return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取履约状态类型列表
+ * @returns 
+ */
+export function getPerformanceStatusList() {
+    return getEnumTypeList('performanceStatus')
+}
+
+/**
+ * 获取履约状态类型名称
+ * @returns 
+ */
+export function getPerformanceStatusName(value: number) {
+    const enums = getPerformanceStatusList()
+    return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取履约类型列表
+ * @returns 
+ */
+export function getPerformanceTypeList() {
+    return getEnumTypeList('performanceType')
+}
+
+/**
+ * 获取履约类型名称
+ * @returns 
+ */
+export function getPerformanceTypeName(value: number) {
+    const enums = getPerformanceTypeList()
+    return getEnumTypeName(enums, value)
 }

+ 36 - 0
src/packages/mobile/views/goods/detail/Index.less

@@ -0,0 +1,36 @@
+.goods-detail {
+    background-color: #fff;
+
+    .van-tabs {
+        &__nav {
+            background-color: #f2f2f2;
+        }
+    }
+
+    &__quote {
+        padding: .2rem 0;
+
+        .price {
+            display: flex;
+            align-items: center;
+            padding: 0 .2rem;
+
+            li {
+                &:first-child {
+                    font-size: .44rem;
+                }
+
+                +li {
+                    margin-left: .2rem;
+                }
+            }
+        }
+
+        .time {
+            font-size: .24rem;
+            color: #999;
+            padding: 0 .2rem;
+            margin-top: .1rem;
+        }
+    }
+}

+ 46 - 16
src/packages/mobile/views/goods/detail/Index.vue

@@ -1,24 +1,30 @@
 <template>
-    <app-view>
+    <app-view class="goods-detail">
         <template #header>
-            <app-navbar title="订单挂牌大厅" >
+            <app-navbar :title="item.goodscode+'/'+item.goodsname" >
                 <template #right>
                     <div class="button-more" @click="onListing">
                         <span>挂牌</span>
                     </div>
                 </template>
             </app-navbar>
-            <div>
-                <span>{{ item.goodsname }}/{{ item.goodscode }}</span>
-                <span>--</span>
-            </div>
         </template>
-        <Tabs v-model:active="tabIndex" @click="onTabChange">
-            <Tab title="买大厅" />
-            <Tab title="卖大厅" />
-        </Tabs>
+        <div class="goods-detail__quote" v-if="quote">
+            <ul class="price">
+                <li :class="quote.lastColor">{{ quote.last }}</li>
+                <li :class="quote.lastColor">{{ handleNumberValue(quote.rise.toFixed(quote.decimalplace)) }}</li>
+                <li :class="quote.lastColor">{{ parsePercent(quote.change) }}</li>
+            </ul>
+            <ul class="time">
+                <li>{{ formatDate(quote.lasttime, 'MM-DD HH:mm:ss') }}</li>
+            </ul>
+        </div>
         <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
         :page-count="pageCount" @refresh="onTabChange">
+            <Tabs v-model:active="tabIndex" @click="onChange">
+                <Tab title="买大厅" />
+                <Tab title="卖大厅" />
+            </Tabs>
             <div class="trade-section sell" v-if="dataList.length">
                 <app-list :columns="columns" :data-list="dataList">
                     <template #username="{ row }">
@@ -30,22 +36,26 @@
                 </app-list>
             </div>
         </app-pull-refresh>
-        <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow, tabIndex, item }" @closed="closeComponent"
+        <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow, tabIndex, item, quote }" @closed="closeComponent"
             v-if="componentId" />
     </app-view>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, defineAsyncComponent } from 'vue'
+import { shallowRef, onMounted, onUnmounted,defineAsyncComponent } from 'vue'
 import { Tab, Tabs, Button, showToast } from 'vant'
 import { useRequest } from '@/hooks/request'
 import { useNavigation } from '@/hooks/navigation'
 import { useComponent } from '@/hooks/component'
-import AppList from '@mobile/components/base/list/index.vue'
 import { queryWrTradeOrderDetail } from '@/services/api/transfer'
-import { useLoginStore } from '@/stores'
+import { useLoginStore, useFuturesStore } from '@/stores'
+import { parsePercent, handleNumberValue, formatDate } from '@/filters'
+
+import AppList from '@mobile/components/base/list/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import quoteSocket from '@/services/websocket/quote'
 
+const futuresStore = useFuturesStore()
 const componentMap = new Map<string, unknown>([
     ['delisting', defineAsyncComponent(() => import('./components/delisting/Index.vue'))],
     ['listing', defineAsyncComponent(() => import('./components/listing/Index.vue'))],
@@ -60,6 +70,8 @@ const tabIndex = shallowRef(0)
 const selectedRow = shallowRef<Model.WrTradeOrderDetailRsp>()
 const error = shallowRef(false)
 const dataList = shallowRef<Model.WrTradeOrderDetailRsp[]>([])
+const subscribe = quoteSocket.addSubscribe([item.goodscode])
+const quote = futuresStore.getQuoteInfo(item.goodscode)
 
 const { pageIndex, loading, run, pageCount } = useRequest(queryWrTradeOrderDetail, {
     params: {
@@ -68,6 +80,7 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryWrTradeOrderDetai
         buyorsell: tabIndex.value
     },
     onSuccess: (res) => {
+        console.log(pageIndex.value)
         if (pageIndex.value === 1) {
             dataList.value = []
         }
@@ -80,7 +93,16 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryWrTradeOrderDetai
 
 const onTabChange = () => {
     run({
-        buyorsell: tabIndex.value
+        buyorsell: tabIndex.value,
+    })
+}
+
+const onChange = () => {
+    /// 重置为1
+    pageIndex.value = 1
+    run({
+        buyorsell: tabIndex.value,
+        page: 1
     })
 }
 
@@ -105,4 +127,12 @@ const onListing = () => {
     openComponent('listing')
 }
 
-</script>
+onMounted(() => subscribe.start())
+
+onUnmounted(() => subscribe.stop())
+
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 6 - 2
src/packages/mobile/views/goods/detail/components/delisting/Index.vue

@@ -41,7 +41,7 @@
             </Field>
             <Field name="OrderQty" :rules="formRules.OrderQty" label="摘牌数量">
                 <template #input>
-                    <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :max="selectedRow.orderqty" :auto-fixed="false" />
+                    <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :step="1" :max="selectedRow.orderqty" :auto-fixed="false" integer/>
                 </template>
             </Field>
         </Form>
@@ -137,4 +137,8 @@ const closed = (isRefresh = false) => {
 defineExpose({
     closed,
 })
-</script>
+</script>
+
+<style lang="less">
+@import './Index.less';
+</style>

+ 12 - 5
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -25,8 +25,8 @@
             </Field>
             <Field name="OrderPrice" :rules="formRules.OrderPrice" label="价格">
                 <template #input>
-                    <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22"
-                        :auto-fixed="false" :step="0.01" />
+                    <Stepper v-model="formData.OrderPrice" input-width="100" :default-value="$props.tabIndex === 0 ? $props.quote.ask : $props.quote.bid" theme="round" button-size="22"
+                        :auto-fixed="false" :decimal-length="item.decimalplace" />
                 </template>
             </Field>
             <Field name="OrderQty" :rules="formRules.OrderQty" label="数量">
@@ -53,7 +53,6 @@ import { EPriceMode, EListingSelectType, EDelistingType, EBuildType, EValidType,
 import AppPopup from '@mobile/components/base/popup/index.vue'
 
 const accountStore = useAccountStore()
-
 const formRef = shallowRef<FormInstance>()
 const showModal = shallowRef(true)
 const refresh = shallowRef(true) // 是否刷新父组件数据
@@ -70,6 +69,10 @@ const props = defineProps({
     tabIndex: {
         type: Number,
         required: true
+    },
+    quote: {
+        type: Object as PropType<Model.Futures>,
+        required: true
     }
 })
 
@@ -87,7 +90,7 @@ const onSubmit = () => {
     formData.MarketMaxSub = 0.0
     formData.GoodsID = goodsid
     formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
-    formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
+    formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
     formData.BuildType = EBuildType.BUILDTYPE_OPEN
     formData.ValidType = EValidType.VALIDTYPE_DR
     formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
@@ -132,4 +135,8 @@ const closed = (isRefresh = true) => {
 defineExpose({
     closed,
 })
-</script>
+</script>
+
+<style lang="less">
+@import './Index.less';
+</style>

+ 14 - 0
src/packages/mobile/views/order/list/Index.vue

@@ -32,8 +32,10 @@
                 <component :is="componentMap.get('goodstrade')" />
             </Tab>
             <Tab title="挂牌委托">
+                <component :is="componentMap.get('listingorder')" />
             </Tab>
             <Tab title="挂牌成交">
+                <component :is="componentMap.get('listingtrade')" />
             </Tab>
             <Tab title="点价委托">
                 <component :is="componentMap.get('pricingorder')" />
@@ -68,6 +70,10 @@ const componentMap = new Map<string, unknown>([
     ['hisgoodstrade', defineAsyncComponent(() => import('./components/hisgoodstrade/list/Index.vue'))], // 历史订单成交
     ['pricingorder', defineAsyncComponent(() => import('./components/pricingorder/list/Index.vue'))], // 挂牌点价委托
     ['pricingtrade', defineAsyncComponent(() => import('./components/pricingtrade/list/Index.vue'))], // 挂牌点价成交
+    ['listingtrade', defineAsyncComponent(() => import('./components/listingtrade/list/Index.vue'))], // 挂牌委托
+    ['listingorder', defineAsyncComponent(() => import('./components/listingorder/list/Index.vue'))], // 挂牌成交
+    ['hislistingtrade', defineAsyncComponent(() => import('./components/hislistingtrade/list/Index.vue'))], // 历史挂牌委托
+    ['hislistingorder', defineAsyncComponent(() => import('./components/hislistingorder/list/Index.vue'))], // 历史挂牌成交
 ])
 
 const onMoreClick = () => {
@@ -94,6 +100,14 @@ const onMoreClick = () => {
             showComponent('hisgoodstrade')
             break
         }
+        case 7: {
+            showComponent('hislistingorder')
+            break
+        }
+        case 8: {
+            showComponent('hislistingtrade')
+            break
+        }
     }
 }
 

+ 55 - 0
src/packages/mobile/views/order/list/components/hislistingorder/detail/Index.vue

@@ -0,0 +1,55 @@
+<!-- 我的订单- 历史挂牌委托 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="历史挂牌委托信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode + '/' + selectedRow.deliverygoodsname" />
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="仓库" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="委托价格" :value="formatDecimal(selectedRow.fixedprice)" />
+                    <Cell title="委托数量" :value="formatDecimal(selectedRow.orderqty)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="撤销数量" :value="formatDecimal(selectedRow.cancelqty)" />
+                    <Cell title="委托时间" :value="formatDate(selectedRow.ordertime)" />wrtradeorderstatus
+                    <Cell title="委托状态" :value="getWRTradeOrderStatusName(selectedRow.wrtradeorderstatus)" />
+                    <Cell title="委托单号" :value="selectedRow.wrtradeorderid" />
+                </CellGroup>
+            </div>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import AppModal from '@/components/base/modal/index.vue'
+import { CellGroup, Cell } from 'vant'
+import { getBuyOrSellName, getWRTradeOrderStatusName, getWrTradeTypeName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+
+const showModal = shallowRef(true)
+// 是否刷新父组件数据
+const refresh = shallowRef(false)
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrOrderDetailRsp>,
+        required: true,
+    }
+})
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 149 - 0
src/packages/mobile/views/order/list/components/hislistingorder/list/Index.vue

@@ -0,0 +1,149 @@
+<!-- 我的订单- 历史挂牌订单 - 委托 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="历史挂牌委托" @back="closed" />
+            </template>
+            <Cell title="查询日期" :value="date" @click="show = true" is-link></Cell>
+            <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.goodscode }}/{{ item.goodsname }}</h5>
+                            </div>
+                        </div>
+                        <div class="g-order-list__content">
+                            <ul>
+                                <li>
+                                    <span>时间:</span>
+                                    <span>{{ formatDate(item.ordertime, 'HH:mm:ss') }}</span>
+                                </li>
+                                <li>
+                                    <span>方向:</span>
+                                    <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                                </li>
+                                <li>
+                                    <span>挂牌数量:</span>
+                                    <span>{{ formatDecimal(item.orderqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>挂牌价格:</span>
+                                    <span>{{ formatDecimal(item.fixedprice) }}</span>
+                                </li>
+                                <li>
+                                    <span>成交数量:</span>
+                                    <span>{{ formatDecimal(item.tradeqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>仓库:</span>
+                                    <span>{{ item.warehousename }}</span>
+                                </li>
+                                <li>
+                                    <span>委托状态:</span>
+                                    <span>{{ getWRTradeOrderStatusName(item.wrtradeorderstatus) }}</span>
+                                </li>
+                                <li>
+                                    <span>单号:</span>
+                                    <span>{{ item.wrtradeorderid }}</span>
+                                </li>
+                            </ul>
+                        </div>
+                        <div class="g-order-list__btnbar">
+                            <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                        </div>
+                    </div>
+                </div>
+                <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+                    v-if="componentId" />
+            </app-pull-refresh>
+            <Calendar :show="show" type="range" :max-date="new Date()" :min-date="moment().subtract(1, 'years').toDate()"
+            @close="onClose" @confirm="onConfirm" />
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, ref, reactive, defineAsyncComponent } from 'vue'
+import { useRequest } from '@/hooks/request'
+import { queryWrOrderDetail } from '@/services/api/order'
+import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useComponent } from '@/hooks/component'
+import { Button, Calendar, Cell } from 'vant'
+import moment from 'moment'
+import AppModal from '@/components/base/modal/index.vue'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const dataList = shallowRef<Model.WrOrderDetailRsp[]>([])
+const showModal = shallowRef(true)
+/// 是否显示日历
+const show = shallowRef(false)
+/// 显示日期
+const date = ref('')
+const selectedRow = shallowRef<Model.WrOrderDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
+])
+
+const formData = reactive<Model.WrOrderDetailReq>({
+    marketid: 17201,
+    haswr: 1,
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrOrderDetail, {
+    manual: true,
+    params: {
+        ...formData
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.WrOrderDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+
+const onClose = () => {
+    show.value = false
+}
+
+const onConfirm = (values: Date[]) => {
+    const [start, end] = values;
+    show.value = false
+    formData.begindate = formatDate(start.toString(), 'YYYYMMDD')
+    formData.enddate = formatDate(end.toString(), 'YYYYMMDD')
+    date.value = formData.begindate + '-' + formData.enddate
+    /// 查询
+    pullRefreshRef.value?.refresh()
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 56 - 0
src/packages/mobile/views/order/list/components/hislistingtrade/detail/Index.vue

@@ -0,0 +1,56 @@
+<!-- 我的订单- 历史挂牌成交 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="历史挂牌成交信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode+'/'+selectedRow.deliverygoodsname"/>
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="类型" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="成交金额" :value="formatDecimal(selectedRow.tradeqty*selectedRow.tradeprice)" />
+                    <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
+                    <Cell title="对手方" :value="selectedRow.matchaccountid" />
+                    <Cell title="成交单号" :value="selectedRow.wrtradedetailid" />
+                </CellGroup>
+            </div>
+            <div v-else>
+                <Empty />
+            </div>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Cell } from 'vant'
+import { formatDate, formatDecimal } from '@/filters'
+import AppModal from '@/components/base/modal/index.vue'
+import { getBuyOrSellName, getWrTradeTypeName } from '@/constants/order'
+
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrTradeDetailRsp>,
+        required: true,
+    }
+})
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 145 - 0
src/packages/mobile/views/order/list/components/hislistingtrade/list/Index.vue

@@ -0,0 +1,145 @@
+<!-- 我的订单- 历史挂牌订单 - 成交 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="历史挂牌成交" @back="closed" />
+            </template>
+            <Cell title="查询日期" :value="date" @click="show = true" is-link></Cell>
+            <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.deliverygoodscode }}/{{ item.deliverygoodsname }}</h5>
+                            </div>
+                        </div>
+                        <div class="g-order-list__content">
+                            <ul>
+                                <li>
+                                    <span>成交时间:</span>
+                                    <span>{{ formatDate(item.tradedate) }}</span>
+                                </li>
+                                <li>
+                                    <span>方向:</span>
+                                    <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                                </li>
+                                <li>
+                                    <span>成交数量:</span>
+                                    <span>{{ item.tradeqty }}</span>
+                                </li>
+                                <li>
+                                    <span>成交价格:</span>
+                                    <span>{{ formatDecimal(item.tradeqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>成交金额:</span>
+                                    <span>{{ formatDecimal(item.tradeprice*item.tradeqty) }}</span>
+                                </li>
+                                <li>
+                                    <span>仓库:</span>
+                                    <span>{{ item.warehousename }}</span>
+                                </li>
+                                <li>
+                                    <span>成交单号:</span>
+                                    <span>{{ item.wrtradedetailid }}</span>
+                                </li>
+                            </ul>
+                        </div>
+                        <div class="g-order-list__btnbar">
+                            <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                        </div>
+                    </div>
+                </div>
+                <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+                    v-if="componentId" />
+            </app-pull-refresh>
+            <Calendar :show="show" type="range" :max-date="new Date()" :min-date="moment().subtract(1, 'years').toDate()"
+            @close="onClose" @confirm="onConfirm" />
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, ref, reactive, defineAsyncComponent } from 'vue'
+import { useRequest } from '@/hooks/request'
+import { queryWrTradeDetail } from '@/services/api/order'
+import { getBuyOrSellName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useComponent } from '@/hooks/component'
+import { Button, Calendar, Cell } from 'vant'
+import moment from 'moment'
+import AppModal from '@/components/base/modal/index.vue'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const dataList = shallowRef<Model.WrTradeDetailRsp[]>([])
+const showModal = shallowRef(true)
+/// 是否显示日历
+const show = shallowRef(false)
+/// 显示日期
+const date = ref('')
+const selectedRow = shallowRef<Model.WrTradeDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
+])
+
+const formData = reactive<Model.WrTradeDetailReq>({
+    marketid: 17201,
+    haswr: 1
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrTradeDetail, {
+    manual: true,
+    params: {
+        ...formData
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.WrTradeDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+
+const onClose = () => {
+    show.value = false
+}
+
+const onConfirm = (values: Date[]) => {
+    const [start, end] = values;
+    show.value = false
+    formData.begindate = formatDate(start.toString(), 'YYYYMMDD')
+    formData.enddate = formatDate(end.toString(), 'YYYYMMDD')
+    date.value = formData.begindate + '-' + formData.enddate
+    /// 查询
+    pullRefreshRef.value?.refresh()
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 1 - 1
src/packages/mobile/views/order/list/components/hisswaporder/list/Index.vue

@@ -1,4 +1,4 @@
-<!-- 我的订单- 掉期订单 - 委托 -->
+<!-- 我的订单- 历史掉期订单 - 委托 -->
 <template>
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">

+ 1 - 1
src/packages/mobile/views/order/list/components/hisswaptrade/list/Index.vue

@@ -1,4 +1,4 @@
-<!-- 我的订单- 掉期订单 - 成交 -->
+<!-- 我的订单- 历史掉期订单 - 成交 -->
 <template>
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">

+ 83 - 0
src/packages/mobile/views/order/list/components/listingorder/detail/Index.vue

@@ -0,0 +1,83 @@
+<!-- 我的订单- 挂牌委托 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="挂牌委托信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode + '/' + selectedRow.deliverygoodsname" />
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="仓库" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="委托价格" :value="formatDecimal(selectedRow.fixedprice)" />
+                    <Cell title="委托数量" :value="formatDecimal(selectedRow.orderqty)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="撤销数量" :value="formatDecimal(selectedRow.cancelqty)" />
+                    <Cell title="委托时间" :value="formatDate(selectedRow.ordertime)" />wrtradeorderstatus
+                    <Cell title="委托状态" :value="getWRTradeOrderStatusName(selectedRow.wrtradeorderstatus)" />
+                    <Cell title="委托单号" :value="selectedRow.wrtradeorderid" />
+                </CellGroup>
+            </div>
+            <template #footer v-if="selectedRow.wrtradeorderstatus === 3 || selectedRow.wrtradeorderstatus === 7">
+                <Button type="primary" block round @click="onCancelSumit">撤销</Button>
+            </template>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import AppModal from '@/components/base/modal/index.vue'
+import { CellGroup, Cell, Button } from 'vant'
+import { getBuyOrSellName, getWRTradeOrderStatusName, getWrTradeTypeName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useWrListingCancelOrder } from '@/business/trade'
+import { dialog, fullloading } from '@/utils/vant'
+
+const showModal = shallowRef(true)
+// 是否刷新父组件数据
+const refresh = shallowRef(false)
+const { cancelSubmit, formData } = useWrListingCancelOrder()
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrOrderDetailRsp>,
+        required: true,
+    }
+})
+
+const onCancelSumit = () => {
+    dialog({
+        message: '确认要撤销吗?',
+        showCancelButton: true,
+    }).then(() => {
+        ///  参数信息
+        formData.Header = { MarketID: 17201 }
+        formData.OldWRTradeOrderID = props.selectedRow.wrtradeorderid
+        formData.BuyOrSell = props.selectedRow.buyorsell
+
+        /// loding....
+        fullloading((hideLoading) => {
+            cancelSubmit().then(() => {
+                hideLoading('撤销成功')
+                closed(true)
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
+        })
+    })
+}
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 131 - 0
src/packages/mobile/views/order/list/components/listingorder/list/Index.vue

@@ -0,0 +1,131 @@
+<!-- 我的订单-挂牌委托 -->
+<template>
+    <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.deliverygoodscode }}/{{ item.deliverygoodsname }}</h5>
+                    </div>
+                </div>
+                <div class="g-order-list__content">
+                    <ul>
+                        <li>
+                            <span>时间:</span>
+                            <span>{{ formatDate(item.ordertime, 'HH:mm:ss') }}</span>
+                        </li>
+                        <li>
+                            <span>方向:</span>
+                            <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                        </li>
+                        <li>
+                            <span>挂牌数量:</span>
+                            <span>{{ formatDecimal(item.orderqty) }}</span>
+                        </li>
+                        <li>
+                            <span>挂牌价格:</span>
+                            <span>{{ formatDecimal(item.fixedprice) }}</span>
+                        </li>
+                        <li>
+                            <span>成交数量:</span>
+                            <span>{{ formatDecimal(item.tradeqty) }}</span>
+                        </li>
+                        <li>
+                            <span>仓库:</span>
+                            <span>{{ item.warehousename }}</span>
+                        </li>
+                        <li>
+                            <span>委托状态:</span>
+                            <span>{{ getWRTradeOrderStatusName(item.wrtradeorderstatus) }}</span>
+                        </li>
+                        <li>
+                            <span>单号:</span>
+                            <span>{{ item.wrtradeorderid }}</span>
+                        </li>
+                    </ul>
+                </div>
+                <div class="g-order-list__btnbar">
+                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                    <Button size="small" v-if="(item.wrtradeorderstatus === 3 || item.wrtradeorderstatus === 7)"
+                        @click="onCancelSumit(item)" round>撤销</Button>
+                </div>
+            </div>
+        </div>
+        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+            v-if="componentId" />
+    </app-pull-refresh>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { Button } from 'vant'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { queryWrOrderDetail } from '@/services/api/order'
+import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+import { useWrListingCancelOrder } from '@/business/trade'
+import { dialog } from '@/utils/vant'
+import { fullloading } from '@/utils/vant'
+
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))]
+])
+
+const { cancelSubmit, formData } = useWrListingCancelOrder()
+const dataList = shallowRef<Model.WrOrderDetailRsp[]>([])
+const selectedRow = shallowRef<Model.WrOrderDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrOrderDetail, {
+    params: {
+        pagesize: 20,
+        wrtradetype: 1,
+        marketid: 17201,
+        haswr: 1
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const onCancelSumit = (item: Model.WrOrderDetailRsp) => {
+    dialog({
+        message: '确认要撤销吗?',
+        showCancelButton: true,
+    }).then(() => {
+        ///  参数信息
+        formData.Header = { MarketID: 17201 }
+        formData.OldWRTradeOrderID = item.wrtradeorderid
+        formData.BuyOrSell = item.buyorsell
+
+        /// loding....
+        fullloading((hideLoading) => {
+            cancelSubmit().then(() => {
+                hideLoading('撤销成功')
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
+        })
+    })
+}
+
+const showComponent = (componentName: string, row: Model.WrOrderDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+</script>

+ 56 - 0
src/packages/mobile/views/order/list/components/listingtrade/detail/Index.vue

@@ -0,0 +1,56 @@
+<!-- 我的订单- 挂牌成交 - 详情 -->
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="详细" @back="closed" />
+            </template>
+            <div v-if="props" class="order-detail__container g-form__container">
+                <CellGroup title="挂牌成交信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode+'/'+selectedRow.deliverygoodsname"/>
+                    <Cell title="仓库" :value="selectedRow.warehousename" />
+                    <Cell title="类型" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
+                    <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
+                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="成交金额" :value="formatDecimal(selectedRow.tradeqty*selectedRow.tradeprice)" />
+                    <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
+                    <Cell title="对手方" :value="selectedRow.matchaccountid" />
+                    <Cell title="成交单号" :value="selectedRow.wrtradedetailid" />
+                </CellGroup>
+            </div>
+            <div v-else>
+                <Empty />
+            </div>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Cell } from 'vant'
+import { formatDate, formatDecimal } from '@/filters'
+import AppModal from '@/components/base/modal/index.vue'
+import { getBuyOrSellName, getWrTradeTypeName } from '@/constants/order'
+
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.WrTradeDetailRsp>,
+        required: true,
+    }
+})
+
+// 关闭弹窗
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
+</script>

+ 98 - 0
src/packages/mobile/views/order/list/components/listingtrade/list/Index.vue

@@ -0,0 +1,98 @@
+<!-- 我的订单-挂牌成交 -->
+<template>
+    <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.deliverygoodscode }}/{{ item.deliverygoodsname }}</h5>
+                    </div>
+                </div>
+                <div class="g-order-list__content">
+                    <ul>
+                        <li>
+                            <span>成交时间:</span>
+                            <span>{{ formatDate(item.tradedate) }}</span>
+                        </li>
+                        <li>
+                            <span>方向:</span>
+                            <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
+                        </li>
+                        <li>
+                            <span>成交数量:</span>
+                            <span>{{ item.tradeqty }}</span>
+                        </li>
+                        <li>
+                            <span>成交价格:</span>
+                            <span>{{ formatDecimal(item.tradeqty) }}</span>
+                        </li>
+                        <li>
+                            <span>成交金额:</span>
+                            <span>{{ formatDecimal(item.tradeprice*item.tradeqty) }}</span>
+                        </li>
+                        <li>
+                            <span>仓库:</span>
+                            <span>{{ item.warehousename }}</span>
+                        </li>
+                        <li>
+                            <span>成交单号:</span>
+                            <span>{{ item.wrtradedetailid }}</span>
+                        </li>
+                    </ul>
+                </div>
+                <div class="g-order-list__btnbar">
+                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                </div>
+            </div>
+        </div>
+        <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
+            v-if="componentId" />
+    </app-pull-refresh>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { Button } from 'vant'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { queryWrTradeDetail } from '@/services/api/order'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getBuyOrSellName } from '@/constants/order'
+import { formatDate, formatDecimal } from '@/filters'
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],
+])
+
+const dataList = shallowRef<Model.WrTradeDetailRsp[]>([])
+const selectedRow = shallowRef<Model.WrTradeDetailRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryWrTradeDetail, {
+    params: {
+        pagesize: 20,
+        marketid: 17201,
+        haswr: 1
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.WrTradeDetailRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
+</script>

+ 122 - 9
src/packages/mobile/views/order/performance/Index.vue

@@ -3,18 +3,131 @@
         <template #header>
             <app-navbar title="履约信息" />
         </template>
-        <Tabs class="van-tabs--list" v-model:active="active" :swipe-threshold="4">
-            <Tab title="买履约">
-            </Tab>
-            <Tab title="卖履约">
-            </Tab>
-        </Tabs>
+        
+        <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+        :page-count="pageCount" @refresh="onChange">
+            <Tabs class="van-tabs--list" v-model:active="buyorsell" :swipe-threshold="4" @click="onChange">
+                <Tab title="买履约" />
+                <Tab title="卖履约" />
+            </Tabs>
+            <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">
+                            <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
+                        </div>
+                        <div class="right">
+                            <span>{{ getPerformanceStatusName(item.performancestatus) }}</span>
+                        </div>
+                    </div>
+                    <div class="g-order-list__content">
+                        <ul>
+                            <li>
+                                <span>履约单号</span>
+                                <span>{{ item.performanceplanid }}</span>
+                            </li>
+                            <li>
+                                <span>时间</span>
+                                <span>{{ item.createtime }}</span>
+                            </li>
+                            <li>
+                                <span>类型</span>
+                                <span>{{ getPerformanceTypeName(item.performancetype) }}</span>
+                            </li>
+                            <li>
+                                <span>关联单号</span>
+                                <span>{{ item.relatedorderid }}</span>
+                            </li>
+                            <li>
+                                <span>履约数量</span>
+                                <span>{{ item.qty }}</span>
+                            </li>
+                            <li>
+                                <span>履约金额</span>
+                                <span>{{ item.amount }}</span>
+                            </li>
+                            <li>
+                                <span>买方已付</span>
+                                <span>{{ item.buypaidamount }}</span>
+                            </li>
+                            <li>
+                                <span>当前步骤</span>
+                                <span>{{ item.curstepname }}</span>
+                            </li>
+                            <li>
+                                <span>卖方已收</span>
+                                <span>{{ item.sellreceivedamount }}</span>
+                            </li>
+                            <li>
+                                <span>步骤到期日期</span>
+                                <span>{{ formatDate( item.curstepdeadline) }}</span>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="g-order-list__btnbar">
+                        <Button size="small" @click="showComponent('breach', item)" round>违约</Button>
+                        <Button size="small" @click="showComponent('modify', item)" round>修改</Button>
+                        <Button size="small" @click="showComponent('detail', item)" 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 } from 'vue'
-import { Tab, Tabs } from 'vant'
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { Tab, Tabs, Button } from 'vant'
+import { useComponent } from '@/hooks/component'
+import { useRequest } from '@/hooks/request'
+import { queryPerformancePlan } from '@/services/api/performance'
+import { formatDate } from '@/filters'
+import { getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
+
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('./components/detail/Index.vue'))], // 详情
+    ['modify', defineAsyncComponent(() => import('./components/modify/Index.vue'))], // 修改
+    ['breach', defineAsyncComponent(() => import('./components/breach/Index.vue'))], //  违约
+])
+
+const dataList = shallowRef<Model.PerformancePlanRsp[]>([])
+const selectedRow = shallowRef<Model.PerformancePlanRsp>()
+const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const buyorsell = shallowRef(0)
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const onChange = () => {
+    run({
+        buyorsell: buyorsell.value
+    })
+}
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryPerformancePlan, {
+    params: {
+        buyorsell: buyorsell.value
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+
+const showComponent = (componentName: string, row: Model.PerformancePlanRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
+}
 
-const active = shallowRef(0)
 </script>

+ 0 - 0
src/packages/mobile/views/order/performance/components/breach/Index.vue


+ 0 - 0
src/packages/mobile/views/order/performance/components/detail/Index.vue


+ 0 - 0
src/packages/mobile/views/order/performance/components/modify/Index.vue


+ 13 - 3
src/packages/mobile/views/order/position/components/goods/close/Index.vue

@@ -19,9 +19,14 @@
                 <CellGroup title="平仓信息">
                     <Cell title="当前价" :value="'--'" />
                     <Form class="goods-close__form" ref="formRef" @submit="onCloseSumit" v-if="props">
+                        <Field name="OrderPrice" :rules="formRules.OrderPrice" label="平仓价格">
+                            <template #input>
+                                <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0" :decimal-length="selectedRow.decimalplace" :auto-fixed="false" />
+                            </template>
+                        </Field>
                         <Field name="OrderQty" :rules="formRules.OrderQty" label="平仓数量">
                             <template #input>
-                                <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :max="selectedRow.enableqty" :auto-fixed="false" />
+                                <Stepper v-model="formData.OrderQty" input-width="100" theme="round" button-size="22" :min="0" :max="selectedRow.enableqty" :auto-fixed="false" integer />
                             </template>
                         </Field>
                     </Form>
@@ -58,6 +63,12 @@ const props = defineProps({
 
 // 表单验证规则
 const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
+    OrderPrice: [{
+        message: '请输入平仓价格',
+        validator: () => {
+            return !!formData.OrderPrice
+        }
+    }],
     OrderQty: [{
         message: '请输入平仓数量',
         validator: () => {
@@ -72,12 +83,11 @@ const onCloseSumit = () => {
         showCancelButton: true,
     }).then(() => {
 
-        const { marketid, goodsid, buyorsell, averageprice} = props.selectedRow
+        const { marketid, goodsid, buyorsell} = props.selectedRow
         /// 市场ID
         formData.Header = { MarketID: marketid, GoodsID: goodsid }
         formData.MarketID = marketid
         formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
-        formData.OrderPrice = averageprice
         formData.BuyOrSell = buyorsell === 0 ? 1 : 0,
         formData.GoodsID = goodsid
         formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING

+ 2 - 2
src/packages/mobile/views/order/position/components/goods/delivery/Index.vue

@@ -21,10 +21,10 @@
                     <Form class="goods-close__form" ref="formRef" @submit="onDeliverySumit" v-if="props">
                         <Field name="DeliveryLot" :rules="formRules.DeliveryLot" label="交收数量">
                             <template #input>
-                                <Stepper v-model="formData.DeliveryLot" input-width="100" theme="round" button-size="22" :min="0" :step="0.01" :max="selectedRow.enableqty" :auto-fixed="false" />
+                                <Stepper v-model="formData.DeliveryLot" input-width="100" theme="round" button-size="22" :min="0" :max="selectedRow.enableqty" :auto-fixed="false" integer />
                             </template>
                         </Field>
-                        <Field name="DeliveryInfo" :rules="formRules.DeliveryLot" label="交收信息" placeholder="请输入交收信息">
+                        <Field name="DeliveryInfo" v-model="formData.DeliveryInfo" :rules="formRules.DeliveryInfo" label="交收信息" placeholder="请输入交收信息">
                         </Field>
                     </Form>
                 </CellGroup>

+ 1 - 1
src/packages/mobile/views/pricing/list/Index.vue

@@ -65,7 +65,7 @@ const { dataList } = useRequest(queryQuoteGoodsList, {
         marketids: '10101'
     },
     onSuccess: (res) => {
-        const goodsCodes = res.data.map((e) => e.refgoodscode)
+        const goodsCodes = res.data.map((e) => e.goodscode)
         const subscribe = quoteSocket.addSubscribe(goodsCodes,  subscribeId)
         subscribe.start()
     }

+ 36 - 0
src/packages/mobile/views/swap/detail/Index.less

@@ -0,0 +1,36 @@
+.swap-detail {
+    background-color: #fff;
+
+    .van-tabs {
+        &__nav {
+            background-color: #f2f2f2;
+        }
+    }
+
+    &__quote {
+        padding: .2rem 0;
+
+        .price {
+            display: flex;
+            align-items: center;
+            padding: 0 .2rem;
+
+            li {
+                &:first-child {
+                    font-size: .44rem;
+                }
+
+                +li {
+                    margin-left: .2rem;
+                }
+            }
+        }
+
+        .time {
+            font-size: .24rem;
+            color: #999;
+            padding: 0 .2rem;
+            margin-top: .1rem;
+        }
+    }
+}

+ 50 - 23
src/packages/mobile/views/swap/detail/Index.vue

@@ -1,7 +1,7 @@
 <template>
-    <app-view>
+    <app-view class="swap-detail">
         <template #header>
-            <app-navbar :title="`${item.goodscode}/${item.goodsname}`">
+            <app-navbar :title="item.goodsgroupname + '/' + item.goodscode">
                 <template #right>
                     <div class="button-more" @click="onListing">
                         <span>挂牌</span>
@@ -9,20 +9,22 @@
                 </template>
             </app-navbar>
         </template>
-        <Cell :title="`${item.goodscode}/${item.goodsname}`" is-link style="margin-bottom: .2rem;">
-            <template #title v-if="quote">
-                <span :class="quote.lastColor" style="font-size: .32rem;">{{ handleNumberValue(quote.last) }}</span>
-                <span :class="quote.lastColor" style="margin-left: .2rem;">{{
-                    handleNumberValue(quote.rise.toFixed(quote.decimalplace)) }}</span>
-                <span :class="quote.lastColor" style="margin-left: .2rem;">{{ parsePercent(quote.change) }}</span>
-            </template>
-        </Cell>
-        <Tabs v-model:active="tabIndex" @click="onTabChange">
-            <Tab title="买大厅" />
-            <Tab title="卖大厅" />
-        </Tabs>
+        <div class="swap-detail__quote" v-if="quote">
+            <ul class="price">
+                <li :class="quote.lastColor">{{ quote.last }}</li>
+                <li :class="quote.lastColor">{{ handleNumberValue(quote.rise.toFixed(quote.decimalplace)) }}</li>
+                <li :class="quote.lastColor">{{ parsePercent(quote.change) }}</li>
+            </ul>
+            <ul class="time">
+                <li>{{ formatDate(quote.lasttime, 'MM-DD HH:mm:ss') }}</li>
+            </ul>
+        </div>
         <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
             :page-count="pageCount" @refresh="onTabChange">
+            <Tabs v-model:active="tabIndex" @click="onChange">
+                <Tab title="买大厅" />
+                <Tab title="卖大厅" />
+            </Tabs>
             <div class="trade-section sell" v-if="dataList.length">
                 <app-list :columns="columns" :data-list="dataList">
                     <template #username="{ row }">
@@ -41,26 +43,32 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, defineAsyncComponent } from 'vue'
-import { Tab, Tabs, Button, showToast, Cell } from 'vant'
-import { parsePercent, handleNumberValue } from '@/filters'
+import { shallowRef, onMounted, onUnmounted, defineAsyncComponent } from 'vue'
+import { Tab, Tabs, Button, showToast } from 'vant'
 import { useRequest } from '@/hooks/request'
 import { useNavigation } from '@/hooks/navigation'
 import { useComponent } from '@/hooks/component'
-import AppList from '@mobile/components/base/list/index.vue'
 import { queryTjmdTradeOrderDetail } from '@/services/api/swap'
-import { useLoginStore, useFuturesStore } from '@/stores'
+import { useLoginStore } from '@/stores'
+import { useFuturesStore } from '@/stores'
+import { parsePercent, handleNumberValue, formatDate } from '@/filters'
+
+import quoteSocket from '@/services/websocket/quote'
+
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import AppList from '@mobile/components/base/list/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['delisting', defineAsyncComponent(() => import('./components/delisting/Index.vue'))],
     ['listing', defineAsyncComponent(() => import('./components/listing/Index.vue'))],
 ])
-
+const pullRefreshRef = shallowRef()
 const loginStore = useLoginStore()
 
 const { getParamString } = useNavigation()
-const { componentRef, componentId, openComponent, closeComponent } = useComponent()
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
 const futuresStore = useFuturesStore()
 const item: Model.QuoteGoodsListRsp = JSON.parse(getParamString('item')?.toString() || '{}')
 const tabIndex = shallowRef(0)
@@ -69,6 +77,8 @@ const error = shallowRef(false)
 const dataList = shallowRef<Model.TjmdTradeOrderDetailRsp[]>([])
 const quote = futuresStore.getQuoteInfo(item.refgoodscode)
 
+const subscribe = quoteSocket.addSubscribe([item.refgoodscode])
+
 const { pageIndex, loading, run, pageCount } = useRequest(queryTjmdTradeOrderDetail, {
     params: {
         pagesize: 20,
@@ -88,7 +98,16 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryTjmdTradeOrderDet
 
 const onTabChange = () => {
     run({
-        buyorsell: tabIndex.value
+        buyorsell: tabIndex.value,
+    })
+}
+
+const onChange = () => {
+    /// 重置为1
+    pageIndex.value = 1
+    run({
+        buyorsell: tabIndex.value,
+        page: 1
     })
 }
 
@@ -113,4 +132,12 @@ const onListing = () => {
     openComponent('listing')
 }
 
-</script>
+onMounted(() => subscribe.start())
+
+onUnmounted(() => subscribe.stop())
+
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 1 - 1
src/packages/mobile/views/swap/detail/components/delisting/Index.vue

@@ -41,7 +41,7 @@
             </Field>
             <Field name="OrderPrice" v-if="priceMove === 2" :rules="formRules.OrderPrice" label="摘牌价格">
                 <template #input>
-                    <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0" :auto-fixed="false" />
+                    <Stepper v-model="formData.OrderPrice" input-width="100" theme="round" button-size="22" :min="0"  :auto-fixed="false" />
                 </template>
             </Field>
             <Field label="估算金额" v-if="priceMove === 3">

+ 86 - 0
src/services/api/performance/index.ts

@@ -0,0 +1,86 @@
+import { useLoginStore, useAccountStore } from '@/stores'
+import http from '@/services/http'
+import { RequestConfig } from '@/services/http/types'
+
+const loginStore = useLoginStore()
+const accountStore = useAccountStore()
+
+/**
+ * 查询履约信息
+ */
+export function queryPerformancePlan(config: RequestConfig<Model.PerformancePlanReq> = {}) {
+    return http.commonRequest<Model.PerformancePlanRsp[]>({
+        url: '/WrTrade2/QueryPerformancePlan',
+        params: {
+            userid: loginStore.userId,
+            ...config.data
+        },
+    })
+}
+
+/**
+ * 查询履约模板
+ */
+export function queryPermancePlanTmp(config: RequestConfig<Model.PermancePlanTmpReq> = {}) {
+    return http.commonRequest<Model.PermancePlanTmpRsp[]>({
+        url: '/WrTrade2/QueryPermancePlanTmp',
+        params: {
+            ...config.data
+        },
+    })
+}
+
+/**
+ * 违约申请请求
+ */
+export function performanceContractedApply(config: RequestConfig<Partial<Proto.PerformanceContractedApplyReq>>) {
+    return http.mqRequest<Proto.PerformanceContractedApplyRsp>({
+        data: {
+            Applicant: loginStore.userId,
+            ...config.data
+        },
+        requestCode: 'PerformanceContractedApplyReq',
+        responseCode: 'PerformanceContractedApplyRsp',
+    })
+}
+
+/**
+ * 延期申请请求
+ */
+export function performanceDelayApply(config: RequestConfig<Partial<Proto.PerformanceDelayApplyReq>>) {
+    return http.mqRequest<Proto.PerformanceDelayApplyRsp>({
+        data: {
+            applicant: loginStore.userId,
+            ...config.data
+        },
+        requestCode: 'PerformanceDelayApplyReq',
+        responseCode: 'PerformanceDelayApplyRsp',
+    })
+}
+
+/**
+ * 履约手动确认请求
+ */
+export function performanceManualConfirm(config: RequestConfig<Partial<Proto.PerformanceManualConfirmReq>>) {
+    return http.mqRequest<Proto.PerformanceManualConfirmRsp>({
+        data: {
+            ...config.data
+        },
+        requestCode: 'PerformanceManualConfirmReq',
+        responseCode: 'PerformanceManualConfirmRsp',
+    })
+}
+
+/**
+ * 履约修改联络信息请求
+ */
+export function performanceModifyContact(config: RequestConfig<Partial<Proto.PerformanceModifyContactReq>>) {
+    return http.mqRequest<Proto.PerformanceModifyContactRsp>({
+        data: {
+            AccountID: accountStore.accountId,
+            ...config.data
+        },
+        requestCode: 'PerformanceModifyContactReq',
+        responseCode: 'PerformanceModifyContactRsp',
+    })
+}

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

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

+ 195 - 0
src/types/model/performance.d.ts

@@ -0,0 +1,195 @@
+declare namespace Model {
+    /** 查询履约信息 请求 */
+    interface PerformancePlanReq {
+        /// 用户id
+        userid?: number
+        /// 买卖方向 0-买 1-卖 
+        buyorsell: number
+        /// 履约状态(可多个,逗号隔开) 1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭
+        status?: string
+        /// 开始交易日(yyyymmdd)
+        begindate?: string
+        /// 结束交易日(yyyymmdd)
+        enddate?: string
+    }
+
+    /** 查询履约信息 回应 */
+    interface PerformancePlanRsp {
+        /// 履约激活月 无仓单的交易收月
+        activatemonth: string
+        /// 履约金额(总金额)
+        amount: number
+        /// 开始交易日(yyyymmdd)
+        begindate: string
+        /// 买方账号
+        buyaccountid: number
+        /// 履约冻结(买履约)
+        buyerfreezeamount: number
+        /// 履约冻结剩余(买履约)
+        buyerfreezeamountremain: number
+        /// 买卖方向 0-买 1-卖
+        buyorsell: number
+        /// 买方已冻/已扣金额 (已付金额)
+        buypaidamount: number
+        /// 买方名字
+        buyusername: string
+        /// 合同ID
+        contractid: number
+        /// 创建时间
+        createtime: string
+        /// 创建人
+        creatorid: number
+        /// 当前步骤到期时间
+        curstepdeadline: string
+        /// 当前步骤ID
+        curstepid: string
+        /// 当前步骤名称
+        curstepname: string
+        /// 品种代码
+        deliverygoodscode: string
+        /// 品种ID
+        deliverygoodsid: number
+        /// 品种名称
+        deliverygoodsname: string
+        /// 结束交易日(yyyymmdd)
+        enddate: string
+        /// 单位名称
+        enumdicname: string
+        /// 运费
+        expressfee: number
+        /// 是否确认运费 - 0:无 1:买方确认 2:卖方确认
+        expressfeeconfirmed: number
+        /// 是否确认溢短 - 0:没有 1:买方确认 2:卖方确认
+        hasovershort: number
+        /// 类型 0-仓单预售 1-仓单贸易
+        haswr: number
+        /// 市场ID
+        marketid: number
+        /// 中间商资金账号ID
+        middleaccountid: number
+        /// 中间商用户ID
+        middleuserid: number
+        /// 现货商品最小变动值
+        minivalue: number
+        /// 选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+        optioncompare: string
+        /// 溢短金额
+        overshortamount: number
+        /// 溢短数量
+        overshortqty: number
+        /// 付款方式 - 1:冻结 2:扣款
+        paymenttype: number
+        /// 履约计划ID(130+yyMMddHHmmss+xxxx)
+        performanceplanid: string
+        /// 履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭
+        performancestatus: number
+        /// 履约类型 - 0:通用 1:交割 2:仓单贸易 3:预售集采 4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式 10:法币C2C 11:报价系统 12:挂牌系统
+        performancetype: number
+        /// 履约数量
+        qty: number
+        /// 关联单号(履约类型的关联单号)
+        relatedorderid: string
+        /// 备注
+        remark: string
+        /// 卖方账号
+        sellaccountid: number
+        /// 履约冻结(卖履约)
+        sellerfreezeamount: number
+        /// 履约冻结剩余(卖履约)
+        sellerfreezeamountremain: number
+        /// 卖方已收金额
+        sellreceivedamount: number
+        /// 卖方名字
+        sellusername: string
+        /// 发货备注[物流单号]
+        shipremark: string
+        /// 开始时间
+        starttime: string
+        /// 履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
+        steptypeid: number
+        /// 履约类型 名称
+        typename: string
+        /// 剩余款(待支付金额)
+        unpaidamount: number
+        /// 用户id
+        userid: number
+        /// 仓库ID
+        warehouseid: number
+        /// 仓库名称
+        warehousename: string
+        /// 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+        wrfactortypeid: string
+        /// 仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+        wrfactortypename: string
+        /// 现货商品代码
+        wrstandardcode: string
+        /// 现货商品ID
+        wrstandardid: number
+        /// 商品名称
+        wrstandardname: string
+        /// 仓单受让用户
+        wrtransferuserid: number
+        /// 商品
+        wrtypename: string
+    }
+
+    /** 查询履约模板 请求 */
+    interface PermancePlanTmpReq {
+        /// 用户id
+        userid?: number
+        /// 模板类型(逗号隔开), 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式–失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式
+        tmptype?: number
+        /// 是否包含公共模板(用户id为空的) 1-包含
+        includepub?: number
+        /// 市场id(天津麦顿指定此参数,其它不用)
+        marketid?: number
+    }
+
+    /** 查询履约模板 回应 */
+    interface PermancePlanTmpRsp {
+        /// AutoID 模板id
+        autoid: number
+        /// 创建时间
+        createtime: string
+        /// 创建人
+        creatorid: number
+        /// 步骤信息列表
+        lstStep: [ListStep] 
+        /// 支付方式 - 1:冻结 2:扣款
+        paymenttype: number
+        /// 提货方式 - 1:无 2:买方自提 3:卖方发货
+        takemode: number
+        /// 模板名称
+        templatename: string
+        /// 模板类型 - 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式–失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式
+        templatetype: number
+        /// 所属用户
+        userid: number
+    }
+
+    /// 步骤信息列表
+    interface ListStep {
+        /// AutoID
+        autoid: number
+        /// 是否自动 - 0:不自动 1:自动
+        isauto: number
+        /// 备注
+        remark: string
+        /// 天数信息(T+N)
+        stepdate: string
+        /// 距离上一步天数
+        stepdays: number
+        /// 步骤序号
+        stepindex: number
+        /// 步骤信息(步骤名称+步骤值)
+        stepinfo: string
+        /// 履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
+        steptypeid: number
+        /// 步骤名称
+        steptypename: string
+        /// 步骤值
+        stepvalue: number
+        /// 履约计划模板ID
+        templateid: number
+    }
+}

+ 111 - 0
src/types/proto/performance.d.ts

@@ -0,0 +1,111 @@
+import { IMessageHead } from './proto'
+import Long from 'long'
+
+declare global {
+    namespace Proto {
+        // 违约申请请求 0 20 9
+        interface PerformanceContractedApplyReq {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// uint64 履约计划ID
+            PerformancePlanID?: number;  
+            /// uint32 违约方类型
+            BreachType?: number;  
+            /// uint64 违约申请人
+            Applicant?: number; 
+            /// string 申请备注 
+            ApplyRemark?: string; 
+            /// string 附件
+            Attachment?: string;
+        }
+        // 违约申请应答 0 20 10
+        interface PerformanceContractedApplyRsp {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// 返回码
+            RetCode: number; 
+            /// 描述信息
+            RetDesc: string; 
+            /// uint64 履约计划ID
+            PerformancePlanID: number; 
+        }
+        // 延期申请请求 0 20 5
+        interface PerformanceDelayApplyReq {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// uint64 履约计划步骤ID
+            PerformancePlanStepID?: number;  
+            /// uint32 申请延期天数
+            delaydays?: number;  
+            /// uint64 申请人
+            applicant?: number;  
+            /// string 申请备注
+            applyremark?: string; 
+        }
+        // 延期申请应答 0 20 6
+        interface PerformanceDelayApplyRsp {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// 返回码
+            RetCode: number; 
+            /// 描述信息
+            RetDesc: string; 
+            /// uint64 履约计划步骤ID
+            PerformancePlanStepID: number;  
+            /// uint64 申请人
+            applicant: number;  
+        }
+        // 履约手动确认请求 0 20 3
+        interface PerformanceManualConfirmReq {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// uint64 履约计划步骤ID
+            PerformancePlanStepID?: number; 
+            /// double 溢短金额
+            OverShortAmount?: number;  
+            /// uint32 履约步骤执行方 1买方 2 卖方
+            PerformanceExecuteSide?: number;  
+            /// string 步骤备注
+            StepRemark?: string;  
+            /// double 溢短数量
+            OverShortQty?: number;  
+            /// double 运费金额
+            ExpressFee?: number;  
+        }
+        // 履约手动确认应答 0 20 4
+        interface PerformanceManualConfirmRsp {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// 返回码
+            RetCode: number; 
+            /// 描述信息
+            RetDesc: string; 
+            /// uint64 履约计划步骤ID
+            PerformancePlanStepID: number;   
+        }
+        // 履约修改联络信息请求 0 20 15
+        interface PerformanceModifyContactReq {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// uint64 履约计划ID
+            PerformancePlanID?: number;  
+            /// uint64 账号
+            AccountID?: number; 
+            /// string 联络信息
+            ContactInfo?: string; 
+        }
+        // 履约修改联络信息回应 0 20 16
+        interface PerformanceModifyContactRsp {
+            /// MessageHead 消息头
+            Header?: IMessageHead;
+            /// 返回码
+            RetCode: number; 
+            /// 描述信息
+            RetDesc: string; 
+            /// uint64 履约计划ID
+            PerformancePlanID: number;  
+            /// uint64 账号
+            AccountID: number;  
+        }
+    }
+}

+ 1 - 1
src/types/proto/trade.d.ts

@@ -116,7 +116,7 @@ declare global {
             Header?: IMessageHead;
             UserID?: number // 用户ID
             AccountID?: number // 资金账号
-            OldWRTradeOrderID?: Long // 目标仓单贸易委托单ID
+            OldWRTradeOrderID?: string // 目标仓单贸易委托单ID
             OrderSrc?: number // 委托来源
             ClientSerialNo?: string // 客户端流水号
             ClientOrderTime?: string // 客户端委托时间