Handy_Cao 4 månader sedan
förälder
incheckning
9530093eb2

+ 1 - 1
public/config/appconfig.json

@@ -4,7 +4,7 @@
   "appTitle": "多元世纪交易中心",
   "version": "1.0.8",
   "versionCode": "10008",
-  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
+  "apiUrl": "http://192.168.31.158:19240/cfg?key=dev_104",
   "tradeChannel": "ws",
   "modules": [
     "register",

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

@@ -273,6 +273,7 @@
         "ask5": "Ask5",
         "marketstatus": "Market status:",
         "unopening": "Market not open",
+        "score": "Score",
         "ballot": {
             "title": "Subscription",
             "refprice": "Proposed price",
@@ -388,9 +389,11 @@
             "tips14": "Do you want to delist immediately?"
         },
         "pricing": {
-            "title": "Trade",
+            "title": "Trading",
             "title1": "Listing & Pricing",
             "title2": "Full-Purchase",
+            "title3": "Score-Trading",
+            "address": "Address",
             "ordercancel": "Order is cancellable",
             "position": "Position Summary",
             "holdlb": "Position details",

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

@@ -273,6 +273,7 @@
         "ask5": "ราคาเสนอขาย 5",
         "marketstatus": "สถานะตลาด:",
         "unopening": "ยังไม่เปิดตลาด",
+        "score": "อินทิเกรต",
         "ballot": {
             "title": "จองซื้อ",
             "attachmenturl": "รูปภาพ",
@@ -391,6 +392,8 @@
             "title": "สั่งซื้อสินค้า",
             "title1": "ลดราคา",
             "title2": "ซื้อทั้งหมด",
+            "title3": "การจัดการการอินทิเกรต",
+            "address": "ที่อยู่",
             "ordercancel": "คำสั่งซื้อสามารถยกเลิกได้",
             "position": "สรุปสถานะการถือครอง",
             "holdlb": "รายละเอียดสถานะการถือครอง",

+ 8 - 5
public/locales/vi-VN.json

@@ -1,7 +1,7 @@
 {
     "app": {
         "name": "TCE",
-        "slogan": "Nền tảng đặt trước hàng hóa giao ngay của Sở Giao dịch Hàng hóa Thái Lan",
+        "slogan": "Nền tảng giao dịch kỹ thuật số\r\nDịch vụ hiện đại",
         "close": "Đóng cửa",
         "pervious": "Bài trước",
         "next": "Bài tiếp theo"
@@ -34,7 +34,7 @@
         "submitsuccess": "Submit Successful",
         "submitsuccess1": "Đã được gửi thành công, vui lòng đợi kết quả trong giây lát",
         "pleaseenter": "Hãy nhấn \"Enter\"",
-        "ikonw": "Đã hiểu",
+        "ikonw": "Đã hiểu", 
         "operate": "Thao tác",
         "exit": "Thoát",
         "tryagain": "Thử lại",
@@ -273,6 +273,7 @@
         "ask5": "Bán 5",
         "marketstatus": "Trạng thái thị trường",
         "unopening": "Chưa mở cửa",
+        "score": "Xác nhận",
         "ballot": {
             "title": "Đăng ký mua",
             "refprice": "Gía bán trước",
@@ -388,9 +389,11 @@
             "tips14": "Bạn có muốn gỡ niêm yết ngay?"
         },
         "pricing": {
-            "title": "Trade",
-            "title1": "Listing & Pricing",
-            "title2": "Full-Purchase",
+            "title": "Giao dịch đơn đặt hàng",
+            "title1": "Điểm treo cổ",
+            "title2": "Mua đầy đủ",
+            "title3": "Giao dịch điểm",
+            "address": "Địa chỉ",
             "ordercancel": "Đơn hàng có thể hủy",
             "position": "Tổng hợp vị thế",
             "holdlb": "Chi tiết vị thế",

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

@@ -273,6 +273,7 @@
         "ask5": "卖五",
         "marketstatus": "市场状态:",
         "unopening": "未开市",
+        "score": "积分",
         "ballot": {
             "title": "认购",
             "attachmenturl": "图片",
@@ -391,6 +392,8 @@
             "title": "交易下单",
             "title1": "挂牌点价",
             "title2": "全款购买",
+            "title3": "积分交易",
+            "address": "地址",
             "ordercancel": "订单可撤",
             "position": "持仓汇总",
             "holdlb": "持仓明细",

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

@@ -273,6 +273,7 @@
         "ask5": "賣五",
         "marketstatus": "市場狀態:",
         "unopening": "未開市",
+        "score": "積分",
         "ballot": {
             "title": "認購",
             "attachmenturl": "圖片",
@@ -391,6 +392,8 @@
             "title": "交易下單",
             "title1": "掛牌點價",
             "title2": "全款購買",
+            "title3": "積分交易",
+            "address": "地址",
             "ordercancel": "訂單可撤",
             "position": "持倉彙總",
             "holdlb": "持倉明細",

+ 2 - 0
src/constants/client.ts

@@ -178,6 +178,8 @@ export enum ETradeMode {
     TRADEMODE_PRICING = 52,
     /// 全款商城
     TRADEMODE_MALL = 53,
+    /// 全款商城
+    TRADEMODE_SCORE = 54,
     /// 千海金-铂金宝
     TRADEMODE_QHJ_BJB = 69,
     /// 海商报业商城

+ 16 - 0
src/packages/pc/components/modules/quote/forex/index.vue

@@ -71,6 +71,10 @@ const buyList = computed(() => {
         if (item) {
             return []
         }
+    } else if (item?.trademode === ETradeMode.TRADEMODE_SCORE) {
+        if (item) {
+            return []
+        }
     } else {
         if (item) {
             const result = [
@@ -138,6 +142,18 @@ const sellList = computed(() => {
             ]
             return result.slice(0, item.quotegear || 1)
         }
+    } else if (item?.trademode === ETradeMode.TRADEMODE_SCORE) {
+        if (item) {
+            const result = [
+                {
+                    label: t('quote.score'),
+                    price: item.ask,
+                    qty: item.askvolume,
+                    color: item.askColor,
+                }
+            ]
+            return result.slice(0, item.quotegear || 1)
+        }
     } else {
         if (item) {
             const result = [

+ 2 - 1
src/packages/pc/views/market/trade/index.vue

@@ -25,7 +25,8 @@ const componentMap = new Map<string, unknown>([
     ['tradeModel_99', defineAsyncComponent(() => import('./market/index.vue'))], // 参考行情
     ['tradeModel_97', defineAsyncComponent(() => import('./market/index.vue'))], // 参考行情2
     ['tradeModel_10', defineAsyncComponent(() => import('./pricing/v2/index.vue'))], // 挂牌点价
-    ['tradeModel_53', defineAsyncComponent(() => import('./mall/index.vue'))], // 点价商城
+    ['tradeModel_53', defineAsyncComponent(() => import('./mall/index.vue'))], // 全款商城
+    ['tradeModel_54', defineAsyncComponent(() => import('./score/index.vue'))], // 积分商城
 ])
 
 const futuresStore = useFuturesStore()

+ 13 - 11
src/packages/pc/views/market/trade/pricing/list/listing/index.vue

@@ -4,7 +4,9 @@
             <Forex v-bind="{ goodsCode: selectedGoods.goodscode }" @price-click="onPriceClick" />
         </div>
         <el-scrollbar class="pricing-listing__form" always>
-            <h4 class="header-title">{{ selectedGoods?.trademode === 10 ? t('quote.pricing.title1') : t('quote.pricing.title2') }}</h4>
+            <h4 class="header-title" v-if="selectedGoods?.trademode === 10">{{ t('quote.pricing.title1') }}</h4>
+            <h4 class="header-title" v-else-if="selectedGoods?.trademode === 54">积分购买</h4>
+            <h4 class="header-title" v-else>{{  t('quote.pricing.title2') }}</h4>
             <el-form ref="formRef" class="el-form--vertical" label-width="60px" :show-message="false" :model="formData"
                 :rules="formRules">
                 <el-form-item prop="GoodsID" :label="t('quote.pricing.goods')">
@@ -45,15 +47,15 @@
                         </template>
                     </div>
                 </el-form-item>
-                <el-form-item v-if="selectedGoods?.trademode === 53" class="el-form-item--row" prop="AddrInfo" :label="t('performance.address')">
-                <div class="el-form-item--col">
-                    <el-input type="textarea" :placeholder="t('performance.pleaseentertheaddress')"
-                        :rows="3" v-model="formData.AddrInfo" />
-                    <el-icon :size="20" style="cursor: pointer;" @click="showAddress = true" >
-                        <CirclePlusFilled />
-                    </el-icon>
-                </div>
-            </el-form-item>
+                <el-form-item v-if="selectedGoods?.trademode === 53 || selectedGoods?.trademode === 54" class="el-form-item--row" prop="AddrInfo" :label="t('quote.pricing.address')">
+                    <div class="el-form-item--col">
+                        <el-input type="textarea" :placeholder="t('performance.pleaseentertheaddress')"
+                            :rows="3" v-model="formData.AddrInfo" />
+                        <el-icon :size="20" style="cursor: pointer;" @click="showAddress = true" >
+                            <CirclePlusFilled />
+                        </el-icon>
+                    </div>
+                </el-form-item>
                 <!-- <el-form-item prop="MarketMaxSub" :label="t('quote.pricing.marketmaxsub1')" v-if="formData.PriceMode === PriceMode.Market">
                     <el-input-number ref="priceRef" :placeholder="t('common.pleaseenter')" :min="0" :max="999" v-model="formData.MarketMaxSub" 
                     @keyup.enter="submitFocus" />
@@ -354,7 +356,7 @@ const getOrderPrice = () => {
 
 watch([selectedGoodsId, buyOrSell, orderPriceType], () => {
     // 商城模式只有买方向
-    if (selectedGoods.value?.trademode === 53) {
+    if ((selectedGoods.value?.trademode === 53 || selectedGoods.value?.trademode === 54)) {
         formData.BuyOrSell = BuyOrSell.Buy
         formData.PriceMode = PriceMode.Market
     }

+ 42 - 0
src/packages/pc/views/market/trade/score/index.less

@@ -0,0 +1,42 @@
+.market-pricing-v2 {
+    display: flex;
+    flex-wrap: wrap;
+    color: #e5e5e5;
+    line-height: normal;
+    padding: 15px 15px 0 0;
+
+    article {
+        width: 200px;
+        background-color: #202831;
+        border-radius: 3px;
+        cursor: pointer;
+        margin: 0 0 15px 15px;
+        padding: 10px;
+
+        h3 {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            font-size: 14px;
+            border-bottom: 1px solid #414851;
+            padding-bottom: 10px;
+        }
+
+        section {
+            display: flex;
+            justify-content: space-between;
+            padding-top: 10px;
+
+            dl {
+                dt {
+                    color: #71848f;
+                }
+
+                dd {
+                    font-size: 16px;
+                    padding-top: 10px;
+                }
+            }
+        }
+    }
+}

+ 74 - 0
src/packages/pc/views/market/trade/score/index.vue

@@ -0,0 +1,74 @@
+<!-- 交易市场 - 积分商城 -->
+<template>
+    <el-scrollbar>
+        <div class="market-pricing-v2">
+            <article v-for="(item, index) in futuresStore.marketGoodsList" :key="index">
+                <h3 @click="openImageViewer(item.pictureurl)">
+                    <span>{{ item.goodscode }}</span>
+                    <app-icon icon="PictureFilled" v-if="item.pictureurl" />
+                </h3>
+                <section @click="onRowClick(item)">
+                    <dl>
+                        <dt>{{ t('quote.score') }}</dt>
+                        <dd :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}
+                        </dd>
+                    </dl>
+                </section>
+            </article>
+        </div>
+        <el-image-viewer :url-list="viewerList" @close="showViewer = false" teleported v-if="showViewer" />
+        <component ref="componentRef" v-bind="{ goodsId: futuresStore.selectedGoodsId }"
+            :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
+    </el-scrollbar>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, onMounted, onUnmounted, defineAsyncComponent } from 'vue'
+import { getFileUrl } from '@/filters'
+import { useComponent } from '@/hooks/component'
+import { handleNumberValue, formatDecimal } from '@/filters'
+import { useUserStore, useFuturesStore, useGlobalStore, i18n } from '@/stores'
+import AppIcon from '@pc/components/base/icon/index.vue'
+
+const t = i18n.global.t
+const futuresStore = useFuturesStore()
+const globalStore = useGlobalStore()
+const userStore = useUserStore()
+const showViewer = shallowRef(false)
+const viewerList = shallowRef<string[]>([])
+
+// 任务 #6289
+const param1012 = userStore.getSystemParamValue('1012')
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => true, false)
+
+const componentMap = new Map<string, unknown>([
+    ['detail', defineAsyncComponent(() => import('@pc/components/modules/goods-detail/index.vue'))], // 详情
+])
+
+const onRowClick = (row: Model.GoodsQuote) => {
+    if (param1012 !== '0') {
+        openComponent('detail')
+    }
+    futuresStore.selectedGoodsId = row.goodsid
+}
+
+const openImageViewer = (url?: string) => {
+    if (url) {
+        viewerList.value = [getFileUrl(url)]
+        showViewer.value = true
+    }
+}
+
+onMounted(() => {
+    globalStore.showPricingListing = true
+})
+
+onUnmounted(() => {
+    globalStore.showPricingListing = false
+})
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>