index.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /** ================================= 前海金相关接口 ================================**/
  2. import { getUsrId } from "@/services/bus/user";
  3. import { commonSearch_go } from "@/services/go";
  4. import {
  5. QhjAccountOutInApply,
  6. QhjContract,
  7. QhjCustomer,
  8. QhjParentAreaList,
  9. QhjReckonPriceLog,
  10. QhjRStrategy,
  11. QhjRSTriggerLog,
  12. QhjTradeGoodsPickup,
  13. QueryAccountInOutApplyReq,
  14. QueryContractReq,
  15. QueryCustomerInfoReq,
  16. QueryReckonPriceLogReq,
  17. QueryRStrategyReq,
  18. QueryRSTriggerLogReq,
  19. QueryTradeGoodsPickupReq
  20. } from "@/services/go/ermcp/qhj/interface";
  21. /**
  22. * -- 铂金宝 - 提货查询
  23. * 查询提货 /Qhj/QueryTradeGoodsPickup
  24. * @constructor
  25. */
  26. export function queryTradeGoodsPickup(req: QueryTradeGoodsPickupReq): Promise<QhjTradeGoodsPickup[]> {
  27. return commonSearch_go('/Qhj/QueryTradeGoodsPickup', req).catch((err) => {
  28. throw new Error(`查询提货: ${err.message}`);
  29. });
  30. }
  31. /**
  32. * -- 铂金宝 - 充值提现审核 - 充值审核/提现审核
  33. * 查询充值提现 /Qhj/QueryAccountInOutApply
  34. * @param req
  35. */
  36. export function queryAccountInOutApply(req: QueryAccountInOutApplyReq): Promise<QhjAccountOutInApply[]> {
  37. return commonSearch_go('/Qhj/QueryAccountInOutApply', req).catch((err) => {
  38. throw new Error(`查询充值提现: ${err.message}`);
  39. });
  40. }
  41. /**
  42. * -- 铂金宝 - 定投价查询
  43. * 查询定投价(结算价) /Qhj/QueryReckonPriceLog
  44. * @param req
  45. */
  46. export function queryReckonPriceLog(req: QueryReckonPriceLogReq): Promise<QhjReckonPriceLog[]> {
  47. return commonSearch_go('/Qhj/QueryReckonPriceLog', req).catch((err) => {
  48. throw new Error(`定投价查询: ${err.message}`);
  49. });
  50. }
  51. /**
  52. * -- 铂金宝 - 定投查询 - 定投流水查询
  53. * 查询定投记录(定投管理/详情/定投记录) /Qhj/QueryRSTriggerLog
  54. * @param req
  55. */
  56. export function queryRSTriggerLog(req: QueryRSTriggerLogReq): Promise<QhjRSTriggerLog[]> {
  57. return commonSearch_go('/Qhj/QueryRSTriggerLog', req).catch((err) => {
  58. throw new Error(`查询定投记录: ${err.message}`);
  59. });
  60. }
  61. /**
  62. * -- 铂金宝 - 定投查询 - 定投计划查询
  63. * 查询定投设置(我的定投/历史定投[状态=已终止]) /Qhj/set feedback off
  64. * @param req
  65. */
  66. export function queryRStrategy(req: QueryRStrategyReq): Promise<QhjRStrategy[]> {
  67. return commonSearch_go('/Qhj/QueryRStrategy', req).catch((err) => {
  68. throw new Error(`查询定投设置: ${err.message}`);
  69. });
  70. }
  71. /**
  72. * -- 铂金宝 - 融资信息
  73. * 查询融资明细(合同) /Qhj/QueryContract
  74. * @param req
  75. */
  76. export function queryContract(req: QueryContractReq): Promise<QhjContract[]> {
  77. return commonSearch_go('/Qhj/QueryContract', req).catch((err) => {
  78. throw new Error(`查询融资明细(合同): ${err.message}`);
  79. });
  80. }
  81. /**
  82. * -- 铂金宝 - 客户资料
  83. * 查询客户资料 /Qhj/QueryCustomerInfo
  84. * @param req
  85. */
  86. export function queryCustomerInfo(req: QueryCustomerInfoReq): Promise<QhjCustomer> {
  87. return commonSearch_go('/Qhj/QueryCustomerInfo', req).catch((err) => {
  88. throw new Error(`查询客户资料: ${err.message}`);
  89. });
  90. }
  91. /**
  92. * -- 铂金宝 - 查询所属机构列表
  93. * 查询客户资料 /Qhj/QueryParentAreaList
  94. * @param req
  95. */
  96. export function queryParentAreaList(): Promise<QhjParentAreaList[]> {
  97. const userid = getUsrId()
  98. return commonSearch_go('/Qhj/QueryParentAreaList', { userid }).catch((err) => {
  99. throw new Error(`查询所属机构列表: ${err.message}`);
  100. });
  101. }