import { request } from '../../boot/axios';
const pathName='materials-class';
class MaterialClassApi{
    getTree=()=>{
      return request.get(`${pathName}/tree`)
    };
    getTreeByCode=(val:string)=>{
      return request.get(`${pathName}/tree/${val}`)
    };
    // pathName + 'updateRemark/' + row.id + '/' + row.remark
    saveRemark=(val?:any)=>{
        return request.post(`${pathName}updateRemark/${val.id}/${val.remark}`);
    };
    // 获取状态字典
    getDnStatus=()=>{
        return request.get('/dict/type/dn_status');
    }
     //  获取包装单位
    gePackUnitMap=()=>{
       return request.get('materialsunit/getUnitList/1/');
    }
    // 获取记账单位
    getRecordUnitMap=()=>{
        return request.get('materialsunit/getUnitList/2/');
    }
    // 获取客户列表
    getCustomerList=()=>{
        return request.get('customer/customer-list');
    }
    getStock=(val?:any)=>{
       return request.post(`${pathName}getStock/${val}`,{});
    }
    getStockPage=(val?:any)=>{
        return request.post('stock/getStockPage/',val);
    }
}
const materialClassApi=new MaterialClassApi();
export {materialClassApi};
