huangbin há 4 anos atrás
pai
commit
9f1438bb80

+ 1 - 1
src/services/go/ermcp/account/index.ts

@@ -84,7 +84,7 @@ export function QueryAccMgrRole(): Promise<ErmcpRole> {
  * @param req
  * @constructor
  */
-export function QueryAccMgrTaAccountInfo(req: QueryAccMgrTaAccountInfoReq): Promise<ErmcpTaAccountInfo> {
+export function QueryAccMgrTaAccountInfo(req: QueryAccMgrTaAccountInfoReq): Promise<ErmcpTaAccountInfo[]> {
     return commonSearch_go('/Ermcp/QueryAccMgrTaAccountInfo', req).catch((err) => {
         throw new Error(`查询账户管理授信: ${err.message}`);
     });

+ 40 - 38
src/services/go/ermcp/account/interface.ts

@@ -173,44 +173,46 @@ export interface QueryAccMgrTaAccountInfoReq {
  * 查询账户管理授信(账户管理/账户设置/授信) 返回
  */
 export interface ErmcpTaAccountInfo {
-    accountname	:string;//机构名称
-    areauserid	:number;//所属机构\交易用户ID
-    begindate	:string;//开始交易日
-    biztype	:number;//业务类型 - 1:套保 2:套利
-    brandname	:string;//品牌名称
-    buypreinvoicedamount	:number;//采购预收票额(预收票额)
-    buyprepaidamount	:number;//采购预付款额(预付货款额)
-    buytodayinvoiceamount	:number;//采购今收票额(今收票额)
-    buytodayrefundamount	:number;//采购今收退款额(今收退款额)
-    buytodaysettleamount	:number;//采购今付款额(今付货款额)
-    buyuninvoicedamount	:number;//采购应收票额(应收票额)
-    buyunpaidamount	:number;//采购应付款额(应付货款额)
-    currencyid	:number;//结算币种ID
-    currencyname	:string;//币种名称
-    cycletime	:string;//周期时间 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(number;
-//)【原值】
-    cycletype	:number;//周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
-    deliverygoodscode	:string;//现货品种代码
-    deliverygoodsid	:number;//现货品种ID
-    deliverygoodsname	:string;//现货品种名称
-    enddate	:string;//结束交易日
-    reckondate	:string;//日照时期(yyyyMMdd)
-    sellpreinvoicedamount	:number;//销售预开票额(预开票额)
-    sellprepaidamount	:number;//销售预收款额(预收货款额)
-    selltodayinvoiceamount	:number;//销售今开票额(今开票额)
-    selltodayrefundamount	:number;//销售今付退款额(今付退款额)
-    selltodaysettleamount	:number;//销售今收款额(今收货款额)
-    selluninvoicedamount	:number;//销售应开票额(应开票额)
-    sellunpaidamount	:number;//销售应收款额(应收货款额)
-    spotgoodsbrandid	:number;//现货品牌ID
-    todaypaysum	:number;//今付款合计
-    todayreceivesum	:number;//今收款合计
-    updatetime	:string;//更新时间
-    wrfactortypeid	:number;//仓单要素类型ID(212+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    wrstandardcode	:string;//品类代码
-    wrstandardid	:number;//现货商品ID
-    wrstandardname	:string;//品类名称
+    accountname: string;//机构名称
+    areauserid: number;//所属机构\交易用户ID
+    begindate: string;//开始交易日
+    biztype: number;//业务类型 - 1:套保 2:套利
+    brandname: string;//品牌名称
+    buypreinvoicedamount: number;//采购预收票额(预收票额)
+    buyprepaidamount: number;//采购预付款额(预付货款额)
+    buytodayinvoiceamount: number;//采购今收票额(今收票额)
+    buytodayrefundamount: number;//采购今收退款额(今收退款额)
+    buytodaysettleamount: number;//采购今付款额(今付货款额)
+    buyuninvoicedamount: number;//采购应收票额(应收票额)
+    buyunpaidamount: number;//采购应付款额(应付货款额)
+    currencyid: number;//结算币种ID
+    currentbalance: number;//当前余额
+    mortgagecredit: number;//授信总额
+    currencyname: string;//币种名称
+    cycletime: string;//周期时间 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(number;
+    //)【原值】
+    cycletype: number;//周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
+    deliverygoodscode: string;//现货品种代码
+    deliverygoodsid: number;//现货品种ID
+    deliverygoodsname: string;//现货品种名称
+    enddate: string;//结束交易日
+    reckondate: string;//日照时期(yyyyMMdd)
+    sellpreinvoicedamount: number;//销售预开票额(预开票额)
+    sellprepaidamount: number;//销售预收款额(预收货款额)
+    selltodayinvoiceamount: number;//销售今开票额(今开票额)
+    selltodayrefundamount: number;//销售今付退款额(今付退款额)
+    selltodaysettleamount: number;//销售今收款额(今收货款额)
+    selluninvoicedamount: number;//销售应开票额(应开票额)
+    sellunpaidamount: number;//销售应收款额(应收货款额)
+    spotgoodsbrandid: number;//现货品牌ID
+    todaypaysum: number;//今付款合计
+    todayreceivesum: number;//今收款合计
+    updatetime: string;//更新时间
+    wrfactortypeid: number;//仓单要素类型ID(212+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    wrstandardcode: string;//品类代码
+    wrstandardid: number;//现货商品ID
+    wrstandardname: string;//品类名称
 }
 
 

+ 46 - 8
src/views/information/account_info/compoments/credit-futures/index.vue

@@ -24,32 +24,35 @@
         <a-col :span="12">
           <a-form-item label="账户名称"
                        name="userid">
-            <span class="white">王二5001</span>
+            <span class="white">{{secondeData.accountname}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="资金账号"
                        name="">
-            <span class="white">250000000017</span>
+            <span class="white">{{secondeData.accountid}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="授信总额"
                        name="">
-            <span class="white"> 请输入授信金额</span>
+            <span class="white"> {{mortgagecredit}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="子账户当前余额"
                        name="">
-            <span class="white">10000.00</span>
+            <span class="white">{{currentbalance}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="授信金额"
                        class="relative"
                        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>
           </a-form-item>
         </a-col>
@@ -59,14 +62,16 @@
 </template>
 
 <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 {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 {LoginaccountOperateReq, TaaccountTransfersxmoneyReq} from '@/services/proto/accountinfo/interface';
 import {loginAccountOperate, taAccountTransfersXMoneyReq} from '@/services/proto/accountinfo';
 import {getLongTypeLoginID} from "@/services/bus/login";
+import { QueryAccMgrTaAccountInfo } from '@/services/go/ermcp/account';
+import { getUserId } from '@/services/bus/account';
 
 export default defineComponent({
     name: 'account_info_futures_btn_child_credit',
@@ -76,17 +81,43 @@ export default defineComponent({
             type: Object as PropType<ErmcpTaAccount>,
             default: {},
         },
+                secondeData: {
+            default: {},
+            type: Object as PropType<ErmcpTaAccount>,
+        },
     },
     setup(props, context) {
         const { visible, cancel } = closeModal('account_info_futures_btn_child_credit');
         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() {
             Modal.confirm({
                 title: '是否确认授信账户',
                 okText: '确认授信',
                 cancelText: '取消',
                 onOk() {
-                    let reqParam: TaaccountTransfersxmoneyReq = {
+                  const param = toRaw(money)
+                  if (param) {
+                                        let reqParam: TaaccountTransfersxmoneyReq = {
                         accountid: props.selectedData.accountid, // uint64 期货账户ID
                         sxmoney: 1,// double 授信金额正为加负为减
                         modifierid: Number(getLongTypeLoginID()),// uint64 修改人
@@ -96,6 +127,10 @@ export default defineComponent({
                         cancel();
                         context.emit('refresh');
                     });
+                  } else {
+                    message.error('请输入授信金额')
+                  }
+
                 },
                 onCancel() {},
             });
@@ -106,6 +141,9 @@ export default defineComponent({
             maskClosableFlag: false,
             submit,
             loading,
+            currentbalance,
+            mortgagecredit,
+            money,
         };
     },
 });

+ 2 - 1
src/views/information/account_info/list/account_info_futures/index.vue

@@ -84,7 +84,8 @@
             :secondeData="secondeData"
             :selectedData="firstData" />
     <Credit @refresh="queryTable"
-            :selectedData="firstData" />
+            :selectedData="firstData"
+            :secondeData="secondeData" />
   </div>
 </template>