
import { request } from 'umi';

//获取商品信息
export async function getproductpage(data) {
    return request('/kitchen/api/Product/GetPage', {
        method: 'POST',
        data: data,
    });
}

//查询型采购信息
export async function page(data) {
    return request('/kitchen/api/PurchaseOrder/page', {
        method: 'POST',
        data: data,
    });
}


//查询采购子订单
export async function purchaseorderentrylist(data) {
    return request(`/kitchen/api/PurchaseOrder/purchase-order-entry-list/${data}`, {
        method: 'get',
        data: data,
    });
}

//添加采购信息
export async function add(data) {
    return request('/kitchen/api/PurchaseOrder', {
        method: 'POST',
        data: data,
    });
}

//xoiugai 采购信息
export async function Update(data) {
    return request('/kitchen/api/PurchaseOrder', {
        method: 'put',
        data: data,
    });
}


//获取供应商
export async function GetSupplierList(data) {
    return request('/kitchen/api/PurchaseOrder/supplier-list', {
        method: 'get',
        data: data,
    });
}

//获取加盟商组织
export async function GetOrgList(data) {
    return request(`/kitchen/api/PurchaseOrder/org-list`, {
        method: 'get',
    });
}

//删除采购订单
export async function Delete(data) {
    return request('/kitchen/api/PurchaseOrder', {
        method: 'DELETE',
        data: data,
    });
}

//删除采购子订单
export async function DeleteSubset(data) {
    return request('/kitchen/api/PurchaseOrder/subset', {
        method: 'DELETE',
        data: data,
    });

}



//通过
export async function enable(data) {
    return request(`/kitchen/api/PurchaseOrder/enable/${data}`, {
        method: 'POST',
    });
}

//拒绝
export async function disable(data) {
    return request(`/kitchen/api/PurchaseOrder/disable/${data}`, {
        method: 'POST',
    });
}

//获取物料信息
export async function getpurchaseorderinfo(data) {
    return request(`/kitchen/api/PurchaseOrder/purchase-order-info/${data}`, {
        method: 'get',
    });
}

//获取物料类型
export async function getproducttypelist() {
    return request(`/kitchen/api/product-type/type-list`, {
        method: 'get',
    });
}


//获取物料类型
export async function getbatchinglist() {
    return request(`/kitchen/api/PurchaseOrder/batching-list`, {
        method: 'get',
    });
}


//获取物料单位
export async function getuintlist() {
    return request(`/kitchen/api/PurchaseOrder/uint-list`, {
        method: 'get',
    });
}


