Handy_Cao 1 year ago
parent
commit
d616ae0e87

+ 1 - 1
oem/tss/locales/extras/zh-CN.json

@@ -81,7 +81,7 @@
             "deliveryprice": "订单价格",
             "deliveryinfo": "收货地址",
             "deliveryinfo1": "提货信息",
-            "deliveryinfo2": "货信息",
+            "deliveryinfo2": "货信息",
             "deliveryamount": "订单货款"
         }
     },

+ 1 - 1
oem/tss/locales/extras/zh-TW.json

@@ -81,7 +81,7 @@
             "deliveryprice": "訂單價格",
             "deliveryinfo": "收貨地址",
             "deliveryinfo1": "提貨信息",
-            "deliveryinfo2": "貨信息",
+            "deliveryinfo2": "貨信息",
             "deliveryamount": "訂單貨款"
         }
     },

+ 10 - 10
src/packages/mobile/views/pricing/trade/fullpayment/Index.vue

@@ -50,21 +50,21 @@
                 <ul class="order-total__center">
                     <li>
                         <span>订单金额:</span>
-                        <span>{{ handleNumberValue(formatDecimal(totalAmount)) }}</span>
+                        <span>{{ formatDecimal(totalAmount) }}</span>
                     </li>
                     <li>
                         <span>订单服务费:</span>
-                        <span>{{ handleNumberValue(formatDecimal(serivcefee)) }}</span>
+                        <span>{{ formatDecimal(serivcefee) }}</span>
                     </li>
                 </ul>
                 <ul class="order-total__bottom">
                     <li>
                         <span>合计总额:</span>
-                        <span>{{ handleNumberValue(formatDecimal(totalAmount + serivcefee)) }}</span>
+                        <span>{{ formatDecimal(totalAmount + serivcefee) }}</span>
                     </li>
                     <li>
                         <span>应付:</span>
-                        <span>{{ handleNumberValue(formatDecimal(totalAmount + serivcefee)) }}</span>
+                        <span>{{ formatDecimal(totalAmount + serivcefee) }}</span>
                     </li>
                 </ul>
             </div>
@@ -143,13 +143,13 @@ const totalAmount = computed(() => {
 // 比率:订单金额*配置值
 const serivcefee = computed(() => {
     const { tradefees = [], agreeunit = 0 } = quote.value ?? {}
-    const { FeeAlgorithm = 1, ExchangeValue = 0.0 } = tradefees.find((e) => e.FeeID === 105) ?? {}
-    // 比例
-    if (FeeAlgorithm === 1) {
-        return props.orderQty * agreeunit * ExchangeValue
-    }
+    const { FeeAlgorithm = 1, ExchangeValue = 0.0, MemberDefaultValue = 0.0 } = tradefees.find((e) => e.FeeID === 105) ?? {}
     // 固定
-    return totalAmount.value * ExchangeValue
+    if (FeeAlgorithm === 2) {
+        return props.orderQty * agreeunit * (ExchangeValue+MemberDefaultValue)
+    }
+    // 比例
+    return totalAmount.value * (ExchangeValue+MemberDefaultValue)
 })
 
 // 委托下单

+ 10 - 10
src/packages/mobile/views/pricing/trade/prepayment/Index.vue

@@ -42,11 +42,11 @@
                 <ul class="order-total__center">
                     <li>
                         <span>订单金额:</span>
-                        <span>{{ handleNumberValue(formatDecimal(totalAmount)) }}</span>
+                        <span>{{ formatDecimal(totalAmount) }}</span>
                     </li>
                     <li>
                         <span>订单服务费:</span>
-                        <span>{{ handleNumberValue(formatDecimal(serivcefee)) }}</span>
+                        <span>{{ formatDecimal(serivcefee) }}</span>
                     </li>
                     <li>
                         <span>预付款:</span>
@@ -56,11 +56,11 @@
                 <ul class="order-total__bottom">
                     <li>
                         <span>合计总额:</span>
-                        <span>{{ handleNumberValue(formatDecimal(serivcefee + usedMargin.deposit)) }}</span>
+                        <span>{{ formatDecimal(serivcefee + usedMargin.deposit) }}</span>
                     </li>
                     <li>
                         <span>应付:</span>
-                        <span>{{ handleNumberValue(formatDecimal(serivcefee + usedMargin.deposit)) }}</span>
+                        <span>{{ formatDecimal(serivcefee + usedMargin.deposit) }}</span>
                     </li>
                 </ul>
             </div>
@@ -135,13 +135,13 @@ const totalAmount = computed(() => {
 // 比率:订单金额*配置值
 const serivcefee = computed(() => {
     const { tradefees = [], agreeunit = 0 } = quote.value ?? {}
-    const { FeeAlgorithm = 1, ExchangeValue = 0.0 } = tradefees.find((e) => e.FeeID === (props.orderType === 1 ? 105 : 106)) ?? {}
-    // 比例
-    if (FeeAlgorithm === 1) {
-        return props.orderQty * agreeunit * ExchangeValue
-    }
+    const { FeeAlgorithm = 1, ExchangeValue = 0.0, MemberDefaultValue = 0.0 } = tradefees.find((e) => e.FeeID === (props.orderType === 1 ? 101 : 102)) ?? {}
     // 固定
-    return totalAmount.value * ExchangeValue
+    if (FeeAlgorithm === 2) {
+        return props.orderQty * agreeunit * (ExchangeValue+MemberDefaultValue)
+    }
+    // 比例
+    return totalAmount.value * (ExchangeValue+MemberDefaultValue)
 })
 
 // 预付款

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

@@ -151,10 +151,14 @@ const onOrderTypeRadioChange = (value: number) => {
     const goodsids = collection?.configs.map(e => e.goodsid) ?? []
     switch (value) {
         case 1:
-            goodsList.value = futuresStore.getGoodsListByGoodsID(goodsids).filter(e => e.trademode === 53)
+            goodsList.value = futuresStore.getGoodsListByGoodsID(goodsids).filter(e => e.trademode === 53).sort((a, b) => {
+                return a.agreeunit-b.agreeunit
+            })
             break;
         default:
-            goodsList.value = futuresStore.getGoodsListByGoodsID(goodsids).filter(e => e.trademode === 10)
+            goodsList.value = futuresStore.getGoodsListByGoodsID(goodsids).filter(e => e.trademode === 10).sort((a, b) => {
+                return a.agreeunit-b.agreeunit
+            })
             break;
     }
     // 默认第一个商品

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

@@ -6,7 +6,7 @@
             <div class="g-product-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-product-list__titlebar">
                     <div class="left">
-                        <b>{{ item.goodscode }}</b>
+                        <b>{{ goodsname(item) }}</b>
                         <span>{{ formatDate(item.reqtime) }}</span>
                     </div>
                     <div class="right">
@@ -32,7 +32,7 @@
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
-                                    <span>{{ item.deliveryqty }}</span>
+                                    <span>{{ item.deliverylot }}</span>
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryinfo') }}:</span>
@@ -115,6 +115,19 @@ const onCancel = (row: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
     })
 }
 
+const goodsname = (item: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
+    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 getImageUrl = (url: string) => {
     const [firstImg] = url.split(',')
     return firstImg ? getFileUrl(firstImg) : ''

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

@@ -6,7 +6,7 @@
             <div class="g-product-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-product-list__titlebar">
                     <div class="left">
-                        <b>{{ item.goodsnamedisplay }}</b>
+                        <b>{{ goodsname(item) }}</b>
                         <span>{{ formatDate(item.reqtime) }}</span>
                     </div>
                     <div class="right">
@@ -32,7 +32,7 @@
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
-                                    <span>{{ item.deliveryqty }}</span>
+                                    <span>{{ item.deliverylot }}</span>
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.applydate') }}:</span>
@@ -122,6 +122,19 @@ const onCancel = (row: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
     })
 }
 
+const goodsname = (item: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
+    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 getImageUrl = (url: string) => {
     const [firstImg] = url.split(',')
     return firstImg ? getFileUrl(firstImg) : ''

+ 16 - 3
src/packages/tss/views/order/delivery/components/spot/Index.vue

@@ -6,7 +6,7 @@
             <div class="g-product-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-product-list__titlebar">
                     <div class="left">
-                        <b>{{ item.goodsnamedisplay }}</b>
+                        <b>{{ goodsname(item) }}</b>
                         <span>{{ formatDate(item.reqtime) }}</span>
                     </div>
                     <div class="right">
@@ -32,14 +32,14 @@
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.deliveryqty') }}:</span>
-                                    <span>{{ item.deliveryqty }}</span>
+                                    <span>{{ item.deliverylot }}</span>
                                 </li>
                                 <li>
                                     <span>{{ $t('delivery.offline.applydate') }}:</span>
                                     <span>{{ formatDate(item.reqtime) }}</span>
                                 </li>
                                 <li>
-                                    <span>{{ $t('delivery.offline.deliveryinfo2') }}:</span>
+                                    <span>{{ $t('delivery.offline.deliveryinfo1') }}:</span>
                                     <span>{{ item.deliveryinfo }}</span>
                                 </li>
                             </ul>
@@ -122,6 +122,19 @@ const onCancel = (row: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
     })
 }
 
+const goodsname = (item: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
+    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 getImageUrl = (url: string) => {
     const [firstImg] = url.split(',')
     return firstImg ? getFileUrl(firstImg) : ''

+ 14 - 1
src/packages/tss/views/order/list/fullpayment/Index.vue

@@ -6,7 +6,7 @@
             <div class="g-product-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-product-list__titlebar">
                     <div class="left">
-                        <b>{{ item.goodsnamedisplay }}</b>
+                        <b>{{ goodsname(item) }}</b>
                         <span>{{ formatDate(item.reqtime) }}</span>
                     </div>
                     <div class="right">
@@ -116,6 +116,19 @@ const onCancel = (row: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
     })
 }
 
+const goodsname = (item: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
+    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 getImageUrl = (url: string) => {
     const [firstImg] = url.split(',')
     return firstImg ? getFileUrl(firstImg) : ''

+ 15 - 1
src/packages/tss/views/order/list/prepayment/Index.vue

@@ -5,7 +5,7 @@
             <div class="g-product-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-product-list__titlebar">
                     <div class="left">
-                        <b>{{ item.goodsname }}</b>
+                        <b>{{ goodsname(item) }}</b>
                         <span>{{ formatDate(item.tradetime) }}</span>
                     </div>
                     <div class="right">
@@ -68,6 +68,7 @@ import { useRequest } from '@/hooks/request'
 import { queryTradeHolderDetailEx } from '@/services/api/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getGoodsUnitName } from '@/constants/unit'
+import { i18n } from '@/stores'
 
 const error = shallowRef(false)
 const dataList = shallowRef<Model.TradeHolderDetailExRsp[]>([])
@@ -94,4 +95,17 @@ const getImageUrl = (url: string) => {
     return firstImg ? getFileUrl(firstImg) : ''
 }
 
+const goodsname = (item: Model.TradeHolderDetailExRsp) => {
+    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
+    }
+}
+
 </script>

+ 0 - 1
src/packages/tss/views/order/position/Index.vue

@@ -108,7 +108,6 @@ defineProps({
     }
 })
 
-
 const { global: { t } } = i18n
 
 const { getSBYJMyOrders, $toRefs } = useSBYJOrderStore()

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

@@ -124,7 +124,7 @@ export const useFuturesStore = defineStore(() => {
 
             // 交易费用
             const findfee =  accountConfig.todayAccountTradefees.find((e) => e.accountid === accountStore.currentAccountId && e.goodsid === item.goodsid)
-            const fee = findfee ?? accountConfig.todayAccountTradefees.find((e) => e.accountid === 0 && e.goodsid === item.goodsid)
+            const fee = findfee ?? accountConfig.todayAccountTradefees.find((e) => e.accountid === 0 && e.goodsid === item.goodsid && e.tradetype === 1)
             if (fee) {
                 const ruleWordArray = CryptoJS.enc.Base64.parse(fee.infocontent) // 解析base64
                 const ruleUint8Array = wordArrayToUint8Array(ruleWordArray)
@@ -377,6 +377,7 @@ export const useFuturesStore = defineStore(() => {
                     currencyid: item.currencyid,
                     pictureurl: item.pictureurl,
                     traderules: item.traderules,
+                    tradefees: item.tradefees,
                     thumurls: item.thumurls
                 } = goods)
 

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

@@ -1792,6 +1792,9 @@ declare namespace Model {
         goodscode: string; // 期货合约代码(内部)
         goodsid: number; // 商品ID
         goodsname: string; // 期货合约名称
+        goodsnameen: string; //
+        goodsnametw: string; //
+        goodsnameth: string; //
         goodunitid: number; // 报价单位ID
         goodsunit: string; // 报价单位
         handlestatus: number; // 处理状态

+ 3 - 0
src/types/model/transfer.d.ts

@@ -321,6 +321,9 @@ declare namespace Model {
         goodscode: string; // 期货合约代码(内部)
         goodsid: number; // 商品ID
         goodsname: string; // 期货合约名称
+        goodsnameen: string; //
+        goodsnametw: string; //
+        goodsnameth: string; //
         goodsnamedisplay: string; // 商品名称
         goodsunit: string; // 单位
         marketid: number; // 市场ID