|
@@ -12,13 +12,17 @@
|
|
|
<view class="b-card">
|
|
<view class="b-card">
|
|
|
<view class="card-top">
|
|
<view class="card-top">
|
|
|
<view class="tit">
|
|
<view class="tit">
|
|
|
- <text v-t="'Label.AgentNumber'"></text>
|
|
|
|
|
- <text>:{{ ibInfo.ibNo }}</text>
|
|
|
|
|
|
|
+ <text>
|
|
|
|
|
+ <text v-t="'Label.AgentNumber'"></text>
|
|
|
|
|
+ :{{ ibInfo.ibNo }}
|
|
|
|
|
+ </text>
|
|
|
<text class="balance-kg"></text>
|
|
<text class="balance-kg"></text>
|
|
|
- <text v-t="'Label.CommissionBalance'"></text>
|
|
|
|
|
- <text>:$</text>
|
|
|
|
|
- <text>{{ balanceInt }}</text>
|
|
|
|
|
- <text>.{{ balanceDecimal }}</text>
|
|
|
|
|
|
|
+ <text>
|
|
|
|
|
+ <text v-t="'Label.CommissionBalance'"></text>
|
|
|
|
|
+ <text>:$</text>
|
|
|
|
|
+ <text>{{ balanceInt }}</text>
|
|
|
|
|
+ <text>.{{ balanceDecimal }}</text>
|
|
|
|
|
+ </text>
|
|
|
</view>
|
|
</view>
|
|
|
<uni-forms ref="formRef" :model="form" :rules="rules" label-width="300" label-position="top"
|
|
<uni-forms ref="formRef" :model="form" :rules="rules" label-width="300" label-position="top"
|
|
|
validate-trigger="submit">
|
|
validate-trigger="submit">
|
|
@@ -44,54 +48,60 @@
|
|
|
<view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
|
|
<view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <template v-if="activeTab != 3">
|
|
|
|
|
|
|
|
- <!-- 20%赠金-年中赠金 -->
|
|
|
|
|
- <view class="form-row" v-if="tableData4TwoFlag">
|
|
|
|
|
- <uni-forms-item class="agree" name="agree5">
|
|
|
|
|
- <checkbox-group :value="form.agree5 ? ['1'] : []" @change="onAgree5Change">
|
|
|
|
|
- <label class="checkbox">
|
|
|
|
|
- <checkbox value="1" :checked="form.agree5" />
|
|
|
|
|
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
|
|
|
|
|
- }}</text>
|
|
|
|
|
-
|
|
|
|
|
- <view style="margin-top: 10px;line-height: 1.5; font-size: 14px">
|
|
|
|
|
- <text class="crm-cursor" @click.stop="dialogCheckTip = true">{{
|
|
|
|
|
- t('Custom.Withdraw.Des') }}</text>
|
|
|
|
|
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
|
|
|
|
|
- }}</text>
|
|
|
|
|
- <text class="clause crm-cursor" style="text-decoration: underline;"
|
|
|
|
|
- @click.stop="dialogClauseNZTwo = true">{{
|
|
|
|
|
- t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
|
|
|
|
|
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
|
|
|
|
|
|
|
+ <!-- 20%赠金-年中赠金 -->
|
|
|
|
|
+ <view class="form-row" v-if="tableData4TwoFlag">
|
|
|
|
|
+ <uni-forms-item class="agree">
|
|
|
|
|
+ <checkbox-group :value="form.agree5 ? ['1'] : []" @change="onAgree5Change">
|
|
|
|
|
+ <label class="checkbox">
|
|
|
|
|
+ <checkbox value="1" :checked="form.agree5" />
|
|
|
|
|
+ <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
|
|
|
}}</text>
|
|
}}</text>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- </label>
|
|
|
|
|
- </checkbox-group>
|
|
|
|
|
- </uni-forms-item>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 赠送活动 -->
|
|
|
|
|
- <view class="form-row" v-if="tableDataNewListFlag">
|
|
|
|
|
- <view class="form-col-full">
|
|
|
|
|
- <uni-forms-item name="agree6">
|
|
|
|
|
- <checkbox-group :value="form.agree6 ? ['1'] : []" @change="onAgree6Change">
|
|
|
|
|
- <label class="checkbox">
|
|
|
|
|
- <checkbox value="1" :checked="form.agree6" />
|
|
|
|
|
- <text @click.stop="dialogClauseNewList = true"
|
|
|
|
|
- style="text-decoration: underline;">{{
|
|
|
|
|
- tableDataNewList.title }}</text>
|
|
|
|
|
- <view style="margin-top: 10px; line-height: 1.5; font-size: 14px">
|
|
|
|
|
- <text> {{
|
|
|
|
|
- t('news_add_field1.activitiesNewList.item1') }}{{
|
|
|
|
|
- t('news_add_field1.activitiesNewList.item2') }}</text>
|
|
|
|
|
|
|
+ <view style="margin-top: 10px;line-height: 1.5; font-size: 14px">
|
|
|
|
|
+ <text class="crm-cursor" @click.stop="dialogCheckTip = true">{{
|
|
|
|
|
+ t('Custom.Withdraw.Des') }}</text>
|
|
|
|
|
+ <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
|
|
|
|
|
+ }}</text>
|
|
|
|
|
+ <text class="clause crm-cursor"
|
|
|
|
|
+ style="text-decoration: underline;"
|
|
|
|
|
+ @click.stop="dialogClauseNZTwo = true">{{
|
|
|
|
|
+ t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
|
|
|
|
|
+ <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
|
|
|
|
|
+ }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</label>
|
|
</label>
|
|
|
</checkbox-group>
|
|
</checkbox-group>
|
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 赠送活动 -->
|
|
|
|
|
+ <view class="form-row" v-if="tableDataNewListFlag">
|
|
|
|
|
+ <view class="form-col-full">
|
|
|
|
|
+ <uni-forms-item name="agree6">
|
|
|
|
|
+ <checkbox-group :value="form.agree6 ? ['1'] : []"
|
|
|
|
|
+ @change="onAgree6Change">
|
|
|
|
|
+ <label class="checkbox">
|
|
|
|
|
+ <checkbox value="1" :checked="form.agree6" />
|
|
|
|
|
+ <text @click.stop="dialogClauseNewList = true"
|
|
|
|
|
+ style="text-decoration: underline;">{{
|
|
|
|
|
+ tableDataNewList.title }}</text>
|
|
|
|
|
+ <view
|
|
|
|
|
+ style="margin-top: 10px; line-height: 1.5; font-size: 14px">
|
|
|
|
|
+ <text> {{
|
|
|
|
|
+ t('news_add_field1.activitiesNewList.item1') }}{{
|
|
|
|
|
+ t('news_add_field1.activitiesNewList.item2') }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </checkbox-group>
|
|
|
|
|
+ </uni-forms-item>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<view class="form-row">
|
|
<view class="form-row">
|
|
|
<button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
|
|
<button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
|
|
@@ -136,6 +146,7 @@ import BonusAgreementPopup from './components/BonusAgreementPopup.vue'
|
|
|
import { useFilters } from '@/composables/useFilters'
|
|
import { useFilters } from '@/composables/useFilters'
|
|
|
const { numberFormat } = useFilters()
|
|
const { numberFormat } = useFilters()
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
|
|
+import { isAfterJuly28 } from '@/utils/dateUtils'
|
|
|
const ibInfo = computed(() => {
|
|
const ibInfo = computed(() => {
|
|
|
return userStore?.userInfo?.ibInfo || {}
|
|
return userStore?.userInfo?.ibInfo || {}
|
|
|
})
|
|
})
|
|
@@ -149,17 +160,18 @@ const tabsConfig = computed(() => [
|
|
|
])
|
|
])
|
|
|
const title = computed(() => tabsConfig.value.find(item => item.value == activeTab.value)?.text || '')
|
|
const title = computed(() => tabsConfig.value.find(item => item.value == activeTab.value)?.text || '')
|
|
|
|
|
|
|
|
-const toLabel = computed(() => activeTab.value == '1' || activeTab.value == '2' ? t('Label.IntoAccount') : t('Ib.Transfer.IbAccountTransfer'))
|
|
|
|
|
|
|
+const toLabel = computed(() => activeTab.value == '1' || activeTab.value == '2' ? t('Label.IntoAccount') : t('Ib.Transfer.IntoAgentAccount'))
|
|
|
|
|
|
|
|
// 获取全局实例(用于访问 Session、$pigeon 等)
|
|
// 获取全局实例(用于访问 Session、$pigeon 等)
|
|
|
const { proxy } = getCurrentInstance()
|
|
const { proxy } = getCurrentInstance()
|
|
|
const $pigeon = proxy?.$pigeon
|
|
const $pigeon = proxy?.$pigeon
|
|
|
-
|
|
|
|
|
|
|
+import { useConfirm } from '@/hooks/useConfirm'
|
|
|
|
|
+const confirm = useConfirm()
|
|
|
// 响应式数据
|
|
// 响应式数据
|
|
|
const loginValue = ref('')
|
|
const loginValue = ref('')
|
|
|
const flag = ref(false)
|
|
const flag = ref(false)
|
|
|
const RES = ref('') // 弹窗响应信息
|
|
const RES = ref('') // 弹窗响应信息
|
|
|
-const giveLoginJoin = ref('')
|
|
|
|
|
|
|
+const giveLoginJoin = ref(null)
|
|
|
const step2 = ref(false)
|
|
const step2 = ref(false)
|
|
|
const amountLimits = reactive({
|
|
const amountLimits = reactive({
|
|
|
minAmount: '',
|
|
minAmount: '',
|
|
@@ -334,12 +346,36 @@ const getInfoStatus5 = computed(() => {
|
|
|
}
|
|
}
|
|
|
return false
|
|
return false
|
|
|
})
|
|
})
|
|
|
|
|
+// 单位类型
|
|
|
|
|
+function groupCurrency(type) {
|
|
|
|
|
+ const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
|
|
|
|
|
+ return map[type] || ': $'
|
|
|
|
|
+}
|
|
|
|
|
+// 单位类型
|
|
|
|
|
+function groupCurrency1(type) {
|
|
|
|
|
+ const map = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }
|
|
|
|
|
+ return map[type] || '$'
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+// 账户类型
|
|
|
|
|
+function groupTypeName(type) {
|
|
|
|
|
+ const typeMap = {
|
|
|
|
|
+ '1': t('AccountType.ClassicAccount'),
|
|
|
|
|
+ '2': t('AccountType.SeniorAccount'),
|
|
|
|
|
+ '3': isAfterJuly28() ? '--' : t('AccountType.AgencyAccount'),
|
|
|
|
|
+ '5': t('AccountType.SpeedAccount'),
|
|
|
|
|
+ '6': t('AccountType.SpeedAccount'),
|
|
|
|
|
+ '7': t('AccountType.StandardAccount'),
|
|
|
|
|
+ '8': t('AccountType.CentAccount')
|
|
|
|
|
+ }
|
|
|
|
|
+ return typeMap[type] || ''
|
|
|
|
|
+}
|
|
|
// 转入账户列表
|
|
// 转入账户列表
|
|
|
const depositDisplayList = computed(() => {
|
|
const depositDisplayList = computed(() => {
|
|
|
if (activeTab.value != 3) {
|
|
if (activeTab.value != 3) {
|
|
|
return toInfo.value.map(item => ({
|
|
return toInfo.value.map(item => ({
|
|
|
- text: [item.login, item.platform, item.cId, item.balance, item.groupTypeName].filter(field => field !== null && field !== undefined && field !== '').join('-'),
|
|
|
|
|
|
|
+ text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
|
|
|
value: item.login,
|
|
value: item.login,
|
|
|
disabled: item.status
|
|
disabled: item.status
|
|
|
}))
|
|
}))
|
|
@@ -561,8 +597,7 @@ watch(activeTab, (newVal) => {
|
|
|
} else {
|
|
} else {
|
|
|
ransferToInfo()
|
|
ransferToInfo()
|
|
|
}
|
|
}
|
|
|
- form.to = ''
|
|
|
|
|
- form.amount = ''
|
|
|
|
|
|
|
+ resetForm()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
//
|
|
//
|
|
@@ -580,66 +615,98 @@ watch(() => form.to, (newVal) => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
// 监听 agree6 变化
|
|
// 监听 agree6 变化
|
|
|
-watch(() => form.agree6, (newVal) => {
|
|
|
|
|
- if (newVal && giveLoginJoin.value?.flag === false) {
|
|
|
|
|
- let tips = ''
|
|
|
|
|
- if (giveLoginJoin.value.promptType == 1) {
|
|
|
|
|
- tips = t('surplusList.item10')
|
|
|
|
|
- } else {
|
|
|
|
|
- tips = t('surplusList.item11')
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return
|
|
|
|
|
- // 活动相关方法,后续需要在调整
|
|
|
|
|
- if (giveLoginJoin.value.activityCategory == 1) {
|
|
|
|
|
- $pigeon?.MessageConfirm(
|
|
|
|
|
- tips,
|
|
|
|
|
- t('Msg.SystemPrompt'),
|
|
|
|
|
- t('surplusList.item12'),
|
|
|
|
|
- t('Home.msg.item3'),
|
|
|
|
|
- () => {
|
|
|
|
|
- $pigeon?.MessageConfirm(
|
|
|
|
|
- t('surplusList.item13'),
|
|
|
|
|
- t('Msg.SystemPrompt'),
|
|
|
|
|
- t('Btn.Confirm'),
|
|
|
|
|
- t('Btn.Cancel'),
|
|
|
|
|
- async () => {
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await activityApi.ActivityGiveCancel({
|
|
|
|
|
- login: loginValue.value,
|
|
|
|
|
- })
|
|
|
|
|
- if (res.code == Code.StatusOK) {
|
|
|
|
|
- $pigeon?.MessageOK(res.msg || t('Msg.Success'))
|
|
|
|
|
- } else {
|
|
|
|
|
- uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- $pigeon?.MessageError(t('Msg.Fail'))
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- () => {
|
|
|
|
|
- form.agree6 = false
|
|
|
|
|
- }
|
|
|
|
|
- )
|
|
|
|
|
- },
|
|
|
|
|
- () => {
|
|
|
|
|
- form.agree6 = false
|
|
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => form.agree6,
|
|
|
|
|
+ async (newVal) => {
|
|
|
|
|
+ if (newVal && giveLoginJoin.value?.flag === false) {
|
|
|
|
|
+ let tips = "";
|
|
|
|
|
+ if (giveLoginJoin.value.promptType == 1) {
|
|
|
|
|
+ tips = t("surplusList.item10");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tips = t("surplusList.item11");
|
|
|
|
|
+ }
|
|
|
|
|
+ // 根据 activityCategory 显示不同的操作按钮
|
|
|
|
|
+ if (giveLoginJoin.value.activityCategory == 1) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ // 第一次弹窗:取消活动
|
|
|
|
|
+ await confirm({
|
|
|
|
|
+ title: t("Msg.SystemPrompt"),
|
|
|
|
|
+ content: tips,
|
|
|
|
|
+ confirmText: t("surplusList.item12"),
|
|
|
|
|
+ cancelText: t("Home.msg.item3"),
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ await new Promise((resolve) => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ resolve(true);
|
|
|
|
|
+ }, 300);
|
|
|
|
|
+ });
|
|
|
|
|
+ await confirm({
|
|
|
|
|
+ title: t("Msg.SystemPrompt"),
|
|
|
|
|
+ content: t("surplusList.item13"),
|
|
|
|
|
+ confirmText: t("Btn.Confirm"),
|
|
|
|
|
+ cancelText: t("Btn.Cancel"),
|
|
|
|
|
+ });
|
|
|
|
|
+ // 调用取消接口
|
|
|
|
|
+ const res = await activityApi.ActivityGiveCancel({
|
|
|
|
|
+ login: loginValue.value,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (res.code == Code.StatusOK) {
|
|
|
|
|
+ MessageOK(res.msg || t("Msg.Success"));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ MessageError(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ // 任意一步取消 → 取消勾选
|
|
|
|
|
+ form.agree6 = false;
|
|
|
}
|
|
}
|
|
|
- )
|
|
|
|
|
- } else {
|
|
|
|
|
- $pigeon?.MessageConfirm(
|
|
|
|
|
- tips,
|
|
|
|
|
- t('Msg.SystemPrompt'),
|
|
|
|
|
- t('Btn.Confirm'),
|
|
|
|
|
- t('Btn.Cancel'),
|
|
|
|
|
- () => { },
|
|
|
|
|
- () => {
|
|
|
|
|
- form.agree6 = false
|
|
|
|
|
|
|
+ } else if (giveLoginJoin.value.activityCategory == 2) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ // 第一次弹窗:跳转
|
|
|
|
|
+ await confirm({
|
|
|
|
|
+ title: t("Msg.SystemPrompt"),
|
|
|
|
|
+ content: tips,
|
|
|
|
|
+ confirmText: "跳转",
|
|
|
|
|
+ cancelText: t("Btn.Cancel"),
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ });
|
|
|
|
|
+ await new Promise((resolve) => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ resolve(true);
|
|
|
|
|
+ }, 300);
|
|
|
|
|
+ });
|
|
|
|
|
+ await confirm({
|
|
|
|
|
+ title: t("Msg.SystemPrompt"),
|
|
|
|
|
+ content: "是否跳转到对应活动取消",
|
|
|
|
|
+ confirmText: t("Btn.Confirm"),
|
|
|
|
|
+ cancelText: t("Btn.Cancel"),
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 跳转到月盈活动
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ path: "/pages/activity/monthly-list",
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ // 取消 → 取消勾选
|
|
|
|
|
+ form.agree6 = false;
|
|
|
}
|
|
}
|
|
|
- )
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 默认情况
|
|
|
|
|
+ try {
|
|
|
|
|
+ await confirm({
|
|
|
|
|
+ title: t("Msg.SystemPrompt"),
|
|
|
|
|
+ content: tips,
|
|
|
|
|
+ confirmText: t("Btn.Confirm"),
|
|
|
|
|
+ cancelText: t("Btn.Cancel"),
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ form.agree6 = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-})
|
|
|
|
|
|
|
+);
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
if (getInfoStatus5.value) {
|
|
if (getInfoStatus5.value) {
|
|
|
InfoStatus5.value = true
|
|
InfoStatus5.value = true
|