|
|
@@ -9,7 +9,7 @@
|
|
|
:customRow="Rowclick"
|
|
|
:expandIcon="expandIcon"
|
|
|
:expandIconAsCell="false"
|
|
|
- rowKey="key"
|
|
|
+ rowKey="orderid"
|
|
|
:data-source="tableList">
|
|
|
<!-- , -->
|
|
|
<!-- 额外的展开行 -->
|
|
|
@@ -36,28 +36,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
-import { ComposeTableParam, BtnList, defineComponent, handleComposeTable, queryTableList, ModalEnum } from '@/common/export/commonTable';
|
|
|
-import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
-import { queryOrderQuoteDetail } from '@/services/go/wrtrade';
|
|
|
-import { QueryOrderQuoteDetailReq, WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
|
|
|
-import { defineAsyncComponent, PropType } from 'vue';
|
|
|
-import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
+import { getShowBottomValue } from '@/common/config/constrolBottom';
|
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
|
+import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
+import { BtnList, ComposeTableParam, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
|
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
-import { ColumnType } from '@/common/methods/table/interface';
|
|
|
-import { Moment } from 'moment';
|
|
|
-import moment from 'moment';
|
|
|
-import { getShowBottomValue } from '@/common/config/constrolBottom';
|
|
|
-import { queryTjmdTradeOrderDetail } from '@/services/go/Tjmd';
|
|
|
-import { QueryTjmdTradeOrderDetailReq, QueryTjmdTradeOrderDetailRsp } from '@/services/go/Tjmd/interface';
|
|
|
import { getUserId } from '@/services/bus/account';
|
|
|
import { getUserAccountType } from '@/services/bus/user';
|
|
|
-import { useBuyOrSellBtnList, getBuyOrSellMarketPrice, sortPirce } from '../setup';
|
|
|
-import { findItemGoods } from '../../setup';
|
|
|
-import { RefGoodsList } from '../../interface';
|
|
|
-import { sortTime } from '@/utils/time';
|
|
|
+import { queryTjmdTradeOrderDetail } from '@/services/go/Tjmd';
|
|
|
+import { QueryTjmdTradeOrderDetailReq, QueryTjmdTradeOrderDetailRsp } from '@/services/go/Tjmd/interface';
|
|
|
+import { WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
|
|
|
import TimerUtils from '@/utils/timer/timerUtil';
|
|
|
+import { defineAsyncComponent, onBeforeUnmount, PropType } from 'vue';
|
|
|
+import { RefGoodsList } from '../../interface';
|
|
|
+import { findItemGoods } from '../../setup';
|
|
|
+import { getBuyOrSellMarketPrice, sortPirce, useBuyOrSellBtnList, hasFloat } from '../setup';
|
|
|
|
|
|
const columns = [
|
|
|
{
|
|
|
@@ -131,10 +124,20 @@ export default defineComponent({
|
|
|
goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
|
|
|
};
|
|
|
queryTable(queryTjmdTradeOrderDetail, param).then((res) => {
|
|
|
- console.log('ddddddddddddddddddd', res);
|
|
|
- tableList.value = sortPirce(res);
|
|
|
+ // 先置空 要不然数据变更了,视图不更新
|
|
|
+ const fn = () => {
|
|
|
+ tableList.value = [];
|
|
|
+ tableList.value = sortPirce(res, props.parantSelectedRow);
|
|
|
+ };
|
|
|
+ if (hasFloat(res)) {
|
|
|
+ // 有浮动价, 则每三秒更新一次数据
|
|
|
+ TimerUtils.setInterval(fn, 3 * 1000, 'buyMarket');
|
|
|
+ }
|
|
|
});
|
|
|
};
|
|
|
+ onBeforeUnmount(() => {
|
|
|
+ TimerUtils.clearInterval('buyMarket');
|
|
|
+ });
|
|
|
// 表格通用逻辑
|
|
|
const param: ComposeTableParam = {
|
|
|
queryFn: queryTableAction,
|