index.ts 1.1 KB

123456789101112131415161718192021222324
  1. /** ================================= 销售 ================================**/
  2. import { getUserId } from '@/services/bus/user';
  3. import { commonSearch_go } from '@/services/go';
  4. import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/purchase/interface';
  5. import { getUserAccountType } from "@/services/bus/user";
  6. /**
  7. * 查询销售信息(这个接口和采购是同一个接口) /Ermcp3/QuerySpotContractBS
  8. * @param req.querytype 查询类型 1-全部 2-待点价 3-履约结算 4-已完成 (必填)
  9. * @param req.usertype 用户类型 2-机构 7-企业成员
  10. * @param req.contractid 合同ID(SpotContractId)
  11. * @constructor
  12. */
  13. export function QueryWareHouse(req: SellBuyContractReq): Promise<Ermcp3SellBuyContract[]> {
  14. const param = {
  15. userid: getUserId(),
  16. contracttype: -1, // 销售 合同类型 1-采购, -1-销售
  17. usertype: getUserAccountType()
  18. }
  19. Object.assign(param, req)
  20. return commonSearch_go('/Ermcp3/QuerySpotContractBS', param).catch((err) => {
  21. throw new Error(`查询销售信息: ${err}`);
  22. });
  23. }