import { request } from '@umijs/max';
import { List } from 'lodash';

export default {

    /**
     * 分页查询
     * @param parms 
     * @returns 
     */
    PagedList(parms: OrderType.Page) {
        return request('/api/order/pagedlist', {
            method: 'POST',
            data: {
                ...parms,
            },
        });
    },

    /**
     * 添加
     * @param parms 
     * @returns 
     */
    Add(parms: OrderType.orderFinalsl[]) {
        return request('/api/order/add', {
            method: 'POST',
            data: parms,
        });
    },

    /**
        * 修改
        * @param parms 
        * @returns 
        */
    update(parms: OrderType.orderFinalsl[]) {
        return request('/api/order/update', {
            method: 'POST',
            data: parms,
        });
    },

       /**
        * 删除
        * @param parms 
        * @returns 
        */
       del(parms: string) {
        return request('/api/order/del/'+parms, {
            method: 'POST',
        });
    },


    /**
 * 獲取訂單的產品信息
 * @param parms 
 * @returns 
 */
    GetorderMaterial(parms: string) {
        return request('/api/order/getordermaterial/' + parms, {
            method: 'get',
        });
    },

       /**
 * 生成工单
 * @param parms 
 * @returns 
 */
       orderassociationwork(parms: OrderType.orderFinalsl[]) {
        return request('/api/order/orderassociationwork', {
            method: 'POST',
            data: parms,
        });
    },

           /**
 * 获取成品可制造数量
 * @param parms 
 * @returns 
 */
           getFinalslLImit(parms:string) {
            return request('/api/order/getfinalsllimit/'+parms, {
                method: 'get',
            });
        },

}





