|
@@ -40,8 +40,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="market">
|
|
<div class="market">
|
|
|
- <div class="first">IC2104</div>
|
|
|
|
|
- <div class="last red">6291.0</div>
|
|
|
|
|
|
|
+ <div class="first">{{selectedRow.goodscode}}</div>
|
|
|
|
|
+ <div class="last red">{{getGoodsPrice()}}</div>
|
|
|
<LineChartOutlined />
|
|
<LineChartOutlined />
|
|
|
</div>
|
|
</div>
|
|
|
<BtnList :btnList="firstBtn"
|
|
<BtnList :btnList="firstBtn"
|
|
@@ -80,7 +80,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
import { queryOrderQuoteDetail } from '@/services/go/wrtrade';
|
|
import { queryOrderQuoteDetail } from '@/services/go/wrtrade';
|
|
|
import { QueryOrderQuoteDetailReq, WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
|
|
import { QueryOrderQuoteDetailReq, WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
|
|
|
import { LeftOutlined } from '@ant-design/icons-vue';
|
|
import { LeftOutlined } from '@ant-design/icons-vue';
|
|
|
-import { handleBuyAndSellList } from './setup';
|
|
|
|
|
|
|
+import { handleBuyAndSellList, handleChildComponentMethod } from './setup';
|
|
|
import Buy from './components/buy/index.vue';
|
|
import Buy from './components/buy/index.vue';
|
|
|
import Sell from './components/sell/index.vue';
|
|
import Sell from './components/sell/index.vue';
|
|
|
import { LineChartOutlined } from '@ant-design/icons-vue';
|
|
import { LineChartOutlined } from '@ant-design/icons-vue';
|
|
@@ -90,6 +90,7 @@ import { PropType, ref } from 'vue';
|
|
|
import { handleSpotBtnList } from '../../setup';
|
|
import { handleSpotBtnList } from '../../setup';
|
|
|
import { addSubscribeQuotation } from '@/services/socket/quota';
|
|
import { addSubscribeQuotation } from '@/services/socket/quota';
|
|
|
import Bus from '@/utils/eventBus/index';
|
|
import Bus from '@/utils/eventBus/index';
|
|
|
|
|
+import { getQuoteDayInfoByCode } from '@/services/bus/goods';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
emits: ['cancel'],
|
|
emits: ['cancel'],
|
|
@@ -119,21 +120,21 @@ export default defineComponent({
|
|
|
// 买卖大厅 配置数据
|
|
// 买卖大厅 配置数据
|
|
|
// 表格操作按钮列表
|
|
// 表格操作按钮列表
|
|
|
const { firstBtn, buyMarket, sellMarket } = handleSpotBtnList(props.enumName);
|
|
const { firstBtn, buyMarket, sellMarket } = handleSpotBtnList(props.enumName);
|
|
|
- const buyRef = ref<null | { queryTableAction: Function }>(null);
|
|
|
|
|
- const sellRef = ref<null | { queryTableAction: Function }>(null);
|
|
|
|
|
- function loadBuyData() {
|
|
|
|
|
- buyRef.value?.queryTableAction();
|
|
|
|
|
|
|
+ const quoteData = getQuoteDayInfoByCode(props.selectedRow.goodscode);
|
|
|
|
|
+ function getGoodsPrice() {
|
|
|
|
|
+ // const quoteData = getQuoteDayInfoByCode(props.selectedRow.goodscode);
|
|
|
|
|
+ console.log('quoteData', quoteData);
|
|
|
|
|
+ return quoteData ? quoteData.ask : '--';
|
|
|
}
|
|
}
|
|
|
- function loadSellData() {
|
|
|
|
|
- sellRef.value?.queryTableAction();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const { childRef: buyRef, loadChildComponentData: loadBuyData } = handleChildComponentMethod();
|
|
|
|
|
+ const { childRef: sellRef, loadChildComponentData: loadSellData } = handleChildComponentMethod();
|
|
|
const { componentId, closeComponent, openComponent } = handleModalComponent(loadBuyData, ref({}));
|
|
const { componentId, closeComponent, openComponent } = handleModalComponent(loadBuyData, ref({}));
|
|
|
Bus.$on('spotTrade', loadSellData);
|
|
Bus.$on('spotTrade', loadSellData);
|
|
|
return {
|
|
return {
|
|
|
buyRef,
|
|
buyRef,
|
|
|
sellRef,
|
|
sellRef,
|
|
|
cancel,
|
|
cancel,
|
|
|
|
|
+ getGoodsPrice,
|
|
|
visible,
|
|
visible,
|
|
|
firstBtn,
|
|
firstBtn,
|
|
|
buyMarket,
|
|
buyMarket,
|