import apiHelper from './api.helper.js'


/**
 * 
 * @param name
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function apiPurchaseList(params) {
	const res = await apiHelper.post('/crm-app/Invinfo/getUnFinishedInv', params)
	return res
}

export async function querySysDictionaryDetailsByCode(params) {
	const res = await apiHelper.post('/crm-app/dictionary/querySysDictionaryDetailsByCode', params, {
		'Content-Type': "application/x-www-form-urlencoded"
	})
	return res
}

export async function getProdDeliveryPlan(params) {
	const res = await apiHelper.post('/crm-app/wantgoods/getProdDeliveryPlan', params)
	return res
}
export async function getReceipt(params) {
	const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/get_bp_sh_addr', params)
	return res
}
export async function findByCustomer(params) {
	const res = await apiHelper.get('/crm-app/setShunting/findByCustomer', params, {'Content-Type': 'application/json'})
	return res
}
export async function findAppGoodsSingle(params) {
	const res = await apiHelper.post('/crm-app/wantgoods/findAppGoodsSingle', params)
	return res
}
export async function queryLogistics(params) {
	const res = await apiHelper.post('/crm-app/logistics/queryLogistics', params, {'Content-Type': 'application/x-www-form-urlencoded'})
	return res
}
export async function initAppWantGoods(params) {
	const res = await apiHelper.post('/crm-app/wantgoods/initAppWantGoods', params)
	return res
}
export async function getCustomerList(params) {
	const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/bp_search', params)
	return res
}
export async function getChannelType(params) {
	const res = await apiHelper.post('/crm-app/wantgoods/getChannelType', params)
	return res
}
export async function listKAStore(params) {
	const res = await apiHelper.post('/crm-app/kastore/listKAStore', params)
	return res
}
export async function startProcessInstanceByKey(params) {
	const res = await apiHelper.post('/crm-app/workflow/startProcessInstanceByKey', params, {'Content-Type': 'application/x-www-form-urlencoded'})
	return res
}
export async function advance(params) {
	const res = await apiHelper.post('/crm-app/workflow/advance', params, {'Content-Type': 'application/x-www-form-urlencoded'})
	return res
}

