Просмотр исходного кода

修改 挂单时候 过滤未上市商品

huangbin 4 лет назад
Родитель
Сommit
6f533a5d9b

+ 6 - 0
src/services/bus/goods.ts

@@ -12,6 +12,12 @@ export function getGoodsList(): Goods[] {
     return APP.get('Goods')
 }
 
+// 获取全部上市 商品信息
+export function getIPOGoodsList(): Goods[] {
+    //商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
+    return getGoodsList().filter(e => e.goodsstatus === 1)
+}
+
 // 通过trademode 获取商品
 export function getGoodsListByTrade(trademode: TradeMode): Ref<Goods[]> {
     const result = ref<Goods[]>([])

+ 2 - 2
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/setup.ts

@@ -1,7 +1,7 @@
 import { TradeMode } from '@/common/constants/enumCommon';
 import { validateCommon } from '@/common/setup/validate';
 import { handleForm as useForm } from '@/common/setup/warehouse_receipt_trade/listing';
-import { getGoodsGroupsByTradeMode, getGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { getGoodsGroupsByTradeMode, getIPOGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
 import { getRules } from '@/services/bus/rules';
 import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
 import { WrPosition } from "@/services/go/wrtrade/interface";
@@ -71,7 +71,7 @@ export function handleForm(data: WrPosition) {
 const goodsList = ref<Goods[]>([])
 export function handleGoods() {
     const goodsGroup = getGoodsGroupsByTradeMode(TradeMode.quote99);
-    const allGoods = getGoodsList()
+    const allGoods = getIPOGoodsList()
     function groupsChange(id: number) {
         goodsList.value = allGoods.filter(e => e.goodsgroupid === id)
     }

+ 2 - 2
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts

@@ -1,7 +1,7 @@
 import { TradeMode } from '@/common/constants/enumCommon';
 import { validateCommon } from '@/common/setup/validate';
 import { handleForm as useForm } from '@/common/setup/warehouse_receipt_trade/listing';
-import { getGoodsGroupsByTradeMode, getGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { getGoodsGroupsByTradeMode, getIPOGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
 import { getRules } from '@/services/bus/rules';
 import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
 import { WrHoldLB } from "@/services/go/wrtrade/interface";
@@ -71,7 +71,7 @@ export function handleForm(data: WrHoldLB) {
 const goodsList = ref<Goods[]>([])
 export function handleGoods() {
     const goodsGroup = getGoodsGroupsByTradeMode(TradeMode.quote99);
-    const allGoods = getGoodsList()
+    const allGoods = getIPOGoodsList()
     function groupsChange(id: number) {
         goodsList.value = allGoods.filter(e => e.goodsgroupid === id)
     }