补贴申请

This commit is contained in:
George
2025-10-31 17:20:43 +08:00
parent 9d0d4d9444
commit 3fdeac8cc2
14 changed files with 309 additions and 2 deletions

View File

@ -52,4 +52,13 @@ export function calculatePresentedCredit(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 申请补贴
export function applySubsidy(data) {
return request({
url: '/app/subsidy/apply',
method: 'post',
data
})
}

View File

@ -24,7 +24,7 @@
</div> </div>
</div> </div>
</template> </template>
<div class="msg-body" > <div class="msg-body" style="flex-direction: row;">
<svg-icon v-if="options.status === 'success'" icon-class="success" class="msg-icon" /> <svg-icon v-if="options.status === 'success'" icon-class="success" class="msg-icon" />
<svg-icon v-else-if="options.status === 'error'" icon-class="error" class="msg-icon" /> <svg-icon v-else-if="options.status === 'error'" icon-class="error" class="msg-icon" />
<svg-icon v-else-if="options.status === 'warning'" icon-class="warning" class="msg-icon" /> <svg-icon v-else-if="options.status === 'warning'" icon-class="warning" class="msg-icon" />

View File

@ -433,6 +433,7 @@ export default {
"transfer": "تحويل", "transfer": "تحويل",
"fundout": "سحب العمولة", "fundout": "سحب العمولة",
"fundtrans": "تحويل العمولة", "fundtrans": "تحويل العمولة",
"subsidy": "طلب الإعانات",
"leverageChange": "تعديل الضغط المالي", "leverageChange": "تعديل الضغط المالي",
"passwordChange": "تغيير كلمة المرور الرئيسية", "passwordChange": "تغيير كلمة المرور الرئيسية",
"investorPasswordChange": "تغيير كلمة المرور للمستثمر", "investorPasswordChange": "تغيير كلمة المرور للمستثمر",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "Transfer", "transfer": "Transfer",
"fundout": "Rebates Withdrawal", "fundout": "Rebates Withdrawal",
"fundtrans": "Rebates Transfer", "fundtrans": "Rebates Transfer",
"subsidy": "Subsidy application",
"leverageChange": "Adjust Leverage", "leverageChange": "Adjust Leverage",
"passwordChange": "Change Master Password", "passwordChange": "Change Master Password",
"investorPasswordChange": "Change Investor Password", "investorPasswordChange": "Change Investor Password",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "Transferir", "transfer": "Transferir",
"fundout": "Retiro de Rebates", "fundout": "Retiro de Rebates",
"fundtrans": "Transferencia de Rebates", "fundtrans": "Transferencia de Rebates",
"subsidy": "Solicitud de subvención",
"leverageChange": "Ajustar Aliciente", "leverageChange": "Ajustar Aliciente",
"passwordChange": "Cambiar Contraseña Maestra", "passwordChange": "Cambiar Contraseña Maestra",
"investorPasswordChange": "Cambiar Contraseña de Inversor", "investorPasswordChange": "Cambiar Contraseña de Inversor",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "ट्रांसफर", "transfer": "ट्रांसफर",
"fundout": "रिबेट निकासी", "fundout": "रिबेट निकासी",
"fundtrans": "रिबेट ट्रांसफर", "fundtrans": "रिबेट ट्रांसफर",
"subsidy": "सब्सिडी आवेदन",
"leverageChange": "लेवरेज समायोजित करें", "leverageChange": "लेवरेज समायोजित करें",
"passwordChange": "मैस्टर पासवर्ड बदलें", "passwordChange": "मैस्टर पासवर्ड बदलें",
"investorPasswordChange": "इनवेस्टर पासवर्ड बदलें", "investorPasswordChange": "इनवेस्टर पासवर्ड बदलें",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "Transfer", "transfer": "Transfer",
"fundout": "Penarikan Rebate", "fundout": "Penarikan Rebate",
"fundtrans": "Transfer Rebate", "fundtrans": "Transfer Rebate",
"subsidy": "Aplikasi subsidi",
"leverageChange": "Ubah Leverage", "leverageChange": "Ubah Leverage",
"passwordChange": "Ubah Password Utama", "passwordChange": "Ubah Password Utama",
"investorPasswordChange": "Ubah Password Investor", "investorPasswordChange": "Ubah Password Investor",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "이체", "transfer": "이체",
"fundout": "리베이트 출금", "fundout": "리베이트 출금",
"fundtrans": "리베이트 이체", "fundtrans": "리베이트 이체",
"subsidy": "보조금 신청",
"leverageChange": "레버리지 조정", "leverageChange": "레버리지 조정",
"passwordChange": "주 로그인 비밀번호 변경", "passwordChange": "주 로그인 비밀번호 변경",
"investorPasswordChange": "투자자 비밀번호 변경", "investorPasswordChange": "투자자 비밀번호 변경",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "โอนย้าย", "transfer": "โอนย้าย",
"fundout": "ถอนคืนค่าคอมมิชชั่น", "fundout": "ถอนคืนค่าคอมมิชชั่น",
"fundtrans": "โอนค่าคอมมิชชั่น", "fundtrans": "โอนค่าคอมมิชชั่น",
"subsidy": "คำขอเงินอุดหนุน",
"leverageChange": "ปรับเปลี่ยนกู้ยืม", "leverageChange": "ปรับเปลี่ยนกู้ยืม",
"passwordChange": "เปลี่ยนรหัสผ่านหลัก", "passwordChange": "เปลี่ยนรหัสผ่านหลัก",
"investorPasswordChange": "เปลี่ยนรหัสผ่านนักลงทุน", "investorPasswordChange": "เปลี่ยนรหัสผ่านนักลงทุน",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "Chuyển khoản", "transfer": "Chuyển khoản",
"fundout": "Rút hoa hồng", "fundout": "Rút hoa hồng",
"fundtrans": "Chuyển hoa hồng", "fundtrans": "Chuyển hoa hồng",
"subsidy": "Đơn xin trợ cấp",
"leverageChange": "Điều chỉnh Tỷ lệ_MARGIN", "leverageChange": "Điều chỉnh Tỷ lệ_MARGIN",
"passwordChange": "Đổi Mật khẩu chính", "passwordChange": "Đổi Mật khẩu chính",
"investorPasswordChange": "Đổi Mật khẩu đầu tư", "investorPasswordChange": "Đổi Mật khẩu đầu tư",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "转账", "transfer": "转账",
"fundout": "佣金出金", "fundout": "佣金出金",
"fundtrans": "佣金转账", "fundtrans": "佣金转账",
"subsidy": "补贴申请",
"leverageChange": "调整杠杆", "leverageChange": "调整杠杆",
"passwordChange": "修改交易密码", "passwordChange": "修改交易密码",
"investorPasswordChange": "修改只读密码", "investorPasswordChange": "修改只读密码",

View File

@ -433,6 +433,7 @@ export default {
"transfer": "轉賬", "transfer": "轉賬",
"fundout": "佣金出金", "fundout": "佣金出金",
"fundtrans": "佣金轉帳", "fundtrans": "佣金轉帳",
"subsidy": "補貼申請",
"leverageChange": "調整槓桿", "leverageChange": "調整槓桿",
"passwordChange": "修改交易密碼", "passwordChange": "修改交易密碼",
"investorPasswordChange": "修改只讀密碼", "investorPasswordChange": "修改只讀密碼",

View File

@ -13,6 +13,7 @@
<div :class="['tab-item', { 'tab-item-active': activeMtName === 'transfer'}]" @click="tabClick('transfer')">{{ t('home.transfer') }}</div> <div :class="['tab-item', { 'tab-item-active': activeMtName === 'transfer'}]" @click="tabClick('transfer')">{{ t('home.transfer') }}</div>
<div v-if="userInfo.user_type == 1" :class="['tab-item', { 'tab-item-active': activeMtName === 'fundout'}]" @click="tabClick('fundout')">{{ t('home.fundout') }}</div> <div v-if="userInfo.user_type == 1" :class="['tab-item', { 'tab-item-active': activeMtName === 'fundout'}]" @click="tabClick('fundout')">{{ t('home.fundout') }}</div>
<div v-if="userInfo.user_type == 1" :class="['tab-item', { 'tab-item-active': activeMtName === 'fundTransfer'}]" @click="tabClick('fundTransfer')">{{ t('home.fundtrans') }}</div> <div v-if="userInfo.user_type == 1" :class="['tab-item', { 'tab-item-active': activeMtName === 'fundTransfer'}]" @click="tabClick('fundTransfer')">{{ t('home.fundtrans') }}</div>
<div :class="['tab-item', { 'tab-item-active': activeMtName === 'subsidy'}]" @click="tabClick('subsidy')">{{ t('home.subsidy') }}</div>
</div> </div>
<div class="tab-active-bar"></div> <div class="tab-active-bar"></div>
</div> </div>
@ -463,6 +464,9 @@
v-model:limit="queryFundTransferParams.page_size" v-model:limit="queryFundTransferParams.page_size"
@pagination="getList" /> @pagination="getList" />
</div> </div>
<div class="report" v-if="activeMtName == 'subsidy'">
<mt-subsidy />
</div>
</div> </div>
</div> </div>
@ -491,6 +495,7 @@ import { generateShortcuts } from '@/utils/shortcutsUtils';
import dayjs from 'dayjs' import dayjs from 'dayjs'
import PayChannel from './payChannel' import PayChannel from './payChannel'
import MtGoldOut from "./mtGoldOut.vue" import MtGoldOut from "./mtGoldOut.vue"
import MtSubsidy from "./mtSubsidy.vue"
import MtTrans from "./mtTrans.vue"; import MtTrans from "./mtTrans.vue";
import FundTrans from "./ibTrans.vue"; import FundTrans from "./ibTrans.vue";
import FundGoldOut from "./ibGoldOut.vue"; import FundGoldOut from "./ibGoldOut.vue";
@ -539,6 +544,7 @@ const loadingGoldout = ref(false);
const loadingTransfer = ref(false); const loadingTransfer = ref(false);
const loadingFundout = ref(false); const loadingFundout = ref(false);
const loadingFundTransfer = ref(false); const loadingFundTransfer = ref(false);
const loadingSubsidy = ref(false);
const loadingCancelMtGoldOut = ref(false); const loadingCancelMtGoldOut = ref(false);
const loadingCancelFundOut = ref(false); const loadingCancelFundOut = ref(false);
@ -695,6 +701,8 @@ function getList() {
queryFundout() queryFundout()
} else if (activeMtName.value == 'fundTransfer' && permissionStore.powerList.includes('applyFundTransfer')) { } else if (activeMtName.value == 'fundTransfer' && permissionStore.powerList.includes('applyFundTransfer')) {
queryFundTransfer() queryFundTransfer()
} else if (activeMtName.value == 'subsidy') {
querySubsidy()
} }
} }
@ -783,6 +791,23 @@ function queryFundTransfer() {
}) })
} }
function querySubsidy() {
loadingSubsidy.value = true;
if (goldoutDateRange.value && goldoutDateRange.value.length) {
queryGoldOutParams.value.date_1_start = goldoutDateRange.value[0]
queryGoldOutParams.value.date_1_end = goldoutDateRange.value[1]
} else {
queryGoldOutParams.value.date_1_start = undefined
queryGoldOutParams.value.date_1_end = undefined
}
queryMyGoldOutList(queryGoldOutParams.value).then(response => {
goldoutList.value = response.data.records;
goldoutCols.value = response.data.columns;
goldoutTotal.value = response.data.totalRecords;
loadingSubsidy.value = false;
})
}
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
if (activeMtName.value == 'goldin') { if (activeMtName.value == 'goldin') {

View File

@ -0,0 +1,263 @@
<template>
<div class="channel-wrap">
<div class="channel-pannel" >
<div class="pay-form">
<el-row>
<el-col>
<!-- apply -->
<el-row>
<div class="goldin-form">
<el-form autocapitalize="off" :inline="true" label-position="top" size="large" :model="form" :rules="rules" ref="formRef" style="width: 500px;margin: auto;">
<el-col>
<el-form-item :label="t('capital.mt4_login')" prop="mt_login" >
<el-select v-model="queryMtAccountIndex" :placeholder="t('common.selectChoose')" clearable @clear="queryMtAccountIndex = null" style="width: 100%" >
<el-option v-for="(item, index) in mtAccountList" :key="index" :label="item.mt4_server_name + ' ' + item.mt4_login" :value="index" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-form-item style="width: 100%;">
<el-button :loading="payLoading" class="sub-btn" style="width: 400px;height: 50px;font-size: 18px;margin-left: auto;margin-right: auto;" type="primary" @click="handleSubmit" >{{ t('capital.submit') }}
<template #loading>
<l-ring-2 size="20" stroke="2" stroke-length="0.25" bg-opacity="0.1" speed="0.8" color="white" style="margin-right: 17px;" ></l-ring-2>
</template>
</el-button>
</el-form-item>
</el-form>
</div>
</el-row>
</el-col>
</el-row>
</div>
</div>
</div>
</template>
<script setup>
import { defineModel, watch } from "vue"
import { useLocale } from 'element-plus'
import { serverLang } from '@/utils/i18n'
import { getTemplateDetailByCode, getMtTableInfo } from '@/api/common'
import { applySubsidy } from '@/api/goldin'
const { proxy } = getCurrentInstance();
const { t } = useLocale()
const active = ref(false)
const payLoading = ref(false)
const mtAccountList = ref([])
const queryMtAccountIndex = ref(null)
const d = reactive({
form: {
mt_server: undefined,
mt_login: undefined,
},
rules: {
mt_server: [{ required: true, message: "", trigger: "blur" }],
mt_login: [{ required: true, message: "", trigger: "blur" }],
safe_pass: undefined
}
});
const { form, rules } = toRefs(d);
loadMtAccountList()
watch(queryMtAccountIndex, (n, o) => {
if(n == null || n < 0 || !mtAccountList.value || !mtAccountList.value.length) {
form.value.mt_server = undefined
form.value.mt_login = undefined
} else {
const { mt4_login, mt4_server } = mtAccountList.value[queryMtAccountIndex.value]
form.value.mt_server = mt4_server
form.value.mt_login = mt4_login
}
}, { immediate: true })
function selectChannel() {
active.value = !!!active.value
}
function reset() {
queryMtAccountIndex.value = null
loadMtAccountList()
form.value = {
mt_server: undefined,
mt_login: undefined,
safe_pass: undefined
}
}
function loadMtAccountList() {
getMtTableInfo({
mt4_server: '',
language: serverLang(),
server_type: 'live'
}).then(resp => {
if (resp.data) {
mtAccountList.value = resp.data
}
})
}
function handleSubmit() {
proxy.$refs["formRef"].validate(valid => {
if (valid) {
payLoading.value = true
proxy.loading.show()
const { mt_server, mt_login, safe_pass } = form.value
applySubsidy({
mt_server,
mt_login,
safe_pass,
}).then(resp => {
payLoading.value = false
proxy.loading.hide()
reset()
window.showTip({
title: t('activity.dh'),
status: 'success'
})
}).catch(() => {
payLoading.value = false
proxy.loading.hide()
})
}
})
}
</script>
<style lang="scss" scoped>
.channel-wrap {
width: 100%;
margin-bottom: 10px;
margin-left: -12px;
.channel-tab-line {
width: 100%;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
}
.channel-tab {
width: 390px;
height: 105px;
border-radius: 8px 8px 8px 8px;
background-color: #fff;
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
// display: flex;
// align-items: center;
font-size: 22px;
padding: 0 20px;
margin-top: 12px;
margin-left: 12px;
margin-bottom: 12px;
user-select: none;
cursor: pointer;
position: relative;
.channel-icon {
width: 80px;
height: 80px;
margin-right: 30px;
}
.channel_name {
width: 200px;
font-size: 22px;
font-weight: 700;
letter-spacing: 0px;
color: rgba(51, 51, 51, 1);
}
}
.channel-tab:not(:last-child) {
margin-right: 20px;
}
.tab-active {
// padding-bottom: 12px;
// height: 117px;
// margin-bottom: 0;
box-shadow: none;
border-radius: 8px 8px 0 0;
}
.active-overlay {
position: absolute;
top: 0;
width: 100%;
bottom: -20px;
left: 0;
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
background-color: transparent;
border-radius: 8px 8px 0 0;
z-index: 2;
}
.active-overlay::after {
content: '';
position: absolute;
bottom: 0;
width: 100%;
background: #fff;
left: 0;
height: 20px;
}
.channel-pannel {
width: 100%;
min-height: 500px;
margin-left: 12px;
margin-bottom: 40px;
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
.pay-form {
// background-color: #d64a4a;
min-height: 500px;
width: 100%;
padding: 50px 80px;
position: relative;
}
}
}
.goldin-form {
width: 100%;
position: relative;
}
.currency-amount {
font-size: 36px;
font-weight: 700;
letter-spacing: 0px;
// line-height: 55.02px;
color: rgba(41, 187, 228, 1);
}
.sub-btn {
width: 100%;
height: 40px;
margin-top: 50px;
}
.template-content {
padding: 50px 50px;
}
.template-content > div {
font-size: 14px;
font-weight: 400;
letter-spacing: 0px;
line-height: 27px;
color: rgba(170, 170, 170, 1);
text-align: left;
}
</style>
<style>
.goldin-form .el-input-number .el-input__inner {
text-align: left;
}
</style>