import http from "@/api";
import { ResPage } from "@/api/interface/index";
/**
 * @name 打印产品条码模块
 */
//产品条码生成记录列表
export const getListApi = (params: Record<string, any>) => {
    // console.log(params);
    // return {
    //     isSuccess: true,
    //     message: "Success",
    //     status: 200,
    //     totalCount: 1,
    //     data: [
    //         {
    //             id: 17372,
    //             specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
    //             materialNumber: "G01-43-552867",
    //             materialName: "7口USB3.0集线器",
    //             barCode: "6936761881968",
    //             purchaseBillNo: "ceshi1224",
    //             generateComplete: "已完成",
    //             number: 300,
    //             printNumber: 0,
    //             downLoadNumber: 300,
    //             useNumber: 2,
    //             creator: "admin",
    //             createTime: "2024-12-24 10:27:04",
    //             generateCompleteTime: "2024-12-24 10:27:05",
    //             supplierOrOrg: "深圳市元创时代科技有限公司",
    //             isUpdateMaterial: false,
    //             isTwo: 2
    //         }
    //     ]
    // };
    return http.post<ResPage<any>>(`SerialNumber/GetGenerateRecordList`, params);
};
//产品条码列表
export const getCodeListApi = (params: Record<string, any>) => {
    const { isDownLoad } = params;
    return http.post<ResPage<any>>(`SerialNumber/GetList`, params, {
        noLoading: isDownLoad
    });
};

// export const getCodeList1Api = (params: Record<string, any>) => {
//     return http.post<ResPage<any>>(`SerialNumber/GetList`, params, {
//         noLoading: true
//     });
// };

//转换规格型号 SerialNumber/UpdateMaterial
export const getUpdateMaterialApi = (params: Record<string, any>) => {
    return http.post<ResPage<any>>(`SerialNumber/UpdateMaterial`, params);
};
//2件装转换
export const getTransferSnApi = (params: Record<string, any>) => {
    return http.post<any>(`SerialNumber/TransferSn`, params);
};
//2件装检测
export const getTransferSnJCApi = (params: Record<string, any>) => {
    return http.post<any>(`SerialNumber/VerifSn`, params);
};
//产品条码列表下载
export const getSerialNumberDownLoadApi = (params: Record<string, any>) => {
    return http.post<ResPage<any>>(`SerialNumber/Export`, params);
};
//生成条码
export const generateBarCodeApi = (params: Record<string, any>) => {
    return http.post<ResPage<any>>(`SerialNumber/Generate`, params);
};
//打印
export const getPrintListCodeApi = (params: Record<string, any>) => {
    return http.post<ResPage<any>>(`SerialNumber/Print`, params);
};
