|
@@ -24,32 +24,35 @@
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="账户名称"
|
|
<a-form-item label="账户名称"
|
|
|
name="userid">
|
|
name="userid">
|
|
|
- <span class="white">王二5001</span>
|
|
|
|
|
|
|
+ <span class="white">{{secondeData.accountname}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="资金账号"
|
|
<a-form-item label="资金账号"
|
|
|
name="">
|
|
name="">
|
|
|
- <span class="white">250000000017</span>
|
|
|
|
|
|
|
+ <span class="white">{{secondeData.accountid}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="授信总额"
|
|
<a-form-item label="授信总额"
|
|
|
name="">
|
|
name="">
|
|
|
- <span class="white"> 请输入授信金额</span>
|
|
|
|
|
|
|
+ <span class="white"> {{mortgagecredit}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="子账户当前余额"
|
|
<a-form-item label="子账户当前余额"
|
|
|
name="">
|
|
name="">
|
|
|
- <span class="white">10000.00</span>
|
|
|
|
|
|
|
+ <span class="white">{{currentbalance}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="授信金额"
|
|
<a-form-item label="授信金额"
|
|
|
class="relative"
|
|
class="relative"
|
|
|
name="">
|
|
name="">
|
|
|
- <a-input class="dialogInput" style="width: 200px" placeholder="请输入授信金额"></a-input>
|
|
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="money"
|
|
|
|
|
+ placeholder="请输入授信金额"></a-input>
|
|
|
<div class="tip">正数为增加,负数为减少</div>
|
|
<div class="tip">正数为增加,负数为减少</div>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -59,14 +62,16 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, PropType, ref } from 'vue';
|
|
|
|
|
|
|
+import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
import {ErmcpLoginUser, ErmcpTaAccount, ErmcpTaAccountEx} from '@/services/go/ermcp/account/interface';
|
|
import {ErmcpLoginUser, ErmcpTaAccount, ErmcpTaAccountEx} from '@/services/go/ermcp/account/interface';
|
|
|
-import { Modal } from 'ant-design-vue';
|
|
|
|
|
|
|
+import { message, Modal } from 'ant-design-vue';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
import {LoginaccountOperateReq, TaaccountTransfersxmoneyReq} from '@/services/proto/accountinfo/interface';
|
|
import {LoginaccountOperateReq, TaaccountTransfersxmoneyReq} from '@/services/proto/accountinfo/interface';
|
|
|
import {loginAccountOperate, taAccountTransfersXMoneyReq} from '@/services/proto/accountinfo';
|
|
import {loginAccountOperate, taAccountTransfersXMoneyReq} from '@/services/proto/accountinfo';
|
|
|
import {getLongTypeLoginID} from "@/services/bus/login";
|
|
import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
|
|
+import { QueryAccMgrTaAccountInfo } from '@/services/go/ermcp/account';
|
|
|
|
|
+import { getUserId } from '@/services/bus/account';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'account_info_futures_btn_child_credit',
|
|
name: 'account_info_futures_btn_child_credit',
|
|
@@ -76,17 +81,43 @@ export default defineComponent({
|
|
|
type: Object as PropType<ErmcpTaAccount>,
|
|
type: Object as PropType<ErmcpTaAccount>,
|
|
|
default: {},
|
|
default: {},
|
|
|
},
|
|
},
|
|
|
|
|
+ secondeData: {
|
|
|
|
|
+ default: {},
|
|
|
|
|
+ type: Object as PropType<ErmcpTaAccount>,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
|
const { visible, cancel } = closeModal('account_info_futures_btn_child_credit');
|
|
const { visible, cancel } = closeModal('account_info_futures_btn_child_credit');
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
+ // 当前余额
|
|
|
|
|
+ const currentbalance = ref<number>(0)
|
|
|
|
|
+ // 授信总额
|
|
|
|
|
+ const mortgagecredit = ref<number>(0)
|
|
|
|
|
+ const money = ref<number | null>(null)
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ if(visible.value && props.secondeData?.accountid) {
|
|
|
|
|
+ const param = {
|
|
|
|
|
+ userid: getUserId(),
|
|
|
|
|
+ accountid: props.secondeData.accountid
|
|
|
|
|
+ }
|
|
|
|
|
+ QueryAccMgrTaAccountInfo(param).then(res => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ if (res.length) {
|
|
|
|
|
+ currentbalance.value = res[0].currentbalance
|
|
|
|
|
+ mortgagecredit.value = res[0].mortgagecredit
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
function submit() {
|
|
function submit() {
|
|
|
Modal.confirm({
|
|
Modal.confirm({
|
|
|
title: '是否确认授信账户',
|
|
title: '是否确认授信账户',
|
|
|
okText: '确认授信',
|
|
okText: '确认授信',
|
|
|
cancelText: '取消',
|
|
cancelText: '取消',
|
|
|
onOk() {
|
|
onOk() {
|
|
|
- let reqParam: TaaccountTransfersxmoneyReq = {
|
|
|
|
|
|
|
+ const param = toRaw(money)
|
|
|
|
|
+ if (param) {
|
|
|
|
|
+ let reqParam: TaaccountTransfersxmoneyReq = {
|
|
|
accountid: props.selectedData.accountid, // uint64 期货账户ID
|
|
accountid: props.selectedData.accountid, // uint64 期货账户ID
|
|
|
sxmoney: 1,// double 授信金额正为加负为减
|
|
sxmoney: 1,// double 授信金额正为加负为减
|
|
|
modifierid: Number(getLongTypeLoginID()),// uint64 修改人
|
|
modifierid: Number(getLongTypeLoginID()),// uint64 修改人
|
|
@@ -96,6 +127,10 @@ export default defineComponent({
|
|
|
cancel();
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
context.emit('refresh');
|
|
|
});
|
|
});
|
|
|
|
|
+ } else {
|
|
|
|
|
+ message.error('请输入授信金额')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onCancel() {},
|
|
onCancel() {},
|
|
|
});
|
|
});
|
|
@@ -106,6 +141,9 @@ export default defineComponent({
|
|
|
maskClosableFlag: false,
|
|
maskClosableFlag: false,
|
|
|
submit,
|
|
submit,
|
|
|
loading,
|
|
loading,
|
|
|
|
|
+ currentbalance,
|
|
|
|
|
+ mortgagecredit,
|
|
|
|
|
+ money,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|