wumu
2023-12-27 98e191b0dd161e9efd734721e58a4f2a8cf0b5ef
internal_system_v1/clientmainwindow.cpp
@@ -23,11 +23,29 @@
    ui->tableWidget->setColumnWidth(2,80);
    ui->tableWidget->setColumnWidth(4,ui->tableWidget->columnWidth(4)+15);
    initUi();
    searchComName();
}
ClientMainWindow::~ClientMainWindow()
{
    delete ui;
}
void ClientMainWindow::searchComName()
{
    QSqlQuery query;
    QString sql = QString("select id,name,code from company_info");
    if(query.exec(sql)){
        qDebug()<<"size:"<<query.numRowsAffected();
        while(query.next()){
            int id = query.value(0).toInt();
            QString name = query.value(1).toString();
            QString code = query.value(2).toString();
            qDebug()<<"com select:"<<id<<name;
            m_comInfo[name] = id;
            //m_comCode[name] = code;
            ui->comboBox_company->addItem(name);
        }
    }
}
void ClientMainWindow::initUi()
@@ -67,6 +85,10 @@
    // 隐藏掉某个选项
    ui->tabWidget->removeTab(3); // OK
    // 问题整改台账
    m_proRecStandingBook = new ProblemRectStandingBook(this);
    ui->tabWidget->addTab(m_proRecStandingBook,"问题整改台账");
    // 关联各个功能槽
    connect(m_coverInfo,SIGNAL(sendComName(QString)),m_searchInfo,SLOT(addComName(QString)));