|
@@ -152,34 +152,26 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, PropType, ref } from 'vue';
|
|
|
|
|
import { Des } from '@/common/components/commonDes';
|
|
import { Des } from '@/common/components/commonDes';
|
|
|
-import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
|
|
-import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
|
-import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
-import { hdWROrder } from '@/services/proto/warehousetrade';
|
|
|
|
|
|
|
+import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
-import { DGFactoryItems, HdWRDealOrderReq, WrBargainApplyReq, WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
|
|
|
|
|
-import { getAccountTypeList, getSelectedAccountId, getUserId } from '@/services/bus/account';
|
|
|
|
|
-import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
-import moment, { Moment } from 'moment';
|
|
|
|
|
-import { getMarketRunByTradeMode, marketIsRun } from '@/services/bus/market';
|
|
|
|
|
-import { QueryOrderQuoteMyqQsp, WrOrderQuote } from '@/services/go/wrtrade/interface';
|
|
|
|
|
-
|
|
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
-
|
|
|
|
|
-import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
|
|
-
|
|
|
|
|
-import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
|
|
|
|
|
-import { getCanUseMoney } from '@/services/bus/account';
|
|
|
|
|
-import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
|
|
|
|
|
-import { handleForm, handleSpotWarrant } from './setup';
|
|
|
|
|
|
|
+import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
|
|
+import { getAccountTypeList, getCanUseMoney, getSelectedAccountId, getUserId } from '@/services/bus/account';
|
|
|
|
|
+import { marketIsRun } from '@/services/bus/market';
|
|
|
import { getRules } from '@/services/bus/rules';
|
|
import { getRules } from '@/services/bus/rules';
|
|
|
-import { ListingForm } from './interface';
|
|
|
|
|
|
|
+import { QueryOrderQuoteMyqQsp } from '@/services/go/wrtrade/interface';
|
|
|
import { HdWRDealOrder, wrBargainApply } from '@/services/proto/warehousetrade';
|
|
import { HdWRDealOrder, wrBargainApply } from '@/services/proto/warehousetrade';
|
|
|
-import Long from 'long';
|
|
|
|
|
|
|
+import { WrBargainApplyReq } from '@/services/proto/warehousetrade/interface';
|
|
|
import Bus from '@/utils/eventBus';
|
|
import Bus from '@/utils/eventBus';
|
|
|
|
|
+import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
+import Long from 'long';
|
|
|
|
|
+import moment from 'moment';
|
|
|
|
|
+import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
+import { defineComponent, PropType, ref } from 'vue';
|
|
|
|
|
+import { ListingForm } from './interface';
|
|
|
|
|
+import { handleForm, handleSpotWarrant } from './setup';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
emits: ['cancel', 'update'],
|
|
emits: ['cancel', 'update'],
|
|
@@ -224,7 +216,7 @@ export default defineComponent({
|
|
|
const price = getPrice();
|
|
const price = getPrice();
|
|
|
const num = getNum();
|
|
const num = getNum();
|
|
|
if (price) {
|
|
if (price) {
|
|
|
- return (price * num).toFixed(2);
|
|
|
|
|
|
|
+ return Math.round(price * num * 100) / 100;
|
|
|
} else {
|
|
} else {
|
|
|
return '--';
|
|
return '--';
|
|
|
}
|
|
}
|
|
@@ -238,7 +230,7 @@ export default defineComponent({
|
|
|
if (price && num && marginvalue) {
|
|
if (price && num && marginvalue) {
|
|
|
result = price * num * marginvalue;
|
|
result = price * num * marginvalue;
|
|
|
}
|
|
}
|
|
|
- return result ? Math.floor(result * 100) / 100 : '--';
|
|
|
|
|
|
|
+ return result ? Math.round(result * 100) / 100 : '--';
|
|
|
}
|
|
}
|
|
|
function getMaxNum() {
|
|
function getMaxNum() {
|
|
|
const qty = props.selectedRow.orderqty;
|
|
const qty = props.selectedRow.orderqty;
|