import config from "@/config";
import http from "@/utils/request";

export default {
	out:{
		list:{
			url: `${config.API_URL}/out.stock.list`,
			name: "销售出库清单列表",
			get: async function (params) {
				return await http.post(this.url, params);
			},
		},
		field:{
			url: `${config.API_URL}/out.stock.field.select.list`,
			name: "销售出库清单检索",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		stockImport:{
			url: `${config.API_URL}/out.stock.import.list`,
			name: "导入的出货清单列表",
			get: async function (params) {
				return await http.post(this.url, params);
			},
		},
		stockExport:{
			url: `${config.API_URL}/out.stock.export.list`,
			name: "出库清单导出",
			post: async function (params) {
				return await http.post(this.url,params);
			}
		},
		deleteImport:{
			url: `${config.API_URL}/out.stock.import.delete`,
			name: "批量删除出货清单",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		stockBom:{
			url: `${config.API_URL}/out.stock.import.mes.info`,
			name: "出货清单对应物料BOM列表信息",
			get: async function (params) {
				return await http.post(this.url, params);
			},
		},
		deleteBom:{
			url: `${config.API_URL}/out.stock.import.mes.info.delete`,
			name: "批量删除MES BOM明细",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		bomField:{
			url: `${config.API_URL}/out.stock.bom.import.list`,
			name: "bom清单检索",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		template:{
			url: `${config.API_URL}/shipping.list.import.template`,
			name: "出货清单导入模版",
			post: async function (params) {
				return await http.get(this.url,params,{responseType: 'arraybuffer'});
			}
		},
		import:{
			url: `${config.API_URL}/out.stock.import`,
			name: "出货清单导入",
			post: async function (params) {
				return await http.post(this.url,params,{'Content-Type': 'multipart/form-data'});
			}
		},
		bomExport:{
			url: `${config.API_URL}/out.stock.export.mes.info`,
			name: "BOM清单导出",
			post: async function (params) {
				return await http.post(this.url,params);
			}
		},
	}
};
