index.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { getLongTypeLoginID } from "@/services/bus/login";
  2. import { ContractOperateApplyReq, ErmcpContractOperateApplyReq } from "@/services/proto/contract/interface";
  3. import { protoMiddleware } from "@/services/socket/protobuf/buildReq";
  4. import { getUUID } from "@/utils/qt/common";
  5. import { getTimeValue } from "@/utils/time";
  6. import {getUserId} from "@/services/bus/account";
  7. /**
  8. * 合同
  9. * @param param
  10. */
  11. export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
  12. const obj = {
  13. OperateSrc: 2,
  14. ClientTicket: getUUID(),
  15. OperateApplyID: getTimeValue(),
  16. UserID: getLongTypeLoginID()?.toNumber()
  17. }
  18. Object.assign(param, obj)
  19. return protoMiddleware<ErmcpContractOperateApplyReq>(param, 'ErmcpContractOperateApplyReq', 'ErmcpContractOperateApplyRsp', 2)
  20. }
  21. /**
  22. * 合同操作 以前管理端的一些功能使用这个接口
  23. * @param param 2、通过 3、拒绝 4、撤销
  24. */
  25. export const contractOperateApply = (param: ContractOperateApplyReq): Promise<any> => {
  26. const obj = {
  27. OperateSrc: 2,
  28. OperatorID: Number(getLongTypeLoginID()),
  29. }
  30. Object.assign(param, obj)
  31. return protoMiddleware<ContractOperateApplyReq>(param, 'ContractOperateApplyReq', 'ContractOperateApplyRsp', 2)
  32. }