Browse Source

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 years ago
parent
commit
fd04880fe2

+ 2 - 2
src/common/setup/table/button.ts

@@ -12,8 +12,8 @@ import { BtnClassName, BtnList, ButtonListKey } from './interface';
  */
 function getClassName(val: string): BtnClassName {
     let result: BtnClassName = 'btnDeafault'
-    const btnDanger = ['disable', 'cancle', 'delete', 'logout', 'locked']
-    const operBtn = ['add', 'modify', 'reset']
+    const btnDanger = ['disable', 'cancle', 'cancel', 'delete', 'logout', 'locked']
+    const operBtn = ['add', 'modify', 'reset', 'credit']
     const map = new Map<BtnClassName, string[]>([
         ['btnDanger', btnDanger],
         ['operBtn', operBtn],

+ 2 - 2
src/services/go/ermcp/exposure/index.ts

@@ -23,8 +23,8 @@ export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
  * @constructor
  */
 export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp3ExposureDetail[]> {
-    const areaUserId = getAreaUserId(); // 用户id
-    return commonSearch_go('/Ermcp3/QueryExposureDetail', { areaUserId, ...req }).catch((err) => {
+    const userid = getAreaUserId(); // 用户id
+    return commonSearch_go('/Ermcp3/QueryExposureDetail', { userid, ...req }).catch((err) => {
         throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err.message}`);
     });
 }

+ 2 - 2
src/services/go/ermcp/exposure/interface.ts

@@ -37,7 +37,7 @@ export interface ErmcpRealExposureModel {
  * 查询实时敞口现货明细请求
  */
 export interface Ermcp3ExposureReq {
-    middleGoodsId: number  //    套保商品
+    middlegoodsid: number  //    套保商品
 }
 
 /**
@@ -66,7 +66,7 @@ export interface Ermcp3ExposureDetail {
  * 实时敞口期货明细请求
  */
 export interface ErmcpExposurePostionReq {
-    middleGoodsId: number //套保商品ID
+    middlegoodsid: number //套保商品ID
 }
 
 /**

+ 0 - 1
src/services/proto/contract/index.ts

@@ -17,7 +17,6 @@ export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promi
         UserID: Number(getLongTypeLoginID())
     }
     Object.assign(param, obj)
-    debugger
     return protoMiddleware<ErmcpContractOperateApplyReq>(param, 'ErmcpContractOperateApplyReq', 'ErmcpContractOperateApplyRsp', 2)
 }
 

+ 31 - 18
src/views/business/exposure/list/realTime/index.vue

@@ -43,7 +43,12 @@ import { getBtnList } from '@/common/setup/contextMenu/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { getColumsAndSearch } from '../setup';
 import { QueryActualExposure, QueryActualExposureDetail, QueryAutualExposurePosition } from '@/services/go/ermcp/exposure/index';
-import { ErmcpRealExposureModel, Ermcp3ExposureDetail, ErmcpExposurePostion } from '@/services/go/ermcp/exposure/interface';
+import {
+    ErmcpRealExposureModel,
+    Ermcp3ExposureDetail,
+    ErmcpExposurePostion,
+    ErmcpExposurePostionReq, Ermcp3ExposureReq
+} from '@/services/go/ermcp/exposure/interface';
 import { message } from 'ant-design-vue';
 import { handleTableEvent } from '@/common/setup/event/index';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
@@ -103,29 +108,37 @@ function handleDeatil(loading: Ref<boolean>, selectedRow: ErmcpRealExposureModel
     // 现货明细信息
     function ActualExposureDetail() {
         loading.value = true;
-        const param = { middleGoodsId: unref(selectedRow).MiddleGoodsID };
-        QueryActualExposureDetail(param)
-            .then((res) => {
-                detailTableList.value = res.map((e, i) => {
-                    return { ...e, key: String(i) };
+        let param: Ermcp3ExposureReq = {
+            middlegoodsid: unref(selectedRow).MiddleGoodsID
+        }
+        if(undefined !== unref(selectedRow).MiddleGoodsID) {
+            QueryActualExposureDetail(param)
+                .then((res) => {
+                    detailTableList.value = res.map((e, i) => {
+                        return { ...e, key: String(i) };
+                    });
+                    loading.value = false;
+                })
+                .catch((err) => {
+                    message.error(err);
+                    loading.value = false;
                 });
-                loading.value = false;
-            })
-            .catch((err) => {
-                message.error(err);
-                loading.value = false;
-            });
+        }
     }
     // 期货头寸明细
     function AutualExposurePosition() {
         loading.value = true;
-        const param = { middleGoodsId: unref(selectedRow).MiddleGoodsID };
-        QueryAutualExposurePosition(param).then((res) => {
-            detailTableList.value = res.map((e, i) => {
-                return { ...e, key: String(i) };
+        let param: ErmcpExposurePostionReq = {
+            middlegoodsid: unref(selectedRow).MiddleGoodsID
+        }
+        if(undefined !== unref(selectedRow).MiddleGoodsID) {
+            QueryAutualExposurePosition(param).then((res) => {
+                detailTableList.value = res.map((e, i) => {
+                    return {...e, key: String(i)};
+                });
+                loading.value = false;
             });
-            loading.value = false;
-        });
+        }
     }
     return { tabList, selectMenu, detailTableList, detailColumns };
 }

+ 38 - 13
src/views/business/purchase/components/settlement/index.vue

@@ -323,20 +323,45 @@ export default defineComponent({
             const wrapEl = unref(formRef);
             wrapEl.validate().then((nameList:any) => {
                 delete nameList.IsChecked;
-                loading.value = true;
-                const params: SettlementReq = checkedObj.value.adjustMargin === 1?{
-                    ReckonRealQty: formState.ReckonRealQty!, // 交收量
-                    ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
-                    AddMargin: formState.AddMargin!, // 追加保证金
-                    ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
-                }:{
-                    ReckonRealQty: formState.ReckonRealQty!, // 交收量
-                    ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
-                    DecMargin: formState.DecMargin!, // 减少保证金
-                    ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
-                };
+                const param: SettlementReq =  {};
+                const {ReckonRealQty, ReckonOtherAmount, AddMargin, ReckonAdjustAmount, DecMargin, Remark } = formState
+                // 交收量
+                if(ReckonRealQty) {
+                  param.ReckonRealQty = ReckonRealQty
+                }
+                 // 其它费用
+                if(ReckonOtherAmount) {
+                  param.ReckonOtherAmount = ReckonOtherAmount
+                }
+                // 追加保证金
+                if(AddMargin) {
+                  param.AddMargin = AddMargin
+                }
+                // 减少保证金
+                if(DecMargin) {
+                  param.DecMargin = DecMargin
+                }
+                // 调整金额 
+                if(ReckonAdjustAmount) {
+                  const temp = checkedObj.value.adjustAmount === 1 ? 1  : -1
+                  param.ReckonAdjustAmount = ReckonAdjustAmount * temp
+                }
+                if(Remark) {
+                  param.Remark = Remark
+                }
+                // const params: SettlementReq = checkedObj.value.adjustMargin === 1?{
+                //     ReckonRealQty: formState.ReckonRealQty!, // 交收量
+                //     ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
+                //     AddMargin: formState.AddMargin!, // 追加保证金
+                //     ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
+                // }:{
+                //     ReckonRealQty: formState.ReckonRealQty!, // 交收量
+                //     ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
+                //     DecMargin: formState.DecMargin!, // 减少保证金
+                //     ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
+                // };
                 // 发出交收请求
-                settlementReq(props.selectedRow.spotcontractid, params, loading)
+                settlementReq(props.selectedRow.spotcontractid, param, loading)
                     .then(() => {
                         cancel();
                         context.emit('refresh');

+ 1 - 1
src/views/information/account_info/compoments/add-traders/index.vue

@@ -60,7 +60,7 @@ export default defineComponent({
         function submit() {
             validateAction<TraderFormState>(formRef, formState).then((res) => {
                 const reqParam: LoginaccountOperateReq = {
-                    operatetype: 1, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    operatetype: 10, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
                     roleids: [24],
                     logintaaccounts: [],
                     accountname: res.rolename,

+ 1 - 1
src/views/information/account_info/compoments/modify-futures/index.vue

@@ -128,7 +128,7 @@ export default defineComponent({
                       limitnumber: 0, // uint64 挂单笔数限额默认0(HedgeOutMainConfig)
                       status: 1, // int32 渠道账号状态 1-可买入可卖出 2-可卖出不可买入默认1(HedgeOutMainConfig)
                       accountname: res.accountname, // string 账户名称accountname1(Taaccount)
-                      // accountid: Number(res.accountid), // uint64 资金账户ID(Taaccount)
+                      accountid: props.selectedData.mainAcc.accountid, // uint64 资金账户ID(Taaccount)
                       taaccounttype: 1, // int32 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号(Taaccount)
                       currencyid: 1, // int32 货币ID默认为1(Taaccount)
                       outthreshold: 0, // double 出金阈值默认为0(Taaccount)