Pārlūkot izejas kodu

错误 #96635 出入库登记功能界面,已经停用的现货品种也可以选择

Administrator 4 gadi atpakaļ
vecāks
revīzija
07de63cea5
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/views/search/inventory/components/add/setup.ts

+ 2 - 2
src/views/search/inventory/components/add/setup.ts

@@ -78,7 +78,7 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
     function getDeliveryGoods() {
         QueryDeliveryGoods({}).then(res => {
             console.log('查询现货商品', res);
-            deliveryGoodsList.value = res;
+            deliveryGoodsList.value = res.filter(x=>x.isvalid === 1);
         }).catch(err => {
             message.error(err)
         })
@@ -98,7 +98,7 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
 
     // 查询现货商品详情
     function getDeliveryGoodsDetail(deliverygoodsid: number) {
-        const temp = APP.get('DeliveryGoodsList').find((e: ErmcpDeliveryGoodsDetailEx) => e.data.deliverygoodsid === deliverygoodsid)
+        const temp = APP.get('DeliveryGoodsList').find((e: ErmcpDeliveryGoodsDetailEx) => e.data.deliverygoodsid === deliverygoodsid && e.data.isvalid == 1)
         if (temp) {
             gblist.value = temp.gblist
             gmlist.value = temp.gmlist