From 2a35837a8810d81717017503aa6036e15b5bd9aa Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Wed, 10 Apr 2024 19:11:08 +0800
Subject: [PATCH] 订单详情

---
 src/locales/india.js                             |    3 
 src/locales/tw.js                                |    3 
 src/page/list/tradingList/data.list.vue          |   19 ++
 src/page/user/recharge-sure.vue                  |    1 
 src/page/user/Warehouse/data.list.vue            |   12 +
 src/page/user/compontents/transferindex-list.vue |    8 
 src/page/user/recharge.vue                       |   48 +-------
 src/axios/api.js                                 |    4 
 src/locales/zh.js                                |    4 
 src/router/index.js                              |   12 ++
 src/locales/hanyu.js                             |    3 
 src/locales/riyu.js                              |    3 
 src/locales/taiyu.js                             |    3 
 src/page/user/Warehouse/Stockdetail.vue          |  143 +++++++++++++++++++++++
 src/locales/en.js                                |    3 
 src/page/list/tradingList/tabs.vue               |   19 +-
 src/utils/rechargeActions.js                     |   20 +++
 17 files changed, 236 insertions(+), 72 deletions(-)

diff --git a/src/axios/api.js b/src/axios/api.js
index 7e9a6e5..239ff2e 100644
--- a/src/axios/api.js
+++ b/src/axios/api.js
@@ -323,6 +323,10 @@
 export function getIndexOrderList(options) {
   return post("/user/index/position/list.do", options);
 }
+// 获取我的持仓单 - 指数
+export function findByPostionSn(options) {
+  return post("/user/position/findByPostionSn.do", options);
+}
 
 // 获取我的持仓单 - 期货
 export function getFuturesOrderList(options) {
diff --git a/src/locales/en.js b/src/locales/en.js
index 3b01894..c4e0d57 100644
--- a/src/locales/en.js
+++ b/src/locales/en.js
@@ -978,5 +978,6 @@
   HK: "Hong Kong Stock Account",
   港股资产: "Hong Kong stock assets",
   港股可用: "Available in Hong Kong stock market",
-  港股冻结: "Hong Kong stock freeze"
+  港股冻结: "Hong Kong stock freeze",
+  订单详情: "Order details"
 };
diff --git a/src/locales/hanyu.js b/src/locales/hanyu.js
index c44eb4e..8f3c9de 100644
--- a/src/locales/hanyu.js
+++ b/src/locales/hanyu.js
@@ -539,5 +539,6 @@
   HK: "홍콩 주식 계좌",
   港股资产: "홍콩 주식 자산",
   港股可用: "홍콩 주식 사용 가능",
-  港股冻结: "홍콩 주식 동결"
+  港股冻结: "홍콩 주식 동결",
+  订单详情: "주문 상세 정보"
 };
diff --git a/src/locales/india.js b/src/locales/india.js
index d15900a..f8e86b3 100644
--- a/src/locales/india.js
+++ b/src/locales/india.js
@@ -971,5 +971,6 @@
   港股冻结: "การแช่แข็งหุ้นฮ่องกง",
   港股资产: "हांगकांग स्टॉक एसेट्स",
   港股可用: "हांगकांग के स्टॉक उपलब्ध हैं",
-  港股冻结: "हांगकांग के स्टॉक जमे हुए"
+  港股冻结: "हांगकांग के स्टॉक जमे हुए",
+  订单详情: "ऑर्डर का विवरण"
 };
diff --git a/src/locales/riyu.js b/src/locales/riyu.js
index 9888b18..cede38d 100644
--- a/src/locales/riyu.js
+++ b/src/locales/riyu.js
@@ -539,5 +539,6 @@
   HK: "香港株口座",
   港股资产: "香港株資産",
   港股可用: "香港株が利用可能",
-  港股冻结: "香港株凍結"
+  港股冻结: "香港株凍結",
+  订单详情: "注文の詳細"
 };
diff --git a/src/locales/taiyu.js b/src/locales/taiyu.js
index 53ddeea..06809f7 100644
--- a/src/locales/taiyu.js
+++ b/src/locales/taiyu.js
@@ -538,5 +538,6 @@
   HK: "บัญชีหุ้นฮ่องกง",
   港股资产: "สินทรัพย์ในหุ้นฮ่องกง",
   港股可用: "มีหุ้นฮ่องกง",
-  港股冻结: "การแช่แข็งหุ้นฮ่องกง"
+  港股冻结: "การแช่แข็งหุ้นฮ่องกง",
+  订单详情: "รายละเอียดการสั่งซื้อ"
 };
diff --git a/src/locales/tw.js b/src/locales/tw.js
index d4b5a0b..e908c34 100644
--- a/src/locales/tw.js
+++ b/src/locales/tw.js
@@ -1205,5 +1205,6 @@
   HK: "港股帳戶",
   港股资产: "港股資產",
   港股可用: "港股可用",
-  港股冻结: "港股凍結"
+  港股冻结: "港股凍結",
+  订单详情: "訂單詳情"
 };
diff --git a/src/locales/zh.js b/src/locales/zh.js
index 83d2047..e80408c 100644
--- a/src/locales/zh.js
+++ b/src/locales/zh.js
@@ -539,5 +539,7 @@
   HK: "港股账户",
   港股资产: "港股资产",
   港股可用: "港股可用",
-  港股冻结: "港股冻结"
+  港股冻结: "港股冻结",
+
+  订单详情: "订单详情"
 };
diff --git a/src/page/list/tradingList/data.list.vue b/src/page/list/tradingList/data.list.vue
index 8bce7d2..5fd2a73 100644
--- a/src/page/list/tradingList/data.list.vue
+++ b/src/page/list/tradingList/data.list.vue
@@ -120,6 +120,7 @@
       this.listArr = [];
       this.pageNumVal = 1;
       this.loadings = true;
+      this.getStock(e, this.zxactive, 1);
     },
     zxactive(e) {
       this.finished = false;
@@ -219,15 +220,23 @@
         data = await api.positionzx(opt);
       }
 
-      this.loadings = false;
       if (data.status === 0) {
-        // if (data.data.list.length < 15) {
-        this.finished = true;
-        // }
         if (pageNumVal !== 1) {
           this.listArr = [...this.listArr, ...data.data.list];
         } else {
-          this.listArr = data.data.list;
+          if (this.active) {
+            if (this.active === data.data.stockType) {
+              this.listArr = data.data.list;
+              this.loadings = false;
+              this.finished = true;
+            }
+          } else {
+            if (this.zxactive === data.data.stockType) {
+              this.listArr = data.data.list;
+              this.loadings = false;
+              this.finished = true;
+            }
+          }
         }
       } else {
         this.finished = true;
diff --git a/src/page/list/tradingList/tabs.vue b/src/page/list/tradingList/tabs.vue
index cc1e9ff..4d9955c 100644
--- a/src/page/list/tradingList/tabs.vue
+++ b/src/page/list/tradingList/tabs.vue
@@ -45,26 +45,25 @@
 export default {
   components: { dataList },
   mounted() {
-    console.log(this.$route.query.type);
-    this.active = this.$route.query.type || "2";
+    this.active = this.$route.query.type || "MAS";
   },
   data() {
     return {
       tabsList: [
         { title: this.$t("hj61"), key: "" },
         // { title: this.$t("数字货币"), key: "1", name: "SZHB" },
-        { title: this.$t("马股"), key: "2", name: "MAS" },
-        { title: this.$t("美股"), key: "3", name: "US" },
-        { title: this.$t("港股"), key: "4", name: "HK" },
+        { title: this.$t("马股"), key: "MAS", name: "MAS" },
+        { title: this.$t("美股"), key: "US", name: "US" },
+        { title: this.$t("港股"), key: "HK", name: "HK" },
       ],
       zxtabsList: [
         // { title: this.$t("数字货币"), key: "1", name: "SZHB" },
-        { title: this.$t("马股"), key: "2", name: "MAS" },
-        { title: this.$t("美股"), key: "3", name: "US" },
-        { title: this.$t("港股"), key: "4", name: "HK" },
+        { title: this.$t("马股"), key: "MAS", name: "MAS" },
+        { title: this.$t("美股"), key: "US", name: "US" },
+        { title: this.$t("港股"), key: "HK", name: "HK" },
       ],
-      active: "2",
-      zxactive: "2",
+      active: "MAS",
+      zxactive: "MAS",
       sousuo: "",
     };
   },
diff --git a/src/page/user/Warehouse/Stockdetail.vue b/src/page/user/Warehouse/Stockdetail.vue
new file mode 100644
index 0000000..df5e29e
--- /dev/null
+++ b/src/page/user/Warehouse/Stockdetail.vue
@@ -0,0 +1,143 @@
+<!--  -->
+<template>
+  <div style="height: 100%">
+    <van-nav-bar
+      :placeholder="true"
+      :safe-area-inset-top="true"
+      :title="$t('订单详情')"
+      left-arrow
+      :fixed="true"
+      @click-left="handleBack"
+    >
+    </van-nav-bar>
+
+    <div class="bottomIfr">
+      <div class="pagebox">
+        <div class="pagebox_left">{{ $t("盈虧") }} ({{ pages.stockGid }})</div>
+        <div class="pagebox_right">{{ pages.profitAndLose }}</div>
+      </div>
+      <div class="pagebox">
+        <div class="pagebox_left">{{ $t("hj141") }} ({{ pages.stockGid }})</div>
+        <div class="pagebox_right">{{ pages.profitAndLoseParent }}</div>
+      </div>
+      <div class="pagebox">
+        <div class="pagebox_left">{{ $t("倉位(股)") }}</div>
+        <div class="pagebox_right">{{ pages.orderNum }}</div>
+      </div>
+      <div class="pagebox" v-if="pages.now_price">
+        <div class="pagebox_left">{{ $t("hj40") }}({{ pages.stockGid }})</div>
+        <div class="pagebox_right">{{ pages.now_price }}</div>
+      </div>
+      <div class="pagebox">
+        <div class="pagebox_left">
+          {{ $t("持倉價") }} ({{ pages.stockGid }})
+        </div>
+        <div class="pagebox_right">{{ pages.buyOrderPrice }}</div>
+      </div>
+      <div class="pagebox">
+        <div class="pagebox_left">
+          {{ $t("訂單金額") }} ({{ pages.stockGid }})
+        </div>
+        <div class="pagebox_right">{{ pages.orderTotalPrice }}</div>
+      </div>
+      <div class="pagebox">
+        <div class="pagebox_left">{{ $t("hj44") }} ({{ pages.stockGid }})</div>
+        <div class="pagebox_right">{{ pages.orderFee }}</div>
+      </div>
+      <div class="pagebox">
+        <div class="pagebox_left">
+          {{ $t("訂單編號") }}
+        </div>
+        <div class="pagebox_right">{{ pages.buyOrderId }}</div>
+      </div>
+
+      <div class="pagebox" v-if="pages.buyOrderTime">
+        <div class="pagebox_left">{{ $t("持倉時間") }}</div>
+        <div class="pagebox_right">
+          {{ $moment(pages.buyOrderTime).format("YYYY-MM-DD HH:mm:ss") }}
+        </div>
+      </div>
+      <div class="pagebox" v-if="pages.sellOrderTime">
+        <div class="pagebox_left">{{ $t("hj128") }}</div>
+        <div class="pagebox_right">
+          {{ $moment(pages.sellOrderTime).format("YYYY-MM-DD HH:mm:ss") }}
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as api from "@/axios/api";
+export default {
+  data() {
+    return {
+      pages: {},
+    };
+  },
+  // 生命周期 - 创建完成(访问当前this实例)
+  created() {
+    this.getInfoSite();
+  },
+  // 生命周期 - 挂载完成(访问DOM元素)
+  mounted() {},
+  methods: {
+    handleBack() {
+      // 点击返回/
+      this.$router.go(-1);
+    },
+    async getInfoSite() {
+      var res = {
+        positionSn: this.$route.query.codes,
+      };
+      let data = await api.findByPostionSn(res);
+      if (data.status === 0) {
+        this.pages = data.data;
+      }
+    },
+  },
+};
+</script>
+<style scoped lang='less'>
+/deep/ .van-nav-bar__content {
+  height: 65px;
+}
+/deep/ .van-nav-bar__title {
+  font-family: "DINPro";
+  width: 100%;
+  height: 1.17333rem;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-style: normal;
+  font-weight: 500;
+  font-size: 0.48rem;
+  color: #14181f;
+}
+.bottomIfr {
+  // position: absolute;
+  // top: 1.5rem;
+  // left: 0;
+  // right: 0;
+  // bottom: 0;
+  width: 100vw;
+  height: calc(100% - 65px);
+  // height:;
+  background-color: #fff !important;
+}
+.pagebox {
+  margin: 0 15px;
+  height: 60px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #ddd;
+}
+.conentIfr {
+  width: 100%;
+  height: 90%;
+  border: none;
+  //取消滚动条
+  overflow: hidden;
+}
+</style>
diff --git a/src/page/user/Warehouse/data.list.vue b/src/page/user/Warehouse/data.list.vue
index 2625a9f..cef0ff2 100644
--- a/src/page/user/Warehouse/data.list.vue
+++ b/src/page/user/Warehouse/data.list.vue
@@ -21,8 +21,9 @@
         :style="actives === 1 ? 'height:5.52rem' : 'height:7.52rem'"
         v-for="(item, index) in dataList"
         :key="index"
+        @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)"
       >
-        <div @click="pushRouter(item)">
+        <div @click.stop="pushRouter(item)">
           <div class="title-box">
             <div class="span">{{ item.stockName }}</div>
             <div
@@ -34,6 +35,7 @@
           </div>
           {{ item.stockCode }}
         </div>
+        <!-- <div @click="$router.push('/Stockdetail')"></div> -->
         <van-row>
           <van-col span="8">
             <div style="text-align: left">
@@ -92,7 +94,7 @@
           <van-col span="8">
             <div style="text-align: left">
               <div class="sport-content-title2">
-                {{ $t("開倉手續費") }} ({{ activeObj.symbolCode }})
+                {{ $t("hj44") }} ({{ activeObj.symbolCode }})
               </div>
               <div class="sport-content-text2">{{ item.orderFee }}</div>
             </div>
@@ -135,8 +137,8 @@
           </van-col>
         </van-row>
 
-        <div class="but-box" v-if="actives === 0">
-          <div class="but" @click="close(item)">{{ $t("平仓") }}</div>
+        <div class="but-box" v-if="actives === 0" @click.stop="close(item)">
+          <div class="but">{{ $t("平仓") }}</div>
           <!-- <div class="but buts">止盈止损</div> -->
         </div>
       </div>
@@ -442,4 +444,6 @@
     text-align: right;
   }
 }
+
+
 </style>
diff --git a/src/page/user/compontents/transferindex-list.vue b/src/page/user/compontents/transferindex-list.vue
index 378d2d8..fbcfbfc 100644
--- a/src/page/user/compontents/transferindex-list.vue
+++ b/src/page/user/compontents/transferindex-list.vue
@@ -23,7 +23,7 @@
                 > {{ $t(item.descs.split("/")[1]) }}
               </div>
             </div>
-            <div>{{ Math.abs(Number(item.amount)) }} USD</div>
+            <div>{{ Math.abs(Number(item.amount)) }} {{ item.symbol }}</div>
           </div>
         </van-cell>
       </van-list>
@@ -46,9 +46,9 @@
   },
   methods: {
     async getMoenyLogs() {
-      const res = await getMoenyLog({ type: "转换" });
-      // const arr = res.data.filter((item) => item.accectType === "US");
-      this.list = res.data;
+      const res = await getMoenyLog({ type: "TRANSFER" });
+      const arr = res.data.filter((item) => Number(item.amount) < 0);
+      this.list = arr.reverse();
       // 加载状态结束
       this.loading = false;
       this.finished = true;
diff --git a/src/page/user/recharge-sure.vue b/src/page/user/recharge-sure.vue
index 7cc44e2..f16c412 100644
--- a/src/page/user/recharge-sure.vue
+++ b/src/page/user/recharge-sure.vue
@@ -111,6 +111,7 @@
           key: "HK",
         },
       ],
+
       bankCard: {},
       availableBalanceUSD: "0.0000",
       getMoneyList: [],
diff --git a/src/page/user/recharge.vue b/src/page/user/recharge.vue
index 553c436..7edccc9 100644
--- a/src/page/user/recharge.vue
+++ b/src/page/user/recharge.vue
@@ -58,7 +58,10 @@
             ></i>
           </div>
           <div class="main-title">{{ $t("請選擇充值賬戶") }}</div>
-          <van-cell is-link :title="rechargeAccountData.name || $t('請選擇')" />
+          <van-cell
+            is-link
+            :title="$t(rechargeAccountData.key) || $t('請選擇')"
+          />
           <!-- @click="rechargeAccountShow = true" -->
           <van-action-sheet
             v-model="rechargeAccountShow"
@@ -74,13 +77,6 @@
           </div>
 
           <div class="bottom-text">
-            <!---->
-            <!-- <div class="balance">
-              <div>需要支付</div>
-              <div class="balance-text" style="margin-bottom: 0px">
-                0.0000 {{ rechargeAccountData.symbolCode }}
-              </div>
-            </div> -->
             <div class="balance" style="margin-top: 10px">
               <div>{{ $t("最小充值金額") }}</div>
               <div class="balance-text" style="margin-bottom: 0px">
@@ -136,6 +132,7 @@
 import apiUrl from "@/axios/api.url.js";
 import { siteGetPayInfo, selCzFn } from "../../axios/api";
 import { Notify } from "vant";
+import { rechargeAccountActions } from "@/utils/rechargeActions";
 // baseURL
 export default {
   components: { ActionSheet, [Notify.Component.name]: Notify.Component },
@@ -157,34 +154,7 @@
       paymentShow: false,
       paymentActions: [],
       rechargeAccountShow: false,
-      rechargeAccountActions: [
-        {
-          title: this.$t("美股資產"),
-          title1: this.$t("美股可用"),
-          title2: this.$t("美股冻结"),
-          name: this.$t("US"),
-          key: "US",
-          symbol: "$",
-          symbolCode: "USD",
-        },
-        // {
-        //   title: this.$t("印股資產"),
-        //   title1: this.$t("印股可用"),
-        //   title2: this.$t("印股冻结"),
-        //   key: "IN",
-        //   symbol: "RM",
-        //   symbolCode: "MYR",
-        // },
-        {
-          name: this.$t("MAS"),
-          title: this.$t("馬股資產"),
-          title1: this.$t("馬股可用"),
-          title2: this.$t("馬股冻结"),
-          key: "MAS",
-          symbol: "RM",
-          symbolCode: "MYR",
-        },
-      ],
+      rechargeAccountActions: rechargeAccountActions,
       showBtn: true,
       imgStatus: false,
       form: {
@@ -206,7 +176,6 @@
       this.judgeValue();
     },
     async selCzFns() {
-      // payTypeId    payAmt  img
       if (!this.value) {
         return Notify(this.$t("hj171"));
       }
@@ -253,7 +222,6 @@
     },
     // upload
     async afterRead(file) {
-      console.log(file);
       let formData = new FormData();
       formData.append("file", file.file || file.raw);
       // console.log(formData);
@@ -266,7 +234,6 @@
       });
 
       clipboard.on("success", () => {
-        // alert("已复制到剪贴板");
         clipboard.destroy();
       });
 
@@ -283,14 +250,11 @@
     },
     paymentSelect(e) {
       this.paymentSelectData = e;
-      console.log(e);
       this.rechargeAccountActions.map((item) => {
-        console.log(item, e);
         if (item.key === e.assetsType) {
           this.rechargeAccountData = item;
         }
       });
-      console.log(this.rechargeAccountData, " this.rechargeAccountData");
     },
   },
 };
diff --git a/src/router/index.js b/src/router/index.js
index a8ce641..6cef809 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -18,6 +18,7 @@
 import Inquiry from "@/page/home/inquiry";
 // import OrderList from '@/page/user/order-list'
 import Warehouse from "@/page/user/Warehouse.vue";
+import Stockdetail from "@/page/user/Warehouse/Stockdetail.vue";
 import yeb from "@/page/user/yeb.vue";
 import yebs from "@/page/user/yebs.vue";
 import yebs2 from "@/page/user/yebs2.vue";
@@ -474,6 +475,17 @@
       component: Warehouse
     },
     {
+      path: "/Stockdetail",
+      name: "Stockdetail",
+      meta: {
+        title: i18n.t("订单详情"),
+        requireAuth: true,
+        hasHeader: false,
+        index: 22
+      },
+      component: Stockdetail
+    },
+    {
       path: "/holdorderlist",
       name: "holdorderlist",
       meta: {
diff --git a/src/utils/rechargeActions.js b/src/utils/rechargeActions.js
new file mode 100644
index 0000000..a87161f
--- /dev/null
+++ b/src/utils/rechargeActions.js
@@ -0,0 +1,20 @@
+export const rechargeAccountActions = [
+  {
+    asset_name: "美股資產",
+    key: "US",
+    symbol: "$",
+    symbolCode: "USD"
+  },
+  {
+    asset_name: "馬股資產",
+    key: "MAS",
+    symbol: "RM",
+    symbolCode: "MYR"
+  },
+  {
+    asset_name: "港股資產",
+    key: "HK",
+    symbol: "HK$",
+    symbolCode: "HKD"
+  }
+];

--
Gitblit v1.9.3