huangbin před 4 roky
rodič
revize
ae063e874b

+ 8 - 1
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue

@@ -50,6 +50,7 @@ export default defineComponent({
     },
     setup() {
         const isBottom = getShowBottomValue();
+        let cacheID: number | null = null;
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
         const cacheList = ref<WrOrderQuote[]>([]);
@@ -92,10 +93,16 @@ export default defineComponent({
                 haswr: 0,
             };
             Object.assign(param, value);
-            queryTable(queryOrderQuote, param);
+            queryTable(queryOrderQuote, param).then((res) => {
+                cacheList.value = res;
+                if (cacheID) {
+                    filterGoods(cacheID);
+                }
+            });
         }
         // 过滤期货合约商品
         function filterGoods(id: number) {
+            cacheID = id;
             tableList.value = cacheList.value.filter((el) => el.goodsid === id);
         }
         function buyOpen(value: any, goods: Goods) {

+ 8 - 1
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -50,6 +50,7 @@ export default defineComponent({
     },
     setup() {
         const isBottom = getShowBottomValue();
+        let cacheID: number | null = null;
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
         const cacheList = ref<WrOrderQuote[]>([]);
@@ -93,10 +94,16 @@ export default defineComponent({
                 haswr: 1,
             };
             Object.assign(param, value);
-            queryTable(queryOrderQuote, param);
+            queryTable(queryOrderQuote, param).then((res) => {
+                cacheList.value = res;
+                if (cacheID) {
+                    filterGoods(cacheID);
+                }
+            });
         }
         // 过滤期货合约商品
         function filterGoods(id: number) {
+            cacheID = id;
             tableList.value = cacheList.value.filter((el) => el.goodsid === id);
         }
         function buyOpen(value: any, goods: Goods) {