|
|
@@ -3,6 +3,7 @@
|
|
|
<div class="topTableHeight">
|
|
|
<Filter :enumName="name"
|
|
|
@search="search"
|
|
|
+ @filterGoods="filterGoods"
|
|
|
@buy="buyOpen" />
|
|
|
<a-table :columns="columns"
|
|
|
:class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
|
|
|
@@ -35,6 +36,7 @@ import Filter from '../../components/filter/index.vue';
|
|
|
import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
import { getShowBottomValue } from '@/common/config/constrolBottom';
|
|
|
import Bus from '@/utils/eventBus/index';
|
|
|
+import { ref } from 'vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: EnumRouterName.warehouse_receipt_trade_floating_price,
|
|
|
@@ -50,13 +52,16 @@ export default defineComponent({
|
|
|
const isBottom = getShowBottomValue();
|
|
|
// 表格列表数据
|
|
|
const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
|
|
|
+ const cacheList = ref<WrOrderQuote[]>([]);
|
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => {
|
|
|
const param: QueryOrderQuoteReq = {
|
|
|
wrpricetype: 2,
|
|
|
haswr: 1,
|
|
|
};
|
|
|
- queryTable(queryOrderQuote, param);
|
|
|
+ queryTable(queryOrderQuote, param).then((res) => {
|
|
|
+ cacheList.value = res;
|
|
|
+ });
|
|
|
};
|
|
|
Bus.$on('spotTrade', queryTableAction);
|
|
|
// 表格通用逻辑
|
|
|
@@ -82,6 +87,7 @@ export default defineComponent({
|
|
|
firstBtn, // 表格按钮
|
|
|
} = handleComposeTable<WrOrderQuote>(param);
|
|
|
function search(value: Object) {
|
|
|
+ console.log('value', value);
|
|
|
const param: QueryOrderQuoteReq = {
|
|
|
wrpricetype: 2,
|
|
|
haswr: 1,
|
|
|
@@ -89,6 +95,10 @@ export default defineComponent({
|
|
|
Object.assign(param, value);
|
|
|
queryTable(queryOrderQuote, param);
|
|
|
}
|
|
|
+ // 过滤期货合约商品
|
|
|
+ function filterGoods(id: number) {
|
|
|
+ tableList.value = cacheList.value.filter((el) => el.goodsid === id);
|
|
|
+ }
|
|
|
function buyOpen(value: any, goods: Goods) {
|
|
|
componentId.value = 'postBuying';
|
|
|
value.goodsid = goods.goodsid;
|
|
|
@@ -114,6 +124,7 @@ export default defineComponent({
|
|
|
tableList,
|
|
|
search,
|
|
|
buyOpen,
|
|
|
+ filterGoods,
|
|
|
};
|
|
|
},
|
|
|
});
|