Преглед изворни кода

修改销售合同 套保交易

li.shaoyi пре 3 година
родитељ
комит
399a28211d
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      src/views/business/sell/list/all/index.vue

+ 4 - 2
src/views/business/sell/list/all/index.vue

@@ -60,6 +60,7 @@ import { formatTime, formatValue } from '@/common/methods';
 import { getTableButton } from '@/common/setup/table/button';
 import { useRoute } from 'vue-router';
 import { getBizTypeName, getPriceTypeName } from '@/common/constants/enumsName';
+import { useTradeAccount } from '@/hooks/account'
 
 export default defineComponent({
   name: EnumRouterName.sell_pending,
@@ -112,14 +113,15 @@ export default defineComponent({
       }
     };
 
+    const { tradeAccountList } = useTradeAccount();
     // 处理按钮显示
     function handleBtnList(item: Ermcp3SellBuyContract) {
-      if (item) {
+      if (item && tradeAccountList.length) {
         if (item.goodsid) {
           return buttons;
         }
-        return buttons.filter((e) => e.code !== 'sell_pending_trade');
       }
+      return buttons.filter((e) => e.code !== 'sell_pending_trade');
     }
 
     // 表格通用逻辑