index.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /** ================================= 商品信息 ================================**/
  2. import APP from '@/services';
  3. import { commonSearch_go } from '@/services/go/index';
  4. import { Ermcp3Brand, Ermcp3Wrstandard, ErmcpDeliveryGoodsReq, ErmcpDeliveryGoodsRsp } from './interface';
  5. /**
  6. * 查询现货商品 /Ermcp3/QueryDeliveryGoods
  7. * @param excluudecfg 排除已配置的现货商品 1-排除
  8. * @constructor
  9. */
  10. export function QueryDeliveryGoods(req: ErmcpDeliveryGoodsReq): Promise<ErmcpDeliveryGoodsRsp[]> {
  11. const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
  12. return commonSearch_go('/Ermcp3/QueryDeliveryGoods', { areauserid, ...req }).catch((err) => {
  13. throw new Error(`查询现货商品: ${err.message}`);
  14. });
  15. }
  16. /**
  17. * 查询商品品类 /Ermcp3/QueryGoodsWrstandard
  18. * @param deliverygoodsid 现货商品id
  19. * @constructor
  20. */
  21. export function QueryGoodsWrstandard(deliverygoodsid: number): Promise<Ermcp3Wrstandard[]> {
  22. const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
  23. return commonSearch_go('/Ermcp3/QueryGoodsWrstandard', { areauserid, deliverygoodsid }).catch((err) => {
  24. throw new Error(`查询商品品类: ${err.message}`);
  25. });
  26. }
  27. /**
  28. * 查询商品品牌 /Ermcp3/QueryGoodsbrand
  29. * @constructor
  30. */
  31. export function QueryGoodsbrand(): Promise<Ermcp3Brand[]> {
  32. const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
  33. return commonSearch_go('/Ermcp3/QueryGoodsbrand', { areauserid }).catch((err) => {
  34. throw new Error(`查询商品品牌: ${err.message}`);
  35. });
  36. }