bonus-ui/src/api/foodManage/purchaseManage.js

497 lines
12 KiB
JavaScript

import request from '@/utils/request'
// 原料类别树
export function systemMaterialTreeApi(data) {
return request({
url: '/smart-canteen/cook_material_type/getTree',
method: 'post',
data: data
})
}
// 查询原料列表
export function getMaterialListApi(data) {
return request({
url: '/smart-canteen/cook_material/list',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params: data
})
}
//查询供应商列表 isPaging 0不分页 2分页
export function supplierPageApi(data) {
return request({
url: '/smart-canteen/ims_supplier/list',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}
// 仓库
export function drpWareHousePageApi(data) {
return request({
url: '/smart-canteen/ims_warehouse_info/listAll',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params: data
})
}
//获取菜品原料反算接口dishes/convert
export function dishesConvertApi(data) {
return request({
url: '/smart-canteen/cook_dishes/dishes/convert',
method: 'post',
data: data
})
}
//采购计划获取参考价-根据原料id获取进价接口
export function checkMaterialAndPriceApi(data) {
return request({
url: '/smart-canteen/cook_material/checkMaterialAndPriceVO',
method: 'post',
data: data
})
}
// -------------采购合同---------------
//获取采购合同分页列表
export function purchaseContractPageApi(data) {
return request({
url: '/smart-canteen/ims_purchase_contract/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data:data,
params:{
pageNum:data.pageNum,
pageSize:data.pageSize
}
})
}
//获取采购合同分页详情
export function getPurchaseContractInfoApi(data) {
return request({
url: '/smart-canteen/ims_purchase_contract/'+data.contractId,
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// 新增
export function addPurchaseContractApi(data) {
return request({
url: '/smart-canteen/ims_purchase_contract',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 编辑
export function editPurchaseContractApi(data) {
return request({
url: '/smart-canteen/ims_purchase_contract/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除
export function delPurchaseContractApi(data) {
return request({
url: '/smart-canteen/ims_purchase_contract/del/'+data.contractIds,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// -------------采购询价---------------
//获取采购询价分页列表
export function goodsInquiryPageApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/list',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
data,
})
}
//获取采购询价分页详情
export function getGoodsInquiryInfoApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/'+data.inquiryId,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
//获取报价供应商详情列表-查看报价
export function getGoodsInquirySupplierInfoApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/qouteInfo',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
//获取报价供应商详情对比-查看报价{inquiryId}
export function getGoodsInquiryQuoteInfoApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/qouteCheckInfo',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 选中供应商-查看报价 {InquirySupplier类}
export function editInquirySupplierApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/supplier',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 新增采购询价
export function addGoodsInquiryApi(data) {
return request({
url: '/smart-canteen/ims_inquiry',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改采购询价
export function editGoodsInquiryApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改采购报价
export function editGoodsQuotationApi(data) {
return request({
url: '/smart-canteen/ims_quote/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 根据询价ID和供应商ID-获取供应商报价详情(可用于询价管理中点击已报价供应商获取报价详情)
export function getGoodsInquiryDetailInfoApi(data) {
return request({
url: '/smart-canteen/ims_quote/detail',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除采购询价
export function delGoodsInquiryApi(data) {
return request({
url: '/smart-canteen/ims_inquiry/del/'+data.inquiryId,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
//获取采购报价分页列表
export function goodsInquiryQuotePageApi(data) {
return request({
url: '/smart-canteen/ims_quote/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data:data,
params:{
pageNum:data.pageNum,
pageSize:data.pageSize
}
})
}
// -------------生产计划---------------
//获取生产计划分页列表
export function productionPlanPageApi(data) {
return request({
url: '/smart-canteen/ims_production_plan/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data:data,
params:{
pageNum:data.pageNum,
pageSize:data.pageSize
}
})
}
//获取生产计划分页详情
export function getProductionPlanInfoApi(data) {
return request({
url: '/smart-canteen/ims_production_plan/'+data.planId,
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// 新增生产计划
export function addProductionPlanApi(data) {
return request({
url: '/smart-canteen/ims_production_plan',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改生产计划
export function editProductionPlanApi(data) {
return request({
url: '/smart-canteen/ims_production_plan/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除生产计划
export function delProductionPlanApi(data) {
return request({
url: '/smart-canteen/ims_production_plan/del/'+data.planIds,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// -------------采购计划---------------
//获取采购计划分页列表
export function purchasePlanPageApi(data) {
return request({
url: '/smart-canteen/ims_purchase_plan/list',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
data
})
}
//获取采购计划分页详情
export function getPurchasePlanInfoApi(data) {
return request({
url: '/smart-canteen/ims_purchase_plan/'+data.planId,
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// 新增采购计划
export function addPurchasePlanApi(data) {
return request({
url: '/smart-canteen/ims_purchase_plan',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改采购计划
export function editPurchasePlanApi(data) {
return request({
url: '/smart-canteen/ims_purchase_plan/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除采购计划
export function delPurchasePlanApi(data) {
return request({
url: '/smart-canteen/ims_purchase_plan/del/'+data.planIds,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// -------------采购订单---------------
//查询采购订单主列表
export function purchaseOrderPageApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data:data,
params:{
pageNum:data.pageNum,
pageSize:data.pageSize
}
})
}
//获取采购订单主详细信息
export function getPurchaseOrderInfoApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/'+data.orderGoodsId,
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// 新增采购订单
export function addPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改采购订单
export function editPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除采购订单
export function delPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/del/'+data.orderGoodsIds,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// -------------采购验货---------------
//查询验货单列表
export function purchaseInspectPageApi(data) {
return request({
url: '/smart-canteen/ims_inspect_goods/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data:data,
params:{
pageNum:data.pageNum,
pageSize:data.pageSize
}
})
}
//获取采购验货主详细信息
export function getPurchaseInspectInfoApi(data) {
return request({
url: '/smart-canteen/ims_inspect_goods/'+data.inspectGoodsId,
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// 新增采购验货
export function addPurchaseInspectApi(data) {
return request({
url: '/smart-canteen/ims_inspect_goods',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改采购验货
export function editPurchaseInspectApi(data) {
return request({
url: '/smart-canteen/ims_inspect_goods/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除采购验货
export function delPurchaseInspectApi(data) {
return request({
url: '/smart-canteen/ims_inspect_goods/del/'+data.inspectGoodsIds,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}