diff --git a/src/api/exchange.js b/src/api/exchange.js index e06ab01..7429eb7 100644 --- a/src/api/exchange.js +++ b/src/api/exchange.js @@ -41,6 +41,16 @@ class Exchange { static stockholdPosition(data, config) { return server.get('/stock/holdPosition', {params:data,config} ) } + + // 股票平仓(部分/指定数量) + static stockClosePosition(data, config) { + return server.post('/stock/closePosition', data, config); + } + + // 股票市价全平 + static stockCloseAllPosition(data, config) { + return server.post('/stock/closeAllPosition', data, config); + } } export default Exchange; \ No newline at end of file diff --git a/src/views/exchangeStock/order-list.vue b/src/views/exchangeStock/order-list.vue index 2520151..8837709 100644 --- a/src/views/exchangeStock/order-list.vue +++ b/src/views/exchangeStock/order-list.vue @@ -92,6 +92,7 @@ {{$t("exchange.a8")}} {{$t("exchange.a9")}} {{$t("exchange.a10")}} + {{ $t("common.action") }} @@ -104,6 +105,12 @@ {{item.dayProfit}} {{item.unRealProfit}} {{item.profitRate}} + + + + @@ -242,11 +249,54 @@ + + + + +
+ + + + {{ closeForm.type == 1 ? $t('contract.d9') : $t('contract.e0') }} + +
+
+ + + + +
+ {{ $t('contract.e9') }} {{ activePosition.usable_balance }} +
+ +
+
+ +