|
|
@@ -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>
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
</>
|
|
|
},
|
|
|
])
|