Handy_Cao 10 mesi fa
parent
commit
c13fb4f4fc

+ 14 - 0
oem/sjgj/locales/extras/en-US.json

@@ -0,0 +1,14 @@
+{ 
+    "enum": {
+        "BuyOrSell": {
+            "Buy": "买料",
+            "Sell": "卖料"
+        }
+    }
+}
+
+import { i18n } from '@/stores'
+
+const { global: { t } } = i18n
+
+t('enum.BuyOrSell.Buy')

+ 8 - 0
oem/sjgj/locales/extras/th-TH.json

@@ -0,0 +1,8 @@
+{
+   "enum": {
+        "BuyOrSell": {
+            "Buy": "买料",
+            "Sell": "卖料"
+        }
+    }
+}

+ 8 - 0
oem/sjgj/locales/extras/zh-CN.json

@@ -0,0 +1,8 @@
+{
+    "enum": {
+        "BuyOrSell": {
+            "Buy": "买料",
+            "Sell": "卖料"
+        }
+    }
+}

+ 8 - 0
oem/sjgj/locales/extras/zh-TW.json

@@ -0,0 +1,8 @@
+{
+    "enum": {
+        "BuyOrSell": {
+            "Buy": "买料",
+            "Sell": "卖料"
+        }
+    }
+}

+ 8 - 0
oem/ykhj/locales/extras/en-US.json

@@ -0,0 +1,8 @@
+{ 
+    "enum": {
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
+        }
+    }
+}

+ 8 - 0
oem/ykhj/locales/extras/th-TH.json

@@ -0,0 +1,8 @@
+{
+   "enum": {
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
+        }
+    }
+}

+ 8 - 0
oem/ykhj/locales/extras/zh-CN.json

@@ -0,0 +1,8 @@
+{
+    "enum": {
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
+        }
+    }
+}

+ 8 - 0
oem/ykhj/locales/extras/zh-TW.json

@@ -0,0 +1,8 @@
+{
+    "enum": {
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
+        }
+    }
+}

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

@@ -1750,6 +1750,10 @@
             "Certified": "Certified",
             "Submitted": "Under Review",
             "Rejected": "Rejected"
+        },
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
         }
     }
 }

+ 4 - 0
public/locales/th-TH.json

@@ -1750,6 +1750,10 @@
             "Certified": "ยืนยันตัวตนแล้ว",
             "Submitted": "กำลังตรวจสอบ",
             "Rejected": "ไม่ผ่านการอนุมัติ"
+        },
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
         }
     }
 }

+ 4 - 0
public/locales/zh-CN.json

@@ -1750,6 +1750,10 @@
             "Certified": "已实名",
             "Submitted": "审核中",
             "Rejected": "未通过"
+        },
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
         }
     }
 }

+ 4 - 0
public/locales/zh-TW.json

@@ -1750,6 +1750,10 @@
             "Certified": "已驗證",
             "Submitted": "審核中",
             "Rejected": "未通過"
+        },
+        "BuyOrSell": {
+            "Buy": "提料",
+            "Sell": "交料"
         }
     }
 }

+ 3 - 1
src/packages/sbyj/views/delivery/completed/list/index.vue

@@ -69,11 +69,13 @@ import { useRequest } from '@/hooks/request'
 import { queryMyTradeGoodsDeliveryOfflines } from '@/services/api/order'
 import { Button } from 'vant'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     buyorsell: Number
 })
 
+const { global: { t } } = i18n
 const dataList = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp[]>([])
 const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
 const error = shallowRef(false)
@@ -106,7 +108,7 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliv
 
 // 获取标签名称
 const getTagName = (value: number) => {
-    return value === BuyOrSell.Buy ? '提料' : '交料'
+    return value === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOfflineRsp) => {

+ 4 - 1
src/packages/sbyj/views/delivery/components/detail/index.vue

@@ -39,6 +39,9 @@ import { BuyOrSell } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
 import { getGoodsUnitName } from '@/constants/unit'
 import AppModal from '@/components/base/modal/index.vue'
+import { i18n } from '@/stores'
+
+const { global: { t } } = i18n
 
 const props = defineProps({
     selectedRow: {
@@ -59,7 +62,7 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 
 // 获取标签名称
 const getTagName = () => {
-    return props.selectedRow.buyorsell === BuyOrSell.Buy ? '提料' : '交料'
+    return props.selectedRow.buyorsell === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 // 关闭弹窗

+ 3 - 1
src/packages/sbyj/views/delivery/components/detail/order-list/index.vue

@@ -57,6 +57,7 @@ import { useRequest } from '@/hooks/request'
 import { queryMyDeliveryofflinedetails } from '@/services/api/order'
 import AppModal from '@/components/base/modal/index.vue'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     selectedRow: {
@@ -65,6 +66,7 @@ const props = defineProps({
     }
 })
 
+const { global: { t } } = i18n
 const showModal = shallowRef(true)
 const error = shallowRef(false)
 const dataList = shallowRef<Model.MyDeliveryofflinedetailRsp[]>([]) // 订单明细
@@ -88,7 +90,7 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryMyDeliveryoffline
 
 // 获取标签名称
 const getTagName = (value: number) => {
-    return value === BuyOrSell.Buy ? '提料' : '交料'
+    return value === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 // 关闭弹窗

+ 3 - 1
src/packages/sbyj/views/delivery/pending/list/index.vue

@@ -63,11 +63,13 @@ import { queryMyTradeGoodsDeliveryOfflines } from '@/services/api/order'
 import { deliveryClientOperator } from '@/services/api/trade'
 import { Button } from 'vant'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     buyorsell: Number
 })
 
+const { global: { t } } = i18n
 const dataList = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp[]>([])
 const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
 const error = shallowRef(false)
@@ -99,7 +101,7 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliv
 
 // 获取标签名称
 const getTagName = (value: number) => {
-    return value === BuyOrSell.Buy ? '提料' : '交料'
+    return value === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOfflineRsp) => {

+ 3 - 1
src/packages/sbyj/views/delivery/processing/components/pay/index.vue

@@ -56,6 +56,7 @@ import { BuyOrSell } from '@/constants/order'
 import { getGoodsUnitName } from '@/constants/unit'
 import { deliveryClientOperator } from '@/services/api/trade'
 import AppModal from '@/components/base/modal/index.vue'
+import { i18n } from '@/stores'
 import AppUploader from '@mobile/components/base/uploader/index.vue'
 
 const props = defineProps({
@@ -65,6 +66,7 @@ const props = defineProps({
     }
 })
 
+const { global: { t } } = i18n
 const formRef = shallowRef<FormInstance>()
 const showModal = shallowRef(true)
 const refresh = shallowRef(false) // 是否刷新父组件数据
@@ -85,7 +87,7 @@ const formData = reactive<Proto.DeliveryClientOperatorReq>({
 const amount = computed(() => +formatDecimal(props.selectedRow.deliverytotalamount - props.selectedRow.payedamount - formData.PayAmount))
 
 // 标签名称
-const tagName = computed(() => props.selectedRow.buyorsell === BuyOrSell.Buy ? '提料' : '交料')
+const tagName = computed(() => props.selectedRow.buyorsell === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell'))
 
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {

+ 3 - 1
src/packages/sbyj/views/delivery/processing/list/index.vue

@@ -78,6 +78,7 @@ import { Button } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { deliveryClientOperator } from '@/services/api/trade'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     buyorsell: Number
@@ -88,6 +89,7 @@ const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
 const formData = reactive<Proto.DeliveryClientOperatorReq>({ PayAmount: 0, DeliveryPayMode: 2 })
+const { global: { t } } = i18n
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../../components/detail/index.vue'))], // 详情
@@ -117,7 +119,7 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliv
 
 // 获取标签名称
 const getTagName = (value: number) => {
-    return value === BuyOrSell.Buy ? '提料' : '交料'
+    return value === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOfflineRsp) => {

+ 1 - 1
src/packages/sbyj/views/market/detail/index.vue

@@ -156,7 +156,7 @@
                             v-if="riskType === 1 && selectedRow.tHDetailEx.holderQty">补充</Button>
                         <template v-if="enableqty(selectedRow)">
                             <Button size="small" @click="showComponent('delivery')" round>
-                                {{ selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '提料' : '交料' }}
+                                {{ selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? $t('enum.BuyOrSell.Buy') : $t('enum.BuyOrSell.Sell') }}
                             </Button>
                             <Button v-if="canClose" size="small" @click="showComponent('closeholder')" round>终止</Button>
                         </template>

+ 3 - 1
src/packages/sbyj/views/order/detail/index.vue

@@ -70,6 +70,7 @@ import { useModifyOrder } from '@/business/trade'
 import { fullloading, dialog } from '@/utils/vant'
 import AppModal from '@/components/base/modal/index.vue'
 import eventBus from '@/services/bus'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     selectedRow: {
@@ -88,6 +89,7 @@ const refresh = shallowRef(false) // 是否刷新父组件数据
 
 const goods = futuresStore.getGoods(props.selectedRow.goodsCode)
 const detail = computed(() => props.selectedRow.tHDetailEx)
+const { global: { t } } = i18n
 
 const IsAutoAddDeposit = shallowRef(detail.value.canautoadddeposit === 1)
 const IsAutoRefundDeposit = shallowRef(detail.value.canautorefunddeposit === 1)
@@ -97,7 +99,7 @@ const canautoadddeposit = detail.value.canautoadddeposit === 1 || goods?.canauto
 
 // 获取标签名称
 const getTagName = () => {
-    return props.selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '提料' : '交料'
+    return props.selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 // 关闭弹窗

+ 3 - 1
src/packages/sbyj/views/order/list/components/market-order-delivery/index.vue

@@ -55,6 +55,7 @@ import { marketOrderDeliveryApply } from '@/services/api/trade'
 import { useGlobalStore, useUserStore, useFuturesStore } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
 import moment from 'moment'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     selectedRow: {
@@ -66,6 +67,7 @@ const props = defineProps({
 const userStore = useUserStore()
 const param326 = userStore.getSystemParamValue('326')
 const param327 = userStore.getSystemParamValue('327')
+const { global: { t } } = i18n
 
 const globalStore = useGlobalStore()
 const futuresStore = useFuturesStore()
@@ -109,7 +111,7 @@ const formRules: { OrderQty?: FieldRule[] } = {
 
 // 获取标签名称
 const getTagName = () => {
-    return props.selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '提料' : '交料'
+    return props.selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 const onRadioChange = (value: number) => {

+ 3 - 1
src/packages/sbyj/views/order/list/index.vue

@@ -105,6 +105,7 @@ import { useFuturesStore, useGlobalStore, useSBYJOrderStore } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { useRequest } from '@/hooks/request'
 import { queryUserTradeSettings } from '@/services/api/order'
+import { i18n } from '@/stores'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/index.vue'))], // 详情
@@ -117,6 +118,7 @@ const active = shallowRef(0)
 
 const globalStore = useGlobalStore()
 const riskType = globalStore.getSystemInfo('riskType') // 风控类型
+const { global: { t } } = i18n
 
 const { getSBYJMyOrders, $toRefs } = useSBYJOrderStore()
 const { getGoods } = useFuturesStore()
@@ -160,7 +162,7 @@ const enableqty = (item: Model.SBYJMyOrderRsp) => {
 
 // 获取标签名称
 const getTagName = (value: number) => {
-    return value === BuyOrSell.Buy ? '提料' : '交料'
+    return value === BuyOrSell.Buy ? t('enum.BuyOrSell.Buy') : t('enum.BuyOrSell.Sell')
 }
 
 const showComponent = (componentName: string, row: Model.SBYJMyOrderRsp) => {