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 receivedApiFun = function(vm){
	// 接口公共前缀
	let parts="/wxh-worker-rest/rest/parts/" //收货 received 模块
	/**
	 * 品牌列表 参数固定
	 */
	let brandListByReceivedModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/type/threeLevel/1100000216/1',params);
	/**
	 * 收货列表
	 */
	let receiveListByReceivedModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/sign/list', params);
	/**
	 * 收货单详情
	 */
	let receiveDetailByReceivedModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/sign/detail/'+ params);
	/**
	 * 确认收货
	 */
	let addReceiveByReceivedModules = async (params = {}) => await vm.$u.post(parts + vm.vuex_token + '/take/stock/sign/create', params,formType);
	

	const receivedApi = {
		brandListByReceivedModules,
		receiveListByReceivedModules,
		receiveDetailByReceivedModules,
		addReceiveByReceivedModules,
	}
	return receivedApi
}
module.exports =  {
	receivedApiFun
}
