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

/**
 * 获取出库单设备明细列表
 * @param data TStkoutDetailModelQueryParam
 */
const QueryTStkoutDetailModelList = (data: TStkoutDetailModelQueryParam) =>
    request({
        url: '/TStkoutDetailAction/findBybillCode/' + data.billCode + "/" + data.page + "/" + data.rows,
        method: 'get',
    })

/**
* 新增出库设备
* @param billCode string
* @param devsns string
*/
const AddTStkoutDetailModel = (billCode: string, devsns: string) =>
    request({
        url: '/TStkoutDetailAction/saveTStkoutDetail/' + billCode + "/" + devsns,
        method: 'get'
    })

/**
* 删除出库明细
* @param  ids string
*/
const DeleteTStkoutDetailModel = (ids: string) =>
    request({
        url: '/TStkoutDetailAction/deleteTStkoutDetail/' + ids,
        method: 'get',
    })

export default {
    QueryTStkoutDetailModelList,
    AddTStkoutDetailModel,
    DeleteTStkoutDetailModel
}