Quellcode durchsuchen

处理合同报错代码

huangbin vor 4 Jahren
Ursprung
Commit
f2bee3cbcd
1 geänderte Dateien mit 20 neuen und 19 gelöschten Zeilen
  1. 20 19
      src/services/proto/contract/index.ts

+ 20 - 19
src/services/proto/contract/index.ts

@@ -1,24 +1,22 @@
-import APP from "@/services";
-import { getSelectedAccountId, getUserId } from "@/services/bus/account";
-import {ContractOperateApplyReq, ErmcpContractOperateApplyReq} from "@/services/proto/contract/interface";
-import {buildProtoReq50, parseProtoRsp50, protoMiddleware} from "@/services/socket/protobuf/buildReq";
+import { getLongTypeLoginID } from "@/services/bus/login";
+import { ContractOperateApplyReq, ErmcpContractOperateApplyReq } from "@/services/proto/contract/interface";
+import { protoMiddleware } from "@/services/socket/protobuf/buildReq";
 import { getUUID } from "@/utils/qt/common";
-import { Callback } from "@/utils/websocket";
-import {DeliveryGoodsCancelReq} from "@/services/proto/delivery/interface";
-import {getLongTypeLoginID} from "@/services/bus/login";
-import {getTimeValue} from "@/utils/time";
+import { getTimeValue } from "@/utils/time";
 
 /**
  * 合同
  * @param param
  */
 export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
-    param.OperateSrc = 2
-    param.UserID = Number(getLongTypeLoginID())
-    param.ClientTicket = getUUID()
-    param.OperateApplyID = getTimeValue()
-    debugger
-    return protoMiddleware<ErmcpContractOperateApplyReq>(param , 'ErmcpContractOperateApplyReq', 'ErmcpContractOperateApplyRsp', 2)
+    const obj = {
+        OperateSrc: 2,
+        OperatorID: Number(getLongTypeLoginID()),
+        ClientTicket: getUUID(),
+        OperateApplyID: getTimeValue()
+    }
+    Object.assign(param, obj)
+    return protoMiddleware<ErmcpContractOperateApplyReq>(param, 'ErmcpContractOperateApplyReq', 'ErmcpContractOperateApplyRsp', 2)
 }
 
 /**
@@ -26,9 +24,12 @@ export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promi
  * @param param 2、通过 3、拒绝 4、撤销
  */
 export const contractOperateApply = (param: ContractOperateApplyReq): Promise<any> => {
-    param.OperateSrc = 2
-    param.OperatorID = Number(getLongTypeLoginID())
-    param.ClientTicket = getUUID()
-    param.OperateApplyID = getTimeValue()
-    return protoMiddleware<ContractOperateApplyReq>(param , 'ContractOperateApplyReq', 'ContractOperateApplyRsp', 2)
+    const obj = {
+        OperateSrc: 2,
+        OperatorID: Number(getLongTypeLoginID()),
+        ClientTicket: getUUID(),
+        OperateApplyID: getTimeValue()
+    }
+    Object.assign(param, obj)
+    return protoMiddleware<ContractOperateApplyReq>(param, 'ContractOperateApplyReq', 'ContractOperateApplyRsp', 2)
 }