Handy_Cao пре 1 година
родитељ
комит
6d593acf7c

+ 12 - 4
public/locales/en-US.json

@@ -161,6 +161,8 @@
         "limitdown": "LimitDown",
         "bidvolume": "BidVolume",
         "askvolume": "AskVolume",
+        "buyusername": "BuyUserName",
+        "sellusername": "SellUserName",
         "bid": "BidPrice",
         "ask": "AskPrice",
         "time": "Time",
@@ -193,10 +195,13 @@
         "ask3": "Ask3",
         "ask4": "Ask4",
         "ask5": "Ask5",
+        "marketstatus": "Market Status:",
+        "unopening": "UnOpening",
         "ballot": {
             "title": "Subscribe",
             "refprice": "RefPrice",
             "attachmenturl": "Image",
+            "sellname": "SellName:",
             "starttime": "Start:",
             "endtime": "End:",
             "starttime1": "StartTime",
@@ -206,9 +211,9 @@
             "issueprice": "IssuePrice",
             "goodsdetail": "Goods Detail",
             "winningthelottery": "Winning The Lottery",
-            "totalqty": "Total Qty:",
+            "totalqty": "TotalQty:",
             "earnest": "Earnest",
-            "transferdepositratio": "Transfer Deposit Ratio",
+            "transferdepositratio": "TransferDepositRatio",
             "subscribe": "I Want Subscribe",
             "orderQty": "OrderQty",
             "maxbuyqty": "MaxBuyQty",
@@ -366,7 +371,8 @@
             "tips10": "Please select a category",
             "tips11": "Please select the product",
             "tips12": "Please select warehouse",
-            "tips13": "Factor of commodities"
+            "tips13": "Factor of commodities",
+            "tips14": "Please choice performance template"
         },
         "transfer": {
             "title1": "Transfer Detail",
@@ -1228,7 +1234,9 @@
             "logining": "logining...",
             "logining1": "logining...",
             "tips2": "Please agree to the terms of use first",
-            "tips3": "Login failed:"
+            "tips3": "Login failed:",
+            "tips4": "Offline notification",
+            "tips5": "The account has been logged out"
         },
         "register": {
             "title": "User Register",

+ 10 - 2
public/locales/zh-CN.json

@@ -162,6 +162,8 @@
         "limitdown": "跌停",
         "bidvolume": "买量",
         "askvolume": "卖量",
+        "buyusername": "购买方",
+        "sellusername": "销售方",
         "bid": "买价",
         "ask": "卖价",
         "time": "时间",
@@ -194,12 +196,15 @@
         "ask3": "卖三",
         "ask4": "卖四",
         "ask5": "卖五",
+        "marketstatus": "市场状态:",
+        "unopening": "未开市",
         "ballot": {
             "title": "认购",
             "attachmenturl": "图片",
             "refprice": "预售价",
             "starttime": "开始:",
             "endtime": "结束:",
+            "sellname": "销售方:",
             "starttime1": "开始时间",
             "endtime1": "结束时间",
             "historypresale": "发售历史",
@@ -368,7 +373,8 @@
             "tips10": "请选择品类",
             "tips11": "请选择商品",
             "tips12": "请选择仓库",
-            "tips13": "商品要素"
+            "tips13": "商品要素",
+            "tips14": "请选择履约方式"
         },
         "transfer": {
             "title1": "转让详情",
@@ -1233,7 +1239,9 @@
             "logining": "登录中...",
             "logining1": "正在登录",
             "tips2": "请先同意使用条款",
-            "tips3": "登录失败:"
+            "tips3": "登录失败:",
+            "tips4": "下线通知",
+            "tips5": "账号已登出"
         },
         "register": {
             "title": "用户注册",

+ 3 - 1
src/packages/pc/App.vue

@@ -13,16 +13,18 @@ export default {
 import { useRouter } from 'vue-router'
 import { ElMessageBox, ElNotification } from 'element-plus'
 import { useLogin } from '@/business/login'
+import { i18n } from '@/stores'
 import eventBus from '@/services/bus'
 
 const { userLogout } = useLogin()
 const router = useRouter()
+const { t } = i18n.global 
 
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
     if (msg) {
-      ElMessageBox.alert(msg as string, '下线通知')
+      ElMessageBox.alert(msg as string, t('user.login.tips4'))
     }
     router.replace({ name: 'login' })
   })

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

@@ -16,7 +16,7 @@
                     <div class="buttonbar">
                         <template v-if="market">
                             <span style="color: #3a87f7;padding:0 10px;">
-                                市场状态:{{ [2, 6].includes(market.runstatus) ? getRunStatusName(market.runstatus) : '未开市' }}
+                                {{ t('quote.marketstatus') }}{{ [2, 6].includes(market.runstatus) ? getRunStatusName(market.runstatus) : t('quote.unopening') }}
                             </span>
                         </template>
                         <slot name="headerRight"></slot>

+ 13 - 12
src/packages/pc/components/modules/goods-detail/order/index.vue

@@ -33,7 +33,7 @@ import { BuyOrSell } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
 import { queryWrTradeOrderDetail } from '@/services/api/transfer'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import service from '@/services'
 
@@ -52,9 +52,10 @@ const componentMap = new Map<string, unknown>([
 const futuresStore = useFuturesStore()
 const quote = futuresStore.getGoodsQuote(props.goodsId)
 const oem = service.getConfig('oem')
+const { t } = i18n.global
 
 const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.WrTradeOrderDetailRsp>({ rowKey: 'orderid' })
-const { componentRef, componentId, openComponent, closeComponent } = useComponent()
+const { componentRef, componentId, closeComponent } = useComponent()
 
 const { dataList: buyList, run: getBuyList } = useRequest(queryWrTradeOrderDetail, {
     params: {
@@ -73,19 +74,19 @@ const { dataList: sellList, run: getSellList } = useRequest(queryWrTradeOrderDet
 })
 
 const buyColumns = shallowRef<Model.TableColumn[]>(
-    oem != 'zrwyt' ? [{ field: 'orderprice', label: '买价' },
-                      { field: 'orderqty', label: '买量' },
-                      { field: 'username', label: '购买方' }] : 
-                      [{ field: 'orderprice', label: '买价' },
-                      { field: 'orderqty', label: '买量' }]
+    oem != 'zrwyt' ? [{ field: 'orderprice', label: t('quote.bid') },
+                      { field: 'orderqty', label: t('quote.bidvolume') },
+                      { field: 'username', label: t('quote.buyusername') }] : 
+                      [{ field: 'orderprice', label: t('quote.bid') },
+                      { field: 'orderqty', label: t('quote.bidvolume') }]
 )
 
 const sellColumns = shallowRef<Model.TableColumn[]>(
-    oem != 'zrwyt' ? [{ field: 'orderprice', label: '卖价' },
-                      { field: 'orderqty', label: '卖量' },
-                      { field: 'username', label: '销售方' }] : 
-                      [{ field: 'orderprice', label: '卖价' },
-                       { field: 'orderqty', label: '卖量' }]
+    oem != 'zrwyt' ? [{ field: 'orderprice', label: t('quote.ask') },
+                      { field: 'orderqty', label: t('quote.askvolume') },
+                      { field: 'username', label: t('quote.sellusername') }] : 
+                      [{ field: 'orderprice', label: t('quote.ask') },
+                       { field: 'orderqty', label: t('quote.askvolume') }]
 )
 
 // const showComponent = (componentName: string, row: Model.WrTradeOrderDetailRsp) => {

+ 9 - 9
src/packages/pc/views/market/trade/presell/ballot/detail/index.vue

@@ -1,7 +1,7 @@
 <!-- 交易市场-预售转让-预售中签-详情 -->
 <template>
-    <app-drawer title="商品详情" v-model:show="show" :width="600" :refresh="refresh">
-        <AppTableDetails :title="selectedRow.goodscode + ' ' + selectedRow.goodsname" :label-width="100" :data="selectedRow"
+    <app-drawer :title="t('quote.ballot.goodsdetail')" v-model:show="show" :width="700" :refresh="refresh">
+        <AppTableDetails :title="selectedRow.goodscode + ' ' + selectedRow.goodsname" :label-width="170" :data="selectedRow"
             :cell-props="detailProps" :column="2">
             <!-- 预售定金 -->
             <template #earnest>
@@ -50,13 +50,13 @@ const props = defineProps({
 const { t } = i18n.global
 
 const detailProps = [
-    { prop: 'refprice', label: '发行价:' },
-    { prop: 'sellname', label: '销售方:' },
-    { prop: 'starttime', label: '开始时间:' },
-    { prop: 'earnest', label: '预售定金:' },
-    { prop: 'endtime', label: '结束时间:' },
-    { prop: 'transferdepositratio', label: '转让定金:' },
-    { prop: 'presaleqty', label: '总量:' },
+    { prop: 'refprice', label: t('quote.ballot.issueprice')+':' },
+    { prop: 'sellname', label: t('quote.ballot.sellname') },
+    { prop: 'starttime', label: t('quote.ballot.starttime1')+':' },
+    { prop: 'earnest', label: t('quote.ballot.earnest')+':' },
+    { prop: 'endtime', label: t('quote.ballot.endtime1')+':' },
+    { prop: 'transferdepositratio', label: t('quote.ballot.transferdepositratio')+':' },
+    { prop: 'presaleqty', label: t('quote.ballot.totalqty') },
 ]
 
 // 预售定金

+ 7 - 7
src/packages/pc/views/market/trade/presell/transfer/listing/index.vue

@@ -4,22 +4,22 @@
             <Forex v-bind="{ goodsCode: selectedGoods.goodscode }" @price-click="onPriceClick" />
         </div>
         <div class="goods-listing__form">
-            <h4 class="header-title">订单交易</h4>
+            <h4 class="header-title">{{ t('quote.goods.title1') }}</h4>
             <el-form ref="formRef" class="el-form--vertical" label-width="60px" :model="formData" :rules="formRules">
-                <el-form-item prop="GoodsID" label="商品">
+                <el-form-item prop="GoodsID" :label="t('quote.goods.goods')">
                     <el-select effect="dark" :placeholder="t('common.choice')" v-model="selectedGoodsId" filterable @change="onGoodsChange">
                         <el-option :label="item.goodsname" :value="item.goodsid" v-for="(item, index) in marketGoodsList"
                             :key="index" />
                     </el-select>
                 </el-form-item>
-                <el-form-item prop="BuyOrSell" label="方向">
+                <el-form-item prop="BuyOrSell" :label="t('quote.goods.buyorsell')">
                     <el-radio-group v-model="formData.BuyOrSell">
                         <el-radio v-for="(item, index) in getBuyOrSellList()" :key="index" :label="item.value">
                             {{ item.label }}
                         </el-radio>
                     </el-radio-group>
                 </el-form-item>
-                <el-form-item prop="OrderPrice" label="价格">
+                <el-form-item prop="OrderPrice" :label="t('quote.goods.orderprice')">
                     <div class="el-form-item--col">
                         <el-input-number ref="priceRef" :placeholder="t('common.pleaseenter')" :min="0" :step="selectedGoods?.decimalvalue"
                             :precision="selectedGoods?.decimalplace" :disabled="isDisabled" v-model="formData.OrderPrice"
@@ -36,7 +36,7 @@
                         </div>
                     </div>
                 </el-form-item>
-                <el-form-item prop="OrderQty" label="数量">
+                <el-form-item prop="OrderQty" :label="t('quote.goods.orderqty')">
                     <div class="g-qty-group">
                         <el-input-number ref="qtyRef" :placeholder="t('common.pleaseenter')" :min="0" :precision="0" :step="qtyStep || 1"
                             v-model="formData.OrderQty" @keyup.enter="submitFocus" />
@@ -117,7 +117,7 @@ const formRules: FormRules = {
             if (value) {
                 callback()
             } else {
-                callback(new Error('请输入价格'))
+                callback(new Error(t('quote.goods.pleaseenterorderprice')))
             }
         }
     }],
@@ -127,7 +127,7 @@ const formRules: FormRules = {
             if (value) {
                 callback()
             } else {
-                callback(new Error('请输入数量'))
+                callback(new Error(t('quote.goods.pleaseenterorderqty')))
             }
         }
     }],

+ 16 - 16
src/packages/pc/views/market/trade/spot/listing/index.vue

@@ -1,38 +1,38 @@
 <!-- 交易市场-仓单交易-挂牌 -->
 <template>
-    <app-drawer title="挂牌" v-model:show="show" :width="800" :loading="loading" :refresh="refresh">
-        <el-form ref="formRef" class="el-form--horizontal" label-width="100px" :model="formData" :rules="formRules">
-            <el-form-item prop="PerformanceTemplateID" label="履约方式">
+    <app-drawer :title="t('operation.listing')" v-model:show="show" :width="900" :loading="loading" :refresh="refresh">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="160px" :model="formData" :rules="formRules">
+            <el-form-item prop="PerformanceTemplateID" :label="t('position.spot.PerformanceTemplate')">
                 <Performance :market-id="17201" tmptype="0,2" v-model="formData.PerformanceTemplateID" />
             </el-form-item>
-            <el-form-item prop="DeliveryGoodsID" label="品种">
+            <el-form-item prop="DeliveryGoodsID" :label="t('quote.spot.deliverygoodsname')">
                 <el-select effect="dark" :placeholder="t('common.choice')" v-model="formData.DeliveryGoodsID" @change="onDeliveryGoodsChange">
                     <el-option :label="item.deliverygoodsname" :value="item.deliverygoodsid"
                         v-for="(item, index) in ftDeliveryGoodsList" :key="index" />
                 </el-select>
             </el-form-item>
-            <el-form-item prop="WRStandardID" label="商品">
+            <el-form-item prop="WRStandardID" :label="t('quote.spot.wrstandard')">
                 <el-select effect="dark" :placeholder="t('common.choice')" v-model="formData.WRStandardID" @change="onGoodsChange">
                     <el-option :label="item.wrstandardname" :value="item.wrstandardid" v-for="(item, index) in goodsList"
                         :key="index" />
                 </el-select>
             </el-form-item>
-            <el-form-item prop="dgFactoryItemId" label="仓库">
+            <el-form-item prop="dgFactoryItemId" :label="t('quote.spot.warehousename1')">
                 <el-select effect="dark" :placeholder="t('common.choice')" v-model="dgFactoryItemId" @change="onWarehouseChange">
                     <el-option :label="item.dgfactoryitemvalue" :value="item.dgfactoryitemid"
                         v-for="(item, index) in warehouseList" :key="index" />
                 </el-select>
             </el-form-item>
-            <el-form-item prop="FixedPrice" label="挂牌价格">
+            <el-form-item prop="FixedPrice" :label="t('quote.spot.listingprice')">
                 <el-input-number :placeholder="t('common.pleaseenter')" :min="0" :precision="2" v-model="formData.FixedPrice" />
             </el-form-item>
-            <el-form-item prop="OrderQty" label="挂牌量">
+            <el-form-item prop="OrderQty" :label="t('quote.spot.listingqty')">
                 <el-input-number :placeholder="t('common.pleaseenter')" :min="0" :precision="0" v-model="formData.OrderQty" />
             </el-form-item>
-            <el-form-item label="货款金额">
+            <el-form-item :label="t('quote.spot.paymentamount')">
                 <span>{{ amount }}</span>
             </el-form-item>
-            <el-form-item label="可用资金">
+            <el-form-item :label="t('quote.spot.avaiableMoney')">
                 <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
@@ -74,15 +74,15 @@ const warehouseList = computed(() => {
 const formRules: FormRules = {
     PerformanceTemplateID: [{
         required: true,
-        message: '请选择履约方式'
+        message: t('quote.spot.tips14')
     }],
     DeliveryGoodsID: [{
         required: true,
-        message: '请选择品类'
+        message: t('quote.spot.tips10')
     }],
     WRStandardID: [{
         required: true,
-        message: '请选择商品'
+        message: t('quote.spot.tips11')
     }],
     dgFactoryItemId: [{
         required: true,
@@ -90,7 +90,7 @@ const formRules: FormRules = {
             if (dgFactoryItemId.value) {
                 callback()
             } else {
-                callback(new Error('请选择仓库'))
+                callback(new Error(t('quote.spot.tips12')))
             }
         }
     }],
@@ -100,7 +100,7 @@ const formRules: FormRules = {
             if (value) {
                 callback()
             } else {
-                callback(new Error('请输入挂牌价格'))
+                callback(new Error(t('quote.spot.tips2')))
             }
         }
     }],
@@ -110,7 +110,7 @@ const formRules: FormRules = {
             if (value) {
                 callback()
             } else {
-                callback(new Error('请输入挂牌量'))
+                callback(new Error(t('quote.spot.tips4')))
             }
         }
     }],

+ 10 - 10
src/packages/pc/views/market/trade/spot/order/delisting/index.vue

@@ -1,33 +1,33 @@
 <!-- 交易市场-仓单交易-买卖大厅-摘牌 -->
 <template>
-    <app-drawer title="摘牌" v-model:show="show" :width="800" :loading="loading" :refresh="refresh">
-        <el-form ref="formRef" class="el-form--horizontal" label-width="100px" :model="formData" :rules="formRules">
-            <el-form-item label="履约模板">
+    <app-drawer :title="t('operation.delisting')" v-model:show="show" :width="840" :loading="loading" :refresh="refresh">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="160px" :model="formData" :rules="formRules">
+            <el-form-item :label="t('position.spot.PerformanceTemplate')">
                 <span>{{ permancePlanTmp?.templatename ?? quoteDetail.performancetemplateid }}</span>
             </el-form-item>
-            <el-form-item label="挂牌方">
+            <el-form-item :label="t('quote.goods.username')">
                 <span>{{ quoteDetail.username }}</span>
             </el-form-item>
-            <el-form-item label="挂牌价格">
+            <el-form-item :label="t('quote.spot.listingprice')">
                 <span>{{ quoteDetail.fixedprice }}</span>
             </el-form-item>
-            <el-form-item label="剩余量">
+            <el-form-item :label="t('quote.spot.remainqty')">
                 <span>{{ quoteDetail.orderqty }}</span>
             </el-form-item>
-            <el-form-item label="可用量" v-if="quoteDetail.buyorsell === BuyOrSell.Buy">
+            <el-form-item :label="t('quote.spot.enableqty')" v-if="quoteDetail.buyorsell === BuyOrSell.Buy">
                 <span>{{ holdLB?.enableqty ?? 0 }}</span>
             </el-form-item>
-            <el-form-item prop="OrderQty" label="摘牌量">
+            <el-form-item prop="OrderQty" :label="t('quote.spot.orderqty2')">
                 <div class="el-form-item--col">
                     <el-input-number :placeholder="t('common.pleaseenter')" :min="0" :max="maxQty" :precision="0"
                         v-model="formData.OrderQty" />
                     <span>{{ quoteDetail.enumdicname }}</span>
                 </div>
             </el-form-item>
-            <el-form-item label="货款金额">
+            <el-form-item :label="t('quote.spot.paymentamount')">
                 <span>{{ amount }}</span>
             </el-form-item>
-            <el-form-item label="可用资金">
+            <el-form-item :label="t('quote.spot.avaiableMoney')">
                 <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>

+ 5 - 5
src/packages/pc/views/market/trade/spot/order/detail/index.vue

@@ -1,6 +1,6 @@
 <!-- 交易市场-仓单交易-现货挂牌-详情 -->
 <template>
-    <app-drawer title="商品详情" v-model:show="show" :width="600" :refresh="refresh">
+    <app-drawer :title="t('quote.ballot.goodsdetail')" v-model:show="show" :width="600" :refresh="refresh">
         <AppTableDetails :title="`${quoteItem.wrstandardcode}/${quoteItem.wrgoodsname}/${quoteItem.warehousename}`"
             :label-width="100" :data="quoteItem" :cell-props="detailProps" :column="2">
             <!-- 卖价 -->
@@ -40,10 +40,10 @@ const props = defineProps({
 const { t } = i18n.global
 
 const detailProps = [
-    { prop: 'sellprice', label: '卖价:' },
-    { prop: 'sellqty', label: '卖量:' },
-    { prop: 'buyprice', label: '买价:' },
-    { prop: 'buyqty', label: '买量:' }
+    { prop: 'sellprice', label: t('quote.ask')+':' },
+    { prop: 'sellqty', label: t('quote.askvolume')+':' },
+    { prop: 'buyprice', label: t('quote.bid')+':' },
+    { prop: 'buyqty', label: t('quote.bidvolume')+':' }
 ]
 
 // 商品图片列表

+ 14 - 14
src/packages/pc/views/market/trade/spot/order/index.vue

@@ -20,19 +20,19 @@
                     </ul>
                     <ul class="datainfo" v-if="quoteItem">
                         <li>
-                            <span>卖价:</span>
+                            <span>{{ t('quote.ask' ) }}:</span>
                             <span>{{ handleNumberValue(quoteItem.sellprice) }}</span>
                         </li>
                         <li>
-                            <span>买价:</span>
+                            <span>{{ t('quote.bid' ) }}:</span>
                             <span>{{ handleNumberValue(quoteItem.buyprice) }}</span>
                         </li>
                         <li>
-                            <span>卖量:</span>
+                            <span>{{ t('quote.askvolume' ) }}:</span>
                             <span>{{ quoteItem.sellqty }}</span>
                         </li>
                         <li>
-                            <span>买量:</span>
+                            <span>{{ t('quote.bidvolume' ) }}:</span>
                             <span>{{ quoteItem.buyqty }}</span>
                         </li>
                     </ul>
@@ -135,19 +135,19 @@ const { dataList: sellList, run: getSellList } = useRequest(queryOrderQuoteDetai
 })
 
 const buyColumns = shallowRef<Model.TableColumn[]>(
-    oem != 'zrwyt' ? [{ field: 'fixedprice', label: '买价' },
-    { field: 'orderqty', label: '买量' },
-    { field: 'username', label: '购买方' }] :
-        [{ field: 'fixedprice', label: '买价' },
-        { field: 'orderqty', label: '买量' }]
+    oem != 'zrwyt' ? [{ field: 'fixedprice', label: t('quote.bid' ) },
+    { field: 'orderqty', label: t('quote.bidvolume' ) },
+    { field: 'username', label: t('quote.buyusername' ) }] :
+        [{ field: 'fixedprice', label: t('quote.bid' ) },
+        { field: 'orderqty', label: t('quote.bidvolume' ) }]
 )
 
 const sellColumns = shallowRef<Model.TableColumn[]>(
-    oem != 'zrwyt' ? [{ field: 'fixedprice', label: '卖价' },
-    { field: 'orderqty', label: '卖量' },
-    { field: 'username', label: '销售方' }] :
-        [{ field: 'fixedprice', label: '卖价' },
-        { field: 'orderqty', label: '卖量' }]
+    oem != 'zrwyt' ? [{ field: 'fixedprice', label: t('quote.ask' ) },
+    { field: 'orderqty', label: t('quote.askvolume' ) },
+    { field: 'username', label: t('quote.sellusername' ) }] :
+        [{ field: 'fixedprice', label: t('quote.ask' ) },
+        { field: 'orderqty', label: t('quote.askvolume' ) }]
 )
 
 const showComponent = (componentName: string, row: Model.OrderQuoteDetailRsp) => {

+ 12 - 12
src/packages/pc/views/market/trade/spot/order/listing/index.vue

@@ -1,23 +1,23 @@
 <!-- 交易市场-仓单交易-买卖大厅-挂牌 -->
 <template>
-    <app-drawer title="挂牌" v-model:show="show" :width="800" :loading="loading" :refresh="refresh">
-        <el-form ref="formRef" class="el-form--horizontal" label-width="100px" :model="formData" :rules="formRules">
-            <el-form-item prop="PerformanceTemplateID" label="履约方式">
+    <app-drawer :title="t('operation.listing')" v-model:show="show" :width="860" :loading="loading" :refresh="refresh">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="160px" :model="formData" :rules="formRules">
+            <el-form-item prop="PerformanceTemplateID" :label="t('position.spot.PerformanceTemplate')">
                 <Performance :market-id="17201" tmptype="0,2" v-model="formData.PerformanceTemplateID" />
             </el-form-item>
-            <el-form-item prop="FixedPrice" label="挂牌价格">
+            <el-form-item prop="FixedPrice" :label="t('quote.spot.listingprice')">
                 <el-input-number :placeholder="t('common.pleaseenter')" :min="0" :precision="2" v-model="formData.FixedPrice" />
             </el-form-item>
-            <el-form-item label="可用量" v-if="buyOrSell === BuyOrSell.Sell">
+            <el-form-item :label="t('quote.spot.enableqty')" v-if="buyOrSell === BuyOrSell.Sell">
                 <span>{{ holdLB?.enableqty ?? 0 }}</span>
             </el-form-item>
-            <el-form-item prop="OrderQty" label="挂牌量">
+            <el-form-item prop="OrderQty" :label="t('quote.spot.listingqty')">
                 <el-input-number :placeholder="t('common.pleaseenter')" :min="0" :precision="0" v-model="formData.OrderQty" />
             </el-form-item>
-            <el-form-item label="货款金额">
+            <el-form-item :label="t('quote.spot.paymentamount')">
                 <span>{{ amount }}</span>
             </el-form-item>
-            <el-form-item label="可用资金">
+            <el-form-item :label="t('quote.spot.avaiableMoney')">
                 <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
@@ -72,7 +72,7 @@ const formRules: FormRules = {
     PerformanceTemplateID: [{
         required: true,
         type: 'number',
-        message: '请选择履约方式'
+        message: t('quote.spot.tips14')
     }],
     FixedPrice: [{
         required: true,
@@ -81,7 +81,7 @@ const formRules: FormRules = {
             if (value) {
                 callback()
             } else {
-                callback(new Error('请输入价格'))
+                callback(new Error(t('quote.pricing.tips2')))
             }
         }
     }],
@@ -94,10 +94,10 @@ const formRules: FormRules = {
                 if (props.buyOrSell === BuyOrSell.Buy || value <= enableqty) {
                     callback()
                 } else {
-                    callback(new Error('可用量不足'))
+                    callback(new Error(t('quote.pricing.tips5')))
                 }
             } else {
-                callback(new Error('请输入挂牌量'))
+                callback(new Error(t('quote.swap.tips8')))
             }
         }
     }],

+ 4 - 2
src/services/websocket/message.ts

@@ -1,10 +1,12 @@
 import { timerInterceptor } from '@/utils/timer'
 import { FunCode } from '@/constants/funcode'
-import { useErrorInfoStore } from '@/stores'
+import { useErrorInfoStore, i18n } from '@/stores'
 import eventBus from '@/services/bus'
 import { Package50 } from './package'
 import { decodeProto } from './package/package50/proto'
 
+const { t } = i18n.global
+
 /**
  * 处理 Package50 消息推送
  * @param pkg 
@@ -27,7 +29,7 @@ export async function pushMessage50(pkg: Package50, contentType: 'encrypted' | '
                 errcode = JSON.parse(res).RetCode
             }
             // 用户登出通知
-            eventBus.$emit('LogoutNotify', getErrorInfoByCode(errcode) || '账号已登出')
+            eventBus.$emit('LogoutNotify', getErrorInfoByCode(errcode) || t('user.login.tips5'))
             break
         }
         case FunCode.MoneyChangedNotify: {