Bläddra i källkod

定重打包和不定重打包

error 6 år sedan
förälder
incheckning
ce448292a3

+ 9 - 3
JxcClient.pro

@@ -30,12 +30,14 @@ SOURCES += \
     handle/utils/utilsfunc.cpp \
     handle/utils/utilsfunc.cpp \
     packinfo.cpp \
     packinfo.cpp \
     widget/autopackform.cpp \
     widget/autopackform.cpp \
+    widget/fixedweightpackform.cpp \
     widget/loginform.cpp \
     widget/loginform.cpp \
     main.cpp \
     main.cpp \
     mainwindow.cpp \
     mainwindow.cpp \
     widget/packdetailform.cpp \
     widget/packdetailform.cpp \
     widget/selectvalueform.cpp \
     widget/selectvalueform.cpp \
-    widget/settingsform.cpp
+    widget/settingsform.cpp \
+    widget/uncertainweightpackform.cpp
 
 
 HEADERS += \
 HEADERS += \
     configinfo.h \
     configinfo.h \
@@ -52,19 +54,23 @@ HEADERS += \
     handle/utils/utilsfunc.h \
     handle/utils/utilsfunc.h \
     packinfo.h \
     packinfo.h \
     widget/autopackform.h \
     widget/autopackform.h \
+    widget/fixedweightpackform.h \
     widget/loginform.h \
     widget/loginform.h \
     mainwindow.h \
     mainwindow.h \
     widget/packdetailform.h \
     widget/packdetailform.h \
     widget/selectvalueform.h \
     widget/selectvalueform.h \
-    widget/settingsform.h
+    widget/settingsform.h \
+    widget/uncertainweightpackform.h
 
 
 FORMS += \
 FORMS += \
     widget/autopackform.ui \
     widget/autopackform.ui \
+    widget/fixedweightpackform.ui \
     widget/loginform.ui \
     widget/loginform.ui \
     mainwindow.ui \
     mainwindow.ui \
     widget/packdetailform.ui \
     widget/packdetailform.ui \
     widget/selectvalueform.ui \
     widget/selectvalueform.ui \
-    widget/settingsform.ui
+    widget/settingsform.ui \
+    widget/uncertainweightpackform.ui
 
 
 # Default rules for deployment.
 # Default rules for deployment.
 qnx: target.path = /tmp/$${TARGET}/bin
 qnx: target.path = /tmp/$${TARGET}/bin

+ 1 - 0
configinfo.cpp

@@ -34,6 +34,7 @@ void ConfigInfo::Start()
         portName = Get("ElectronicScale","portName").toString();//串口名称
         portName = Get("ElectronicScale","portName").toString();//串口名称
         portBaudRate = Get("ElectronicScale","portBaudRate").toString();//串口波特率
         portBaudRate = Get("ElectronicScale","portBaudRate").toString();//串口波特率
 
 
+
 //   }else{
 //   }else{
 //        qDebug()<<"配置文件不存在";
 //        qDebug()<<"配置文件不存在";
 //        //url接口地址
 //        //url接口地址

+ 3 - 0
handle/autopackutils.cpp

@@ -82,6 +82,9 @@ void AutoPackUtils::insertProductSQL(QSharedPointer<PackInfo> packes)
     productData.carton_type = packes->carton_type;
     productData.carton_type = packes->carton_type;
     productData.operator_id = packes->operator_id;
     productData.operator_id = packes->operator_id;
     productData.specs = packes->info().specs;
     productData.specs = packes->info().specs;
+    productData.denier = packes->info().denier;
+    productData.dtex = packes->info().dtex;
+    productData.fiber = packes->info().fiber;
     productData.remark = packes->remark;
     productData.remark = packes->remark;
 
 
     if(database.insertProduct(productData)){
     if(database.insertProduct(productData)){

+ 1 - 1
handle/code39.cpp

@@ -160,7 +160,7 @@ QImage Code39::draw(QString BinaryNum,QString barcode)
     font.setPixelSize(10);
     font.setPixelSize(10);
     font.setWeight(QFont::ExtraLight);
     font.setWeight(QFont::ExtraLight);
     painter.setFont(font);
     painter.setFont(font);
-    painter.drawText(5,30,MAXWIDTH,10,Qt::AlignCenter,/*"S/N:"barcode);
+    painter.drawText(5,30,MAXWIDTH,10,Qt::AlignCenter,"S/N:"barcode);
 //    bool isSaved = image.save(path + barcode + ".bmp");
 //    bool isSaved = image.save(path + barcode + ".bmp");
 //    qDebug()<<isSaved;
 //    qDebug()<<isSaved;
 //    return image;
 //    return image;

+ 12 - 4
handle/database.cpp

@@ -48,6 +48,9 @@ bool Database::createProductDatabase()
                                   "carton_type VARCHAR NOT NULL,"           //纸箱种类
                                   "carton_type VARCHAR NOT NULL,"           //纸箱种类
                                   "operator_id INTEGER NOT NULL,"           //操作员ID
                                   "operator_id INTEGER NOT NULL,"           //操作员ID
                                   "specs VARCHAR NOT NULL,"                 //规格
                                   "specs VARCHAR NOT NULL,"                 //规格
+                                  "denier VARCHAR,"                         //旦数(D)
+                                  "dtex VARCHAR,"                           //分特(dt)
+                                  "fiber VARCHAR,"                          //孔数(F)
                                   "tongbu VARCHAR(1) DEFAULT 0,"            //同步状态
                                   "tongbu VARCHAR(1) DEFAULT 0,"            //同步状态
                                   "remark VARCHAR);");                      //备注
                                   "remark VARCHAR);");                      //备注
 
 
@@ -103,8 +106,8 @@ bool Database::insertProduct(product_data productData)
     query.prepare("INSERT INTO product(goods_id,"
     query.prepare("INSERT INTO product(goods_id,"
                           "code_single, quantity, batch_no, category,level_id, tube_number,"
                           "code_single, quantity, batch_no, category,level_id, tube_number,"
                           "gross_weight, net_weight, machine_no, packing_time,"
                           "gross_weight, net_weight, machine_no, packing_time,"
-                          "packing_type, carton_type, operator_id, specs, remark)"
-                          "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
+                          "packing_type, carton_type, operator_id, specs, denier, dtex, fiber, remark)"
+                          "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
     query.bindValue(0,productData.goods_id);
     query.bindValue(0,productData.goods_id);
     query.bindValue(1,productData.code_single);
     query.bindValue(1,productData.code_single);
     query.bindValue(2,productData.quantity);
     query.bindValue(2,productData.quantity);
@@ -120,7 +123,10 @@ bool Database::insertProduct(product_data productData)
     query.bindValue(12,productData.carton_type);
     query.bindValue(12,productData.carton_type);
     query.bindValue(13,productData.operator_id);
     query.bindValue(13,productData.operator_id);
     query.bindValue(14,productData.specs);
     query.bindValue(14,productData.specs);
-    query.bindValue(15,productData.remark);
+    query.bindValue(15,productData.denier);
+    query.bindValue(16,productData.dtex);
+    query.bindValue(17,productData.fiber);
+    query.bindValue(18,productData.remark);
 
 
     bool success=query.exec();
     bool success=query.exec();
     return success;
     return success;
@@ -206,10 +212,12 @@ QList<QMap<QString,QString>> Database::GetValues(QString table, QStringList &val
 
 
     QString sql = QString("select * from ") + table +" "+ condition;
     QString sql = QString("select * from ") + table +" "+ condition;
     query.exec(sql);
     query.exec(sql);
+
+    qDebug()<<table;
     while (query.next())
     while (query.next())
     {
     {
         for(int i = 0;i <= values.size()-1;i++){
         for(int i = 0;i <= values.size()-1;i++){
-//            qDebug()<<values.at(i) << query.value(values.at(i)).toString();
+            qDebug()<<values.at(i) << query.value(values.at(i)).toString();
             dbmxdata.insert(values.at(i),query.value(values.at(i)).toString());
             dbmxdata.insert(values.at(i),query.value(values.at(i)).toString());
         }
         }
         dbmxlist.append(dbmxdata);
         dbmxlist.append(dbmxdata);

+ 3 - 0
handle/database.h

@@ -24,6 +24,9 @@ struct product_data
     QString carton_type;
     QString carton_type;
     int operator_id;
     int operator_id;
     QString specs;
     QString specs;
+    QString denier;
+    QString dtex;
+    QString fiber;
     QString remark;
     QString remark;
 };
 };
 
 

+ 7 - 3
handle/remotepackconfig.cpp

@@ -53,7 +53,7 @@ RemotePackConfig::RemotePackConfig(QObject *parent) : QObject(parent)
    parsefUNS.insert("A3000303",[this](const QJsonObject & obj){this->_config.morenDaYinXIaoShouDan = this->getConfigInt(obj);});
    parsefUNS.insert("A3000303",[this](const QJsonObject & obj){this->_config.morenDaYinXIaoShouDan = this->getConfigInt(obj);});
    parsefUNS.insert("A3000304",[this](const QJsonObject & obj){this->_config.morenXianShiQianKuan = this->getConfigInt(obj);});
    parsefUNS.insert("A3000304",[this](const QJsonObject & obj){this->_config.morenXianShiQianKuan = this->getConfigInt(obj);});
    parsefUNS.insert("A3000305",[this](const QJsonObject & obj){this->_config.xiaoShouEJingDu = this->getConfigInt(obj);});
    parsefUNS.insert("A3000305",[this](const QJsonObject & obj){this->_config.xiaoShouEJingDu = this->getConfigInt(obj);});
-
+   parsefUNS.insert("A4000400",[this](const QJsonObject & obj){this->_config.diys = this->getDiys(obj);});
 
 
   //TODO:http://doc.vanlai.net:3001/web/#/1?page_id=57 补全剩下
   //TODO:http://doc.vanlai.net:3001/web/#/1?page_id=57 补全剩下
 //http://erp.itwsw.cn/#/packageCon
 //http://erp.itwsw.cn/#/packageCon
@@ -107,6 +107,7 @@ void RemotePackConfig::refConfig()
 
 
 void RemotePackConfig::result(int code, const QJsonObject & body)
 void RemotePackConfig::result(int code, const QJsonObject & body)
 {
 {
+//    qDebug()<<body;
     int ecode = body.value("code").toInt(404);
     int ecode = body.value("code").toInt(404);
     if(ecode != 200){
     if(ecode != 200){
         emit configUpdateError(ecode,body.value("message").toString(""));
         emit configUpdateError(ecode,body.value("message").toString(""));
@@ -208,20 +209,23 @@ int RemotePackConfig::getConfigInt(const QJsonObject & data)
 QPair<int,int> RemotePackConfig::getConfigpAIR(const QJsonObject & data)
 QPair<int,int> RemotePackConfig::getConfigpAIR(const QJsonObject & data)
 {
 {
     QJsonArray value_array = data.value("value").toArray();
     QJsonArray value_array = data.value("value").toArray();
+//    qDebug()<<value_array;
     QPair<int,int> list;
     QPair<int,int> list;
     int vSize = value_array.size();
     int vSize = value_array.size();
     bool frist = true;
     bool frist = true;
     for(int i = 0; i < vSize; ++i){
     for(int i = 0; i < vSize; ++i){
         QJsonObject value_object = value_array.at(i).toObject();
         QJsonObject value_object = value_array.at(i).toObject();
-        if(value_object.value("selected").toBool(false)){
+//        if(value_object.value("selected").toBool(false)){
             if(frist) {
             if(frist) {
                 list.first = value_object.value("value").toInt();
                 list.first = value_object.value("value").toInt();
+//                qDebug()<<"不定重范围"<<value_object.value("value").toInt();
                 frist = false;
                 frist = false;
             } else {
             } else {
                 list.second = value_object.value("value").toInt();
                 list.second = value_object.value("value").toInt();
+//                qDebug()<<"不定重范围"<<value_object.value("value").toInt();
             }
             }
 
 
-        }
+//        }
 
 
     }
     }
 
 

+ 1 - 0
handle/remotepackconfig.h

@@ -98,6 +98,7 @@ signals:
     void configUpdate(const DaBaoConfig & config);
     void configUpdate(const DaBaoConfig & config);
     void dengJIConfigUp(const QList<DengJiConfigItem> & dengJis);
     void dengJIConfigUp(const QList<DengJiConfigItem> & dengJis);
     void configUpdateError(int code,const QString & msg);
     void configUpdateError(int code,const QString & msg);
+
 public slots:
 public slots:
     void refConfig();
     void refConfig();
 private slots:
 private slots:

+ 2 - 2
main.cpp

@@ -5,8 +5,8 @@
 int main(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
 {
     QApplication a(argc, argv);
     QApplication a(argc, argv);
-    MainWindow w;
-    w.show();
+        MainWindow w;
+        w.show();
     return a.exec();
     return a.exec();
 }
 }
 
 

+ 29 - 2
mainwindow.cpp

@@ -1,6 +1,5 @@
 #include "mainwindow.h"
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "ui_mainwindow.h"
-// TODO: 界面串起来
 MainWindow::MainWindow(QWidget *parent)
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
     : QMainWindow(parent)
     , ui(new Ui::MainWindow)
     , ui(new Ui::MainWindow)
@@ -11,6 +10,8 @@ MainWindow::MainWindow(QWidget *parent)
     connect(ui->pageAutoPack,&AutoPackForm::back,this,&MainWindow::backMenu);
     connect(ui->pageAutoPack,&AutoPackForm::back,this,&MainWindow::backMenu);
     connect(ui->pagePackDetail,&PackDetailForm::back,this,&MainWindow::backMenu);
     connect(ui->pagePackDetail,&PackDetailForm::back,this,&MainWindow::backMenu);
     connect(ui->pageSettings,&SettingsForm::back,this,&MainWindow::backMenu);
     connect(ui->pageSettings,&SettingsForm::back,this,&MainWindow::backMenu);
+    connect(ui->pageDingZhong,&FixedWeightPackForm::back,this,&MainWindow::backMenu);
+    connect(ui->pageBuDing,&UncertainWeightPackForm::back,this,&MainWindow::backMenu);
 
 
     connect(ui->pageSelectValue,&SelectValueForm::selectProject,this,&MainWindow::pageStatusChange);
     connect(ui->pageSelectValue,&SelectValueForm::selectProject,this,&MainWindow::pageStatusChange);
     ui->stackedWidget->setCurrentWidget(ui->pageLogin);
     ui->stackedWidget->setCurrentWidget(ui->pageLogin);
@@ -29,6 +30,20 @@ MainWindow::~MainWindow()
     delete ui;
     delete ui;
 }
 }
 
 
+void MainWindow::on_pushDingZHong_clicked()
+{
+    ui->stackedWidget->setCurrentWidget(ui->pageSelectValue);
+    ui->pageSelectValue->getInfo(1,20);
+    ui->pageSelectValue->setStatus(2);
+}
+
+void MainWindow::on_pushBuDingZhong_clicked()
+{
+    ui->stackedWidget->setCurrentWidget(ui->pageSelectValue);
+    ui->pageSelectValue->getInfo(1,20);
+    ui->pageSelectValue->setStatus(3);
+}
+
 void MainWindow::on_pushAuto_clicked()
 void MainWindow::on_pushAuto_clicked()
 {
 {
     ui->stackedWidget->setCurrentWidget(ui->pageSelectValue);
     ui->stackedWidget->setCurrentWidget(ui->pageSelectValue);
@@ -53,6 +68,18 @@ void MainWindow::pageStatusChange(const ProjectInfo & info, int status)
         ui->stackedWidget->setCurrentWidget(ui->pageAutoPack);
         ui->stackedWidget->setCurrentWidget(ui->pageAutoPack);
         ui->pageAutoPack->setProInfo(info);
         ui->pageAutoPack->setProInfo(info);
         ui->pageAutoPack->init();
         ui->pageAutoPack->init();
+        break;
+    case 2:
+        ui->stackedWidget->setCurrentWidget(ui->pageDingZhong);
+        ui->pageDingZhong->setProInfo(info);
+        ui->pageDingZhong->init();
+        break;
+    case 3:
+        ui->stackedWidget->setCurrentWidget(ui->pageBuDing);
+        ui->pageBuDing->setProInfo(info);
+        ui->pageBuDing->init();
+        break;
+
     }
     }
 }
 }
 
 
@@ -64,7 +91,7 @@ void MainWindow::changeToSettings()
 void MainWindow::backMenu()
 void MainWindow::backMenu()
 {
 {
     int user = GlobalInfo::this_()->user().userId;
     int user = GlobalInfo::this_()->user().userId;
-//    qDebug()<<user;
+
     if(user==0){
     if(user==0){
         ui->stackedWidget->setCurrentWidget(ui->pageLogin);
         ui->stackedWidget->setCurrentWidget(ui->pageLogin);
         return;
         return;

+ 4 - 0
mainwindow.h

@@ -25,6 +25,10 @@ private slots:
 
 
     void on_pushConfig_clicked();
     void on_pushConfig_clicked();
 
 
+    void on_pushDingZHong_clicked();
+
+    void on_pushBuDingZhong_clicked();
+
 private:
 private:
     void backMenu();
     void backMenu();
     void pageStatusChange(const ProjectInfo & info, int status);
     void pageStatusChange(const ProjectInfo & info, int status);

+ 15 - 1
mainwindow.ui

@@ -33,7 +33,7 @@
     <item>
     <item>
      <widget class="QStackedWidget" name="stackedWidget">
      <widget class="QStackedWidget" name="stackedWidget">
       <property name="currentIndex">
       <property name="currentIndex">
-       <number>0</number>
+       <number>8</number>
       </property>
       </property>
       <widget class="QWidget" name="pageMain">
       <widget class="QWidget" name="pageMain">
        <layout class="QHBoxLayout" name="horizontalLayout_2">
        <layout class="QHBoxLayout" name="horizontalLayout_2">
@@ -341,6 +341,8 @@ color: rgb(255, 255, 255);</string>
       <widget class="AutoPackForm" name="pageAutoPack"/>
       <widget class="AutoPackForm" name="pageAutoPack"/>
       <widget class="SelectValueForm" name="pageSelectValue"/>
       <widget class="SelectValueForm" name="pageSelectValue"/>
       <widget class="PackDetailForm" name="pagePackDetail"/>
       <widget class="PackDetailForm" name="pagePackDetail"/>
+      <widget class="FixedWeightPackForm" name="pageDingZhong"/>
+      <widget class="UncertainWeightPackForm" name="pageBuDing"/>
      </widget>
      </widget>
     </item>
     </item>
    </layout>
    </layout>
@@ -388,6 +390,18 @@ color: rgb(255, 255, 255);</string>
    <header>widget/settingsform.h</header>
    <header>widget/settingsform.h</header>
    <container>1</container>
    <container>1</container>
   </customwidget>
   </customwidget>
+  <customwidget>
+   <class>FixedWeightPackForm</class>
+   <extends>QWidget</extends>
+   <header>widget/fixedweightpackform.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>UncertainWeightPackForm</class>
+   <extends>QWidget</extends>
+   <header>widget/uncertainweightpackform.h</header>
+   <container>1</container>
+  </customwidget>
  </customwidgets>
  </customwidgets>
  <resources/>
  <resources/>
  <connections/>
  <connections/>

+ 18 - 6
widget/autopackform.cpp

@@ -12,6 +12,7 @@ AutoPackForm::AutoPackForm(QWidget *parent) :
     timer->start(500);
     timer->start(500);
     ui->addBoxList->setDisabled(true);
     ui->addBoxList->setDisabled(true);
     ui->addPackList->setDisabled(true);
     ui->addPackList->setDisabled(true);
+    netNum = 0.00;
 }
 }
 
 
 AutoPackForm::~AutoPackForm()
 AutoPackForm::~AutoPackForm()
@@ -24,7 +25,11 @@ void AutoPackForm::scaleData()
 {
 {
     ui->grossWeight_2->setText(QString::number(GlobalInfo::this_()->GetScaleData().gross_widget));
     ui->grossWeight_2->setText(QString::number(GlobalInfo::this_()->GetScaleData().gross_widget));
     ui->tareWeight_2->setText(QString::number(ui->pizhong->currentText().toDouble()));
     ui->tareWeight_2->setText(QString::number(ui->pizhong->currentText().toDouble()));
-    ui->netWeight_2->setText(QString::number(ui->grossWeight_2->text().toDouble()-ui->tareWeight_2->text().toDouble()));
+    netNum = ui->grossWeight_2->text().toDouble()-ui->tareWeight_2->text().toDouble();
+    if(netNum<0){
+        netNum = 0.00;
+    }
+    ui->netWeight_2->setText(QString::number(netNum));
 //    ui->tongshu->setText(QString::number(GlobalInfo::this_()->GetScaleData().tongshu));
 //    ui->tongshu->setText(QString::number(GlobalInfo::this_()->GetScaleData().tongshu));
 }
 }
 
 
@@ -55,6 +60,17 @@ void AutoPackForm::on_pushBack_clicked()
 
 
 void AutoPackForm::on_addPackList_clicked()
 void AutoPackForm::on_addPackList_clicked()
 {
 {
+
+
+    if(!packinfo.isNull()&&packinfo->boxes().size()>0){
+        //packinfo其他数据在new时已经定义好的,需要时直接调就可以了,所以这里只要箱数,等级,机台和类型
+        packinfo->quantity = packinfo->boxes().size();
+        packinfo->level_id = ui->dengji->currentData().toInt();
+        packinfo->machine_no = ui->jitai->currentText();
+        packinfo->carton_type = ui->zhixiang->currentText();
+    }
+
+
 //    qDebug()<<aputils.toJson(packinfo);
 //    qDebug()<<aputils.toJson(packinfo);
 
 
     //把数据添加到数据库里
     //把数据添加到数据库里
@@ -126,12 +142,8 @@ void AutoPackForm::on_addBoxList_clicked()
     //添加数据库
     //添加数据库
     aputils.insertDetailsSQL(box,packinfo->codeSingle());
     aputils.insertDetailsSQL(box,packinfo->codeSingle());
 
 
-    //packinfo其他数据在new时已经定义好的,需要时直接调就可以了,所以这里只要箱数,等级,机台和类型
+    //当当前箱数大于等于最大箱数是启动on_addPackList_clicked();
     if(packinfo->boxes().size()>=ui->comboBox->currentText().toInt()){
     if(packinfo->boxes().size()>=ui->comboBox->currentText().toInt()){
-        packinfo->quantity = packinfo->boxes().size();
-        packinfo->level_id = ui->dengji->currentData().toInt();
-        packinfo->machine_no = ui->jitai->currentText();
-        packinfo->carton_type = ui->zhixiang->currentText();
 //        emit djmbbox(djmb.printPackInfo(packinfo->codeSingle(),packinfo));
 //        emit djmbbox(djmb.printPackInfo(packinfo->codeSingle(),packinfo));
         on_addPackList_clicked();
         on_addPackList_clicked();
 //        qDebug()<<"这里";
 //        qDebug()<<"这里";

+ 3 - 0
widget/autopackform.h

@@ -29,6 +29,7 @@ public slots:
     void upconfig(const DaBaoConfig & config);
     void upconfig(const DaBaoConfig & config);
     void upDengjiInfo(const QList<DengJiConfigItem> & dengJis);
     void upDengjiInfo(const QList<DengJiConfigItem> & dengJis);
     void init();
     void init();
+
 signals:
 signals:
     void back();
     void back();
     void djmbbox(QImage image);
     void djmbbox(QImage image);
@@ -61,6 +62,8 @@ private:
     DanJuMuBan djmb;
     DanJuMuBan djmb;
     AutoPackUtils aputils;
     AutoPackUtils aputils;
 
 
+    double netNum;
+
     void scaleData();
     void scaleData();
 
 
 };
 };

+ 183 - 0
widget/fixedweightpackform.cpp

@@ -0,0 +1,183 @@
+#include "fixedweightpackform.h"
+#include "ui_fixedweightpackform.h"
+
+FixedWeightPackForm::FixedWeightPackForm(QWidget *parent) :
+    QWidget(parent),
+    ui(new Ui::FixedWeightPackForm)
+{
+    ui->setupUi(this);
+    QTimer *timer = new QTimer(this);
+    connect(timer,&QTimer::timeout,this,&FixedWeightPackForm::calcData);
+    timer->start(500);
+}
+
+FixedWeightPackForm::~FixedWeightPackForm()
+{
+    delete ui;
+}
+
+//从秤中获取毛重、皮重、净重、筒数------每100毫秒一次
+void FixedWeightPackForm::calcData()
+{
+    ui->grossWeight_2->setText(ui->type->currentText());
+    netNum = ui->grossWeight_2->text().toDouble()-ui->pizhong->currentText().toDouble()-ui->tongshu->text().toDouble()*ui->tongzhong->currentText().toDouble();
+    if(netNum<0){
+        netNum = 0.00;
+    }
+//    ui->netWeight_2->setText(QString::number(netNum));
+//    ui->tongshu->setText(QString::number(GlobalInfo::this_()->GetScaleData().tongshu));
+}
+
+
+void FixedWeightPackForm::on_pushBack_clicked()
+{
+    emit back();
+}
+
+void FixedWeightPackForm::on_addPackList_clicked()
+{
+
+
+    if(!packinfo.isNull()&&packinfo->boxes().size()>0){
+        packinfo->quantity = packinfo->boxes().size();
+        packinfo->level_id = ui->dengji->currentData().toInt();
+        packinfo->machine_no = ui->jitai->currentText();
+        packinfo->carton_type = ui->zhixiang->currentText();
+    }
+
+
+
+    //把数据添加到数据库里
+    aputils.insertProductSQL(packinfo);
+    //TODO: 缓存箱单数据,页面显示情空
+
+    //发送码单 packinfo 数据, 转换为 json数据发送
+    aputils.doSend(aputils.toJson(packinfo));
+    //TODO: 初始化码单信息
+    packinfo.reset(new PackInfo(_info));
+    packinfo->operator_id = GlobalInfo::this_()->user().userId;
+    packinfo->packing_time = QDate::currentDate().toString("yy-MM-dd");
+    packinfo->packing_type = _info.category;
+}
+
+void FixedWeightPackForm::on_pushStart_clicked()
+{
+    if(ui->pushStart->isChecked()){
+        ui->pushStart->setChecked(true);
+        ui->addBoxList->setDisabled(false);
+        ui->addPackList->setDisabled(false);
+        ui->widget_2->setEnabled(false);
+    } else {
+        init();
+    }
+}
+
+void FixedWeightPackForm::on_addBoxList_clicked()
+{
+    if(packinfo.isNull()) return;
+    auto box = packinfo->addBoxInfo();
+
+    box->box_weight = int(ui->pizhong->currentText().toDouble()*1000);
+    box->tube_number = ui->tongshu->text().toInt();
+    box->bucket_weight = int(ui->pizhong->currentText().toInt()*ui->tongshu->text().toDouble()*1000);
+    box->gross_weight = int(ui->grossWeight_2->text().toDouble()*1000);
+    box->net_weight = int(netNum*1000);
+    box->sort = "1";
+    box->remark = ui->beizhu->toPlainText();
+    packinfo->level = ui->dengji->currentText();
+    packinfo->level_id = ui->dengji->currentData().toInt();
+
+
+    ui->tableWidget->setRowCount(ui->tableWidget->rowCount()+1);
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,0,new QTableWidgetItem(QString::number(ui->tableWidget->rowCount())));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,1,new QTableWidgetItem(box->caseNumber()));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,2,new QTableWidgetItem(QString::number(box->tube_number)));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,3,new QTableWidgetItem(QString::number(box->gross_weight)));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,4,new QTableWidgetItem(QString::number(box->bucket_weight)));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,5,new QTableWidgetItem(QString::number(box->net_weight)));
+
+
+//    emit djmbbox(djmb.printBoxInfo(box->caseNumber(),box));
+//    qDebug()<<packinfo->boxes().size();
+//    doSend(packinfo);
+
+//    把box数据添加到packinfo的boxes数据表里;
+    packinfo->addBoxInfoList(box);
+
+    //添加数据库
+    aputils.insertDetailsSQL(box,packinfo->codeSingle());
+
+    //当当前箱数大于等于最大箱数是启动on_addPackList_clicked();
+    if(packinfo->boxes().size()>=ui->comboBox->currentText().toInt()){
+        on_addPackList_clicked();
+
+    }
+}
+
+void FixedWeightPackForm::init()
+{
+    ui->pushStart->setChecked(false);
+    ui->addBoxList->setDisabled(true);
+    ui->addPackList->setDisabled(true);
+    ui->widget_2->setEnabled(true);
+    packConfig.refConfig();
+    connect(&packConfig,&RemotePackConfig::configUpdate,this,&FixedWeightPackForm::upconfig);
+    connect(&packConfig,&RemotePackConfig::dengJIConfigUp,this,&FixedWeightPackForm::upDengjiInfo);
+    ui->comboBox->clear();
+    for(int i = 1;i<=20;i++){
+        ui->comboBox->addItem(QString::number(i));
+    }
+    ui->comboBox->setCurrentText("20");
+    on_addPackList_clicked();
+}
+
+void FixedWeightPackForm::upconfig(const DaBaoConfig &config)
+{
+
+    //机台
+    ui->jitai->clear();
+    ui->jitai->addItems(config.jitai);
+
+    //打包工班次
+    ui->comboBox_2->clear();
+    ui->comboBox_2->addItems(config.daBaoGongBanCi);
+
+    //皮重
+    ui->pizhong->clear();
+    for(int i = 0;i<config.xiangzhong.size();i++){
+        ui->pizhong->addItem(QString::number(config.xiangzhong.at(i)));
+    }
+
+    //管色
+    ui->guanse->clear();
+    ui->guanse->addItems(config.guanse);
+
+    //捻向
+    ui->nianxiang->clear();
+    ui->nianxiang->addItems(config.nianxiang);
+
+    //纸箱
+    ui->zhixiang->clear();
+    ui->zhixiang->addItems(config.zhixiang);
+
+    //筒重
+    ui->tongzhong->clear();
+    for(int i = 0;i<config.tongZhong.size();i++){
+        ui->tongzhong->addItem(QString::number(config.tongZhong.at(i)));
+    }
+
+    ui->type->clear();
+    for(int i = 0;i<config.diys.size();i++){
+        ui->type->addItem(QString::number(config.diys.at(i).type));
+    }
+}
+void FixedWeightPackForm::upDengjiInfo(const QList<DengJiConfigItem> & dengJis)
+{
+    ui->dengji->clear();
+    for(int i = 0;i<dengJis.size();i++){
+        if(!dengJis.at(i).isEnable){
+            ui->dengji->addItem(dengJis.at(i).value,dengJis.at(i).id);
+        }
+    }
+}
+

+ 58 - 0
widget/fixedweightpackform.h

@@ -0,0 +1,58 @@
+#ifndef FIXEDWEIGHTPACKFORM_H
+#define FIXEDWEIGHTPACKFORM_H
+
+#include <QWidget>
+#include "handle/remotepackconfig.h"
+#include "packinfo.h"
+#include "httprequestid.h"
+#include "handle/danjumuban.h"
+#include "handle/database.h"
+#include "handle/autopackutils.h"
+#include "QTimer"
+
+namespace Ui {
+class FixedWeightPackForm;
+}
+
+class FixedWeightPackForm : public QWidget
+{
+    Q_OBJECT
+
+public:
+    explicit FixedWeightPackForm(QWidget *parent = nullptr);
+    ~FixedWeightPackForm();
+
+    inline void setProInfo(const ProjectInfo & info){_info = info;}
+
+private slots:
+    void on_pushBack_clicked();
+
+    void on_pushStart_clicked();
+
+    void on_addBoxList_clicked();
+
+    void on_addPackList_clicked();
+
+    void calcData();
+
+public slots:
+    void upconfig(const DaBaoConfig & config);
+    void upDengjiInfo(const QList<DengJiConfigItem> & dengJis);
+    void init();
+
+signals:
+    void back();
+
+private:
+    Ui::FixedWeightPackForm *ui;
+    ProjectInfo _info;
+    QSharedPointer<PackInfo> packinfo;
+    QMap<QString,DengJiConfigItem> dengjiMap;// <name,详细信息>
+    RemotePackConfig packConfig;
+    HttpRequest _request;
+    DanJuMuBan djmb;
+    double netNum = 0.00;
+    AutoPackUtils aputils;
+};
+
+#endif // FIXEDWEIGHTPACKFORM_H

+ 655 - 0
widget/fixedweightpackform.ui

@@ -0,0 +1,655 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FixedWeightPackForm</class>
+ <widget class="QWidget" name="FixedWeightPackForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1085</width>
+    <height>619</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_3">
+   <item row="0" column="0" colspan="2">
+    <widget class="QWidget" name="widget" native="true">
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>30</height>
+      </size>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_9">
+      <property name="topMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="pushBack">
+        <property name="text">
+         <string>&lt;返回主页</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer_2">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>452</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QLabel" name="label_20">
+        <property name="text">
+         <string>定重打包</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer_3">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>451</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>合计</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>筒数:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_5">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_3">
+         <property name="text">
+          <string>毛重:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_6">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_4">
+         <property name="text">
+          <string>净重:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_7">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QTableWidget" name="tableWidget">
+       <property name="minimumSize">
+        <size>
+         <width>562</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>9999</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <column>
+        <property name="text">
+         <string>序号</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>箱号</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>筒数</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>毛重</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>皮重</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>净重</string>
+        </property>
+       </column>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="1">
+    <layout class="QGridLayout" name="gridLayout_2">
+     <item row="0" column="0">
+      <widget class="QLabel" name="label_23">
+       <property name="minimumSize">
+        <size>
+         <width>41</width>
+         <height>16</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>41</width>
+         <height>16</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>毛重</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLineEdit" name="grossWeight_2">
+       <property name="minimumSize">
+        <size>
+         <width>141</width>
+         <height>61</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>141</width>
+         <height>61</height>
+        </size>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>20</pointsize>
+        </font>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="2" rowspan="2">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QPushButton" name="pushStart">
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>50</height>
+          </size>
+         </property>
+         <property name="styleSheet">
+          <string notr="true">background-color: rgb(255, 255, 255);
+color: rgb(0, 170, 255);</string>
+         </property>
+         <property name="text">
+          <string>开始打包</string>
+         </property>
+         <property name="checkable">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_8">
+         <item>
+          <widget class="QPushButton" name="addBoxList">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>50</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">background-color: rgb(255, 255, 255);
+color: rgb(0, 170, 255);</string>
+           </property>
+           <property name="text">
+            <string>添加箱单</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="addPackList">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>50</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">background-color: rgb(255, 255, 255);
+color: rgb(0, 170, 255);</string>
+           </property>
+           <property name="text">
+            <string>添加码单</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="label_24">
+       <property name="minimumSize">
+        <size>
+         <width>31</width>
+         <height>16</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>31</width>
+         <height>16</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>筒数</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLineEdit" name="tongshu">
+       <property name="minimumSize">
+        <size>
+         <width>141</width>
+         <height>61</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>141</width>
+         <height>61</height>
+        </size>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>20</pointsize>
+        </font>
+       </property>
+       <property name="text">
+        <string>0</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0" colspan="3">
+      <widget class="QWidget" name="widget_2" native="true">
+       <property name="minimumSize">
+        <size>
+         <width>450</width>
+         <height>402</height>
+        </size>
+       </property>
+       <layout class="QGridLayout" name="gridLayout">
+        <property name="leftMargin">
+         <number>0</number>
+        </property>
+        <property name="rightMargin">
+         <number>0</number>
+        </property>
+        <item row="0" column="0">
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_3">
+            <item>
+             <widget class="QLabel" name="label_25">
+              <property name="text">
+               <string>包装类型</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="type"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_4">
+            <item>
+             <widget class="QLabel" name="label_8">
+              <property name="text">
+               <string>码数</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="comboBox">
+              <property name="currentText">
+               <string/>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_7">
+            <property name="spacing">
+             <number>0</number>
+            </property>
+           </layout>
+          </item>
+         </layout>
+        </item>
+        <item row="1" column="0">
+         <layout class="QHBoxLayout" name="horizontalLayout_11">
+          <item>
+           <widget class="QCheckBox" name="xiangdanPrint">
+            <property name="text">
+             <string>打印箱单</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="madanPrint">
+            <property name="text">
+             <string>打印码单</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="showMaoZhong">
+            <property name="text">
+             <string>显示毛重</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item row="2" column="0">
+         <layout class="QHBoxLayout" name="horizontalLayout_13">
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_5">
+            <item>
+             <widget class="QLabel" name="label_9">
+              <property name="text">
+               <string>打包班次</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="comboBox_2"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_6">
+            <item>
+             <widget class="QLabel" name="label_10">
+              <property name="text">
+               <string>机台</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="jitai"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_7">
+            <item>
+             <widget class="QLabel" name="label_11">
+              <property name="text">
+               <string>等级</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="dengji"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_8">
+            <item>
+             <widget class="QLabel" name="label_12">
+              <property name="text">
+               <string>皮重</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="pizhong"/>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </item>
+        <item row="3" column="0">
+         <layout class="QHBoxLayout" name="horizontalLayout_14">
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_9">
+            <item>
+             <widget class="QLabel" name="label_13">
+              <property name="text">
+               <string>管色</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="guanse"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_10">
+            <item>
+             <widget class="QLabel" name="label_14">
+              <property name="text">
+               <string>捻向</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="nianxiang"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_11">
+            <item>
+             <widget class="QLabel" name="label_15">
+              <property name="text">
+               <string>纸箱</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="zhixiang"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_12">
+            <item>
+             <widget class="QLabel" name="label_21">
+              <property name="text">
+               <string>筒重</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="tongzhong"/>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </item>
+        <item row="4" column="0">
+         <layout class="QHBoxLayout" name="horizontalLayout_12">
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_13">
+            <item>
+             <widget class="QLabel" name="label_16">
+              <property name="text">
+               <string>码单</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="madan">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_17">
+              <property name="text">
+               <string>箱单</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="xiangdan">
+              <property name="enabled">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer name="verticalSpacer">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>40</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_14">
+            <item>
+             <widget class="QLabel" name="label_18">
+              <property name="text">
+               <string>箱单抬头</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLineEdit" name="taitou"/>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_22">
+              <property name="text">
+               <string>电话</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLineEdit" name="taitou_2"/>
+            </item>
+            <item>
+             <spacer name="verticalSpacer_2">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>40</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_15">
+            <item>
+             <widget class="QLabel" name="label_19">
+              <property name="text">
+               <string>备注</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QTextEdit" name="beizhu"/>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 3 - 0
widget/packdetailform.cpp

@@ -198,6 +198,9 @@ void PackDetailForm::productList()
     productSqlList.append("operator_id");
     productSqlList.append("operator_id");
     productSqlList.append("category");
     productSqlList.append("category");
     productSqlList.append("specs");
     productSqlList.append("specs");
+    productSqlList.append("denier");
+    productSqlList.append("dtex");
+    productSqlList.append("fiber");
     productSqlList.append("remark");
     productSqlList.append("remark");
 }
 }
 
 

+ 24 - 1
widget/packdetailform.ui

@@ -140,8 +140,13 @@
               <string notr="true">background-color: rgb(255, 255, 255);</string>
               <string notr="true">background-color: rgb(255, 255, 255);</string>
              </property>
              </property>
              <property name="currentText">
              <property name="currentText">
-              <string/>
+              <string>品种</string>
              </property>
              </property>
+             <item>
+              <property name="text">
+               <string>品种</string>
+              </property>
+             </item>
             </widget>
             </widget>
            </item>
            </item>
            <item>
            <item>
@@ -179,6 +184,11 @@
              <property name="styleSheet">
              <property name="styleSheet">
               <string notr="true">background-color: rgb(255, 255, 255);</string>
               <string notr="true">background-color: rgb(255, 255, 255);</string>
              </property>
              </property>
+             <item>
+              <property name="text">
+               <string>等级</string>
+              </property>
+             </item>
             </widget>
             </widget>
            </item>
            </item>
            <item>
            <item>
@@ -186,6 +196,11 @@
              <property name="styleSheet">
              <property name="styleSheet">
               <string notr="true">background-color: rgb(255, 255, 255);</string>
               <string notr="true">background-color: rgb(255, 255, 255);</string>
              </property>
              </property>
+             <item>
+              <property name="text">
+               <string>操作员</string>
+              </property>
+             </item>
             </widget>
             </widget>
            </item>
            </item>
            <item>
            <item>
@@ -193,6 +208,11 @@
              <property name="styleSheet">
              <property name="styleSheet">
               <string notr="true">background-color: rgb(255, 255, 255);</string>
               <string notr="true">background-color: rgb(255, 255, 255);</string>
              </property>
              </property>
+             <item>
+              <property name="text">
+               <string>时间段</string>
+              </property>
+             </item>
             </widget>
             </widget>
            </item>
            </item>
            <item>
            <item>
@@ -212,6 +232,9 @@
                <height>41</height>
                <height>41</height>
               </size>
               </size>
              </property>
              </property>
+             <property name="styleSheet">
+              <string notr="true">background-color: rgb(175, 223, 255);</string>
+             </property>
              <property name="text">
              <property name="text">
               <string>搜索</string>
               <string>搜索</string>
              </property>
              </property>

+ 0 - 1
widget/selectvalueform.cpp

@@ -25,7 +25,6 @@ void SelectValueForm::getInfo(int page, int pageListNum)
      auto url = glo->config().baseUrl + QString("/v1/goods/list?page=%1&limit=%2").arg(nowPage).arg(pageListNum);
      auto url = glo->config().baseUrl + QString("/v1/goods/list?page=%1&limit=%2").arg(nowPage).arg(pageListNum);
      _request.setUserToken(QString::number(GlobalInfo::this_()->user().accountId),GlobalInfo::this_()->user().acessToken);
      _request.setUserToken(QString::number(GlobalInfo::this_()->user().accountId),GlobalInfo::this_()->user().acessToken);
      _request.get(url);
      _request.get(url);
-
 }
 }
 
 
 void SelectValueForm::result(int code, const QJsonObject & body)
 void SelectValueForm::result(int code, const QJsonObject & body)

+ 1 - 1
widget/settingsform.ui

@@ -228,7 +228,7 @@
         </rect>
         </rect>
        </property>
        </property>
        <property name="text">
        <property name="text">
-        <string>名称:</string>
+        <string>类型:</string>
        </property>
        </property>
       </widget>
       </widget>
       <widget class="QLabel" name="label_4">
       <widget class="QLabel" name="label_4">

+ 239 - 0
widget/uncertainweightpackform.cpp

@@ -0,0 +1,239 @@
+#include "uncertainweightpackform.h"
+#include "ui_uncertainweightpackform.h"
+
+UncertainWeightPackForm::UncertainWeightPackForm(QWidget *parent) :
+    QWidget(parent),
+    ui(new Ui::UncertainWeightPackForm)
+{
+    ui->setupUi(this);
+    autoRead = true;
+    QTimer *timer = new QTimer(this);
+    connect(timer,&QTimer::timeout,this,&UncertainWeightPackForm::calcData);
+    timer->start(500);
+    ui->widget_6->setEnabled(false);
+    //筒数限制,true限制
+    istubeNumTure = false;
+}
+
+UncertainWeightPackForm::~UncertainWeightPackForm()
+{
+    delete ui;
+}
+
+void UncertainWeightPackForm::on_pushBack_clicked()
+{
+    emit back();
+}
+
+//从秤中获取毛重、皮重、净重、筒数------每100毫秒一次
+void UncertainWeightPackForm::calcData()
+{
+    if(autoRead == true){
+        ui->grossWeight->setText(QString::number(GlobalInfo::this_()->GetScaleData().gross_widget));
+    }
+//    qDebug()<<autoRead;
+    netNum = ui->grossWeight->text().toDouble()-ui->pizhong->currentText().toDouble()-ui->tongshu->text().toDouble()*ui->tongzhong->currentText().toDouble();
+    if(netNum<0){
+        netNum = 0.00;
+    }
+    if(istubeNumTure){
+        if(ui->tongshu->text().toInt()>tubeNumMax || ui->tongshu->text().toInt()<tubeNumMin){
+            ui->tongshu->setValue(tubeNumMin);
+        }
+    }
+//    ui->netWeight_2->setText(QString::number(netNum));
+//    ui->tongshu->setText(QString::number(GlobalInfo::this_()->GetScaleData().tongshu));
+}
+
+void UncertainWeightPackForm::on_addPackList_clicked()
+{
+
+
+    if(!packinfo.isNull()&&packinfo->boxes().size()>0){
+        packinfo->quantity = packinfo->boxes().size();
+        packinfo->level_id = ui->dengji->currentData().toInt();
+        packinfo->machine_no = ui->jitai->currentText();
+        packinfo->carton_type = ui->zhixiang->currentText();
+    }
+
+
+
+    //把数据添加到数据库里
+    aputils.insertProductSQL(packinfo);
+
+
+    //发送码单 packinfo 数据, 转换为 json数据发送
+    aputils.doSend(aputils.toJson(packinfo));
+
+    packinfo.reset(new PackInfo(_info));
+    packinfo->operator_id = GlobalInfo::this_()->user().userId;
+    packinfo->packing_time = QDate::currentDate().toString("yy-MM-dd");
+    packinfo->packing_type = _info.category;
+}
+
+void UncertainWeightPackForm::on_pushStart_clicked()
+{
+    if(ui->pushStart->isChecked()){
+        ui->pushStart->setChecked(true);
+        ui->addBoxList->setDisabled(false);
+        ui->addPackList->setDisabled(false);
+        ui->widget_3->setEnabled(false);
+        ui->widget_5->setEnabled(false);
+        ui->widget_7->setEnabled(false);
+        ui->tongzhong->setEnabled(true);
+    } else {
+        init();
+    }
+}
+
+void UncertainWeightPackForm::on_addBoxList_clicked()
+{
+        if(ui->tongshu->text()!="0"&&!ui->tongshu->text().toInt()){
+            QMessageBox::information(this,tr("注意"),tr("筒数异常"));
+            return;
+        }
+    if(packinfo.isNull()) return;
+    auto box = packinfo->addBoxInfo();
+
+    box->box_weight = int(ui->pizhong->currentText().toDouble()*1000);
+    box->tube_number = ui->tongshu->text().toInt();
+    box->bucket_weight = int(ui->pizhong->currentText().toInt()*ui->tongshu->text().toDouble()*1000);
+    box->gross_weight = int(ui->grossWeight->text().toDouble()*1000);
+    box->net_weight = int(netNum*1000);
+    box->sort = "1";
+    box->remark = ui->beizhu->toPlainText();
+    packinfo->level = ui->dengji->currentText();
+    packinfo->level_id = ui->dengji->currentData().toInt();
+
+
+    ui->tableWidget->setRowCount(ui->tableWidget->rowCount()+1);
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,0,new QTableWidgetItem(QString::number(ui->tableWidget->rowCount())));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,1,new QTableWidgetItem(box->caseNumber()));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,2,new QTableWidgetItem(QString::number(box->tube_number)));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,3,new QTableWidgetItem(QString::number(box->gross_weight)));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,4,new QTableWidgetItem(QString::number(box->bucket_weight)));
+    ui->tableWidget->setItem(ui->tableWidget->rowCount()-1,5,new QTableWidgetItem(QString::number(box->net_weight)));
+
+
+//    emit djmbbox(djmb.printBoxInfo(box->caseNumber(),box));
+//    qDebug()<<packinfo->boxes().size();
+//    doSend(packinfo);
+
+//    把box数据添加到packinfo的boxes数据表里;
+    packinfo->addBoxInfoList(box);
+
+    //添加数据库
+    aputils.insertDetailsSQL(box,packinfo->codeSingle());
+
+    //当当前箱数大于等于最大箱数是启动on_addPackList_clicked();
+    if(packinfo->boxes().size()>=ui->mashu->currentText().toInt()){
+        on_addPackList_clicked();
+
+    }
+}
+
+//自动读数按钮
+void UncertainWeightPackForm::on_handleRead_2_clicked()
+{
+    if(autoRead==true){
+        autoRead = false;
+        ui->handleRead_2->setText("自动读数");
+        ui->label->setText("已开启手动");
+        return;
+    }
+    autoRead = true;
+    ui->handleRead_2->setText("手动读数");
+    ui->label->setText("已开启自动");
+}
+
+//筒数是否固定
+void UncertainWeightPackForm::on_tongshuguding_currentIndexChanged(const QString &arg1)
+{
+    if(arg1=="固定"){
+        ui->widget_6->setEnabled(false);
+        return;
+    }
+    ui->widget_6->setEnabled(true);
+}
+
+//筒数是否限制
+void UncertainWeightPackForm::on_tongshuxianzhi_stateChanged(int arg1)
+{
+    qDebug()<<arg1;
+
+    if(arg1 == 2){
+        istubeNumTure = true;
+        return;
+    }
+    istubeNumTure = false;
+}
+
+
+void UncertainWeightPackForm::init()
+{
+    // TODO: 页面进入初始化
+    ui->pushStart->setChecked(false);
+    ui->addBoxList->setDisabled(true);
+    ui->addPackList->setDisabled(true);
+    ui->widget_3->setEnabled(true);
+    ui->widget_5->setEnabled(true);
+    ui->widget_7->setEnabled(true);
+    packConfig.refConfig();
+    connect(&packConfig,&RemotePackConfig::configUpdate,this,&UncertainWeightPackForm::upconfig);
+    connect(&packConfig,&RemotePackConfig::dengJIConfigUp,this,&UncertainWeightPackForm::upDengjiInfo);
+    ui->mashu->clear();
+    for(int i = 1;i<=20;i++){
+        ui->mashu->addItem(QString::number(i));
+    }
+    ui->mashu->setCurrentText("20");
+    on_addPackList_clicked();
+}
+
+void UncertainWeightPackForm::upconfig(const DaBaoConfig &config)
+{
+    // TODO:打包配置更新
+    //机台
+    ui->jitai->clear();
+    ui->jitai->addItems(config.jitai);
+
+    //打包工班次
+    ui->dabaobanci->clear();
+    ui->dabaobanci->addItems(config.daBaoGongBanCi);
+
+    //皮重
+    ui->pizhong->clear();
+    for(int i = 0;i<config.xiangzhong.size();i++){
+        ui->pizhong->addItem(QString::number(config.xiangzhong.at(i)));
+    }
+
+    //管色
+    ui->guanse->clear();
+    ui->guanse->addItems(config.guanse);
+
+    //捻向
+    ui->nianxiang->clear();
+    ui->nianxiang->addItems(config.nianxiang);
+
+    //纸箱
+    ui->zhixiang->clear();
+    ui->zhixiang->addItems(config.zhixiang);
+
+    //筒重
+    ui->tongzhong->clear();
+    for(int i = 0;i<config.tongZhong.size();i++){
+        ui->tongzhong->addItem(QString::number(config.tongZhong.at(i)));
+    }
+
+    tubeNumMin = config.buDingZhongTongShuFanWei.first;
+    tubeNumMax = config.buDingZhongTongShuFanWei.second;
+}
+void UncertainWeightPackForm::upDengjiInfo(const QList<DengJiConfigItem> & dengJis)
+{
+// TODO: 等级信息更新
+    ui->dengji->clear();
+    for(int i = 0;i<dengJis.size();i++){
+        if(!dengJis.at(i).isEnable){
+            ui->dengji->addItem(dengJis.at(i).value,dengJis.at(i).id);
+        }
+    }
+}

+ 71 - 0
widget/uncertainweightpackform.h

@@ -0,0 +1,71 @@
+#ifndef UNCERTAINWEIGHTPACKFORM_H
+#define UNCERTAINWEIGHTPACKFORM_H
+
+#include <QWidget>
+#include "handle/remotepackconfig.h"
+#include "packinfo.h"
+#include "httprequestid.h"
+#include "handle/danjumuban.h"
+#include "handle/database.h"
+#include "handle/autopackutils.h"
+#include "QTimer"
+
+namespace Ui {
+class UncertainWeightPackForm;
+}
+
+class UncertainWeightPackForm : public QWidget
+{
+    Q_OBJECT
+
+public:
+    explicit UncertainWeightPackForm(QWidget *parent = nullptr);
+    ~UncertainWeightPackForm();
+
+    inline void setProInfo(const ProjectInfo & info){_info = info;}
+
+private slots:
+    void on_pushBack_clicked();
+
+    void on_pushStart_clicked();
+
+    void on_addBoxList_clicked();
+
+    void on_addPackList_clicked();
+
+    void calcData();
+
+    void on_handleRead_2_clicked();
+
+
+    void on_tongshuguding_currentIndexChanged(const QString &arg1);
+
+    void on_tongshuxianzhi_stateChanged(int arg1);
+
+public slots:
+    void upconfig(const DaBaoConfig & config);
+    void upDengjiInfo(const QList<DengJiConfigItem> & dengJis);
+    void init();
+
+signals:
+    void back();
+
+private:
+    Ui::UncertainWeightPackForm *ui;
+    ProjectInfo _info;
+    QSharedPointer<PackInfo> packinfo;
+    QMap<QString,DengJiConfigItem> dengjiMap;// <name,详细信息>
+    RemotePackConfig packConfig;
+    HttpRequest _request;
+    DanJuMuBan djmb;
+    AutoPackUtils aputils;
+    bool autoRead;
+
+
+    double netNum = 0.00;
+    bool istubeNumTure;
+    int tubeNumMax;
+    int tubeNumMin;
+};
+
+#endif // UNCERTAINWEIGHTPACKFORM_H

+ 751 - 0
widget/uncertainweightpackform.ui

@@ -0,0 +1,751 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UncertainWeightPackForm</class>
+ <widget class="QWidget" name="UncertainWeightPackForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1087</width>
+    <height>660</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_8">
+   <item row="0" column="0" colspan="2">
+    <widget class="QWidget" name="widget" native="true">
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>30</height>
+      </size>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_23">
+      <property name="topMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="pushBack">
+        <property name="text">
+         <string>&lt;返回主页</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer_4">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>452</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QLabel" name="label_41">
+        <property name="text">
+         <string>不定重打包</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer_5">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>451</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <layout class="QGridLayout" name="gridLayout_4">
+     <item row="0" column="0">
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <widget class="QLabel" name="label_42">
+         <property name="text">
+          <string>合计</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_43">
+         <property name="text">
+          <string>筒数:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_44">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_45">
+         <property name="text">
+          <string>毛重:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_46">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_47">
+         <property name="text">
+          <string>净重:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_48">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="1" column="0">
+      <widget class="QTableWidget" name="tableWidget">
+       <property name="minimumSize">
+        <size>
+         <width>562</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>9999</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <column>
+        <property name="text">
+         <string>序号</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>箱号</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>筒数</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>毛重</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>皮重</string>
+        </property>
+       </column>
+       <column>
+        <property name="text">
+         <string>净重</string>
+        </property>
+       </column>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="1">
+    <widget class="QWidget" name="widget_2" native="true">
+     <property name="maximumSize">
+      <size>
+       <width>494</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_7">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_25">
+        <property name="minimumSize">
+         <size>
+          <width>41</width>
+          <height>16</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>41</width>
+          <height>16</height>
+         </size>
+        </property>
+        <property name="text">
+         <string>毛重</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="grossWeight">
+        <property name="minimumSize">
+         <size>
+          <width>141</width>
+          <height>61</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>141</width>
+          <height>61</height>
+         </size>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>20</pointsize>
+         </font>
+        </property>
+        <property name="text">
+         <string>0</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" rowspan="2">
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="QPushButton" name="pushStart">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>50</height>
+           </size>
+          </property>
+          <property name="styleSheet">
+           <string notr="true">background-color: rgb(255, 255, 255);
+color: rgb(0, 170, 255);</string>
+          </property>
+          <property name="text">
+           <string>开始打包</string>
+          </property>
+          <property name="checkable">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_15">
+          <item>
+           <widget class="QPushButton" name="addBoxList">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>50</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">background-color: rgb(255, 255, 255);
+color: rgb(0, 170, 255);</string>
+            </property>
+            <property name="text">
+             <string>添加箱单</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="addPackList">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>50</height>
+             </size>
+            </property>
+            <property name="styleSheet">
+             <string notr="true">background-color: rgb(255, 255, 255);
+color: rgb(0, 170, 255);</string>
+            </property>
+            <property name="text">
+             <string>添加码单</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label_26">
+        <property name="minimumSize">
+         <size>
+          <width>31</width>
+          <height>16</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>31</width>
+          <height>16</height>
+         </size>
+        </property>
+        <property name="text">
+         <string>筒数</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="3">
+       <layout class="QHBoxLayout" name="horizontalLayout_5">
+        <item>
+         <widget class="QCheckBox" name="xiangdanPrint_2">
+          <property name="text">
+           <string>打印箱单</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="madanPrint_2">
+          <property name="text">
+           <string>打印码单</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="showMaoZhong_2">
+          <property name="text">
+           <string>显示毛重</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="tongshuxianzhi">
+          <property name="text">
+           <string>筒数限制</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="3" column="0" colspan="3">
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_18">
+          <item>
+           <widget class="QLabel" name="label_27">
+            <property name="text">
+             <string>码数</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QComboBox" name="mashu">
+            <property name="currentText">
+             <string/>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <widget class="QLabel" name="label_2">
+            <property name="maximumSize">
+             <size>
+              <width>30</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>筒数</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QComboBox" name="tongshuguding">
+            <property name="maximumSize">
+             <size>
+              <width>80</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <item>
+             <property name="text">
+              <string>固定</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>不固定</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_18">
+          <property name="spacing">
+           <number>0</number>
+          </property>
+          <item>
+           <widget class="QLabel" name="label">
+            <property name="text">
+             <string>已开启自动</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="handleRead_2">
+            <property name="minimumSize">
+             <size>
+              <width>71</width>
+              <height>41</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>手动读数</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+      <item row="4" column="0" colspan="3">
+       <widget class="QWidget" name="widget_3" native="true">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>450</width>
+          <height>0</height>
+         </size>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_6">
+         <item row="0" column="0">
+          <layout class="QHBoxLayout" name="horizontalLayout_4">
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_19">
+             <item>
+              <widget class="QLabel" name="label_28">
+               <property name="text">
+                <string>打包班次</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QComboBox" name="dabaobanci"/>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_20">
+             <item>
+              <widget class="QLabel" name="label_29">
+               <property name="text">
+                <string>机台</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QComboBox" name="jitai"/>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_21">
+             <item>
+              <widget class="QLabel" name="label_30">
+               <property name="text">
+                <string>等级</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QComboBox" name="dengji"/>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <layout class="QVBoxLayout" name="verticalLayout_22">
+             <item>
+              <widget class="QLabel" name="label_31">
+               <property name="text">
+                <string>皮重</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QComboBox" name="pizhong"/>
+             </item>
+            </layout>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="5" column="0" colspan="3">
+       <widget class="QWidget" name="widget_4" native="true">
+        <layout class="QGridLayout" name="gridLayout_5">
+         <item row="0" column="0">
+          <widget class="QWidget" name="widget_5" native="true">
+           <layout class="QGridLayout" name="gridLayout_3">
+            <property name="leftMargin">
+             <number>0</number>
+            </property>
+            <property name="topMargin">
+             <number>0</number>
+            </property>
+            <property name="rightMargin">
+             <number>0</number>
+            </property>
+            <property name="bottomMargin">
+             <number>0</number>
+            </property>
+            <item row="0" column="0">
+             <layout class="QHBoxLayout" name="horizontalLayout_6">
+              <item>
+               <layout class="QVBoxLayout" name="verticalLayout_23">
+                <item>
+                 <widget class="QLabel" name="label_32">
+                  <property name="text">
+                   <string>管色</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QComboBox" name="guanse"/>
+                </item>
+               </layout>
+              </item>
+              <item>
+               <layout class="QVBoxLayout" name="verticalLayout_24">
+                <item>
+                 <widget class="QLabel" name="label_33">
+                  <property name="text">
+                   <string>捻向</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QComboBox" name="nianxiang"/>
+                </item>
+               </layout>
+              </item>
+              <item>
+               <layout class="QVBoxLayout" name="verticalLayout_25">
+                <item>
+                 <widget class="QLabel" name="label_34">
+                  <property name="text">
+                   <string>纸箱</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QComboBox" name="zhixiang"/>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QWidget" name="widget_6" native="true">
+           <layout class="QGridLayout" name="gridLayout">
+            <property name="leftMargin">
+             <number>0</number>
+            </property>
+            <property name="topMargin">
+             <number>0</number>
+            </property>
+            <property name="rightMargin">
+             <number>0</number>
+            </property>
+            <property name="bottomMargin">
+             <number>0</number>
+            </property>
+            <item row="0" column="0">
+             <layout class="QVBoxLayout" name="verticalLayout_26">
+              <item>
+               <widget class="QLabel" name="label_35">
+                <property name="text">
+                 <string>筒重</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QComboBox" name="tongzhong"/>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="6" column="0" colspan="3">
+       <widget class="QWidget" name="widget_7" native="true">
+        <layout class="QGridLayout" name="gridLayout_2">
+         <item row="0" column="0">
+          <layout class="QVBoxLayout" name="verticalLayout_27">
+           <item>
+            <widget class="QLabel" name="label_36">
+             <property name="text">
+              <string>码单</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="madan_2">
+             <property name="enabled">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="label_37">
+             <property name="text">
+              <string>箱单</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="xiangdan_2">
+             <property name="enabled">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer name="verticalSpacer_3">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+         <item row="0" column="1">
+          <layout class="QVBoxLayout" name="verticalLayout_28">
+           <item>
+            <widget class="QLabel" name="label_38">
+             <property name="text">
+              <string>箱单抬头</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="taitou_3"/>
+           </item>
+           <item>
+            <widget class="QLabel" name="label_39">
+             <property name="text">
+              <string>电话</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLineEdit" name="taitou_4"/>
+           </item>
+           <item>
+            <spacer name="verticalSpacer_4">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+         <item row="0" column="2">
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <item>
+            <widget class="QLabel" name="label_40">
+             <property name="text">
+              <string>备注</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QTextEdit" name="beizhu"/>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QSpinBox" name="tongshu">
+        <property name="minimumSize">
+         <size>
+          <width>141</width>
+          <height>61</height>
+         </size>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>20</pointsize>
+         </font>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>