import request from "@/http/request";
import axios from "axios";

/**
 * 提交入库单
 */

const _request = axios.create({
    // baseURL: 'http://localhost:12315',
    baseURL: 'http://10.18.58.21:12315',
    timeout: 5000
})

const submitOrderInForm = (params) => {
    return _request({
        url: '/ycwms/orderIn',
        method: 'post',
        data: params
    })
}

/**
 * 查询入库单列表
 */
const getOrderIns = (params) => {
    return request({
        url: '/order/getOrderIns',
        method: 'post',
        data: params
    })
}

// 修改update方法
const updateOrderIn = (recordId, orderStatus) => {
    return request({
        url: '/order/updateOrderIn',
        method: 'post',
        params: {  // 使用params传递URL参数
            recordId,
            orderStatus
        }
    })
}

export {
    submitOrderInForm,
    getOrderIns,
    updateOrderIn
}
