Handy_Cao 1 年之前
父节点
当前提交
27fc0875bf

+ 2 - 1
src/packages/tss/views/order/delivery/components/offline/Index.vue

@@ -28,7 +28,7 @@
                                 </li>
                                 <li>
                                     <span>{{ $t('position.goods.agreeunit') }}:</span>
-                                    <span>{{ item.agreeunit }}{{ item.goodsunit }}</span>
+                                    <span>{{ item.agreeunit }}{{ getGoodsUnitName(item.goodsunitid) }}</span>
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
@@ -69,6 +69,7 @@ import { queryMineTradeGoodsDeliveryOfflines } from '@/services/api/transfer'
 import { offlineDeliveryApplyCancelOrder } from '@/services/api/trade'
 import { i18n } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getGoodsUnitName } from '@/constants/unit'
 
 const dataList = shallowRef<Model.MineTradeGoodsDeliveryOfflinesRsp[]>([])
 const error = shallowRef(false)

+ 2 - 1
src/packages/tss/views/order/delivery/components/online/Index.vue

@@ -28,7 +28,7 @@
                                 </li>
                                 <li>
                                     <span>{{ $t('position.goods.agreeunit') }}:</span>
-                                    <span>{{ item.agreeunit }}{{ item.goodsunit }}</span>
+                                    <span>{{ item.agreeunit }}{{ getGoodsUnitName(item.goodsunitid) }}</span>
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
@@ -76,6 +76,7 @@ import { offlineDeliveryApplyCancelOrder } from '@/services/api/trade'
 import { i18n } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getDeliveryOrderStatusName } from '@/constants/order'
+import { getGoodsUnitName } from '@/constants/unit'
 
 const dataList = shallowRef<Model.MineTradeGoodsDeliveryOfflinesRsp[]>([])
 const error = shallowRef(false)

+ 2 - 1
src/packages/tss/views/order/delivery/components/spot/Index.vue

@@ -28,7 +28,7 @@
                                 </li>
                                 <li>
                                     <span>{{ $t('position.goods.agreeunit') }}:</span>
-                                    <span>{{ item.agreeunit }}{{ item.goodsunit }}</span>
+                                    <span>{{ item.agreeunit }}{{ getGoodsUnitName(item.goodsunitid) }}</span>
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
@@ -76,6 +76,7 @@ import { offlineDeliveryApplyCancelOrder } from '@/services/api/trade'
 import { i18n } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getDeliveryOrderStatusName } from '@/constants/order'
+import { getGoodsUnitName } from '@/constants/unit'
 
 const dataList = shallowRef<Model.MineTradeGoodsDeliveryOfflinesRsp[]>([])
 const error = shallowRef(false)

+ 9 - 3
src/packages/tss/views/order/position/Index.vue

@@ -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) : ''
 }
 

+ 1 - 1
src/types/model/transfer.d.ts

@@ -326,7 +326,7 @@ declare namespace Model {
         goodsnameth: string; //
         goodsnamedisplay: string; // 商品名称
         goodsunit: string; // 单位
-        goodunitid: number; // 单位id
+        goodsunitid: number; // 单位id
         marketid: number; // 市场ID
         matchaccountid: number; // 对手方AccountID
         matchuserid: number; // 对手方UserID