li.shaoyi 2 jaren geleden
bovenliggende
commit
634b400f74

+ 16 - 29
oem/zrwyt/config/router.json

@@ -5,7 +5,6 @@
         "title": "底部单据菜单",
         "code": "bottom",
         "children": [
-            
             {
                 "authType": 2,
                 "sort": 1,
@@ -19,9 +18,7 @@
                         "title": "预售认购",
                         "code": "bottom_presell_presellposition",
                         "component": "views/footer/presell/presellposition/index.vue",
-                        "children": [
-                            
-                        ]
+                        "children": []
                     },
                     {
                         "authType": 2,
@@ -29,9 +26,7 @@
                         "title": "转让持仓",
                         "code": "bottom_presell_transferposition",
                         "component": "views/footer/presell/transferposition/index.vue",
-                        "children": [
-                            
-                        ]
+                        "children": []
                     },
                     {
                         "authType": 2,
@@ -39,9 +34,7 @@
                         "title": "转让委托",
                         "code": "bottom_presell_transferorder",
                         "component": "views/footer/presell/transferorder/index.vue",
-                        "children": [
-                            
-                        ]
+                        "children": []
                     },
                     {
                         "authType": 2,
@@ -49,9 +42,7 @@
                         "title": "转让成交",
                         "code": "bottom_presell_transfertrader",
                         "component": "views/footer/presell/transfertrader/index.vue",
-                        "children": [
-                            
-                        ]
+                        "children": []
                     },
                     {
                         "authType": 2,
@@ -59,13 +50,11 @@
                         "title": "点选交收",
                         "code": "bottom_presell_onlinedelivery",
                         "component": "views/footer/presell/onlinedelivery/index.vue",
-                        "children": [
-                            
-                        ]
+                        "children": []
                     }
                 ]
             },
-			{
+            {
                 "authType": 2,
                 "sort": 1,
                 "title": "商品订单",
@@ -131,7 +120,7 @@
                 "title": "现货仓单",
                 "code": "bottom_spot",
                 "component": "views/footer/index.vue",
-				"hidden": true,
+                "hidden": true,
                 "children": [
                     {
                         "authType": 2,
@@ -230,7 +219,6 @@
                 "urlType": 1,
                 "component": "Main",
                 "children": [
-                    
                     {
                         "authType": 1,
                         "sort": 1,
@@ -251,12 +239,12 @@
                                 "authType": 2,
                                 "sort": 2,
                                 "title": "定金转让",
-                                "code": "market_trade_presell_transfer",
+                                "code": "market_trade_presell_49201",
                                 "component": "views/market/trade/presell/transfer/index.vue"
                             }
                         ]
                     },
-					{
+                    {
                         "authType": 1,
                         "sort": 2,
                         "title": "订单交易",
@@ -277,7 +265,7 @@
                                 "sort": 2,
                                 "title": "中远期挂牌",
                                 "code": "market_trade_goods_50102",
-								"hidden": true,
+                                "hidden": true,
                                 "component": "views/market/trade/goods/list/index.vue"
                             }
                         ]
@@ -289,7 +277,7 @@
                         "code": "market_trade_spot",
                         "url": "spot",
                         "urlType": 1,
-						"hidden": true,
+                        "hidden": true,
                         "component": "views/market/trade/spot/index.vue"
                     }
                 ]
@@ -314,7 +302,7 @@
                 "url": "order",
                 "urlType": 1,
                 "component": "Main",
-                "children": [                   
+                "children": [
                     {
                         "authType": 1,
                         "sort": 3,
@@ -354,7 +342,7 @@
                             }
                         ]
                     },
-					 {
+                    {
                         "authType": 1,
                         "sort": 1,
                         "title": "商品合约",
@@ -386,7 +374,7 @@
                         "code": "query_order_spot",
                         "url": "spot",
                         "urlType": 1,
-						"hidden": true,
+                        "hidden": true,
                         "component": "views/query/order/spot/index.vue",
                         "children": [
                             {
@@ -416,7 +404,6 @@
                 "urlType": 1,
                 "component": "Main",
                 "children": [
-                    
                     {
                         "authType": 1,
                         "sort": 2,
@@ -442,7 +429,7 @@
                             }
                         ]
                     },
-					{
+                    {
                         "authType": 1,
                         "sort": 1,
                         "title": "商品合约",
@@ -474,7 +461,7 @@
                         "code": "query_trade_spot",
                         "url": "spot",
                         "urlType": 1,
-						"hidden": true,
+                        "hidden": true,
                         "component": "views/query/trade/spot/index.vue",
                         "children": [
                             {

+ 8 - 1
public/config/router.json

@@ -272,7 +272,14 @@
                                 "authType": 2,
                                 "sort": 2,
                                 "title": "定金转让",
-                                "code": "market_trade_presell_transfer",
+                                "code": "market_trade_presell_49201",
+                                "component": "views/market/trade/presell/transfer/index.vue"
+                            },
+                            {
+                                "authType": 2,
+                                "sort": 3,
+                                "title": "全款挂牌",
+                                "code": "market_trade_presell_16201",
                                 "component": "views/market/trade/presell/transfer/index.vue"
                             }
                         ]

+ 0 - 7
src/packages/pc/views/market/trade/goods/index.vue

@@ -4,16 +4,9 @@
 </template>
 
 <script lang="ts" setup>
-import { onMounted, onUnmounted } from 'vue'
-import { useGlobalStore } from '@/stores'
 import AppAuthComponent from '@pc/components/modules/auth-component/index.vue'
 
 defineProps({
     code: String
 })
-
-const globalStore = useGlobalStore()
-
-onMounted(() => globalStore.showGoodsListing = true)
-onUnmounted(() => globalStore.showGoodsListing = false)
 </script>

+ 7 - 2
src/packages/pc/views/market/trade/goods/list/index.vue

@@ -69,7 +69,7 @@ import { shallowRef, onMounted, onUnmounted, defineAsyncComponent } from 'vue'
 import { parsePercent, handleNumberValue, formatDecimal } from '@/filters'
 import { useComponent } from '@/hooks/component'
 import { getGoodsUnitName } from '@/constants/unit'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, useGlobalStore } from '@/stores'
 import quoteSocket from '@/services/websocket/quote'
 import AppTable from '@pc/components/base/table/index.vue'
 
@@ -82,6 +82,7 @@ const props = defineProps({
 })
 
 const subscribe = quoteSocket.createSubscribe()
+const globalStore = useGlobalStore()
 const { setMarketId, $toRefs } = useFuturesStore()
 const { marketGoodsList, selectedGoodsId } = $toRefs()
 
@@ -129,7 +130,11 @@ onMounted(() => {
     }
     const goodsCodes = marketGoodsList.value.map((e) => e.goodscode)
     subscribe.start(...goodsCodes)
+    globalStore.showGoodsListing = true
 })
 
-onUnmounted(() => subscribe.stop())
+onUnmounted(() => {
+    globalStore.showGoodsListing = false
+    subscribe.stop()
+})
 </script>

+ 3 - 2
src/packages/pc/views/market/trade/goods/list/listing/index.less

@@ -35,8 +35,9 @@
         }
 
         .footer-btnbar {
-            display: flex;
-            justify-content: center;
+            .el-button {
+                flex: 1;
+            }
         }
 
         .el-radio {

+ 1 - 1
src/packages/pc/views/market/trade/goods/list/listing/index.vue

@@ -45,7 +45,7 @@
                         </el-radio-group>
                     </div>
                 </el-form-item>
-                <el-form-item>
+                <el-form-item class="footer-btnbar">
                     <template v-if="formData.BuyOrSell === BuyOrSell.Buy">
                         <el-button ref="submitRef" type="primary" :loading="loading"
                             :disabled="!selectedGoodsId || !formData.OrderQty"

+ 1 - 2
src/packages/pc/views/market/trade/presell/index.vue

@@ -1,6 +1,6 @@
 <!-- 交易市场-预售转让 -->
 <template>
-    <app-auth-component direction="bottom" v-bind="{ code }"/>
+    <app-auth-component direction="bottom" v-bind="{ code }" />
 </template>
 
 <script lang="ts" setup>
@@ -9,5 +9,4 @@ import AppAuthComponent from '@pc/components/modules/auth-component/index.vue'
 defineProps({
     code: String
 })
-
 </script>

+ 12 - 1
src/packages/pc/views/market/trade/presell/transfer/index.vue

@@ -73,6 +73,10 @@ import { useFuturesStore, useGlobalStore } from '@/stores'
 import quoteSocket from '@/services/websocket/quote'
 import AppTable from '@pc/components/base/table/index.vue'
 
+const props = defineProps({
+    code: String
+})
+
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('@pc/components/modules/goods-detail/index.vue'))], // 详情
 ])
@@ -110,7 +114,14 @@ const onRowClick = (row: Model.GoodsQuote) => {
 }
 
 onMounted(() => {
-    setMarketId(49201)
+    switch (props.code) {
+        case 'market_trade_presell_49201':
+            setMarketId(49201)
+            break
+        case 'market_trade_presell_16201':
+            setMarketId(16201)
+            break
+    }
     const goodsCodes = marketGoodsList.value.map((e) => e.goodscode)
     subscribe.start(...goodsCodes)
     globalStore.showTransferListing = true

+ 3 - 2
src/packages/pc/views/market/trade/presell/transfer/listing/index.less

@@ -35,8 +35,9 @@
         }
 
         .footer-btnbar {
-            display: flex;
-            justify-content: center;
+            .el-button {
+                flex: 1;
+            }
         }
 
         .el-radio {

+ 5 - 5
src/packages/pc/views/market/trade/presell/transfer/listing/index.vue

@@ -4,7 +4,7 @@
             <Forex v-bind="{ goodsCode: selectedGoods.goodscode }" @price-click="onPriceClick" />
         </div>
         <div class="goods-listing__form">
-            <h4 class="header-title">定金转让</h4>
+            <h4 class="header-title">订单交易</h4>
             <el-form ref="formRef" class="el-form--vertical" label-width="60px" :model="formData" :rules="formRules">
                 <el-form-item prop="GoodsID" label="商品">
                     <el-select placeholder="请选择" v-model="selectedGoodsId" filterable>
@@ -45,13 +45,13 @@
                         </el-radio-group>
                     </div>
                 </el-form-item>
-                <el-form-item>
-                    <el-button ref="submitRef" type="primary" :loading="loading" @click="onSubmit"
-                        v-if="formData.BuyOrSell === BuyOrSell.Buy">订立买入</el-button>
+                <el-form-item class="footer-btnbar">
+                    <el-button ref="submitRef" type="primary" :loading="loading" :disabled="!selectedGoodsId"
+                        @click="onSubmit" v-if="formData.BuyOrSell === BuyOrSell.Buy">订立</el-button>
                     <el-button ref="submitRef" type="primary" :loading="loading"
                         :disabled="!formData.OrderQty || !enableqty || (formData.OrderQty > enableqty)" @click="onSubmit"
                         v-if="formData.BuyOrSell === BuyOrSell.Sell">
-                        <span>转让卖出</span>
+                        <span>转让</span>
                         <span v-if="enableqty">(≤{{ enableqty }})</span>
                     </el-button>
                 </el-form-item>