huangbin 4 năm trước cách đây
mục cha
commit
15a17e6fa5

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
     "apiUrl": "http://192.168.31.139:8080/cfg?key=test_139"
-}
+}

+ 4 - 3
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -236,7 +236,7 @@ export default defineComponent({
             // 可用资金
             const temp = +canUseMoney();
             const money = temp > 0 ? temp : 0;
-            const price = isFloat() ? getQuoteDayInfoByCodeFindPrice(goodscode) : formState.FixedPrice;
+            const price = isFloat() ? getQuoteDayInfoByCodeFindPrice(props.selectedRow.refgoodscode) : formState.FixedPrice;
             if (marginType && money && price && price !== '--') {
                 // 保证金方式 1:比率 2:固定
                 if (marginType === 1) {
@@ -254,7 +254,8 @@ export default defineComponent({
         // 估算价
         function getPrice() {
             let result = '--';
-            const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
+            const goodsPrice = getQuoteDayInfoByCodeFindPrice(props.selectedRow.refgoodscode);
+            console.log('goodsPrice', goodsPrice);
             if (goodsPrice && goodsPrice !== '--') {
                 // 有实时行情价格
                 result = ((goodsPrice as number) + formState.PriceMove).toFixed(2);
@@ -304,7 +305,7 @@ export default defineComponent({
                 if (isFloat()) {
                     // 浮动价
                     param.MarketMaxSub = res.PriceMove; // 基差
-                    param.OrderPrice = +getQuoteDayInfoByCodeFindPrice(goodscode)!;
+                    param.OrderPrice = +getQuoteDayInfoByCodeFindPrice(props.selectedRow.refgoodscode)!;
                 }
                 requestResultLoadingAndInfo(diaoQiOrder, param, loading, ['挂牌求购成功', '挂牌求购失败:']).then(() => {
                     cancel(true);

+ 4 - 0
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/setup.ts

@@ -21,6 +21,10 @@ export const useUserType = () => {
 export const isInstitution = () => {
     return getUserAccountType() === UserType.institution
 }
+// 判断是否是 投资者
+export const isInvestment = () => {
+    return getUserAccountType() === UserType.investment
+}
 
 // 交易账号
 export function useBlocksAccount<T extends { accountid: number | undefined }>(formState: UnwrapRef<T>) {

+ 2 - 2
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/index.vue

@@ -112,14 +112,14 @@ export default defineComponent({
         };
 
         // 行情按需订阅
-        let stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList);
+        let stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList, 'refgoodscode');
         // 过滤标的合约
         function goodsChange(value: string) {
             filterGoodsList(value);
             // 停止上次订阅
             stopSubcribe();
             // 重新发起订阅
-            stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList);
+            stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList, 'refgoodscode');
         }
         return {
             isBottom,

+ 2 - 2
src/views/order/commodity_contract/components/commodity_contract_summary/index.vue

@@ -69,7 +69,7 @@ import { useHolderprice, useProfitloss } from '@/services/bus/holdPosition';
 import { queryTradePosition } from '@/services/go/ermcp/order';
 import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
 import { getBuyOrSellName, getChannelBuildName } from '@/common/constants/enumsName';
-import { isInstitution } from '@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/setup';
+import { isInvestment } from '@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/setup';
 import { useIsDiaoQi, findGoodsCode } from './setup';
 import { getSwapList } from '@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/setup';
 import { ref } from 'vue';
@@ -246,7 +246,7 @@ export default defineComponent({
             const listing = ['commodity_contract_summary_transfer', 'commodity_contract_summary_settlement'];
             // 贸易圈
             // 只有机构 才有平仓
-            const diaoqi = isInstitution() ? ['commodity_contract_summary_deal_closed', 'commodity_contract_summary_order_closed'] : ['commodity_contract_summary_deal_closed'];
+            const diaoqi = isInvestment() ? ['commodity_contract_summary_deal_closed', 'commodity_contract_summary_order_closed'] : ['commodity_contract_summary_deal_closed'];
             const arr = findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi ? diaoqi : listing;
             return btnList.filter((e) => arr.includes(e.code));
         }