|
@@ -1,7 +1,9 @@
|
|
|
import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
|
|
import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
|
|
|
import APP from "@/services";
|
|
import APP from "@/services";
|
|
|
import {Callback} from "@/utils/websocket";
|
|
import {Callback} from "@/utils/websocket";
|
|
|
-import {GldErmcpSpotContractOperateReq} from "@/services/proto/spotcontract/interface";
|
|
|
|
|
|
|
+import {GldErmcpSpotContractOperateReq, SpotContractStatusModifyReq} from "@/services/proto/spotcontract/interface";
|
|
|
|
|
+import {getSelectedAccountId, getUserId} from "@/services/bus/account";
|
|
|
|
|
+import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
|
|
|
/**(重点提醒 这里属于管理端接口,仅用于新增)以上来自android代码 回头需要确认
|
|
/**(重点提醒 这里属于管理端接口,仅用于新增)以上来自android代码 回头需要确认
|
|
|
* 新增 / 修改采购合同报文 (很多修改合同操作也在这)
|
|
* 新增 / 修改采购合同报文 (很多修改合同操作也在这)
|
|
@@ -9,13 +11,22 @@ import {GldErmcpSpotContractOperateReq} from "@/services/proto/spotcontract/inte
|
|
|
* @param param
|
|
* @param param
|
|
|
*/
|
|
*/
|
|
|
export const orderContract = (param: GldErmcpSpotContractOperateReq): Promise<any> => {
|
|
export const orderContract = (param: GldErmcpSpotContractOperateReq): Promise<any> => {
|
|
|
|
|
+
|
|
|
|
|
+ const OperateSrc: number = 2; // uint32 操作来源-1:管理端2:终端
|
|
|
|
|
+ const ClientTicket: string = uuidv4(); // 客户端流水号
|
|
|
|
|
+ const UserID: number = getUserId(); // 用户id
|
|
|
|
|
+
|
|
|
|
|
+ const reqParams = {
|
|
|
|
|
+ ...param , OperateSrc, ClientTicket, UserID
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
const params = {
|
|
const params = {
|
|
|
protobufName: 'GldErmcpSpotContractOperateReq',
|
|
protobufName: 'GldErmcpSpotContractOperateReq',
|
|
|
funCodeName: 'GldErmcpSpotContractOperateReq',
|
|
funCodeName: 'GldErmcpSpotContractOperateReq',
|
|
|
- reqParams: param,
|
|
|
|
|
|
|
+ reqParams: reqParams,
|
|
|
msgHeadParams: {
|
|
msgHeadParams: {
|
|
|
- AccountID: param.accountid,
|
|
|
|
|
|
|
+ AccountID: getSelectedAccountId(),
|
|
|
MarketID: 18,
|
|
MarketID: 18,
|
|
|
GoodsID: 0,
|
|
GoodsID: 0,
|
|
|
}
|
|
}
|
|
@@ -33,4 +44,4 @@ export const orderContract = (param: GldErmcpSpotContractOperateReq): Promise<an
|
|
|
onFail: (err) => reject(err.message),
|
|
onFail: (err) => reject(err.message),
|
|
|
} as Callback);
|
|
} as Callback);
|
|
|
});
|
|
});
|
|
|
-}
|
|
|
|
|
|
|
+}
|