|
@@ -2,41 +2,41 @@
|
|
|
<app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
|
|
<app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
|
|
|
<app-view class="g-form">
|
|
<app-view class="g-form">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
- <app-navbar title="新增" @back="closed" />
|
|
|
|
|
|
|
+ <app-navbar :title="$t('inout.add.title')" @back="closed" />
|
|
|
</template>
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="formSubmit">
|
|
<Form ref="formRef" class="g-form__container" @submit="formSubmit">
|
|
|
<CellGroup inset>
|
|
<CellGroup inset>
|
|
|
- <Field v-model="formData.InUserID" :rules="formRules.InUserID" name="InUserID" label="转入客户"
|
|
|
|
|
|
|
+ <Field v-model="formData.InUserID" :rules="formRules.InUserID" name="InUserID" :label="$t('inout.add.inusername')"
|
|
|
right-icon="arrow" clickable @click="showSearch = true">
|
|
right-icon="arrow" clickable @click="showSearch = true">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
- <input placeholder="请选择" :value="selectedUser?.customername" readonly />
|
|
|
|
|
|
|
+ <input :placeholder="$t('inout.add.choice')" :value="selectedUser?.customername" readonly />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="GoodsID" label="转让商品" :rules="formRules.GoodsID" is-link>
|
|
|
|
|
|
|
+ <Field name="GoodsID" :label="$t('inout.add.goodsid')" :rules="formRules.GoodsID" is-link>
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-select v-model="formData.GoodsID" :options="goodsList"
|
|
<app-select v-model="formData.GoodsID" :options="goodsList"
|
|
|
:optionProps="{ value: 'goodsid' }" @confirm="onGoodsChange" />
|
|
:optionProps="{ value: 'goodsid' }" @confirm="onGoodsChange" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field label="可用量">
|
|
|
|
|
|
|
+ <Field :label="$t('inout.add.enableqty')">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<span>{{ enableqty }}</span>
|
|
<span>{{ enableqty }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="Qty" :rules="formRules.Qty" label="转让量">
|
|
|
|
|
|
|
+ <Field name="Qty" :rules="formRules.Qty" :label="$t('inout.add.orderqty')">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<Stepper v-model="formData.Qty" theme="round" :min="0" :max="enableqty" :default-value="0"
|
|
<Stepper v-model="formData.Qty" theme="round" :min="0" :max="enableqty" :default-value="0"
|
|
|
:auto-fixed="false" button-size="22" />
|
|
:auto-fixed="false" button-size="22" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="TransferPrice" :rules="formRules.TransferPrice" label="转让价格">
|
|
|
|
|
|
|
+ <Field name="TransferPrice" :rules="formRules.TransferPrice" :label="$t('inout.add.orderprice')">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<Stepper v-model="formData.TransferPrice" theme="round" :min="0"
|
|
<Stepper v-model="formData.TransferPrice" theme="round" :min="0"
|
|
|
:decimal-length="selectedGoods?.decimalplace" :default-value="0" :auto-fixed="false"
|
|
:decimal-length="selectedGoods?.decimalplace" :default-value="0" :auto-fixed="false"
|
|
|
button-size="22" />
|
|
button-size="22" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="FreezeDays" label="冻结天数">
|
|
|
|
|
|
|
+ <Field name="FreezeDays" :label="$t('inout.add.freezedays')">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<span>{{ formData.FreezeDays }}</span>
|
|
<span>{{ formData.FreezeDays }}</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -46,8 +46,8 @@
|
|
|
<Cell>
|
|
<Cell>
|
|
|
<template #title>
|
|
<template #title>
|
|
|
<div style="display: flex;align-items: center;">
|
|
<div style="display: flex;align-items: center;">
|
|
|
- <Checkbox shape="square" icon-size="16px" v-model="isAgree">我已阅读并同意</Checkbox>
|
|
|
|
|
- <span @click="showAgreement = true" style="color:#E92020">《持仓转让协议》</span>
|
|
|
|
|
|
|
+ <Checkbox shape="square" icon-size="16px" v-model="isAgree">{{ $t('inout.add.tips1') }}</Checkbox>
|
|
|
|
|
+ <span @click="showAgreement = true" style="color:#E92020">{{ $t('inout.add.tips2') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</Cell>
|
|
</Cell>
|
|
@@ -55,7 +55,7 @@
|
|
|
</Form>
|
|
</Form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
- <Button type="danger" @click="formRef?.submit" round block>提交</Button>
|
|
|
|
|
|
|
+ <Button type="danger" @click="formRef?.submit" round block>{{ $t('operation.submit')}}</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</app-view>
|
|
</app-view>
|
|
@@ -70,7 +70,7 @@ import { CellGroup, Cell, Button, Checkbox, Field, Form, Stepper, FieldRule, sho
|
|
|
import { fullloading } from '@/utils/vant'
|
|
import { fullloading } from '@/utils/vant'
|
|
|
import { BuyOrSell } from '@/constants/order'
|
|
import { BuyOrSell } from '@/constants/order'
|
|
|
import { holderTransferApply } from '@/services/api/trade'
|
|
import { holderTransferApply } from '@/services/api/trade'
|
|
|
-import { useLoginStore, usePositionStore } from '@/stores'
|
|
|
|
|
|
|
+import { useLoginStore, usePositionStore, i18n } from '@/stores'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
|
@@ -78,7 +78,7 @@ import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
const Search = defineAsyncComponent(() => import('./search/index.vue'))
|
|
const Search = defineAsyncComponent(() => import('./search/index.vue'))
|
|
|
// 持仓转让协议
|
|
// 持仓转让协议
|
|
|
const Agreement = defineAsyncComponent(() => import('../agreement/index.vue'))
|
|
const Agreement = defineAsyncComponent(() => import('../agreement/index.vue'))
|
|
|
-
|
|
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
const showModal = shallowRef(true)
|
|
const showModal = shallowRef(true)
|
|
|
const showSearch = shallowRef(false) // 弹出客户搜索界面
|
|
const showSearch = shallowRef(false) // 弹出客户搜索界面
|
|
|
const showAgreement = shallowRef(false) // 弹出转让协议界面
|
|
const showAgreement = shallowRef(false) // 弹出转让协议界面
|
|
@@ -114,23 +114,23 @@ const formData = reactive<Partial<Proto.HolderTransferDetail>>({
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
|
InUserID: [{
|
|
InUserID: [{
|
|
|
- message: '请输入客户编号或手机号',
|
|
|
|
|
|
|
+ message: t('inout.add.tips3'),
|
|
|
validator: () => !!formData.InUserID
|
|
validator: () => !!formData.InUserID
|
|
|
}],
|
|
}],
|
|
|
GoodsID: [{
|
|
GoodsID: [{
|
|
|
- message: '请选择转让商品',
|
|
|
|
|
|
|
+ message: t('inout.add.tips4'),
|
|
|
validator: () => !!selectedGoods.value
|
|
validator: () => !!selectedGoods.value
|
|
|
}],
|
|
}],
|
|
|
TransferPrice: [{
|
|
TransferPrice: [{
|
|
|
- message: '请输入转让价格',
|
|
|
|
|
|
|
+ message: t('inout.add.tips5'),
|
|
|
validator: () => formData.TransferPrice ? !!Number(formData.TransferPrice) : false
|
|
validator: () => formData.TransferPrice ? !!Number(formData.TransferPrice) : false
|
|
|
}],
|
|
}],
|
|
|
Qty: [{
|
|
Qty: [{
|
|
|
- message: '请输入转让量',
|
|
|
|
|
|
|
+ message: t('inout.add.tips6'),
|
|
|
validator: () => !!formData.Qty
|
|
validator: () => !!formData.Qty
|
|
|
}],
|
|
}],
|
|
|
FreezeDays: [{
|
|
FreezeDays: [{
|
|
|
- message: '请输入冻结天数',
|
|
|
|
|
|
|
+ message: t('inout.add.tips7'),
|
|
|
required: true
|
|
required: true
|
|
|
}]
|
|
}]
|
|
|
}
|
|
}
|
|
@@ -161,7 +161,7 @@ const formSubmit = () => {
|
|
|
HolderTransferDetails: [formData]
|
|
HolderTransferDetails: [formData]
|
|
|
}
|
|
}
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- hideLoading('提交成功,请稍后查询结果', 'success')
|
|
|
|
|
|
|
+ hideLoading(t('inout.add.tips8'), 'success')
|
|
|
closed(true)
|
|
closed(true)
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
hideLoading(err, 'fail')
|
|
hideLoading(err, 'fail')
|
|
@@ -169,7 +169,7 @@ const formSubmit = () => {
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
showToast({
|
|
showToast({
|
|
|
- message: '请同意持仓转让协议',
|
|
|
|
|
|
|
+ message: t('inout.add.tips9'),
|
|
|
position: 'top',
|
|
position: 'top',
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|