li.shaoyi 10 месяцев назад
Родитель
Сommit
d1b8fc8cc9

+ 2 - 2
oem/tss/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.tss",
   "appName": "TCE",
-  "version": "1.0.33",
-  "versionCode": "100033",
+  "version": "1.0.35",
+  "versionCode": "100035",
   "apiUrl": "http://192.168.31.210:8080/cfg?key=test_210",
   "tradeChannel": "ws",
   "showLoginAlert": true,

+ 2 - 2
src/packages/sjgj/views/user/login/index.less

@@ -1,10 +1,10 @@
 .login {
     &::before {
-        background: linear-gradient(35deg, #c49430, #c49430);
+        background: linear-gradient(180deg, #ddb45d, #ddb45d);
     }
 
     &-logo {
-        padding: 40px 0;
+        padding: 30px 0;
 
         img {
             width: 180px;

+ 13 - 2
src/packages/tss/views/bank/capital/index.vue

@@ -13,7 +13,7 @@
             <Cell :title="$t('account.freezeMargin2')" :value="formatDecimal(item.freezeMargin)" />
             <Cell :title="$t('account.profitLoss')">
                 <template #value>
-                    <span :class="handlePriceColor(item.profitLoss)">{{ formatDecimal(item.profitLoss) }}</span>
+                    <span :class="handlePriceColor(profitLoss)">{{ formatDecimal(profitLoss) }}</span>
                 </template>
             </Cell>
             <Cell :title="$t('account.inamount')" :value="formatDecimal(item.inamount)" />
@@ -26,10 +26,21 @@
 </template>
 
 <script lang="ts" setup>
+import { computed } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import { formatDecimal, handlePriceColor } from '@/filters'
 import { getTradeStatusName } from '@/constants/order'
-import { useAccountStore } from '@/stores'
+import { useAccountStore, useSBYJOrderStore } from '@/stores'
 
+const sbyjOrderStore = useSBYJOrderStore()
 const accountStore = useAccountStore()
+const { currentAccount } = accountStore.$toRefs()
+
+// 浮动盈亏
+const profitLoss = computed(() => {
+    // 水贝亿爵订单列表
+    const orderList = sbyjOrderStore.orderComputedList.filter((e) => e.tHDetailEx.accountID === currentAccount.value.accountid)
+    // 计算浮动盈亏
+    return orderList.reduce((pre, cur) => pre += cur.tHDetailEx.floatPL, 0)
+})
 </script>

+ 4 - 2
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 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 && e.tradetype === 1)
             if (fee) {
                 const ruleWordArray = CryptoJS.enc.Base64.parse(fee.infocontent) // 解析base64
@@ -263,6 +263,7 @@ export const useFuturesStore = defineStore(() => {
             goodscode: quote.goodscode ?? '',
             goodsname: '',
             goodsgroupid: 0,
+            goodsgroupname: '',
             goodunitid: 0,
             marketid: 0,
             trademode: 0,
@@ -360,6 +361,7 @@ export const useFuturesStore = defineStore(() => {
                     goodsname: item.goodsname,
                     goodsgroupid: item.goodsgroupid,
                     goodunitid: item.goodunitid,
+                    goodsgroupname: item.goodsgroupname,
                     marketid: item.marketid,
                     trademode: item.trademode,
                     agreeunit: item.agreeunit,
@@ -521,7 +523,7 @@ 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 item.trademode != 10 ? item.goodscode + '/' + item.goodsname : item.goodscode
         }
         return '--'
     }

+ 20 - 19
src/types/model/goods.d.ts

@@ -38,6 +38,7 @@ declare namespace Model {
         goodscode: string; // 商品代码(内部)
         goodscurrencyid: number; // 合约货币ID
         goodsgroupid: number; // 所属商品组ID
+        goodsgroupname: string; // 所属商品组名称
         goodsid: number; // 商品ID(自增ID SEQ_GOODS)
         goodsname: string; // 商品名称
         goodsorder: string; // 商品显示顺序(99)
@@ -593,25 +594,25 @@ declare namespace Model {
         // Banner图(多张)(2:1)(逗号分隔)
         bannerurls: string;
         // 商品集合描述(富文本)(简体) 
-        collectiondesc: string;	
+        collectiondesc: string;
         // 商品集合描述(富文本)(英文)
-        collectiondescen: string;	
+        collectiondescen: string;
         // 商品集合描述(富文本)(泰文)
-        collectiondescth: string;	
+        collectiondescth: string;
         // 商品集合描述(富文本)(繁体)
-        collectiondesctw: string;	
+        collectiondesctw: string;
         // 商品集合ID(SEQ_TCE_GOODSCOLLECTION)
-        collectionid: number;	
+        collectionid: number;
         // 商品集合名称(简体)
-        collectionname: string;	
+        collectionname: string;
         // 商品集合名称(英文)
-        collectionnameen: string;	
+        collectionnameen: string;
         // 商品集合名称(泰文)
-        collectionnameth: string;	
+        collectionnameth: string;
         // 商品集合名称(繁体)
-        collectionnametw: string;	
+        collectionnametw: string;
         // 状态 - 1:正常 2:注销(枚举:status)
-        collectionstatus: number;	
+        collectionstatus: number;
         // 商品集合商品列表
         configs: {
             // 商品集合ID(SEQ_TCE_GOODSCOLLECTION)
@@ -619,25 +620,25 @@ declare namespace Model {
             // 商品配置ID(SEQ_TCE_GCGoodsConfig)
             configid: number;
             // 创建时间
-            createtime: string;	
+            createtime: string;
             //  商品ID
             goodsid: number;
         }[];
         // 创建时间
-        createtime: string;	
+        createtime: string;
         // 建仓人
-        creatorid: number;	
+        creatorid: number;
         // 默认商品ID
-        defaultgoodsid: number;	
+        defaultgoodsid: number;
         // 修改人
-        modifierid: number;	
+        modifierid: number;
         // 修改时间
-        modifytime: string;	
+        modifytime: string;
         // 显示顺序
-        orderindex: number;	
+        orderindex: number;
         // 详情图(1张)
-        pictureurl: string;	
+        pictureurl: string;
         // 缩略图片(1:1)(1张)
-        thumurls: string;  
+        thumurls: string;
     }
 }

+ 1 - 0
src/types/model/market.d.ts

@@ -70,6 +70,7 @@ declare namespace Model {
         averageprice: number; // 均价
         marketid: number; // 所属市场ID
         goodsgroupid: number; // 所属商品组ID
+        goodsgroupname: string; // 所属商品组名称
         goodsid: number; // 商品ID 
         goodscode: string; // 商品代码
         goodsname: string; // 商品名称