|
|
@@ -11,7 +11,7 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="合约">
|
|
|
- <a-select class="inlineFormSelect" placeholder="请选择" v-model:value="formData.GoodsID" @change="goodsChange">
|
|
|
+ <a-select class="inlineFormSelect" placeholder="请选择" :filterOption="filterOption" show-search v-model:value="formData.GoodsID" @change="goodsChange">
|
|
|
<a-select-option v-for="item in goodsList" :value="item.goodsid" :key="item.goodsid">{{ item.goodsname }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
@@ -49,7 +49,6 @@
|
|
|
</a-button>
|
|
|
<!--如果有持仓则显示按钮-->
|
|
|
<a-button :loading="loading" @click="submit('close')" v-show="positionList.length">
|
|
|
- <span>优先平今</span>
|
|
|
<span>平仓</span>
|
|
|
</a-button>
|
|
|
</div>
|
|
|
@@ -70,14 +69,13 @@ import Drawer from '@/common/components/drawer/index.vue';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
|
|
|
import { defineComponent, ref, computed } from 'vue';
|
|
|
-import { handleForm } from './setup';
|
|
|
+import { handleForm, getColumns } from './setup';
|
|
|
import { channelOrderReq } from '@/services/proto/futures';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
import { BuyOrSell, BuildType, PriceType } from '@/common/constants/enumCommon';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { GoodsQuote } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
import { getGoodsQuoteList } from '@/services/bus/goods';
|
|
|
-import { getColumns } from '@/views/order/futures_information/components/futures_information_position/columns';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
@@ -97,7 +95,7 @@ export default defineComponent({
|
|
|
},
|
|
|
},
|
|
|
setup(props, context) {
|
|
|
- const goodsList = getGoodsQuoteList(props.exchangeId);
|
|
|
+ const goodsList = getGoodsQuoteList();
|
|
|
const getGoods = (id: number) => goodsList.find((item) => item.goodsid === id)!;
|
|
|
// 当前选中的商品合约
|
|
|
const selectedGoods = ref<GoodsQuote>(getGoods(props.goodsId));
|
|
|
@@ -187,6 +185,11 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 搜索商品合约
|
|
|
+ function filterOption(input: string, option: any) {
|
|
|
+ return option.children[0].children.includes(input);
|
|
|
+ }
|
|
|
+
|
|
|
// 选择商品合约
|
|
|
function goodsChange(id: number) {
|
|
|
formData.OrderPrice = 0;
|
|
|
@@ -297,6 +300,7 @@ export default defineComponent({
|
|
|
priceTypeList,
|
|
|
PriceType,
|
|
|
selectedPriceType,
|
|
|
+ filterOption,
|
|
|
priceTypeChange,
|
|
|
getColumns,
|
|
|
onSelectChange,
|