import { TStkinModel, TStkinModelQueryParam } from '@/types'
import request from '@/until/request'

/**
 * 获取入库单列表
 * @param data TStkinModelQueryParam
 */
const QueryTStkinModelList = (data: TStkinModelQueryParam) =>
    request({
        url: '/TStkinAction/findlistByCon',
        method: 'post',
        data: data
    })

/**
* 新增入库单
* @param data TStkinModel
*/
const AddTStkinModel = (data: TStkinModel) =>
    request({
        url: '/TStkinAction/saveTStkin',
        method: 'post',
        data: data
    })

/**
* 编辑入库单
* @param data TStkinModel
*/
const EditTStkinModel = (data: TStkinModel) =>
    request({
        url: '/TStkinAction/updateTStkin',
        method: 'post',
        data: data
    })

/**
* 作废入库单
* @param  data TStkinModel
*/
const DeleteTStkinModel = (data: TStkinModel) =>
    request({
        url: '/TStkinAction/deleteTStkin',
        method: 'post',
        data: data
    })

export default {
    QueryTStkinModelList,
    AddTStkinModel,
    EditTStkinModel,
    DeleteTStkinModel
}