Handy_Cao 1 년 전
부모
커밋
f9c2e7e01b

+ 9 - 2
src/packages/mobile/views/order/position/components/pricing/detail2/Index.vue

@@ -64,7 +64,7 @@
                         </div>
                         <div class="g-order-list__btnbar" v-if="item.tHDetailEx.holderQty">
                             <Button size="small" v-if="enableqty(item) != 0 && !onlyDelivery" @click="showComponent('close', item)" round>{{ $t('operation.close') }}</Button>
-                            <Button size="small" @click="showComponent('delivery', item)" round>{{ $t('operation.delivery') }}</Button>
+                            <Button size="small" v-if="deliveryflag(item) != 0" @click="showComponent('delivery', item)" round>{{ $t('operation.delivery') }}</Button>
                         </div>
                     </div>
                 </div>
@@ -82,7 +82,7 @@ import { useComponent } from '@/hooks/component'
 import { getBuyOrSellName } from '@/constants/order'
 import { formatDecimal, formatDate, handlePriceColor } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
-import { useSBYJOrderStore } from '@/stores'
+import { useSBYJOrderStore, useFuturesStore } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import eventBus from '@/services/bus'
@@ -100,6 +100,13 @@ const refresh = shallowRef(false) // 是否刷新父组件数据
 const { getSBYJMyOrders, $toRefs } = useSBYJOrderStore()
 const { orderComputedList, loading, error } = $toRefs()
 
+const futuresStore = useFuturesStore()
+
+const deliveryflag = (item: Model.SBYJMyOrderRsp) => {
+    const { deliveryflag } = futuresStore.getGoods(item.goodsCode) ?? {}
+    return deliveryflag
+}
+
 const componentMap = new Map<string, unknown>([
     ['close', defineAsyncComponent(() => import('./components/transfer/Index.vue'))],
     ['delivery', defineAsyncComponent(() => import('./components/delivery/Index.vue'))],

+ 14 - 4
src/packages/pc/views/footer/pricing/detail2/index.vue

@@ -20,8 +20,7 @@ import { getBuyOrSellName } from '@/constants/order'
 import { formatDecimal, formatDate, handlePriceColor } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useComponent } from '@/hooks/component'
-import { i18n } from '@/stores'
-import { useSBYJOrderStore } from '@/stores'
+import { useSBYJOrderStore, useFuturesStore, i18n } from '@/stores'
 import AppTableV2 from '@pc/components/base/table-v2/index.vue'
 
 const componentMap = new Map<string, unknown>([
@@ -34,6 +33,12 @@ const t = i18n.global.t
 const selectedRow = shallowRef<Model.SBYJMyOrderRsp>()
 
 const sbyjOrderStore = useSBYJOrderStore()
+const futuresStore = useFuturesStore()
+
+const deliveryflag = (item: Model.SBYJMyOrderRsp) => {
+    const { deliveryflag } = futuresStore.getGoods(item.goodsCode) ?? {}
+    return deliveryflag
+}
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => sbyjOrderStore.getSBYJMyOrders())
 
@@ -111,9 +116,14 @@ const tableColumns = shallowRef<Partial<Column>[]>([
         title: t('common.operate'),
         width: 190,
         fixed: TableV2FixedDir.RIGHT,
-        cellRenderer: ({ rowData }) => <>
+        cellRenderer: ({ rowData }) => <> 
             <el-button type="danger" size="small" onClick={() => showComponent('transfer', rowData)}>{t('operation.close')}</el-button>
-            <el-button type="primary" size="small" onClick={() => showComponent('delivery', rowData)}>{t('operation.delivery')}</el-button>
+        {
+            
+            deliveryflag(rowData) != 0 && <el-button type="primary" size="small" onClick={() => showComponent('delivery', rowData)}>{t('operation.delivery')}</el-button>
+        }
+            
+            
         </>
     },
 ])