From 3bc690331548ef221c37d03637e0618e1d55352b Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Fri, 15 Aug 2025 18:07:45 +0800
Subject: [PATCH] 1

---
 dist.rar                                    |    0 
 src/lang/es.json                            |    1 
 src/lang/zh.json                            |    1 
 src/views/account/components/Trasferire.vue |  229 +++++++++++++++++++++++++++++++++++++++++++++
 src/views/account/account.vue               |   26 ++++
 src/lang/hi.json                            |    1 
 src/assets/images/account_hz.png            |    0 
 src/axios/api.js                            |    9 +
 src/lang/cht.json                           |    1 
 src/lang/en.json                            |    1 
 src/views/account/components/Withdraw.vue   |    8 +
 11 files changed, 272 insertions(+), 5 deletions(-)

diff --git a/dist.rar b/dist.rar
new file mode 100644
index 0000000..8f35f46
--- /dev/null
+++ b/dist.rar
Binary files differ
diff --git a/src/assets/images/account_hz.png b/src/assets/images/account_hz.png
new file mode 100644
index 0000000..7adcaeb
--- /dev/null
+++ b/src/assets/images/account_hz.png
Binary files differ
diff --git a/src/axios/api.js b/src/axios/api.js
index aa31e5b..f9b904a 100644
--- a/src/axios/api.js
+++ b/src/axios/api.js
@@ -5,6 +5,15 @@
 export function getMoney(options) {
   return post("/user/getMoney.do", options);
 }
+
+// 提交划转
+export function transfer(options) {
+  return post("/user/transfer.do", options);
+}
+// 获取手续费
+export function getfee(options) {
+  return post("/api/user/queryStockConfigTwo.do", options);
+}
 // 大宗交易下单
 export function buyStockDz(options) {
   return post("/user/buyStockDz.do", options);
diff --git a/src/lang/cht.json b/src/lang/cht.json
index f5cecad..9164acb 100644
--- a/src/lang/cht.json
+++ b/src/lang/cht.json
@@ -1,4 +1,5 @@
 {
+	"汇率":"匯率",
   "已上市": "已上市",
   "关于我们详情": "我們的多元化團隊包括CS、CA、MBA、CFA等專業人士。五角集團為社會各界提供一站式服務,提供綜合的商業、法律和金融解決方案。五角證券經紀是五角集團旗下從事股票、衍生品、共同基金等業務的單位,",
   "关于我们详情1": "為投資者群體提供證券經紀平台,以及貨幣段等內部存管參與者服務。我們的團隊擁有豐富多樣的經驗,包括一些歷史交易和公司程序。",
diff --git a/src/lang/en.json b/src/lang/en.json
index 89d302e..bcf6fbd 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -1,4 +1,5 @@
 {
+	"汇率":"exchange rate",
   "已上市": "Already on the market",
   "关于我们详情": "Our diverse team includes CS, CA, MBA, CFA and other professionals. Pentagon Group provides a one-stop-shop providing integrated business, legal and financial solutions to various sections of the society. Pentagon Stock Broking, Pentagon Group's unit dealing in equities, derivatives, mutual funds,",
   "关于我们详情1": "Provides stock broking platform to its investor groups along with services of inhouse depository participant for currency segment etc. Our team has rich and diverse experience, including some historical transactions and corporate proceedings.",
diff --git a/src/lang/es.json b/src/lang/es.json
index c1cf637..2dcbb28 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -1,4 +1,5 @@
 {
+	"汇率":"taxa de câmbio",
   "已上市": "Listada",
   "秘钥": "Clave",
   "描述": "Descripción",
diff --git a/src/lang/hi.json b/src/lang/hi.json
index 3ba08ac..7d7c790 100644
--- a/src/lang/hi.json
+++ b/src/lang/hi.json
@@ -1,4 +1,5 @@
 {
+	"汇率":"विनिमय दर",
   "已上市": "बाजार में पहले से मौजूद",
   "关于我们详情": "हमारी विविध टीम में CS, CA, MBA, CFA और अन्य पेशेवर शामिल हैं। पेंटागन समूह समाज के विभिन्न वर्गों को एकीकृत व्यावसायिक, कानूनी और वित्तीय समाधान प्रदान करने वाला एक-स्टॉप-शॉप है। पेंटागन स्टॉक ब्रोकिंग, पेंटागन समूह की इकाई जो इक्विटी, डेरिवेटिव्स, म्यूचुअल फंड्स में व्यापार करती है,",
   "关于我们详情1": "अपने निवेशक समूहों को स्टॉक ब्रोकिंग प्लेटफॉर्म प्रदान करता है, साथ ही मुद्रा खंड आदि के लिए इन-हाउस डिपॉजिटरी प्रतिभागी की सेवाएं भी प्रदान करता है। हमारी टीम के पास समृद्ध और विविध अनुभव है, जिसमें कुछ ऐतिहासिक लेनदेन और कॉर्पोरेट कार्यवाही शामिल हैं।",
diff --git a/src/lang/zh.json b/src/lang/zh.json
index e1c0bf3..def42bd 100644
--- a/src/lang/zh.json
+++ b/src/lang/zh.json
@@ -1,4 +1,5 @@
 {
+  "汇率":"汇率",
   "已上市": "已上市",
   "秘钥": "秘钥",
   "描述": "描述",
diff --git a/src/views/account/account.vue b/src/views/account/account.vue
index be80a53..c5b3789 100644
--- a/src/views/account/account.vue
+++ b/src/views/account/account.vue
@@ -33,6 +33,16 @@
         </div>
 
         <div class="action-buttons">
+			<el-button
+			  type="success"
+			  class="deposit-btn"
+			  @click="trasferireVisible = true"
+			>
+			  <div class="flex-center">
+			    <img src="@/assets/images/account_hz.png" alt="Deposit" />
+			    {{ $t("劃轉") }}
+			  </div>
+			</el-button>
           <el-button
             type="success"
             class="deposit-btn"
@@ -52,7 +62,7 @@
         </div>
       </div>
 
-      <div class="loan-info flex-between-start">
+      <!-- <div class="loan-info flex-between-start">
         <div style="width: 50%" class="flex-center">
           <div class="loan-item">
             <div class="loan-label">{{ $t("待还款金额") }}</div>
@@ -82,7 +92,7 @@
             >{{ $t("dkjl") }}</el-button
           >
         </div>
-      </div>
+      </div> -->
     </div>
 
     <!-- 市场数据 -->
@@ -373,13 +383,20 @@
       </div>
     </div>
 
+	<!-- 划转弹窗 -->
+	<Trasferire
+	  :dialogVisible.sync="trasferireVisible"
+	  v-if="trasferireVisible"
+	  @onClose="getMoney"
+	  :maxNum="Math.floor(moneyData.availableBalance * 100) / 100"
+	></Trasferire>
     <!-- 充值弹窗 -->
     <Deposit
       :dialogVisible.sync="depositDialogVisible"
       v-if="depositDialogVisible"
       @onClose="getMoney"
     ></Deposit>
-
+	
     <!-- 提现弹窗 -->
     <Withdraw
       :dialogVisible.sync="withdrawVisible"
@@ -429,6 +446,7 @@
 import lp from "./components/lp.vue";
 import Deposit from "./components/Deposit.vue";
 import Withdraw from "./components/Withdraw.vue";
+import Trasferire from "./components/Trasferire.vue";
 import LoanApplication from "./components/LoanApplication.vue";
 import LoanRecords from "./components/LoanRecords.vue";
 import Position from "./components/Position.vue";
@@ -446,6 +464,7 @@
     lp,
     bto,
     Deposit,
+	Trasferire,
     Withdraw,
     LoanApplication,
     LoanRecords,
@@ -461,6 +480,7 @@
       depositAmount: "", // 存款金额
       depositMethod: "Bank Transfer", // 存款方式
       depositDialogVisible: false, // 存款弹窗显示状态
+	  trasferireVisible: false, // 存款弹窗显示状态
       withdrawVisible: false, // 存款弹窗显示状态
       applicationVisible: false, // 申请贷款弹窗显示状态
       recordsVisible: false, // 贷款记录弹窗显示状态
diff --git a/src/views/account/components/Trasferire.vue b/src/views/account/components/Trasferire.vue
new file mode 100644
index 0000000..9017d61
--- /dev/null
+++ b/src/views/account/components/Trasferire.vue
@@ -0,0 +1,229 @@
+<template>
+	<el-dialog :title="$t('劃轉')" :visible.sync="dialogVisible" width="720px" :before-close="onClose">
+		<el-form ref="withdrawform" :model="form" label-width="auto" :rules="rules">
+			<el-form-item :label="$t('从')" prop="fromType">
+				<div class="flex-center">
+					<el-select @change="getExchangeRate" v-model="form.fromType" :placeholder="$t('請選擇')">
+						<el-option v-for="item in options" :key="item.value" :label="item.name" :value="item.name">
+						</el-option>
+					</el-select>
+					<el-input v-model.number="form.amt" @input="amtinput" type="number"></el-input>
+					<el-button type="primary" style="margin-left: 10px" @click="form.amt = maxNum"
+						class="submit">{{ $t("最大") }}</el-button>
+
+				</div>
+			</el-form-item>
+
+			<el-form-item :label="$t('到')" prop="toType">
+				<div class="flex-center">
+					<el-select @change="getExchangeRate" v-model="form.toType" :placeholder="$t('請選擇')">
+						<el-option v-for="item in actions" :key="item.value" :label="item.name" :value="item.name">
+						</el-option>
+					</el-select>
+					<el-input v-model.number="price" disabled type="number"></el-input>
+				</div>
+			</el-form-item>
+
+			<el-form-item>
+				<div class="ts">
+					{{ $t("可用餘額") }}
+					{{ maxNum }} {{form.fromType}}
+				</div>
+				<div class="ts">
+					{{ $t("汇率") }}
+					1{{ form.fromType }} ≈ {{rata}}{{form.toType}}
+				</div>
+				<div class="ts">
+					{{ $t("hj44") }}
+					{{handling_fee}}
+				</div>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button @click="onClose">{{ $t("qx") }}</el-button>
+				<el-button type="primary" @click="onSubmit" class="submit">
+					{{ $t("hj161") }}
+				</el-button>
+			</el-form-item>
+		</el-form>
+	</el-dialog>
+</template>
+
+<script>
+	import * as api from "@/axios/api";
+	export default {
+		data() {
+			return {
+				form: {
+					fromType: "US", //账户
+					toType: "HK", //指定账户
+					amt: "", //划转金额
+				},
+				handling_fee: "", //手续费
+				rata: "", //汇率
+				price: "", //划转后金额
+				allMoney: "",
+				moneylist:[],  //全部账户信息
+				rules: {
+					fromType: [{
+						required: true,
+						message: this.$t("請選擇"),
+						trigger: "change"
+					}, ],
+					toType: [{
+						required: true,
+						message: this.$t("請選擇"),
+						trigger: "change"
+					}],
+					bankId: [{
+						required: true,
+						message: this.$t("請選擇"),
+						trigger: "change"
+					}, ],
+					amt: [{
+						required: true,
+						message: this.$t("请输入")
+					}],
+				},
+				options: [{
+					name: "US",
+					value: "USD"
+				}, {
+					name: "HK",
+					value: "HKD"
+				}, {
+					name: "IN",
+					value: "INR"
+				}, {
+					name: "TW",
+					value: "TWD"
+				}],
+				actions: [{
+					name: "US",
+					value: "USD"
+				}, {
+					name: "HK",
+					value: "HKD"
+				}, {
+					name: "IN",
+					value: "INR"
+				}, {
+					name: "TW",
+					value: "TWD"
+				}],
+				yhkactions: [],
+			};
+		},
+		props: {
+			dialogVisible: {
+				type: Boolean,
+				default: false,
+			},
+			//可用余额
+			maxNum: {
+				type: Number,
+				default: 0,
+			},
+		},
+		created() {
+			this.getExchangeRate()
+			this.getfee()
+			this.getMoney()
+		},
+		methods: {
+			
+			async getMoney() {
+				let data = await api.getMoney();
+				if (data.status === 0) {
+					this.moneylist = data.data
+				}
+			},
+			amtinput(e) {
+				this.price = e * this.rata
+			},
+			async getfee() {
+				let data = await api.getfee();
+				if (data.status == 0) {
+					this.handling_fee = data.data.cValue
+				}
+			},
+			async getExchangeRate() {
+				// this.getMoney()
+				// this.amtinput()
+				let selectedName = this.form.fromType;
+				let toselectedName = this.form.toType;
+				if (selectedName == toselectedName) {
+					this.rata = '1'
+					return
+				}
+				let selectedItem = this.options.find(item => item.name === selectedName);
+				let toselectedItem = this.actions.find(item => item.name === toselectedName);
+				
+				this.moneylist.forEach((item) => {
+				  if (item.symbolCode == selectedItem.value ) {
+				    this.maxNum = item.availableBalance;
+				  }
+				});
+				
+				let data = await api.getRateInfo();
+				data.data &&
+					data.data.forEach((item) => {
+						if (item.currency == selectedItem.value && item.conversionCurrency == toselectedItem
+							.value) {
+							this.rata = item.rata;
+						}
+					});
+			},
+			// 关闭弹窗
+			onClose() {
+				this.$emit("update:dialogVisible", false);
+				this.$emit("onClose"); // 关闭弹窗时,通知父组件
+			},
+			// 提交
+			onSubmit() {
+				this.$refs["withdrawform"].validate(async (valid) => {
+					if (valid) {
+						let data = await api.transfer(this.form);
+						if (data.status == 0) {
+							this.$message.success(this.$t("划转成功"));
+							this.onClose();
+						}
+					} else {
+						console.log("outMoney err");
+						return false;
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	::v-deep .el-input--suffix .el-input__inner {
+		width: 280px;
+	}
+
+	::v-deep .el-select-dropdown__list {
+		display: flex;
+		flex-direction: column;
+	}
+
+	::v-deep .el-radio__input.is-checked .el-radio__inner {
+		border-color: #c4d600;
+		background: #c4d600;
+	}
+
+	::v-deep .el-radio__input.is-checked+.el-radio__label {
+		color: #c4d600;
+	}
+
+	.submit {
+		background-color: #c4d600 !important;
+		border-color: #c4d600 !important;
+	}
+
+	.ts {
+		color: #dfb758;
+		text-align: end;
+	}
+</style>
\ No newline at end of file
diff --git a/src/views/account/components/Withdraw.vue b/src/views/account/components/Withdraw.vue
index f99f234..f31a520 100644
--- a/src/views/account/components/Withdraw.vue
+++ b/src/views/account/components/Withdraw.vue
@@ -12,7 +12,7 @@
             v-for="item in options"
             :key="item.value"
             :label="item.name"
-            :value="item.value"
+            :value="item.name"
           >
           </el-option>
         </el-select>
@@ -93,7 +93,7 @@
         ],
         amt: [{ required: true, message: this.$t("请输入") }],
       },
-      options: [{ name: "USD", value: "USD" }],
+      options: [{ name: "US", value: "USD" },{ name: "HK", value: "HKD" },{ name: "IN", value: "INR" },{ name: "TW", value: "TWD" }],
       actions: [{ name: this.$t("hj215"), value: "YHK" }],
       yhkactions: [],
     };
@@ -149,6 +149,10 @@
 </script>
 
 <style lang="scss" scoped>
+	::v-deep .el-select-dropdown__list{
+		display: flex;
+		flex-direction: column;
+	}
 ::v-deep .el-radio__input.is-checked .el-radio__inner {
   border-color: #c4d600;
   background: #c4d600;

--
Gitblit v1.9.3