#ifndef PACKDETAILFORM_H
#define PACKDETAILFORM_H

#include <QWidget>
//#include "handle/remotepackconfig.h"
#include "QMessageBox"
#include "QTreeWidget"
#include "globalinfo.h"
#include "handle/packinfoseed2server.h"

namespace Ui {
class PackDetailForm;
}

class PackDetailForm : public QWidget
{
    Q_OBJECT

public:
    explicit PackDetailForm(QWidget *parent = nullptr);
    ~PackDetailForm();
//    void upconfig(const DaBaoConfig &config);
    inline void setSaveInfo(QList<PackSaveInfo> saveinfo){saveInfo = saveinfo;}

private slots:
    void on_pushButton_clicked();
//    void changeTable(QList<QMap<QString,QString>> productList);


//    void changeTreeWidget()
    void tongbu_clicked(QTreeWidgetItem * item,int row);
    void code_single_clicked(int row);
    void case_number_clicked();

    void on_pushBack_clicked();

    void on_prevoiusPage_clicked();

    void on_nextPage_clicked();

    void on_jump_clicked();

    void on_showMao_clicked();

public slots:
    void changeTreeWidget(/*QList<QMap<QString,QString>> productList*/int page,int limit);
    void SynReturn();
    void upconfig();
    void select();
    void dengjiselect();

signals:
    void back();

private:
    Ui::PackDetailForm *ui;

    PackInfoSeed2Server *packServer;
    PackInfoManger *Manger;
    int limits;

    QList<QMap<QString,QString>> product;
    QList<QMap<QString,QString>> details;
    QSharedPointer<PackInfo> packinfo;
    int nowPageNum;
    int pageNumAll;


    GlobalInfo * glo = GlobalInfo::this_();

    QList<PackSaveInfo> saveInfo;
public:

    int days = 0;
};

#endif // PACKDETAILFORM_H
