|
@@ -6,15 +6,15 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div class="switch-group">
|
|
<div class="switch-group">
|
|
|
<span :class="{ active: formData.DigitalTransferType === 3 }" @click="formData.DigitalTransferType = 3">
|
|
<span :class="{ active: formData.DigitalTransferType === 3 }" @click="formData.DigitalTransferType = 3">
|
|
|
- 从 合约 到 现货
|
|
|
|
|
|
|
+ {{ $t('digital.transfer1') }}
|
|
|
</span>
|
|
</span>
|
|
|
<span :class="{ active: formData.DigitalTransferType === 4 }" @click="formData.DigitalTransferType = 4">
|
|
<span :class="{ active: formData.DigitalTransferType === 4 }" @click="formData.DigitalTransferType = 4">
|
|
|
- 从 现货 到 合约
|
|
|
|
|
|
|
+ {{ $t('digital.transfer2') }}
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Field name="CurrencyID" label="币种" label-align="top" :rules="formRules.CurrencyID"
|
|
|
|
|
|
|
+ <Field name="CurrencyID" :label="t('banksign.currency')" label-align="top" :rules="formRules.CurrencyID"
|
|
|
arrow-direction="down" is-link>
|
|
arrow-direction="down" is-link>
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-select v-model="formData.CurrencyID" :options="currencyOptions" />
|
|
<app-select v-model="formData.CurrencyID" :options="currencyOptions" />
|
|
@@ -22,10 +22,10 @@
|
|
|
</Field>
|
|
</Field>
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Cell title="数量"
|
|
|
|
|
- :value="`可用 (${formatDecimal(contractAccount?.avaiableBalance ?? 0, contractAccount?.currencydecimalplace)})`"
|
|
|
|
|
|
|
+ <Cell :title="t('mine.setting.qty')"
|
|
|
|
|
+ :value="`${ t('digital.available')} (${formatDecimal(contractAccount?.avaiableBalance ?? 0, contractAccount?.currencydecimalplace)})`"
|
|
|
v-if="formData.DigitalTransferType === 3" />
|
|
v-if="formData.DigitalTransferType === 3" />
|
|
|
- <Cell title="数量" :value="`可用 (${spotBalance})`" v-if="formData.DigitalTransferType === 4" />
|
|
|
|
|
|
|
+ <Cell :title="t('mine.setting.qty')" :value="`${ t('digital.available')} (${spotBalance})`" v-if="formData.DigitalTransferType === 4" />
|
|
|
<Field name="Amount" label-align="top" :rules="formRules.Amount">
|
|
<Field name="Amount" label-align="top" :rules="formRules.Amount">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-stepper v-model="formData.Amount" :min="0" />
|
|
<app-stepper v-model="formData.Amount" :min="0" />
|
|
@@ -34,8 +34,8 @@
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
</Form>
|
|
</Form>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
- <Button block @click="routerBack">取消</Button>
|
|
|
|
|
- <Button type="primary" block @click="formRef?.submit">划转</Button>
|
|
|
|
|
|
|
+ <Button block @click="routerBack">{{ $t('operation.cancel') }}</Button>
|
|
|
|
|
+ <Button type="primary" block @click="formRef?.submit">{{ $t('digital.wallet-transfer') }}</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</app-view>
|
|
</app-view>
|
|
|
</template>
|
|
</template>
|
|
@@ -108,11 +108,11 @@ const contractAccount = computed(() => accountStore.getAccountItem({
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
|
CurrencyID: [{
|
|
CurrencyID: [{
|
|
|
- message: '请选择币种',
|
|
|
|
|
|
|
+ message: t('digital.tips1'),
|
|
|
validator: () => !!formData.CurrencyID
|
|
validator: () => !!formData.CurrencyID
|
|
|
}],
|
|
}],
|
|
|
Amount: [{
|
|
Amount: [{
|
|
|
- message: '请输入数量',
|
|
|
|
|
|
|
+ message: t('digital.tips2'),
|
|
|
validator: () => !!formData.Amount
|
|
validator: () => !!formData.Amount
|
|
|
}],
|
|
}],
|
|
|
}
|
|
}
|
|
@@ -125,7 +125,7 @@ const onSubmit = () => {
|
|
|
AccountID: contractAccount.value?.accountid
|
|
AccountID: contractAccount.value?.accountid
|
|
|
}
|
|
}
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- hideLoading('提交成功', 'success')
|
|
|
|
|
|
|
+ hideLoading(t('common.submitsuccess'), 'success')
|
|
|
routerBack()
|
|
routerBack()
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
hideLoading(err, 'fail')
|
|
hideLoading(err, 'fail')
|