import util from '@/utils/util.js'
const jsonType = {'content-type': 'application/json'}
const formType = {'content-type': 'application/x-www-form-urlencoded'}
const dataType = {'content-type': 'multipart/form-data'}

let inventoryApiFun = function(vm){
	// 接口公共前缀
	let parts="/wxh-worker-rest/rest/parts/" //收货 inventory 模块
	/**
	 * 收货列表
	 */
	let inventoryListByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/take/stock', params);
	/**
	 * 收货单详情
	 */
	let inventoryDetailByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/sign/detail/'+ params);
	/**
	 * 确认收货
	 */
	let addInventoryByInventoryModules = async (params = {}) => await vm.$u.post(parts + vm.vuex_token + '/take/stock/detail/add', params,formType);
	

	const inventoryApi = {
		inventoryListByInventoryModules,
		inventoryDetailByInventoryModules,
		addInventoryByInventoryModules,
	}
	return inventoryApi
}
module.exports =  {
	inventoryApiFun
}
