wumu
2024-11-26 5efd96cc316f8a704f0f6315b85078b738ddee04
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#ifndef THREEMERGEPROBLEMLIST_H
#define THREEMERGEPROBLEMLIST_H
 
#include <QMainWindow>
#include "tableitemdelegate.h"
#include <QMenu>
#include <QAction>
 
#include "filedialogdelegate.h"
#include "customheaderview.h"
 
#include "comboboxdelegate.h"
#include "datedelegate.h"
#include "struct_data.h"
//#include "threecombobox.h"
#include "tableitemdelegate.h"
 
 
#include <QPdfWriter>
//#include <QtWebEngineWidgets/QtWebEngineWidgets>
 
namespace Ui {
class ThreeMergeProblemList;
}
 
class ThreeMergeProblemList : public QMainWindow
{
    Q_OBJECT
 
public:
    explicit ThreeMergeProblemList(QWidget *parent = 0);
    ~ThreeMergeProblemList();
 
    void initUi();
    void initProblemListUi();
    void initProblemResultUi();
    void initProblemRectBookUi();
 
    void readCompanyFromSQL();
 
    void loadDataFromSQL(const QString &arg1);
    int selectSQL(QString sql,QVector<QVector<QString>> &result); // 拿结果集的sql
    int changeSQL(QString sql); // 拿条数的sql
    int saveDataLine(int row); // 保存指定行 先判断对应的索引id是否存在,存在则更新,不存在则新建插入
    // 保持路径加上 id+项目名称
    int saveFile(QString path, QString id,QString &absSavePath,QString proName); // 根据id来指定子目录进行文件的拷贝和存储
 
    int loadPdfFile(QString path); // 加载pdf文件
 
private slots:
    // 问题清单
    void showMenuSlot(QPoint);
    void deleteAction();
 
    //处理结果
    void showMenuSlotResult(QPoint);
    void deleteActionResult();
 
    // 整改台账
    void showMenuSlotRectBook(QPoint);
    void deleteActionRectBook(); // 删除当前行
    void saveActionRectBook();  // 保存单行 当前
 
    void on_pushButton_addRow_3_clicked();
 
    void on_pushButton_addRow_2_clicked();
 
    void on_pushButton_addRow_clicked();
 
    void on_comboBox_company_currentIndexChanged(const QString &arg1);
 
    void on_pushButton_save_2_clicked();
 
    void on_pushButton_save_clicked();
 
 
    void on_pushButton_search_clicked();
 
    void on_pushButton_save_3_clicked();
 
    void on_pushButton_moreSearch_clicked();
 
    void on_pushButton_multiSearch_clicked();
 
    void showSaveFile(); // 显示已经保存的佐证文件
 
    void updateComboList(QMap<QString,ComInfo> &); // 更新下拉框公司名
 
    void on_pushButton_save_export_clicked();
 
private:
    Ui::ThreeMergeProblemList *ui;
    QMenu *m_menu; // 问题清单菜单
    QMenu *m_menuResult; // 整改成果
    QMenu *m_menuRectBook; // 整改台账
 
    FileDialogDelegate *m_fdd;
    CustomHeaderView *m_custonHV;
 
    ComboBoxDelegate *m_cbb_nw; // 内审或外审
    DateDelegate *m_date_year; // 审计年度
    ComboBoxDelegate *m_cbb_company; // 审计单位
    ComboBoxDelegate *m_cbb_way; // 审计方式
    ComboBoxDelegate *m_cbb_pro; // 审计项目
    ComboBoxDelegate *m_cbb_file_wri; // 问题描述佐证
 
    DateDelegate *m_date_ymd; // 时间 年月日
    //ThreeComboBox *m_noEdit; // 禁用编辑功能
    TableItemDelegate *m_noEdit;
 
    //QWebEngineView *m_pdfView;  // 使用浏览器加载pdf文件
};
 
#endif // THREEMERGEPROBLEMLIST_H