Handy_Cao пре 1 година
родитељ
комит
61710cbab2

+ 14 - 1
src/packages/mobile/views/order/position/components/pricing/detail2/components/delivery/Index.vue

@@ -10,7 +10,7 @@
             <Form ref="formRef" class="g-form__container" @submit="onDeliverySumit">
                 <CellGroup :title="$t('position.goods.subtitle')" :inset="insetStyle">
                     <Cell :title="$t('position.goods.orderid')" :value="`${selectedRow.tHDetailEx.tradeID}`" />
-                    <Cell :title="$t('position.goods.goodsname')" :value="`${selectedRow.goodsCode}`" />
+                    <Cell :title="$t('position.goods.goodsname')" :value="`${goodsname}`" />
                     <Cell :title="$t('position.goods.agreeunit')"
                         :value="`${selectedRow.agreeUnit}${selectedRow.goodsUnit}`" />
                     <Cell :title="$t('position.goods.buyorsell')"
@@ -100,6 +100,19 @@ const goods = futuresStore.getGoods(props.selectedRow.goodsCode)
 const quote = futuresStore.getGoodsQuote(props.selectedRow.goodsCode)
 const { mindeliverylot = 0 } = goods ?? {}
 
+const goodsname = computed(() => {
+    switch (i18n.global.locale) {
+        case 'zh-CN':
+            return props.selectedRow.goodsName
+        case 'en-US':
+            return props.selectedRow.goodsnameen
+        case 'zh-TW':
+            return props.selectedRow.goodsnametw
+        default:
+            return props.selectedRow.goodsnameth
+    }
+})
+
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
     DeliveryLot: [{

+ 21 - 6
src/packages/mobile/views/pricing/trade/v2/Index.vue

@@ -116,11 +116,26 @@ const orderQty = shallowRef(qtyStepList.value[0]) // 默认数量
 
 // 订单模型列表
 const orderTypeStepList = computed(() => {
-    return [
-        { label: '全款', value: 1 },
-        { label: '预付款', value: 2 },
-        { label: '回购', value: 3 }
-    ]
+    const goodsids = collection?.configs.map(e => e.goodsid) ?? []
+    const goods = futuresStore.getGoodsListByGoodsID(goodsids)
+    const hasFull = (goods.some(e => e.trademode === 53))
+    const hasPre = (goods.some(e => e.trademode === 10))
+    if (hasFull && hasPre) {
+        return [
+            { label: '全款', value: 1 },
+            { label: '预付款', value: 2 },
+            { label: '回购', value: 3 }
+        ]
+    } else if (!hasFull && hasPre) {
+        return [
+            { label: '预付款', value: 2 },
+            { label: '回购', value: 3 }
+        ]
+    } else {
+        return [
+            { label: '全款', value: 1 },
+        ]
+    }
 })
 // 订单模型
 const orderType = shallowRef(orderTypeStepList.value[0].value)
@@ -249,7 +264,7 @@ const onSubmit = () => {
 
 onMounted(() => {
     // 默认第一个商品集合的第一个商品
-    onOrderTypeRadioChange(1)
+    onOrderTypeRadioChange(orderType.value)
     // 订阅商品行情
     subscribe.start(quote.value?.goodscode ?? '')
 })

+ 17 - 5
src/packages/tss/views/order/position/Index.vue

@@ -17,7 +17,7 @@
                 <div class="order-list__box" v-for="(item, index) in orderComputedList" :key="index">
                     <div class="order-list__titlebar">
                         <div class="left">
-                            <b>{{ item.goodsCode }}</b>
+                            <b>{{ goodsname(item)}}</b>
                             <span>{{ formatDate(item.tHDetailEx.tradeTime) }}</span>
                         </div>
                         <div :class="['right', !item.tHDetailEx.buyOrSell ? 'buy' : 'sell']">
@@ -43,7 +43,7 @@
                                     </li>
                                     <li>
                                         <span>{{ $t('position.goods.holddetail.holderqty') }}:</span>
-                                        <span>{{ enableqty(item) + getGoodsUnitName(item.goodsUnitID) }}</span>
+                                        <span>{{ enableqty(item) }}</span>
                                     </li>
                                     <li>
                                         <span>{{ $t('position.goods.preamounts') }}:</span>
@@ -93,7 +93,6 @@ import { getFileUrl } from '@/filters'
 import { useComponent } from '@/hooks/component'
 import { getBuyOrSellName, BuyOrSell, PriceMode } from '@/constants/order'
 import { formatDecimal, formatDate, handleRequestBigNumber, handlePriceColor } from '@/filters'
-import { getGoodsUnitName } from '@/constants/unit'
 import { useSBYJOrderStore, i18n } from '@/stores'
 import { useOrder } from '@/business/trade'
 import { dialog, fullloading } from '@/utils/vant'
@@ -134,8 +133,8 @@ const showComponent = (componentName: string, row: Model.SBYJMyOrderRsp) => {
 
 // 可用重量
 const enableqty = (item: Model.SBYJMyOrderRsp) => {
-    const { tHDetailEx, agreeUnit } = item
-    return (tHDetailEx.holderQty - tHDetailEx.freezeQty) * agreeUnit
+    const { tHDetailEx } = item
+    return tHDetailEx.holderQty - tHDetailEx.freezeQty
 }
 
 const getImageUrl = (url: string) => {
@@ -145,6 +144,19 @@ const getImageUrl = (url: string) => {
     return firstImg ? getFileUrl(firstImg) : ''
 }
 
+const goodsname = (item: Model.SBYJMyOrderRsp) => {
+    switch (i18n.global.locale) {
+        case 'zh-CN':
+            return item.goodsName
+        case 'en-US':
+            return item.goodsnameen
+        case 'zh-TW':
+            return item.goodsnametw
+        default:
+            return item.goodsnameth
+    }
+}
+
 const onCloseSumit = (item: Model.SBYJMyOrderRsp) => {
     dialog({
         message: t('position.goods.tips3'),

+ 6 - 0
src/types/model/order.d.ts

@@ -1566,6 +1566,12 @@ declare namespace Model {
         goodsCode: string;
         /// 商品名称
         goodsName: string;
+        //
+        goodsnameen: string; 
+        //
+        goodsnametw: string; 
+        //
+        goodsnameth: string; 
         /// 单位
         goodsUnitID: number;
         /// 合约单位