uncertainweightpackform.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #ifndef UNCERTAINWEIGHTPACKFORM_H
  2. #define UNCERTAINWEIGHTPACKFORM_H
  3. #include <QWidget>
  4. #include "handle/remotepackconfig.h"
  5. #include "struct_/packinfo.h"
  6. #include "QTimer"
  7. #include "QMessageBox"
  8. #include "globalinfo.h"
  9. #include "editboxinfodialog.h"
  10. namespace Ui {
  11. class UncertainWeightPackForm;
  12. }
  13. class UncertainWeightPackForm : public QWidget
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit UncertainWeightPackForm(QWidget *parent = nullptr);
  18. ~UncertainWeightPackForm();
  19. void setProInfo(const QSharedPointer<ProjectInfo> & info);
  20. private slots:
  21. void on_addBoxList_clicked();
  22. void on_addPackList_clicked();
  23. void calcData();
  24. void on_tongshuguding_currentIndexChanged(const QString &arg1);
  25. void on_tongshuxianzhi_stateChanged(int arg1);
  26. void on_searchButton_clicked();
  27. void on_pushContinue_clicked();
  28. void on_showMaoZhong_stateChanged(int);
  29. void on_pushEditBatch_clicked();
  30. void on_pushNoSyncList_clicked();
  31. void on_pushSync_clicked();
  32. void on_backButton_clicked();
  33. void on_dingzhong_clicked();
  34. void on_ruku_stateChanged(int arg1);
  35. private slots:
  36. void upBoxModelList();//获取箱单模板
  37. void upPackModelList();//获取码单模板
  38. void on_useNewDataButton_clicked();
  39. private:
  40. void updateTableWidget(QList<QSharedPointer<ProjectInfo>> & list);
  41. void init();
  42. void xuanZe_clicked(QString batchno);
  43. void del_clicked(int row);
  44. void Makeup_clicked(int row);
  45. void checkPackInfo();
  46. void EditBatch();
  47. public slots:
  48. void setShortcutConfig();
  49. void upconfig();
  50. void upDengjiInfo();
  51. void changeSpecs();
  52. void upWare();
  53. public:
  54. void addTableWidget(QSharedPointer<BoxInfo> box, int row);
  55. void restTableWidget();
  56. void upSum();
  57. void edit_clicked(int row);
  58. void save();
  59. signals:
  60. void back();
  61. void NoSyncList();
  62. void dingzhong();
  63. void backup(int i);
  64. private:
  65. Ui::UncertainWeightPackForm *ui;
  66. QSharedPointer<ProjectInfo> _info;
  67. QSharedPointer<PackInfo> packinfo;
  68. QMap<QString,DengJiConfigItem> dengjiMap;// <name,详细信息>
  69. HttpRequest _request;
  70. // AutoPackUtils aputils;
  71. bool autoRead;
  72. bool isRuku = false;
  73. // SelectSpecs specs;
  74. QList<QSharedPointer<ProjectInfo>> prolist;
  75. GlobalInfo * glo = GlobalInfo::this_();
  76. PackInfoSeed2Server *packServer;
  77. PackInfoManger *Manger;
  78. double netNum = 0.00;
  79. double gross_weight = 0.00;
  80. float f_gross_weight = 0.0;
  81. float f_netNum = 0.0;
  82. int chengZhongJingDu;
  83. int chengZhongJingDuModel;
  84. double chengZhongJingDuModel_Num = 0.005;//打包精度计算时所需的数,类似四舍五入时把double+0.5在向下取整;
  85. double f_chengZhongJingDuModel_Num = 0.05;//单精度计算时的数;
  86. bool istubeNumTure;
  87. int tubeNumMax;
  88. int tubeNumMin;
  89. };
  90. #endif // UNCERTAINWEIGHTPACKFORM_H