import { TStkoutModel, TStkoutModelQueryParam } from '@/types'
import request from '@/until/request'

/**
 * 获取出库单列表
 * @param data TStkoutModelQueryParam
 */
const QueryTStkoutModelList = (data: TStkoutModelQueryParam) =>
    request({
        url: '/TStkoutAction/findlistByCon',
        method: 'post',
        data: data
    })

/**
* 新增出库单
* @param data TStkoutModel
*/
const AddTStkoutModel = (data: TStkoutModel) =>
    request({
        url: '/TStkoutAction/saveTStkout',
        method: 'post',
        data: data
    })

/**
* 编辑出库单
* @param data TStkoutModel
*/
const EditTStkoutModel = (data: TStkoutModel) =>
    request({
        url: '/TStkoutAction/updateTStkout',
        method: 'post',
        data: data
    })

/**
* 作废出库单
* @param  data TStkoutModel
*/
const DeleteTStkoutModel = (data: TStkoutModel) =>
    request({
        url: '/TStkoutAction/deleteTStkout',
        method: 'post',
        data: data
    })

export default {
    QueryTStkoutModelList,
    AddTStkoutModel,
    EditTStkoutModel,
    DeleteTStkoutModel
}