Handy_Cao 1 年之前
父節點
當前提交
de7900ee65

+ 2 - 2
src/packages/pc/components/modules/goods-detail/index.vue

@@ -9,8 +9,7 @@
                     </div>
                     <ul class="breadcrumb" v-if="quote">
                         <li>
-                            <span>{{ quote.goodscode }}</span>
-                            <span>{{ quote.goodsname }}</span>
+                            <span>{{ goodsdisplay(quote.goodscode) }}</span>
                         </li>
                     </ul>
                     <div class="buttonbar">
@@ -55,6 +54,7 @@ const props = defineProps({
 
 const emit = defineEmits(['closed'])
 const futuresStore = useFuturesStore()
+const { goodsdisplay } = useFuturesStore()
 const quote = futuresStore.getGoodsQuote(props.goodsId)
 const active = shallowRef(true)
 

+ 2 - 2
src/packages/pc/components/modules/quote/price/index.vue

@@ -2,8 +2,7 @@
     <div class="app-quote-price" v-if="quote">
         <div class="app-quote-price__main">
             <div class="block-top">
-                <span>{{ quote.goodscode }}</span>
-                <span>{{ quote.goodsname }}</span>
+                <span>{{ goodsdisplay(quote.goodscode) }}</span>
             </div>
             <div class="block-bottom">
                 <div class="block-bottom-left">
@@ -92,6 +91,7 @@ const props = defineProps({
 
 const globalStore = useGlobalStore()
 const futuresStore = useFuturesStore()
+const { goodsdisplay } = useFuturesStore()
 const quote = futuresStore.getGoodsQuote(props.goodsCode)
 const { t } = i18n.global
 

+ 4 - 2
src/packages/pc/views/footer/pricing/order/index.vue

@@ -11,7 +11,7 @@
         </template>
         <!-- 商品代码/名称 -->
         <template #goodsname="{ row }">
-            {{ row.goodscode }}
+            {{ goodsdisplay(row.goodscode) }}
         </template>
          <!-- 方向 -->
          <template #buyorsell="{ value }">
@@ -48,7 +48,7 @@ import { queryTradeOrderDetail } from '@/services/api/order'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
 import { getWRTradeOrderStatusName, getBuyOrSellName } from '@/constants/order'
-import { useTableColumnsStore, i18n } from '@/stores'
+import { useTableColumnsStore, i18n, useFuturesStore } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import eventBus from '@/services/bus'
 
@@ -60,6 +60,8 @@ const componentMap = new Map<string, unknown>([
 const { tableList, showLoadMore, initTableData, loadMore } = useLocalPagination<Model.TradeOrderDetailRsp>()
 const { rowKey, expandKeys } = useComposeTable<Model.TradeOrderDetailRsp>({ rowKey: 'orderid' })
 
+const { goodsdisplay } = useFuturesStore()
+
 const tableRef = ref()
 const selectedRows = ref<Model.TradeOrderDetailRsp[]>([])
 const { t } = i18n.global

+ 11 - 1
src/stores/modules/futures.ts

@@ -494,6 +494,15 @@ export const useFuturesStore = defineStore(() => {
         })
     })
 
+    // 商品显示
+    const goodsdisplay = (code: string | number) => {
+        const item = getGoods(code)
+        if (item) {
+            return item.trademode != 10 ? item.goodscode+'/'+item.goodsname : item.goodscode
+        }
+        return '--'
+    }
+
     return {
         ...toRefs(state),
         marketGoodsList,
@@ -511,6 +520,7 @@ export const useFuturesStore = defineStore(() => {
         updateQuotation,
         quoteWatch,
         quotePushNotify,
-        getGoods
+        getGoods,
+        goodsdisplay
     }
 })