Jelajahi Sumber

修改 仓单贸易过滤

huangbin 3 tahun lalu
induk
melakukan
0c45d481eb

+ 0 - 1
src/views/market/market-spot/components/buy-sell-market/components/delisting/index.vue

@@ -167,7 +167,6 @@ import { ModalEnum } from '@/common/constants/modalNameEnum';
 import { HdWRDealOrderReq } from '@/services/proto/warehousetrade/interface';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { handleForm, handleNumAndMoney, handleSpotWarrant, getWrPosition } from './setup';
-import { handleIs } from '../../setup';
 import { validateAction } from '@/common/setup/form';
 import { ListingForm, TempWrOrderQuoteDetail } from './interface';
 import { BuyOrSell } from '@/common/constants/enumCommon';

+ 0 - 1
src/views/market/market-spot/components/buy-sell-market/components/financing_delisting/index.vue

@@ -201,7 +201,6 @@ import { handleModalComponent } from '@/common/setup/asyncComponent';
 import { WrFAProductDetail } from '@/services/go/wrtrade/interface';
 import { validateAction } from '@/common/setup/form';
 import { handleNumAndMoney, getWrPosition, selecedFinance } from './setup';
-import { handleIs } from '../../setup';
 import { getCanUseMoney } from '@/services/bus/account';
 import Bus from '@/utils/eventBus/index';
 import { ListingForm } from '@/views/market/market-spot/components/buy-sell-market/components/financing_delisting/interface';

+ 53 - 47
src/views/market/market-spot/components/filter/index.vue

@@ -1,51 +1,58 @@
 <template>
-  <!-- 报表通用过滤 -->
-  <div class="filterTable">
-    <div class="filter-custom-table">
-      <a-tree-select v-model:value="selectedFT"
-                     @select="changeFT"
-                     style="width: 200px"
-                     :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
-                     :tree-data="FtDeliveryGoods"
-                     placeholder="全部商品"
-                     :showCheckedStrategy="ALL"
-                     tree-default-expand-all></a-tree-select>
-      <a-select label-in-value
+    <!-- 报表通用过滤 -->
+    <div class="filterTable">
+        <div class="filter-custom-table">
+            <a-tree-select
+                v-model:value="selectedFT"
+                @select="changeFT"
+                style="width: 200px"
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :tree-data="FtDeliveryGoods"
+                placeholder="全部商品"
+                :showCheckedStrategy="ALL"
+                tree-default-expand-all
+            ></a-tree-select>
+            <a-select
+                label-in-value
                 class="conditionSelect"
                 v-for="(item, index) in wrLsit"
                 :key="index + '11'"
                 style="width: 120px"
                 v-model:value="item.selected"
-                :placeholder="`全部${item.itemtypename}`">
-        <a-select-option v-for="sub in item.itemlst"
-                         :key="sub.dgfactoryitemid">{{sub.dgfactoryitemvalue}}</a-select-option>
-      </a-select>
-      <a-space direction="vertical"
-               v-if="!isWR()">
-        <a-month-picker :allowClear="false"
-                        :style="{marginRight: '10px' }"
-                        placeholder="全部交收月"
-                        v-model:value="time"
-                        class="commonDatePicker conditionPicker allDatePicker" />
-      </a-space>
-      <a-select class="conditionSelect"
-                v-if="isFloat()"
-                :style="{width: '180px', maxHeight: '400px', overflow: 'auto' }"
+                :placeholder="`全部${item.itemtypename}`"
+            >
+                <a-select-option
+                    v-for="sub in item.itemlst"
+                    :key="sub.dgfactoryitemid"
+                >{{ sub.dgfactoryitemvalue }}</a-select-option>
+            </a-select>
+            <a-space direction="vertical" v-if="getAuctionwrType(AuctionwrType.noWr)">
+                <a-month-picker
+                    :allowClear="false"
+                    :style="{ marginRight: '10px' }"
+                    placeholder="全部交收月"
+                    v-model:value="time"
+                    class="commonDatePicker conditionPicker allDatePicker"
+                />
+            </a-space>
+            <a-select
+                class="conditionSelect"
+                v-if="getListingMode(ListingMode.float)"
+                :style="{ width: '180px', maxHeight: '400px', overflow: 'auto' }"
                 @change="goodsChange"
                 v-model:value="goodsid"
-                placeholder="全部期货合约">
-        <a-select-option v-for="item in goodsList"
-                         :value="item.goodsid"
-                         :key="item.goodsid">{{item.goodscode}}({{item.goodsname}})
-        </a-select-option>
-      </a-select>
-      <a-button class="btnDeafault"
-                @click="search(true)"
-                style="width: 80px">筛选</a-button>
-      <a-button class="operBtn"
-                @click="listingAction">挂牌求购</a-button>
+                placeholder="全部期货合约"
+            >
+                <a-select-option
+                    v-for="item in goodsList"
+                    :value="item.goodsid"
+                    :key="item.goodsid"
+                >{{ item.goodscode }}({{ item.goodsname }})</a-select-option>
+            </a-select>
+            <a-button class="btnDeafault" @click="search(true)" style="width: 80px">筛选</a-button>
+            <a-button class="operBtn" @click="listingAction">挂牌求购</a-button>
+        </div>
     </div>
-  </div>
 </template>
 
 <script lang="ts">
@@ -64,10 +71,11 @@ import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/sock
 import { v4 } from 'uuid';
 import { getGoodsList, getGoodsListByTrade, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { handleIs, setGoodsPrice } from '../buy-sell-market/setup';
-import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
+import { setGoodsPrice } from '../buy-sell-market/setup';
 import { getMarketByTradeMode } from '@/services/bus/market';
 import TimerUtils from '@/utils/timer/timerUtil';
+import { getAuctionwrType, getListingMode } from '@/views/market/market-spot/setup'
+import { TradeMode, BuyOrSell, ListingMode, AuctionwrType } from '@/common/constants/enumCommon';
 
 const ALL = TreeSelect.SHOW_ALL;
 
@@ -85,7 +93,6 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
         const loading = ref<boolean>(false);
         // 商品
         const { FtDeliveryGoods } = handleFtDeliveryGoods();
@@ -170,7 +177,7 @@ export default defineComponent({
                     wrResult.push({ dgfactoryitemtypeid, dgfactoryitemid: key });
                 }
             });
-            if (!isWR()) {
+            if (getAuctionwrType(AuctionwrType.noWr)) {
                 // 预售
                 if (time.value) {
                     //   交收月(yyyy-mm) 仓单预售填写
@@ -198,13 +205,13 @@ export default defineComponent({
             }
 
             if (flag) {
-                if (!isWR()) {
+                if (getAuctionwrType(AuctionwrType.noWr)) {
                     if (!time.value) {
                         message.warn('请选中交收月!');
                         return;
                     }
                 }
-                if (isFloat()) {
+                if (getListingMode(ListingMode.float)) {
                     if (!selectedGoods.value) {
                         message.warn('请选中期货合约!');
                         return;
@@ -228,9 +235,8 @@ export default defineComponent({
             time,
             goodsList,
             goodsChange,
-            isWR,
-            isFloat,
             goodsid,
+            getAuctionwrType, getListingMode, ListingMode, AuctionwrType,
         };
     },
 });