index.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /** ================================= 现货合同 ================================**/
  2. import { getUserId } from "@/services/bus/account";
  3. import { commonSearch_go } from '@/services/go';
  4. import {
  5. Ermcp3ContractReq,
  6. Ermcp3ContractRsp,
  7. ErmcpOPLogModel,
  8. QueryChangeLogReq
  9. } from '@/services/go/ermcp/spot-contract/interface';
  10. import {getUserAccountType} from "@/services/bus/user";
  11. /**
  12. * 查询现货合同 /Ermcp3/QuerySpotContract
  13. * @param req.querytype 查询类型 1-未提交 2-待审核 3-履约中 4-已完成
  14. * @param req.userid 用户ID (非必填)
  15. * @param req.usertype 用户类型 2-机构 7-企业成员 (非必填)
  16. * @param req.contractid 合同ID(SpotContractId) (非必填)
  17. * @constructor
  18. */
  19. export function QuerySpotContract(req: Ermcp3ContractReq): Promise<Ermcp3ContractRsp[]> {
  20. const userid = getUserId(); // 所属机构id
  21. // const areauserid = 10000; // 所属机构id
  22. req.usertype = getUserAccountType()
  23. return commonSearch_go('/Ermcp3/QuerySpotContract', { userid, ...req }).catch((err) => {
  24. throw new Error(`查询现货合同: ${err}`);
  25. });
  26. }
  27. /**
  28. * 查询变更记录 /Ermcp/QueryChangeLog
  29. * @param req
  30. * @constructor
  31. */
  32. export function QueryChangeLog(req: QueryChangeLogReq): Promise<ErmcpOPLogModel[]> {
  33. return commonSearch_go('/Ermcp/QueryChangeLog', req).catch((err) => {
  34. throw new Error(`查询变更记录: ${err}`);
  35. });
  36. }