|
|
@@ -71,7 +71,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="order-list__btnbar" v-if="item.tHDetailEx.holderQty">
|
|
|
- <Button type="primary" v-if="enableqty(item)" @click="onCloseSumit(item)">
|
|
|
+ <Button type="primary" v-if="enableqty(item) && [1, 3].includes(goodstradetype(item))" @click="onCloseSumit(item)">
|
|
|
{{ $t('operation.close') }}
|
|
|
</Button>
|
|
|
<Button type="danger" @click="showComponent('delivery', item)">
|
|
|
@@ -93,7 +93,7 @@ import { getFileUrl } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { getBuyOrSellName, BuyOrSell, PriceMode } from '@/constants/order'
|
|
|
import { formatDecimal, formatDate, handleRequestBigNumber, handlePriceColor } from '@/filters'
|
|
|
-import { useSBYJOrderStore, i18n } from '@/stores'
|
|
|
+import { useSBYJOrderStore, i18n, useFuturesStore } from '@/stores'
|
|
|
import { useOrder } from '@/business/trade'
|
|
|
import { dialog, fullloading } from '@/utils/vant'
|
|
|
import { EBuildType, EDelistingType, EListingSelectType, EValidType } from '@/constants/client'
|
|
|
@@ -122,6 +122,7 @@ const componentMap = new Map<string, unknown>([
|
|
|
|
|
|
const selectedRow = shallowRef<Model.SBYJMyOrderRsp>()
|
|
|
const pullRefreshRef = shallowRef()
|
|
|
+const futuresStore = useFuturesStore()
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
pullRefreshRef.value?.refresh()
|
|
|
@@ -132,6 +133,12 @@ const showComponent = (componentName: string, row: Model.SBYJMyOrderRsp) => {
|
|
|
openComponent(componentName)
|
|
|
}
|
|
|
|
|
|
+// 商品交易权限类型 - 1:可建可平 2:可建不可平 3:不可建可平 4:不可建不可平
|
|
|
+const goodstradetype = (item: Model.SBYJMyOrderRsp) => {
|
|
|
+ const goods = futuresStore.getGoods(item.goodsCode)
|
|
|
+ return goods?.goodstradetype ?? 0
|
|
|
+}
|
|
|
+
|
|
|
// 可用重量
|
|
|
const enableqty = (item: Model.SBYJMyOrderRsp) => {
|
|
|
const { tHDetailEx } = item
|
|
|
@@ -141,7 +148,6 @@ const enableqty = (item: Model.SBYJMyOrderRsp) => {
|
|
|
const getImageUrl = (url: string) => {
|
|
|
// debugger
|
|
|
const [firstImg] = url ? url.split(',') : ''
|
|
|
-
|
|
|
return firstImg ? getFileUrl(firstImg) : ''
|
|
|
}
|
|
|
|