li.shaoyi 2 anos atrás
pai
commit
94e859ae0b
32 arquivos alterados com 167 adições e 140 exclusões
  1. 23 23
      public/config/router.json
  2. 5 2
      src/business/trade/index.ts
  3. 9 8
      src/constants/funcode.ts
  4. 1 1
      src/hooks/echarts/timeline/dataset.ts
  5. 1 0
      src/packages/pc/components/base/drawer/index.less
  6. 2 2
      src/packages/pc/components/modules/listing/index.vue
  7. 1 1
      src/packages/pc/components/modules/quote/chart/kline/index.less
  8. 1 1
      src/packages/pc/components/modules/quote/chart/timeline/index.less
  9. 1 1
      src/packages/pc/components/modules/quote/chart/timeline/index.vue
  10. 2 2
      src/packages/pc/views/account/sign/components/cancel/index.vue
  11. 6 5
      src/packages/pc/views/account/sign/components/certification/index.vue
  12. 8 6
      src/packages/pc/views/account/sign/components/sign/index.vue
  13. 3 2
      src/packages/pc/views/account/sign/index.vue
  14. 4 3
      src/packages/pc/views/footer/capital/summary/deposit/index.vue
  15. 2 2
      src/packages/pc/views/footer/goods/order/cancel/index.vue
  16. 3 3
      src/packages/pc/views/footer/goods/order/index.vue
  17. 4 3
      src/packages/pc/views/footer/goods/position/components/delivery/index.vue
  18. 23 21
      src/packages/pc/views/footer/goods/position/components/transfer/index.vue
  19. 3 3
      src/packages/pc/views/footer/goods/position/index.vue
  20. 3 3
      src/packages/pc/views/footer/goods/trade/index.vue
  21. 1 1
      src/packages/pc/views/footer/performance/components/contracted/index.vue
  22. 1 1
      src/packages/pc/views/footer/performance/components/delay/index.vue
  23. 5 5
      src/packages/pc/views/footer/performance/components/details/index.vue
  24. 4 4
      src/packages/pc/views/footer/performance/components/edit/index.vue
  25. 1 1
      src/packages/pc/views/footer/performance/components/manual/index.vue
  26. 2 2
      src/packages/pc/views/footer/spot/order/cancel/index.vue
  27. 2 2
      src/packages/pc/views/footer/spot/position/components/listing/index.vue
  28. 25 26
      src/packages/pc/views/footer/spot/position/components/pickup/index.vue
  29. 6 3
      src/packages/pc/views/market/trade/goods/detail/components/order/delisting/index.vue
  30. 4 1
      src/packages/pc/views/market/trade/goods/detail/index.vue
  31. 3 1
      src/services/bus/types.ts
  32. 8 1
      src/services/websocket/trade.ts

+ 23 - 23
public/config/router.json

@@ -7,29 +7,6 @@
         "children": [
             {
                 "authType": 2,
-                "sort": 1,
-                "title": "资金信息",
-                "code": "bottom_capital",
-                "component": "views/footer/index.vue",
-                "children": [
-                    {
-                        "authType": 2,
-                        "sort": 1,
-                        "title": "资金汇总",
-                        "code": "bottom_capital_summary",
-                        "component": "views/footer/capital/summary/index.vue"
-                    },
-                    {
-                        "authType": 2,
-                        "sort": 2,
-                        "title": "资金流水",
-                        "code": "bottom_capital_statement",
-                        "component": "views/footer/capital/statement/index.vue"
-                    }
-                ]
-            },
-            {
-                "authType": 2,
                 "sort": 2,
                 "title": "商品订单",
                 "code": "bottom_goods",
@@ -124,6 +101,29 @@
                         "component": "views/footer/performance/sell/index.vue"
                     }
                 ]
+            },
+            {
+                "authType": 2,
+                "sort": 1,
+                "title": "资金信息",
+                "code": "bottom_capital",
+                "component": "views/footer/index.vue",
+                "children": [
+                    {
+                        "authType": 2,
+                        "sort": 1,
+                        "title": "资金汇总",
+                        "code": "bottom_capital_summary",
+                        "component": "views/footer/capital/summary/index.vue"
+                    },
+                    {
+                        "authType": 2,
+                        "sort": 2,
+                        "title": "资金流水",
+                        "code": "bottom_capital_statement",
+                        "component": "views/footer/capital/statement/index.vue"
+                    }
+                ]
             }
         ]
     },

+ 5 - 2
src/business/trade/index.ts

@@ -24,6 +24,7 @@ import {
 import { formatDate } from "@/filters";
 import Long from 'long'
 import { BuyOrSell } from '@/constants/order'
+import eventBus from '@/services/bus'
 
 const loginStore = useLoginStore()
 const accountStore = useAccountStore()
@@ -574,14 +575,16 @@ export function useOrder() {
     const formSubmit = async () => {
         try {
             loading.value = true
-
-            return await order({
+            const res = await order({
                 data: {
                     ...formData,
                     ClientSerialNo: v4(),
                     ClientOrderTime: formatDate(new Date().toISOString()),
                 }
             })
+            // 推送委托回应通知
+            eventBus.$emit('OrderRsp', res)
+            return res
         } finally {
             loading.value = false
         }

+ 9 - 8
src/constants/funcode.ts

@@ -51,6 +51,7 @@ export enum FunCode {
     ListingOrderChangeNtf = 131176, // 挂牌委托变更广播通知
     OrderDealedNtf = 131081, // 委托单成交通知
     MarketStatusChangeNtf = 131089, // 市场状态变更通知
+    PosChangedNtf = 131075, // 头寸变化通知
 
     // 行情内容
     QuoteBeat = 0x12, // 心跳
@@ -116,12 +117,12 @@ export enum FunCode {
     PerformanceModifyContactReq = 1310735, // 履约修改联络信息请求
     PerformanceModifyContactRsp = 1310736, // 履约修改联络信息回应
 
-    SupplementDepositReq        = 196731, // 补充定金接口请求
-	SupplementDepositRsp        = 196732, // 补充定金接口响应
-	RefundedDepositReq          = 196733, // 退返定金接口请求
-	RefundedDepositRsp          = 196734, // 退返定金接口响应
-	MarketOrderDeliveryApplyReq = 196739, // 按单做市交收申请接口请求
-	MarketOrderDeliveryApplyRsp = 196740, // 按单做市交收申请接口响应
-	DeliveryClientOperatorReq   = 196743, // 交收终端操作接口请求
-	DeliveryClientOperatorRsp   = 196744, // 交收终端操作接口响应
+    SupplementDepositReq = 196731, // 补充定金接口请求
+    SupplementDepositRsp = 196732, // 补充定金接口响应
+    RefundedDepositReq = 196733, // 退返定金接口请求
+    RefundedDepositRsp = 196734, // 退返定金接口响应
+    MarketOrderDeliveryApplyReq = 196739, // 按单做市交收申请接口请求
+    MarketOrderDeliveryApplyRsp = 196740, // 按单做市交收申请接口响应
+    DeliveryClientOperatorReq = 196743, // 交收终端操作接口请求
+    DeliveryClientOperatorRsp = 196744, // 交收终端操作接口响应
 } 

+ 1 - 1
src/hooks/echarts/timeline/dataset.ts

@@ -98,7 +98,7 @@ export function useDataset() {
     // 计算图表最高最低指标线
     const calcMarkLine = () => {
         const { close } = dataset.timeline.source;
-        const point = Math.pow(10, -dataset.decimal) * 10; // 图表上下保留10个报价点数
+        const point = Math.pow(10, -dataset.decimal) * 30; // 图表上下保留30个报价点数
         let max = Math.max(...close); // 取历史行情最高价
         let min = Math.min(...close); // 取历史行情最低价
 

+ 1 - 0
src/packages/pc/components/base/drawer/index.less

@@ -36,6 +36,7 @@
     &__body {
         flex: 1;
         overflow-y: auto;
+        line-height: normal;
         background-color: #0f1a25;
         padding: 24px;
         padding-bottom: 0;

+ 2 - 2
src/packages/pc/components/modules/listing/index.vue

@@ -213,8 +213,8 @@ watch(() => goodsStore.goodsId, () => {
     immediate: true
 })
 
-// 接收资金变动通知
-eventBus.$on('MoneyChangedNotify', () => getTradePosition())
+// 接收持仓变化通知
+eventBus.$on('PosChangedNtf', () => getTradePosition())
 </script>
 
 <style lang="less">

+ 1 - 1
src/packages/pc/components/modules/quote/chart/kline/index.less

@@ -21,7 +21,7 @@
             display: flex;
             color: #7a8a94;
             font-size: 12px;
-            padding: 4px 4%;
+            padding: 10px;
             margin: 0;
 
             &-item {

+ 1 - 1
src/packages/pc/components/modules/quote/chart/timeline/index.less

@@ -21,7 +21,7 @@
             display: flex;
             color: #7a8a94;
             font-size: 12px;
-            padding: 4px 4%;
+            padding: 10px;
             margin: 0;
 
             &-item {

+ 1 - 1
src/packages/pc/components/modules/quote/chart/timeline/index.vue

@@ -8,7 +8,7 @@
         </template>
         <template v-else>
             <div class="app-echats-timeline__container">
-                <ul class="legend" v-if="false">
+                <ul class="legend">
                     <li class="legend-item">MA5: {{ selectedItem.ma5 }}</li>
                 </ul>
                 <app-echarts :option="options.timeline" v-model:dataIndex="dataIndex" @ready="initOptions" />

+ 2 - 2
src/packages/pc/views/account/sign/components/cancel/index.vue

@@ -3,7 +3,7 @@
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
         <div>确认要解约吗?</div>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>
         </template>
     </app-drawer>
@@ -33,7 +33,7 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onCancelSumit = () => {
-    const { cusbankid, currency, accountcode} = props.selectedRow
+    const { cusbankid, currency, accountcode } = props.selectedRow
     formData.Currency = currency
     formData.CusBankID = cusbankid
     formData.AccountCode = accountcode

+ 6 - 5
src/packages/pc/views/account/sign/components/certification/index.vue

@@ -10,19 +10,20 @@
             </el-form-item>
             <el-form-item label="证件类型" prop="cardtype">
                 <el-select v-model="formData.cardtype">
-                    <el-option :label="item.label" :value="item.value" v-for="(item, index) in enums"
-                        :key="index" />
+                    <el-option :label="item.label" :value="item.value" v-for="(item, index) in enums" :key="index" />
                 </el-select>
             </el-form-item>
             <el-form-item label="证件正面照片">
-                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="b_afterRead" :rules="formRules.cardfrontphotourl" />
+                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="b_afterRead"
+                    :rules="formRules.cardfrontphotourl" />
             </el-form-item>
             <el-form-item label="证件反面照片">
-                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="f_afterRead" :rules="formRules.cardbackphotourl" />
+                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="f_afterRead"
+                    :rules="formRules.cardbackphotourl" />
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">提交</el-button>
         </template>
     </app-drawer>

+ 8 - 6
src/packages/pc/views/account/sign/components/sign/index.vue

@@ -5,22 +5,24 @@
         <el-form ref="formRef" class="el-form--vertical" label-width="100px" :model="formData" :rules="formRules">
             <el-form-item label="开户银行" prop="OpenBankAccId">
                 <el-select v-model="formData.OpenBankAccId">
-                    <el-option :label="item.bankname" :value="item.bankid" v-for="(item, index) in banklist"
-                        :key="index" />
+                    <el-option :label="item.bankname" :value="item.bankid" v-for="(item, index) in banklist" :key="index" />
                 </el-select>
             </el-form-item>
             <el-form-item label="银行卡号" prop="BankAccountNo">
-                <el-input name="BankAccountNo" placeholder="银行卡账户名" :maxlength="30" v-model="formData.BankAccountNo" :rules="formRules.BankAccountNo"/>
+                <el-input name="BankAccountNo" placeholder="银行卡账户名" :maxlength="30" v-model="formData.BankAccountNo"
+                    :rules="formRules.BankAccountNo" />
             </el-form-item>
             <el-form-item label="姓名" prop="BankAccountName">
-                <el-input name="BankAccountName" readonly placeholder="银行卡账户名" v-model="formData.BankAccountName" :rules="formRules.BankAccountName"/>
+                <el-input name="BankAccountName" readonly placeholder="银行卡账户名" v-model="formData.BankAccountName"
+                    :rules="formRules.BankAccountName" />
             </el-form-item>
             <el-form-item label="支行名称" prop="BranchBankName">
-                <el-input name="BranchBankName" placeholder="请输入银行卡支行名称" :maxlength="20" v-model="formData.OpenBankName" :rules="formRules.OpenBankName"/>
+                <el-input name="BranchBankName" placeholder="请输入银行卡支行名称" :maxlength="20" v-model="formData.OpenBankName"
+                    :rules="formRules.OpenBankName" />
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="formSubmit">{{ bankInfo ? '修改' : '提交' }}</el-button>
         </template>
     </app-drawer>

+ 3 - 2
src/packages/pc/views/account/sign/index.vue

@@ -3,8 +3,9 @@
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
         :expand-row-keys="expandKeys" @row-click="rowClick">
         <template #header>
-            <el-button type="primary" v-if="authStatus === AuthStatus.Certified" @click="openComponent('sign')">添加签约账户</el-button>
-            <el-button type="warning" v-else @click="openComponent('certification')" plain>实名认证</el-button>
+            <el-button type="primary" v-if="authStatus === AuthStatus.Certified"
+                @click="openComponent('sign')">添加签约账户</el-button>
+            <el-button type="warning" v-else @click="openComponent('certification')">实名认证</el-button>
         </template>
         <!-- 证件类型 -->
         <template #cardtype="{ value }">

+ 4 - 3
src/packages/pc/views/footer/capital/summary/deposit/index.vue

@@ -4,14 +4,15 @@
         <el-form ref="formRef" class="el-form--vertical" label-width="100px" label-position="left" :model="formData"
             :rules="formRules">
             <el-form-item prop="Amount" label="充值金额">
-                <el-input-number placeholder="请输入" :max="9999999999" :precision="2" v-model="formData.Amount" :rules="formRules.Amount"/>
+                <el-input-number placeholder="请输入" :max="9999999999" :precision="2" v-model="formData.Amount"
+                    :rules="formRules.Amount" />
             </el-form-item>
             <el-form-item label="凭证" prop="filePath">
-                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="onUploadChange"/>
+                <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="onUploadChange" />
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="formSubmit">提交</el-button>
         </template>
     </app-drawer>

+ 2 - 2
src/packages/pc/views/footer/goods/order/cancel/index.vue

@@ -3,7 +3,7 @@
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
         <div>确认要撤销吗?</div>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>
         </template>
     </app-drawer>
@@ -33,7 +33,7 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onCancelSumit = () => {
-    const { orderid, marketid, goodsid} = props.selectedRow
+    const { orderid, marketid, goodsid } = props.selectedRow
     ///  参数信息
     formData.Header = { MarketID: marketid, GoodsID: goodsid }
     formData.OldOrderId = orderid

+ 3 - 3
src/packages/pc/views/footer/goods/order/index.vue

@@ -75,10 +75,10 @@ const showComponent = (componentName: string, row: Model.TradeOrderDetailRsp) =>
     openComponent(componentName)
 }
 
-// 接收资金变动通知
-const moneyChangedNotify = eventBus.$on('MoneyChangedNotify', () => {
+// 接收持仓变化通知、委托回应通知
+const subNotify = eventBus.$on(['PosChangedNtf', 'OrderRsp'], () => {
     run()
 })
 
-onUnmounted(() => moneyChangedNotify.cancel())
+onUnmounted(() => subNotify.cancel())
 </script>

+ 4 - 3
src/packages/pc/views/footer/goods/position/components/delivery/index.vue

@@ -5,7 +5,7 @@
             <el-form-item label="商品代码/名称">
                 <span>{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
             </el-form-item>
-            <el-form-item label="持仓方向" >
+            <el-form-item label="持仓方向">
                 <span>{{ getBuyOrSellName(selectedRow.buyorsell) }}</span>
             </el-form-item>
             <el-form-item label="持仓金额">
@@ -30,14 +30,15 @@
                 <span :class="handlePriceColor(closepl, 0)">{{ formatDecimal(closepl) }}</span>
             </el-form-item>
             <el-form-item prop="DeliveryLot" label="交收数量">
-                <el-input-number placeholder="请输入数量" v-model="formData.DeliveryLot" :precision="0" :max="selectedRow.enableqty" :min="0" />
+                <el-input-number placeholder="请输入数量" v-model="formData.DeliveryLot" :precision="0"
+                    :max="selectedRow.enableqty" :min="0" />
             </el-form-item>
             <el-form-item prop="DeliveryInfo" label="交收信息">
                 <el-input type="textarea" placeholder="请输入交收信息" v-model="formData.DeliveryInfo" />
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">交收</el-button>
         </template>
     </app-drawer>

+ 23 - 21
src/packages/pc/views/footer/goods/position/components/transfer/index.vue

@@ -6,7 +6,7 @@
             <el-form-item label="商品代码/名称">
                 <span>{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
             </el-form-item>
-            <el-form-item label="持仓方向" >
+            <el-form-item label="持仓方向">
                 <span>{{ getBuyOrSellName(selectedRow.buyorsell) }}</span>
             </el-form-item>
             <el-form-item label="持仓金额">
@@ -28,14 +28,16 @@
                 <span :class="handlePriceColor(closepl, 0)">{{ formatDecimal(closepl) }}</span>
             </el-form-item>
             <el-form-item prop="OrderQty" label="转让数量">
-                <el-input-number placeholder="请输入数量" v-model="formData.OrderQty" :precision="0" :max="selectedRow.enableqty" :min="0" />
+                <el-input-number placeholder="请输入数量" v-model="formData.OrderQty" :precision="0" :max="selectedRow.enableqty"
+                    :min="0" />
             </el-form-item>
             <el-form-item prop="OrderPrice" label="转让价格">
-                <el-input-number placeholder="请输入价格" v-model="formData.OrderPrice" :decimal-length="selectedRow.decimalplace" />
+                <el-input-number placeholder="请输入价格" v-model="formData.OrderPrice"
+                    :decimal-length="selectedRow.decimalplace" />
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCloseSumit">提交</el-button>
         </template>
     </app-drawer>
@@ -94,24 +96,24 @@ const onCancel = (isRefresh = false) => {
 
 const onCloseSumit = () => {
     const { marketid, goodsid, buyorsell } = props.selectedRow
-        /// 市场ID
-        formData.Header = { GoodsID: goodsid }
-        formData.MarketID = marketid
-        formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
-        formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
-        formData.GoodsID = goodsid
-        formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
-        formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
-        formData.BuildType = EBuildType.BUILDTYPE_CLOSE
-        formData.TimevalidType = EValidType.VALIDTYPE_DR
-        formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
+    /// 市场ID
+    formData.Header = { GoodsID: goodsid }
+    formData.MarketID = marketid
+    formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+    formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
+    formData.GoodsID = goodsid
+    formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
+    formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
+    formData.BuildType = EBuildType.BUILDTYPE_CLOSE
+    formData.TimevalidType = EValidType.VALIDTYPE_DR
+    formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
 
-        formSubmit().then(() => {
-            ElMessage.success('挂牌成功')
-            onCancel(true)
-        }).catch((err) => {
-            ElMessage.error('挂牌失败:' + err)
-        })
+    formSubmit().then(() => {
+        ElMessage.success('挂牌成功')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error('挂牌失败:' + err)
+    })
 }
 
 onMounted(() => {

+ 3 - 3
src/packages/pc/views/footer/goods/position/index.vue

@@ -92,10 +92,10 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'closepl', label: '浮动盈亏' },
 ])
 
-// 接收资金变动通知
-const moneyChangedNotify = eventBus.$on('MoneyChangedNotify', () => {
+// 接收持仓变化通知
+const posChangedNtf = eventBus.$on('PosChangedNtf', () => {
     run()
 })
 
-onUnmounted(() => moneyChangedNotify.cancel())
+onUnmounted(() => posChangedNtf.cancel())
 </script>

+ 3 - 3
src/packages/pc/views/footer/goods/trade/index.vue

@@ -44,10 +44,10 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'tradetime', label: '成交时间' }
 ])
 
-// 接收资金变动通知
-const moneyChangedNotify = eventBus.$on('MoneyChangedNotify', () => {
+// 接收成交通知
+const orderDealedNtf = eventBus.$on('OrderDealedNtf', () => {
     run()
 })
 
-onUnmounted(() => moneyChangedNotify.cancel())
+onUnmounted(() => orderDealedNtf.cancel())
 </script>

+ 1 - 1
src/packages/pc/views/footer/performance/components/contracted/index.vue

@@ -16,7 +16,7 @@
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>
         </template>
     </app-drawer>

+ 1 - 1
src/packages/pc/views/footer/performance/components/delay/index.vue

@@ -16,7 +16,7 @@
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>
         </template>
     </app-drawer>

+ 5 - 5
src/packages/pc/views/footer/performance/components/details/index.vue

@@ -38,8 +38,8 @@
             <template #sellreceivedamount="{ value }">
                 {{ formatDecimal(value) }}
             </template>
-             <!-- 对手方 -->
-             <template #accountname>
+            <!-- 对手方 -->
+            <template #accountname>
                 {{ selectedRow.buyorsell === 0 ? selectedRow.buyusername : selectedRow.sellusername }}
             </template>
             <!-- 买方联络信息 -->
@@ -54,7 +54,7 @@
         <app-table :data="dataList" :columns="tableColumns" :show-toolbar="false" :row-style="rowStyle" border>
             <template #header>
                 <h3 class="g-details__title">步骤列表</h3>
-            </template> 
+            </template>
             <!-- 步骤值 -->
             <template #stepvalue="{ value }">
                 {{ (value * 100).toFixed(1) }}
@@ -70,9 +70,9 @@
             <template #stepstatus="{ value }">
                 {{ getPerformanceStepStatusName(value) }}
             </template>
-        </app-table> 
+        </app-table>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
         </template>
     </app-drawer>
 </template>

+ 4 - 4
src/packages/pc/views/footer/performance/components/edit/index.vue

@@ -48,7 +48,7 @@
             </template>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>
         </template>
     </app-drawer>
@@ -142,12 +142,12 @@ const onSubmit = () => {
     /// PerformancePlanID
     formData.value.PerformancePlanID = props.selectedRow.performanceplanid
     /// Json String
-    const json =  {
+    const json = {
         ContactInfo: `${Contract.value}`,
         ReceiveInfo: `${Receive.value}`,
         ReceiptInfo: `${Receipt.value}`
     }
-    formData.value.ContactInfo= JSON.stringify(json)
+    formData.value.ContactInfo = JSON.stringify(json)
 
     formRef.value?.validate((valid) => {
         if (valid) {
@@ -168,7 +168,7 @@ onMounted(() => {
                 const res = JSON.parse(props.selectedRow.buyerinfo)
                 Contract.value = res.ContactInfo
                 Receive.value = res.ReceiveInfo
-                Receipt .value= res.ReceiptInfo
+                Receipt.value = res.ReceiptInfo
             }
             break
         case 1:

+ 1 - 1
src/packages/pc/views/footer/performance/components/manual/index.vue

@@ -10,7 +10,7 @@
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>
         </template>
     </app-drawer>

+ 2 - 2
src/packages/pc/views/footer/spot/order/cancel/index.vue

@@ -3,7 +3,7 @@
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
         <div>确认要撤销吗?</div>
         <template #footer>
-            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>
         </template>
     </app-drawer>
@@ -33,7 +33,7 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onCancelSumit = () => {
-    const { wrtradeorderid, buyorsell} = props.selectedRow
+    const { wrtradeorderid, buyorsell } = props.selectedRow
     ///  参数信息
     formData.Header = { MarketID: 17201 }
     formData.OldWRTradeOrderID = wrtradeorderid

+ 2 - 2
src/packages/pc/views/footer/spot/position/components/listing/index.vue

@@ -6,7 +6,7 @@
             <el-form-item label="商品代码/名称">
                 <span>{{ selectedRow.wrstandardcode }}/{{ selectedRow.wrstandardname }}</span>
             </el-form-item>
-            <el-form-item label="仓库" >
+            <el-form-item label="仓库">
                 <span>{{ selectedRow.warehousename }}</span>
             </el-form-item>
             <el-form-item label="库存量">
@@ -26,7 +26,7 @@
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="formSubmit">提交</el-button>
         </template>
     </app-drawer>

+ 25 - 26
src/packages/pc/views/footer/spot/position/components/pickup/index.vue

@@ -1,22 +1,21 @@
 <!-- 现货仓单-现货明细-提货 -->
 <template>
     <app-drawer title="提货" v-model:show="show" :width="960" :loading="loading" :refresh="refresh">
-        <el-form ref="formRef" class="el-form--horizontal" label-width="120px" :model="formData"
-            :rules="formRules">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="120px" :model="formData" :rules="formRules">
             <el-form-item label="商品代码/名称">
-                <span>{{selectedRow.wrstandardcode}}/{{ selectedRow.wrstandardname }}</span>
+                <span>{{ selectedRow.wrstandardcode }}/{{ selectedRow.wrstandardname }}</span>
             </el-form-item>
-            <el-form-item label="仓库" >
-                <span>{{selectedRow.warehousename}}</span>
+            <el-form-item label="仓库">
+                <span>{{ selectedRow.warehousename }}</span>
             </el-form-item>
             <el-form-item label="库存量">
-                <span>{{selectedRow.qty}}</span>
+                <span>{{ selectedRow.qty }}</span>
             </el-form-item>
             <el-form-item label="冻结量">
-                <span>{{selectedRow.freezerqty}}</span>
+                <span>{{ selectedRow.freezerqty }}</span>
             </el-form-item>
             <el-form-item label="可用量">
-                <span>{{selectedRow.enableqty}}</span>
+                <span>{{ selectedRow.enableqty }}</span>
             </el-form-item>
             <el-form-item prop="OrderQty" label="提货数量">
                 <el-input-number placeholder="请输入提货数量" v-model="orderQty" :max="selectedRow.enableqty" :min="0" />
@@ -29,28 +28,28 @@
             </el-form-item>
             <el-form-item prop="ContractName" label="联系人">
                 <div class="el-form-item--col">
-                        <el-input type="textarea" :rows="2" v-model="formData.ContactName" />
-                        <el-dropdown trigger="click" v-if="addressList.length">
-                            <el-icon :size="20" style="cursor: pointer;">
-                                <CirclePlusFilled />
-                            </el-icon>
-                            <template #dropdown>
-                                <el-dropdown-menu>
-                                    <el-dropdown-item v-for="(item, index) in addressList" :key="index"
-                                        @click="addressChange(item)">
-                                        {{ [item.provincename, item.cityname, item.districtname, item.address].join(' ') }}
-                                    </el-dropdown-item>
-                                </el-dropdown-menu>
-                            </template>
-                        </el-dropdown>
-                    </div>
+                    <el-input type="textarea" :rows="2" v-model="formData.ContactName" />
+                    <el-dropdown trigger="click" v-if="addressList.length">
+                        <el-icon :size="20" style="cursor: pointer;">
+                            <CirclePlusFilled />
+                        </el-icon>
+                        <template #dropdown>
+                            <el-dropdown-menu>
+                                <el-dropdown-item v-for="(item, index) in addressList" :key="index"
+                                    @click="addressChange(item)">
+                                    {{ [item.provincename, item.cityname, item.districtname, item.address].join(' ') }}
+                                </el-dropdown-item>
+                            </el-dropdown-menu>
+                        </template>
+                    </el-dropdown>
+                </div>
             </el-form-item>
             <el-form-item prop="ContactNum" label="联系方式">
                 <el-input placeholder="请输入" v-model="formData.ContactNum" />
             </el-form-item>
             <el-form-item prop="Region" class="el-form-item--row" label="收货地区">
-                <app-region class="el-form-item--col" v-model:province="formData.ProvinceID"
-                    v-model:city="formData.CityID" v-model:district="formData.DistrictID" />
+                <app-region class="el-form-item--col" v-model:province="formData.ProvinceID" v-model:city="formData.CityID"
+                    v-model:district="formData.DistrictID" />
             </el-form-item>
             <el-form-item class="el-form-item--row" prop="Address" label="收货地址">
                 <el-input placeholder="请输入" v-model="formData.Address" />
@@ -75,7 +74,7 @@
             </el-form-item>
         </el-form>
         <template #footer>
-            <el-button type="info" @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">提货</el-button>
         </template>
     </app-drawer>

+ 6 - 3
src/packages/pc/views/market/trade/goods/detail/components/order/delisting/index.vue

@@ -9,7 +9,7 @@
                 <span>{{ selectedRow.orderprice }}</span>
             </el-form-item>
             <el-form-item label="剩余数量">
-                <span>{{ selectedRow.orderqty }}{{ getGoodsUnitName(quote?.goodunitid) }}</span>
+                <span>{{ enableQty }}{{ getGoodsUnitName(quote?.goodunitid) }}</span>
             </el-form-item>
             <el-form-item prop="OrderQty" label="摘牌数量">
                 <div class="el-form-item--col">
@@ -25,7 +25,7 @@
         </el-form>
         <template #footer>
             <template v-if="selectedRow.buyorsell === BuyOrSell.Buy">
-                <el-button type="primary" :disabled="orderQty > selectedRow.orderqty"
+                <el-button type="primary" :disabled="orderQty > enableQty"
                     @click="onSubmit(EBuildType.BUILDTYPE_OPEN)">订立卖出</el-button>
                 <el-button type="primary" :disabled="(buyQty === 0) || (orderQty > buyQty)"
                     @click="onSubmit(EBuildType.BUILDTYPE_CLOSE)">
@@ -34,7 +34,7 @@
                 </el-button>
             </template>
             <template v-if="selectedRow.buyorsell === BuyOrSell.Sell">
-                <el-button type="primary" :disabled="orderQty > selectedRow.orderqty"
+                <el-button type="primary" :disabled="orderQty > enableQty"
                     @click="onSubmit(EBuildType.BUILDTYPE_OPEN)">订立买入</el-button>
                 <el-button type="primary" :disabled="(sellQty === 0) || (orderQty > sellQty)"
                     @click="onSubmit(EBuildType.BUILDTYPE_CLOSE)">
@@ -86,6 +86,9 @@ const quote = futuresStore.getQuoteInfo(props.selectedRow.goodsid)
 // 合约乘数
 const agreeunit = computed(() => quote.value?.agreeunit ?? 0)
 
+// 剩余数量
+const enableQty = computed(() => props.selectedRow.orderqty * agreeunit.value)
+
 // 数量步长列表
 const qtyStepList = computed(() => {
     return [

+ 4 - 1
src/packages/pc/views/market/trade/goods/detail/index.vue

@@ -14,7 +14,10 @@
                         </li>
                     </ul>
                     <div class="buttonbar">
-                        <el-button type="primary" @click="active = false" v-if="active">买卖大厅</el-button>
+                        <template v-if="active">
+                            <el-button type="info" style="min-width: 60px;">刷新</el-button>
+                            <el-button type="primary" @click="active = false">买卖大厅</el-button>
+                        </template>
                         <el-button type="primary" @click="active = true" v-else>图表</el-button>
                     </div>
                 </div>

+ 3 - 1
src/services/bus/types.ts

@@ -10,8 +10,10 @@ export enum EventCode {
     UserChangeNtf,       // 账户变更通知
     WRTradeDealedNtf, // 仓单贸易成交通知
     ListingOrderChangeNtf, // 挂牌委托变更广播通知
-    OrderDealedNtf, // 委托单成交通知
+    OrderDealedNtf, // 成交通知
     MarketStatusChangeNtf, // 市场状态变更通知
+    OrderRsp, // 委托回应通知
+    PosChangedNtf, // 头寸变化通知
 }
 
 /**

+ 8 - 1
src/services/websocket/trade.ts

@@ -36,7 +36,7 @@ export default new (class {
                 }
                 case FunCode.OrderDealedNtf: {
                     timerInterceptor.debounce(() => {
-                        // 委托单成交通知
+                        // 成交通知
                         eventBus.$emit('OrderDealedNtf')
                     }, delay, funCode.toString())
                     break
@@ -55,6 +55,13 @@ export default new (class {
                     }, delay, funCode.toString())
                     break;
                 }
+                case FunCode.PosChangedNtf: {
+                    timerInterceptor.debounce(() => {
+                        // 头寸变化通知
+                        eventBus.$emit('PosChangedNtf');
+                    }, delay, funCode.toString())
+                    break;
+                }
                 default: {
                     if (funCode) {
                         console.warn('接收到未定义的通知', funCode)