| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- /** ================================= 信息 - 现货商品信息 ================================**/
- import APP from '@/services';
- import { getUserId } from "@/services/bus/account";
- import { commonSearch_go } from '@/services/go/index';
- import {
- Ermcp3Brand, Ermcp3GoodsGroup, Ermcp3MiddleGoodsDetailEx,
- Ermcp3Wrstandard,
- ErmcpDeliveryGoodsDetailEx,
- ErmcpDeliveryGoodsReq,
- ErmcpDeliveryGoodsRsp, ErmcpMiddleGoodsModel
- } from './interface';
- /**
- * 查询现货商品 /Ermcp3/QueryDeliveryGoods
- * @param excluudecfg 排除已配置的现货商品 1-排除
- * @constructor
- */
- export function QueryDeliveryGoods(req: ErmcpDeliveryGoodsReq): Promise<ErmcpDeliveryGoodsRsp[]> {
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryDeliveryGoods', { areauserid, ...req }).catch((err) => {
- throw new Error(`查询现货商品: ${err.message}`);
- });
- }
- /**
- * 查询商品品类 /Ermcp3/QueryGoodsWrstandard
- * @param deliverygoodsid 现货商品id
- * @constructor
- */
- export function QueryGoodsWrstandard(deliverygoodsid: number): Promise<Ermcp3Wrstandard[]> {
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryGoodsWrstandard', { areauserid, deliverygoodsid }).catch((err) => {
- throw new Error(`查询商品品类: ${err.message}`);
- });
- }
- /**
- * 查询商品品牌 /Ermcp3/QueryGoodsbrand
- * @constructor
- */
- export function QueryGoodsbrand(): Promise<Ermcp3Brand[]> {
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryGoodsbrand', { areauserid }).catch((err) => {
- throw new Error(`查询商品品牌: ${err.message}`);
- });
- }
- /**
- * 查询现货商品详情 /Ermcp3/QueryDeliveryGoodsDetail
- * @param deliverygoodsid 现货商品id
- * @constructor
- */
- export function QueryDeliveryGoodsDetail(deliverygoodsid?: number): Promise<ErmcpDeliveryGoodsDetailEx[]> {
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- const param = deliverygoodsid ? { areauserid, deliverygoodsid } : { areauserid }
- return commonSearch_go('/Ermcp3/QueryDeliveryGoodsDetail', param).catch((err) => {
- throw new Error(`查询现货商品详情: ${err.message}`);
- });
- }
- /**
- * 查询期货商品组 /Ermcp3/QueryGoodsGroup
- * @param excludecfg 排除套保品中已关联的商品组 1-排除
- * @constructor
- */
- export function QueryGoodsfGroup(excludecfg?: number): Promise<Ermcp3GoodsGroup[]> {
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- const param = excludecfg ? { areauserid, excludecfg } : { areauserid }
- return commonSearch_go('/Ermcp3/QueryGoodsGroup', param).catch((err) => {
- throw new Error(`查询期货商品组: ${err.message}`);
- });
- }
- /** ================================= 信息 - 套保品种 ================================**/
- /**
- * 查询套保品种(菜单:套保品种) /Ermcp/QueryMiddleGoods
- * @param status 状态 0-停用 1-正常
- * @constructor
- */
- export function QueryMiddleGoods(status: number): Promise<ErmcpMiddleGoodsModel[]> {
- const userid = getUserId(); // 所属机构id
- return commonSearch_go('/Ermcp/QueryMiddleGoods', { userid, status }).catch((err) => {
- throw new Error(`查询套保品种: ${err.message}`);
- });
- }
- /**
- * 查询套保品种详情(套保品种/商品详情) /Ermcp3/QueryMiddleGoodsDetail
- * @param middlegoodsid 套保品种id
- * @constructor
- */
- export function QueryMiddleGoodsDetail(middlegoodsid: number): Promise<Ermcp3MiddleGoodsDetailEx[]> {
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryMiddleGoodsDetail', { areauserid, middlegoodsid }).catch((err) => {
- throw new Error(`查询套保品种详情(套保品种/商品详情): ${err.message}`);
- });
- }
|