| | |
| | | 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() |
| | |
| | | // m_coverInfo->setParent(ui->tab); |
| | | |
| | | // 隐藏掉某个选项 |
| | | // 按索引来,从大到小 |
| | | ui->tabWidget->removeTab(3); // OK |
| | | ui->tabWidget->removeTab(1); // OK 老业务情况表 |
| | | ui->tabWidget->removeTab(0); // OK 老封面 |
| | | |
| | | |
| | | |
| | | // 问题整改台账 |
| | | m_proRecStandingBook = new ProblemRectStandingBook(this); |
| | | ui->tabWidget->addTab(m_proRecStandingBook,"问题整改台账"); |
| | | |
| | | // 关联各个功能槽 |
| | | connect(m_coverInfo,SIGNAL(sendComName(QString)),m_searchInfo,SLOT(addComName(QString))); |
| | |
| | | connect(this,SIGNAL(sendDataToProblemNoMoney(QVariantList)),m_problemNotMon,SLOT(showData(QVariantList))); |
| | | connect(this,SIGNAL(sendDataToPunish(QVariantList)),m_punish,SLOT(showData(QVariantList))); |
| | | connect(this,SIGNAL(sendDataToCaseClue(QVariantList)),m_caseClue,SLOT(showData(QVariantList))); |
| | | |
| | | // 新版本 |
| | | m_conInfo2 = new ConverInfo2(this); |
| | | //ui->tabWidget->addTab(m_conInfo2,"基本信息"); |
| | | ui->tabWidget->insertTab(0,m_conInfo2,"封面信息"); |
| | | |
| | | m_problemList = new ProblemList(this); |
| | | ui->tabWidget->addTab(m_problemList,"问题清单"); |
| | | |
| | | m_problemRectifResult = new ProblemRectificationResult(this); |
| | | ui->tabWidget->addTab(m_problemRectifResult,"整改成果"); |
| | | |
| | | |
| | | } |
| | |
| | | qDebug()<<__FUNCTION__<<row<<column; |
| | | calc(); |
| | | } |
| | | |
| | | void ClientMainWindow::on_pushButton_save_clicked() |
| | | { |
| | | // 保存数据,结构比较特殊,需要多行多列同时写入 |
| | | // 得考虑分段单表处理方可 |
| | | // 获取写到文件里面,每个单位一个文件 |
| | | } |