Kaynağa Gözat

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

huangbin 4 yıl önce
ebeveyn
işleme
5b70ddc09b

+ 35 - 0
public/proto/mtp.proto

@@ -708,3 +708,38 @@ message CancelPaymentRsp {
 	optional string RetDesc = 3; // string 描述信息
 		optional uint64 TradeID = 4; // uint64 成交单号
 }
+
+// 现货品种申请请求 0 29 124
+message DeliveryGoodsApplyReq {
+	optional MessageHead Header = 1; // MessageHead
+		optional string version = 2; // string 接口版本号(目前支持2.0 3.1 3.2)
+		optional uint64 userid = 3; // uint64 用户ID
+		optional uint64 loginid = 4; // uint64 登录ID
+		optional string deliverygoodscode = 5; // string 交割商品代码(新增时有值)
+		optional string deliverygoodsname = 6; // string 交割商品名称(新增时有值)
+		optional uint64 deliverygoodsid = 7; // uint64 交割商品id(修改时有值)
+		optional uint64 unitid = 8; // uint64 单位ID
+		optional int32 type = 9; // int32 类型 1 新增 2 修改
+		optional string remark = 10; // string 备注
+	repeated GLDWRStandardEx gldwrstandards = 11; // GLDWRStandardEx 现货商品型号数据
+	repeated GLDDGFactoryItemEx glddgfactoryItems = 12; // GLDDGFactoryItemEx 现货商品品牌数据
+	repeated WRSConvertDetailEx wrsconvertdetails = 13; // WRSConvertDetailEx 现货商品折算配置明细数据
+}
+// 现货商品型号数据 0 29 172
+message GLDWRStandardEx {
+		optional uint64 wrstandardid = 1; // uint64 型号ID(修改时有值)
+		optional string wrstandardname = 2; // string 型号名称
+		optional uint64 unitid = 3; // uint64 单位ID
+		optional double convertfactor = 4; // double 标仓系数(接口为3.1及以上版本时传)
+}
+// 现货商品品牌数据 0 29 173
+message GLDDGFactoryItemEx {
+		optional uint64 dgfactoryitemid = 1; // uint64 品牌ID(修改时有值)
+		optional string dgfactoryitemvalue = 2; // string 品牌名称
+}
+// 现货商品折算配置明细数据 0 29 127
+message WRSConvertDetailEx {
+		optional uint64 middlegoodsid = 1; // uint64 套保品种ID(接口为3.1及以下版本时传套保品种ID,否则传期货品种ID)
+		optional uint64 unitid = 2; // uint64 单位ID
+		optional double convertratio = 3; // double 套保系数
+}

+ 29 - 0
src/assets/styles/mixin.less

@@ -160,6 +160,23 @@
         color: #3A87F7;
     }
 }
+::v-deep.ant-select-single.conditionSelect {
+    .ant-select-selector {
+        height: 30px;
+        padding: 0 8px;
+        background: #15202B;
+        border: none;
+        border-radius: 3px;
+        color: @m-grey10;
+    }
+    .ant-select-arrow {
+        right: 8px;
+        color: @m-grey1;
+    }
+}
+.conditionSelect+.conditionSelect {
+    margin-left: 10px;
+}
 ::v-deep.commonInput {
     background: #15202B;
     border: 1px solid @m-grey14;
@@ -172,4 +189,16 @@
     .ant-input-suffix {
         color: #E5E5E5;
     }
+}
+.tableConditionInput {
+    width: 140px;
+    height: 30px;
+    line-height: 30px;
+    background: @m-grey9;
+    .rounded-corners(3px);
+    border: 0;
+    color: @m-white1;
+}
+.tableConditionInput+.tableConditionInput {
+    margin-left: 10px;
 }

+ 6 - 0
src/funcode/index.ts

@@ -61,4 +61,10 @@ export const funCode: Code = {
     CustOfflineNtf: 131074, // 客户离线通知
     PosChangedNtf: 131075, // 头寸变化通知
     MoneyChangedNtf: 131076, // 资金变化通知
+
+    // 现货
+    DeliveryGoodsApplyReq: 1900668, //  现货品种申请请求
+    DeliveryGoodsApplyRsp: 1900672, //  现货品种申请响应
+    DeliveryGoodsCancelReq: 1900673, // 现货品种停用请求
+    DeliveryGoodsCancelRsp: 1900674, // 现货品种停用响应
 };

+ 7 - 7
src/goServiceAPI/ermcp/customInfo/index.ts

@@ -1,6 +1,6 @@
 /** ================================= 客户资料 ================================**/
 
-import { commonSearch_go } from '@/goServiceAPI/index';
+import {BaseResponse, commonSearch_go, commonUpdate_go} from '@/goServiceAPI/index';
 import APP from '@/services';
 import * as type from './interface';
 import { QueryCustomInfoType } from './type';
@@ -26,9 +26,9 @@ export function QueryCustomInfo(queryType: QueryCustomInfoType): Promise<type.Qu
  * @param userInfoApply.
  * @constructor
  */
-// export function QueryModifyUserInfo(userInfoApply: type.ModifyUserInfoApplyReq): Promise<BaseResponse> {
-//     return commonUpdate_go('/Ermcp/ModifyUserInfoApply', { userInfoApply })
-//         .catch(err => {
-//             throw new Error(`新增客户申请: ${err.message}`);
-//         })
-// }
+export function QueryModifyUserInfo(userInfoApply: type.ModifyUserInfoApplyReq): Promise<BaseResponse> {
+    return commonUpdate_go('/Ermcp/ModifyUserInfoApply', { userInfoApply })
+        .catch(err => {
+            throw new Error(`新增客户申请: ${err.message}`);
+        })
+}

+ 40 - 0
src/protoService/delivery/index.ts

@@ -0,0 +1,40 @@
+import {DeliveryGoodsApplyReq} from "@/protoService/delivery/interface";
+import {getUserId} from "@/services/bus/account";
+import {getUUID} from "@/utils/tool/common";
+import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
+import APP from "@/services";
+import {Callback} from "@/utils/websocket";
+
+/**
+ * 现货品种申请请求
+ * @param param DeliveryGoodsApplyReq
+ */
+export const addDeliveryGoodsApply = (param: DeliveryGoodsApplyReq): Promise<any> => {
+    return new Promise((resolve, reject) => {
+        const req = {
+            version: "3.2",
+        };
+        const params = {
+            protobufName: 'DeliveryGoodsApplyReq',
+            funCodeName: 'DeliveryGoodsApplyReq',
+            reqParams: Object.assign(req, param),
+            msgHeadParams: {
+                AccountID: param.accountid,
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'DelUserReceiveInfoRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}

+ 37 - 0
src/protoService/delivery/interface.ts

@@ -0,0 +1,37 @@
+// 现货品种申请请求 0 29 124
+export interface DeliveryGoodsApplyReq {
+    accountid: string  // header 需要用到
+    userid: number // uint64 用户ID
+    loginid: number // uint64 登录ID
+    deliverygoodscode?: string // string 交割商品代码(新增时有值)
+    deliverygoodsname?: string // string 交割商品名称(新增时有值)
+    deliverygoodsid?: number// uint64 交割商品id(修改时有值)
+    unitid: number // uint64 单位ID
+    type: number// int32 类型 1 新增 2 修改
+    remark: number // string 备注
+    gldwrstandards: GLDWRStandardEx[]; //        GLDWRStandardEx 现货商品型号数据
+    glddgfactoryItems: GLDDGFactoryItemEx[] //   GLDDGFactoryItemEx 现货商品品牌数据
+    wrsconvertdetails: WRSConvertDetailEx[] // WRSConvertDetailEx 现货商品折算配置明细数据
+
+}
+
+// 现货商品型号数据 0 29 172
+export interface GLDWRStandardEx {
+    wrstandardid?: number // uint64 型号ID(修改时有值)
+    wrstandardname: string // string 型号名称
+    unitid: number// uint64 单位ID
+    convertfactor: number// double 标仓系数(接口为3.1及以上版本时传)
+}
+
+// 现货商品品牌数据 0 29 173
+export interface GLDDGFactoryItemEx {
+    dgfactoryitemid?: number // uint64 品牌ID(修改时有值)
+    dgfactoryitemvalue: string // string 品牌名称
+}
+
+// 现货商品折算配置明细数据 0 29 127
+export interface WRSConvertDetailEx {
+    middlegoodsid: number // uint64 套保品种ID(接口为3.1及以下版本时传套保品种ID,否则传期货品种ID)
+    unitid: number // uint64 单位ID
+    convertratio: number // double 套保系数
+}