瀏覽代碼

任务 #6483 任务 #6482

Handy_Cao 1 年之前
父節點
當前提交
b0e0c48b58

+ 1 - 1
oem/sbyj/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "水贝亿爵",
   "version": "1.0.23",
   "versionCode": "100023",
-  "apiUrl": "http://120.25.76.98:8280/cfg?key=ykhj_ddgl",
+  "apiUrl": "http://192.168.31.209:8080/cfg?key=test_209",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 6 - 0
oem/tss/config/appconfig.json

@@ -1,9 +1,15 @@
 {
   "appId": "com.muchinfo.tss",
   "appName": "TCE",
+<<<<<<< HEAD
   "version": "1.0.29",
   "versionCode": "100029",
   "apiUrl": "http://192.168.31.210:8080/cfg?key=test_210",
+=======
+  "version": "1.0.27",
+  "versionCode": "100027",
+  "apiUrl": "http://47.128.190.111:8280/cfg?key=tss_sp",
+>>>>>>> fe532a86 (任务 #6483  任务 #6482)
   "tradeChannel": "ws",
   "showLoginAlert": true,
   "modules": [

+ 1 - 1
oem/ykhj/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "鑫永坤",
   "version": "1.0.12",
   "versionCode": "100012",
-  "apiUrl": "http://120.25.76.98:8280/cfg?key=ykhj_ddgl",
+  "apiUrl": "http://192.168.31.158:15240/cfg?key=dev_104",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 5 - 0
src/packages/sbyj/router/index.ts

@@ -163,6 +163,11 @@ const routes: Array<RouteRecordRaw> = [
         name: 'market-detail',
         component: () => import('../views/market/detail/index.vue'),
       },
+      {
+        path: 'chart',
+        name: 'market-chart',
+        component: () => import('@mobile/views/market/detail/Index.vue'),
+      },
     ],
   },
   {

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

@@ -1,7 +1,11 @@
 <template>
     <app-view class="market-detail">
         <template #header>
-            <app-navbar :title="quote?.goodsname" />
+            <app-navbar :title="quote?.goodsname">
+                <template #right>
+                    <Icon v-if="system_1012 != '0'" name="bars" size="20px" @click="showChart" />
+                </template>
+            </app-navbar>
         </template>
         <div class="market-detail__form" v-if="quote">
             <div class="form-price">
@@ -168,7 +172,7 @@
 <script lang="ts" setup>
 import { useOrder } from '@/business/trade'
 import { shallowRef, onMounted, onUnmounted, computed, onActivated, defineAsyncComponent } from 'vue'
-import { Form, Field, Stepper, Button, FieldRule, FormInstance, Radio, RadioGroup, showToast, ActionSheet, Checkbox } from 'vant'
+import { Form, Field, Stepper, Button, FieldRule, FormInstance, Radio, RadioGroup, showToast, ActionSheet, Checkbox, Icon } from 'vant'
 import { useNavigation } from '@mobile/router/navigation'
 import { useGlobalStore, useFuturesStore, useUserStore, useSBYJOrderStore } from '@/stores'
 import { getGoodsUnitName } from '@/constants/unit'
@@ -181,7 +185,7 @@ import quoteSocket from '@/services/websocket/quote'
 import { queryMdUserSwapProtocol } from '@/services/api/swap'
 import { getUserId } from '@/services/methods/user'
 
-const { getQueryString } = useNavigation()
+const { getQueryString, router } = useNavigation()
 const { formData, formSubmit } = useOrder()
 const { getSBYJMyOrders, getOrderListByGoodsId } = useSBYJOrderStore()
 const globalStore = useGlobalStore()
@@ -204,6 +208,9 @@ const show = shallowRef(false)
 /// 能否下单交易
 const canBankSign = shallowRef(false)
 
+const { getSystemParamValue } = useUserStore()
+const system_1012 = getSystemParamValue('1012') ?? '1'
+
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../../order/detail/index.vue'))], // 详情
     ['supplement', defineAsyncComponent(() => import('../../order/list/components/supplement-deposit/index.vue'))], // 补充
@@ -236,6 +243,15 @@ const qtyStepList = computed(() => {
     ]
 })
 
+const showChart = () => {
+    router.push({
+        name: 'market-chart',
+        query: {
+            goodscode: quote.value?.goodscode ?? ''
+        }
+    })
+}
+
 const commit = (buyOrSell: BuyOrSell) => {
     /// 这里要去判断是否已经实名认证
     if (userStore.hasAuth) {
@@ -253,13 +269,23 @@ const commit = (buyOrSell: BuyOrSell) => {
 
 // 下单
 const onSubmit = () => {
+
+    // 计算提示信息
+    const { marketid = 0, goodsid = 0, goodunitid = 0 } = quote.value ?? {}
+    const { marginalgorithm = 0, transferdepositratio = 0.0 } = goods ?? {}
+    const totalamount = orderQty.value*(formData.OrderPrice ?? 0)
+    const orderPrice = `定价价格:${formData.OrderPrice ?? 0}\n`
+    const qty = `订单数量:${orderQty.value}${getGoodsUnitName(goodunitid)}\n`
+    const orderamount = `订单总额:${formatDecimal(totalamount)}\n`
+    const margin = `预付定金:${marginalgorithm === 1 ? totalamount*transferdepositratio : orderQty.value*transferdepositratio}\n`
+    const message = orderPrice + qty + orderamount + margin
+
     dialog({
         allowHtml: true,
-        message: `确认要提交吗?`,
+        title: '订单明细',
+        message: message,
         showCancelButton: true,
     }).then(() => {
-
-        const { marketid = 0, goodsid = 0 } = quote.value ?? {}
         /// 获取对应的市场ID
         formData.MarketID = marketid
         formData.PriceMode = EPriceMode.PRICEMODE_MARKET

+ 19 - 2
src/packages/sbyj/views/market/list/index.vue

@@ -41,7 +41,7 @@
                 </tr>
             </thead>
             <tbody>
-                <tr v-for="(item, index) in touristRefGoodsList" :key="index">
+                <tr v-for="(item, index) in touristRefGoodsList" :key="index" @click="touristRowClick(item)">
                     <td>{{ item.goodsname }}</td>
                     <td :class="item.bidColor">{{ handleNumberValue(formatDecimal(item.bid, item.decimalplace)) }}</td>
                     <td :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}</td>
@@ -66,7 +66,7 @@ import { getServerTime } from '@/services/api/common'
 import { handleNumberValue, formatDecimal, getFileUrl } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { queryTouristGoods, queryTouristQuoteDay } from '@/services/api/goods'
-import { useFuturesStore, useLoginStore } from '@/stores'
+import { useFuturesStore, useLoginStore, useUserStore } from '@/stores'
 import { timerTask } from '@/utils/timer'
 import { useRequest } from '@/hooks/request'
 import { queryImageConfigs } from "@/services/api/common"
@@ -84,6 +84,9 @@ const subscribeData = shallowRef<string[]>([])
 const serverTime = ref<Moment>()
 const topBG = ref('')
 
+const { getSystemParamValue } = useUserStore()
+const system_1012 = getSystemParamValue('1012') ?? '1'
+
 // 请求背景图
 useRequest(queryImageConfigs, {
     params: {
@@ -118,6 +121,20 @@ const rowClick = (row: Model.GoodsQuote) => {
     })
 }
 
+// 游客商品点击
+const touristRowClick = (row: Model.GoodsQuote) => {
+    /// 不显示图标
+    if (system_1012 != '1') {
+        return
+    }
+    router.push({
+        name: 'market-chart',
+        query: {
+            goodscode: row.goodscode
+        }
+    })
+}
+
 if (loginStore.token) {
     futuresStore.onDataCompleted(() => {
         subscribeData.value = futuresStore.goodsList.map((e) => e.goodscode)

+ 2 - 0
src/types/model/goods.d.ts

@@ -84,6 +84,8 @@ declare namespace Model {
         tradeproperty: number; // 交易属性 - 1:收益权(可做空) 2:所有权(不可做空) 3:期权 4:现货 5:参考行情 6:通道交易 7:币交易 8:场外期权
         traderules: Proto.TradeRuleInfoStruct['TradeRules'] // 交易规则
         tradefees: Proto.TradeFeeInfoStruct['TradeFees'] // 交易规则
+        transferdepositratio: number // 
+        marginalgorithm: number // 1(比率) 2(固定)
     }
 
     /** 现货商品详情 */