huangbin 4 years ago
parent
commit
0dcfa4a134

+ 2 - 1
src/views/order/swap_the_order/components/swap_commodity_contract_summary/index.vue

@@ -63,7 +63,7 @@
       </template>
       </template>
       <!-- 持仓盈亏 -->
       <!-- 持仓盈亏 -->
       <template #profitloss="{ record }">
       <template #profitloss="{ record }">
-        <span>{{ record.averageprice ? useProfitloss(record) : '--' }}</span>
+        <span>{{ record.averageprice ? useProfitloss(record, findGoodsCode(record.goodsid, record.goodscode, swapList)) : '--' }}</span>
       </template>
       </template>
       <template #buyorsell="{ record }">
       <template #buyorsell="{ record }">
         <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
         <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
@@ -210,6 +210,7 @@ export default defineComponent({
       detailLoading,
       detailLoading,
       getDetailColums,
       getDetailColums,
       detailTableList,
       detailTableList,
+      findGoodsCode,
       getDetailProfitloss, getDetailMarketAmount, handleQuotePriceColor, clsoeAction
       getDetailProfitloss, getDetailMarketAmount, handleQuotePriceColor, clsoeAction
     };
     };
   },
   },