├── MS
├── SQLQuery1.sql
├── product_inventory.mdf
└── product_inventory_log.ldf
├── ProductInventoryMS
├── ProductInventoryMS.pro
├── ProductInventoryMS.pro.user
├── addinstockdialog.cpp
├── addinstockdialog.h
├── addoutstockdialog.cpp
├── addoutstockdialog.h
├── addstockdialog.cpp
├── addstockdialog.h
├── homepage.cpp
├── homepage.h
├── homepage.ui
├── images
│ ├── add.png
│ ├── delete.png
│ ├── file.png
│ ├── home.png
│ ├── resource.qrc
│ └── user.png
├── instockpage.cpp
├── instockpage.h
├── instockpage.ui
├── loginwindow.cpp
├── loginwindow.h
├── loginwindow.ui
├── main.cpp
├── mainwindow.cpp
├── mainwindow.h
├── mainwindow.ui
├── modifyinstockdialog.cpp
├── modifyinstockdialog.h
├── modifyoutstockdialog.cpp
├── modifyoutstockdialog.h
├── modifystockdialog.cpp
├── modifystockdialog.h
├── outstockpage.cpp
├── outstockpage.h
├── outstockpage.ui
├── resources.qrc
├── sqlserver.cpp
├── sqlserver.h
├── stockpage.cpp
├── stockpage.h
├── stockpage.ui
├── userpage.cpp
├── userpage.h
└── userpage.ui
├── README.md
└── img.assets
├── 001.png
├── 002.png
├── 003.png
├── 004.png
├── 005.png
├── 006.png
├── 007.png
├── 008.png
├── 009.png
├── 010.png
├── 011.png
└── 012.png
/MS/SQLQuery1.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/MS/SQLQuery1.sql
--------------------------------------------------------------------------------
/MS/product_inventory.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/MS/product_inventory.mdf
--------------------------------------------------------------------------------
/MS/product_inventory_log.ldf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/MS/product_inventory_log.ldf
--------------------------------------------------------------------------------
/ProductInventoryMS/ProductInventoryMS.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2022-12-16T01:34:58
4 | #
5 | #-------------------------------------------------
6 |
7 | QT += core gui sql
8 |
9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
10 |
11 | TARGET = ProductInventoryMS
12 | TEMPLATE = app
13 |
14 | # The following define makes your compiler emit warnings if you use
15 | # any feature of Qt which has been marked as deprecated (the exact warnings
16 | # depend on your compiler). Please consult the documentation of the
17 | # deprecated API in order to know how to port your code away from it.
18 | DEFINES += QT_DEPRECATED_WARNINGS
19 |
20 | # You can also make your code fail to compile if you use deprecated APIs.
21 | # In order to do so, uncomment the following line.
22 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
23 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
24 |
25 | CONFIG += c++11
26 |
27 | SOURCES += \
28 | main.cpp \
29 | loginwindow.cpp \
30 | mainwindow.cpp \
31 | sqlserver.cpp \
32 | stockpage.cpp \
33 | homepage.cpp \
34 | userpage.cpp \
35 | addstockdialog.cpp \
36 | modifystockdialog.cpp \
37 | instockpage.cpp \
38 | outstockpage.cpp \
39 | addinstockdialog.cpp \
40 | modifyinstockdialog.cpp \
41 | addoutstockdialog.cpp \
42 | modifyoutstockdialog.cpp
43 |
44 | HEADERS += \
45 | loginwindow.h \
46 | mainwindow.h \
47 | sqlserver.h \
48 | stockpage.h \
49 | homepage.h \
50 | userpage.h \
51 | addstockdialog.h \
52 | modifystockdialog.h \
53 | instockpage.h \
54 | outstockpage.h \
55 | addinstockdialog.h \
56 | modifyinstockdialog.h \
57 | addoutstockdialog.h \
58 | modifyoutstockdialog.h
59 |
60 | FORMS += \
61 | loginwindow.ui \
62 | mainwindow.ui \
63 | stockpage.ui \
64 | homepage.ui \
65 | userpage.ui \
66 | instockpage.ui \
67 | outstockpage.ui
68 |
69 | # Default rules for deployment.
70 | qnx: target.path = /tmp/$${TARGET}/bin
71 | else: unix:!android: target.path = /opt/$${TARGET}/bin
72 | !isEmpty(target.path): INSTALLS += target
73 |
74 | RESOURCES += \
75 | resources.qrc
76 |
--------------------------------------------------------------------------------
/ProductInventoryMS/ProductInventoryMS.pro.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | EnvironmentId
7 | {e3aca188-9ffd-477c-8ed4-ad5b4463c879}
8 |
9 |
10 | ProjectExplorer.Project.ActiveTarget
11 | 0
12 |
13 |
14 | ProjectExplorer.Project.EditorSettings
15 |
16 | true
17 | false
18 | true
19 |
20 | Cpp
21 |
22 | CppGlobal
23 |
24 |
25 |
26 | QmlJS
27 |
28 | QmlJSGlobal
29 |
30 |
31 | 2
32 | UTF-8
33 | false
34 | 4
35 | false
36 | 80
37 | true
38 | true
39 | 1
40 | true
41 | false
42 | 0
43 | true
44 | true
45 | 0
46 | 8
47 | true
48 | 1
49 | true
50 | true
51 | true
52 | false
53 |
54 |
55 |
56 | ProjectExplorer.Project.PluginSettings
57 |
58 |
59 | -fno-delayed-template-parsing
60 |
61 | true
62 |
63 |
64 |
65 | ProjectExplorer.Project.Target.0
66 |
67 | Desktop Qt 5.12.2 MinGW 64-bit
68 | Desktop Qt 5.12.2 MinGW 64-bit
69 | qt.qt5.5122.win64_mingw73_kit
70 | 0
71 | 0
72 | 0
73 |
74 | F:/Qt/workspace/database/build-ProductInventoryMS-Desktop_Qt_5_12_2_MinGW_64_bit-Debug
75 |
76 |
77 | true
78 | qmake
79 |
80 | QtProjectManager.QMakeBuildStep
81 | true
82 |
83 | false
84 | false
85 | false
86 |
87 |
88 | true
89 | Make
90 |
91 | Qt4ProjectManager.MakeStep
92 |
93 | false
94 |
95 |
96 | false
97 |
98 | 2
99 | Build
100 |
101 | ProjectExplorer.BuildSteps.Build
102 |
103 |
104 |
105 | true
106 | Make
107 |
108 | Qt4ProjectManager.MakeStep
109 |
110 | true
111 | clean
112 |
113 | false
114 |
115 | 1
116 | Clean
117 |
118 | ProjectExplorer.BuildSteps.Clean
119 |
120 | 2
121 | false
122 |
123 | Debug
124 | Debug
125 | Qt4ProjectManager.Qt4BuildConfiguration
126 | 2
127 | true
128 |
129 |
130 | F:/Qt/workspace/database/build-ProductInventoryMS-Desktop_Qt_5_12_2_MinGW_64_bit-Release
131 |
132 |
133 | true
134 | qmake
135 |
136 | QtProjectManager.QMakeBuildStep
137 | false
138 |
139 | false
140 | false
141 | true
142 |
143 |
144 | true
145 | Make
146 |
147 | Qt4ProjectManager.MakeStep
148 |
149 | false
150 |
151 |
152 | false
153 |
154 | 2
155 | Build
156 |
157 | ProjectExplorer.BuildSteps.Build
158 |
159 |
160 |
161 | true
162 | Make
163 |
164 | Qt4ProjectManager.MakeStep
165 |
166 | true
167 | clean
168 |
169 | false
170 |
171 | 1
172 | Clean
173 |
174 | ProjectExplorer.BuildSteps.Clean
175 |
176 | 2
177 | false
178 |
179 | Release
180 | Release
181 | Qt4ProjectManager.Qt4BuildConfiguration
182 | 0
183 | true
184 |
185 |
186 | F:/Qt/workspace/database/build-ProductInventoryMS-Desktop_Qt_5_12_2_MinGW_64_bit-Profile
187 |
188 |
189 | true
190 | qmake
191 |
192 | QtProjectManager.QMakeBuildStep
193 | true
194 |
195 | false
196 | true
197 | true
198 |
199 |
200 | true
201 | Make
202 |
203 | Qt4ProjectManager.MakeStep
204 |
205 | false
206 |
207 |
208 | false
209 |
210 | 2
211 | Build
212 |
213 | ProjectExplorer.BuildSteps.Build
214 |
215 |
216 |
217 | true
218 | Make
219 |
220 | Qt4ProjectManager.MakeStep
221 |
222 | true
223 | clean
224 |
225 | false
226 |
227 | 1
228 | Clean
229 |
230 | ProjectExplorer.BuildSteps.Clean
231 |
232 | 2
233 | false
234 |
235 | Profile
236 | Profile
237 | Qt4ProjectManager.Qt4BuildConfiguration
238 | 0
239 | true
240 |
241 | 3
242 |
243 |
244 | 0
245 | 部署
246 |
247 | ProjectExplorer.BuildSteps.Deploy
248 |
249 | 1
250 | Deploy Configuration
251 |
252 | ProjectExplorer.DefaultDeployConfiguration
253 |
254 | 1
255 |
256 |
257 | false
258 | false
259 | 1000
260 |
261 | true
262 |
263 | false
264 | false
265 | false
266 | false
267 | true
268 | 0.01
269 | 10
270 | true
271 | 1
272 | 25
273 |
274 | 1
275 | true
276 | false
277 | true
278 | valgrind
279 |
280 | 0
281 | 1
282 | 2
283 | 3
284 | 4
285 | 5
286 | 6
287 | 7
288 | 8
289 | 9
290 | 10
291 | 11
292 | 12
293 | 13
294 | 14
295 |
296 | 2
297 |
298 | ProductInventoryMS
299 |
300 | Qt4ProjectManager.Qt4RunConfiguration:F:/Qt/workspace/database/ProductInventoryMS/ProductInventoryMS.pro
301 | ProductInventoryMS.pro
302 |
303 | 3768
304 | false
305 | true
306 | true
307 | false
308 | false
309 | true
310 |
311 | F:/Qt/workspace/database/build-ProductInventoryMS-Desktop_Qt_5_12_2_MinGW_64_bit-Debug
312 |
313 | 1
314 |
315 |
316 |
317 | ProjectExplorer.Project.TargetCount
318 | 1
319 |
320 |
321 | ProjectExplorer.Project.Updater.FileVersion
322 | 20
323 |
324 |
325 | Version
326 | 20
327 |
328 |
329 |
--------------------------------------------------------------------------------
/ProductInventoryMS/addinstockdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "addinstockdialog.h"
2 | #include
3 |
4 | addInStockDialog::addInStockDialog(QWidget *parent)
5 | : QDialog(parent)
6 | {
7 | setWindowTitle(tr("入库"));
8 | QLabel *snoLabel = new QLabel("产品编号");
9 | snoEdit = new QLineEdit;
10 | QLabel *snameLabel = new QLabel("产品名称");
11 | snameEdit = new QLineEdit;
12 | QLabel *icountLabel = new QLabel("入库数量");
13 | icountEdit = new QLineEdit;
14 | QLabel *agentLabel = new QLabel("进货人");
15 | agentEdit = new QLineEdit;
16 | inButton = new QPushButton("入库");
17 |
18 | QGridLayout *layout = new QGridLayout;
19 | layout->addWidget(snoLabel,0,0);//产品编号
20 | layout->addWidget(snoEdit,0,1);
21 | layout->addWidget(snameLabel,1,0);//产品名称
22 | layout->addWidget(snameEdit,1,1);
23 | layout->addWidget(icountLabel,2,0);//入库数量
24 | layout->addWidget(icountEdit,2,1);
25 | layout->addWidget(agentLabel,3,0);//进货人
26 | layout->addWidget(agentEdit,3,1);
27 | layout->addWidget(inButton,4,1);
28 |
29 | setLayout(layout);
30 | setWindowModality(Qt::WindowModal);
31 | }
32 |
33 | addInStockDialog::~addInStockDialog()
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ProductInventoryMS/addinstockdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef ADDINSTOCKDIALOG_H
2 | #define ADDINSTOCKDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | class addInStockDialog : public QDialog
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | addInStockDialog(QWidget *parent = nullptr);
17 | ~addInStockDialog();
18 |
19 | QLineEdit *snoEdit;
20 | QLineEdit *snameEdit;
21 | QLineEdit *icountEdit;
22 | QLineEdit *agentEdit;
23 | QPushButton *inButton;
24 | };
25 |
26 | #endif // ADDINSTOCKDIALOG_H
27 |
--------------------------------------------------------------------------------
/ProductInventoryMS/addoutstockdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "addoutstockdialog.h"
2 | #include
3 |
4 | addOutStockDialog::addOutStockDialog(QWidget *parent)
5 | : QDialog(parent)
6 | {
7 | setWindowTitle(tr("出库"));
8 | QLabel *snoLabel = new QLabel("产品编号");
9 | snoEdit = new QLineEdit;
10 | QLabel *snameLabel = new QLabel("产品名称");
11 | snameEdit = new QLineEdit;
12 | QLabel *ocountLabel = new QLabel("出库数量");
13 | ocountEdit = new QLineEdit;
14 | QLabel *clientLabel = new QLabel("客户");
15 | clientEdit = new QLineEdit;
16 | outButton = new QPushButton("出库");
17 |
18 | QGridLayout *layout = new QGridLayout;
19 | layout->addWidget(snoLabel,0,0);//产品编号
20 | layout->addWidget(snoEdit,0,1);
21 | layout->addWidget(snameLabel,1,0);//产品名称
22 | layout->addWidget(snameEdit,1,1);
23 | layout->addWidget(ocountLabel,2,0);//出库数量
24 | layout->addWidget(ocountEdit,2,1);
25 | layout->addWidget(clientLabel,3,0);//客户
26 | layout->addWidget(clientEdit,3,1);
27 | layout->addWidget(outButton,4,1);
28 |
29 | setLayout(layout);
30 | setWindowModality(Qt::WindowModal);
31 | }
32 |
33 | addOutStockDialog::~addOutStockDialog()
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ProductInventoryMS/addoutstockdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef ADDOUTSTOCKDIALOG_H
2 | #define ADDOUTSTOCKDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | class addOutStockDialog : public QDialog
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | addOutStockDialog(QWidget *parent = nullptr);
17 | ~addOutStockDialog();
18 |
19 | QLineEdit *snoEdit;
20 | QLineEdit *snameEdit;
21 | QLineEdit *ocountEdit;
22 | QLineEdit *clientEdit;
23 | QPushButton *outButton;
24 | };
25 |
26 | #endif // ADDOUTSTOCKDIALOG_H
27 |
--------------------------------------------------------------------------------
/ProductInventoryMS/addstockdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "addstockdialog.h"
2 | #include
3 |
4 | addStockDialog::addStockDialog(QWidget *parent)
5 | : QDialog(parent)
6 | {
7 | setWindowTitle(tr("添加"));
8 | QLabel *nameLabel = new QLabel("产品名称");
9 | nameEdit = new QLineEdit;
10 | QLabel *categoryLabel = new QLabel("所属类目");
11 | categoryEdit = new QComboBox;
12 | QStringList categoryList;
13 | categoryList<<""<<"家电"<<"数码"<<"家具"<<"服饰"<<"食品"<<"其他";
14 | categoryEdit->addItems(categoryList);
15 | QLabel *speciLabel = new QLabel("产品数量");
16 | speciEdit = new QLineEdit;
17 | QLabel *addrLabel = new QLabel("产地");
18 | addrEdit = new QComboBox;
19 | QStringList addrList;
20 | addrList<<""<<"北京"<<"上海"<<"浙江"<<"安徽"<<"广州"<<"深圳"<<"重庆"<<"其他";
21 | addrEdit->addItems(addrList);
22 | QLabel *manuLabel = new QLabel("制造商");
23 | manuEdit = new QLineEdit;
24 | QLabel *noteLabel = new QLabel("备注");
25 | noteEdit = new QLineEdit;
26 | addButton = new QPushButton("添加");
27 |
28 | QGridLayout *layout = new QGridLayout;
29 | layout->addWidget(nameLabel,0,0);//产品名称
30 | layout->addWidget(nameEdit,0,1);
31 | layout->addWidget(categoryLabel,1,0);//所属类目
32 | layout->addWidget(categoryEdit,1,1);
33 | layout->addWidget(speciLabel,2,0);//产品数量
34 | layout->addWidget(speciEdit,2,1);
35 | layout->addWidget(addrLabel,3,0);//产地
36 | layout->addWidget(addrEdit,3,1);
37 | layout->addWidget(manuLabel,4,0);//制造商
38 | layout->addWidget(manuEdit,4,1);
39 | layout->addWidget(noteLabel,5,0);//备注
40 | layout->addWidget(noteEdit,5,1);
41 | layout->addWidget(addButton,6,1);
42 |
43 | setLayout(layout);
44 | setWindowModality(Qt::WindowModal);
45 | }
46 |
47 | addStockDialog::~addStockDialog()
48 | {
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/ProductInventoryMS/addstockdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef ADDSTOCKDIALOG_H
2 | #define ADDSTOCKDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | class addStockDialog : public QDialog
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | addStockDialog(QWidget *parent = nullptr);
17 | ~addStockDialog();
18 |
19 | QLineEdit *nameEdit;
20 | QComboBox *addrEdit;
21 | QComboBox *categoryEdit;
22 | QLineEdit *manuEdit;
23 | QLineEdit *noteEdit;
24 | QLineEdit *speciEdit;
25 | QPushButton *addButton;
26 | };
27 |
28 | #endif // ADDSTOCKDIALOG_H
29 |
--------------------------------------------------------------------------------
/ProductInventoryMS/homepage.cpp:
--------------------------------------------------------------------------------
1 | #include "homepage.h"
2 | #include "ui_homepage.h"
3 |
4 | HomePage::HomePage(QWidget *parent) :
5 | QWidget(parent),
6 | ui(new Ui::HomePage)
7 | {
8 | ui->setupUi(this);
9 | }
10 |
11 | HomePage::~HomePage()
12 | {
13 | delete ui;
14 | }
15 |
--------------------------------------------------------------------------------
/ProductInventoryMS/homepage.h:
--------------------------------------------------------------------------------
1 | #ifndef HOMEPAGE_H
2 | #define HOMEPAGE_H
3 |
4 | #include
5 |
6 | namespace Ui {
7 | class HomePage;
8 | }
9 |
10 | class HomePage : public QWidget
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | explicit HomePage(QWidget *parent = nullptr);
16 | ~HomePage();
17 |
18 | private:
19 | Ui::HomePage *ui;
20 | };
21 |
22 | #endif // HOMEPAGE_H
23 |
--------------------------------------------------------------------------------
/ProductInventoryMS/homepage.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | HomePage
4 |
5 |
6 |
7 | 0
8 | 0
9 | 765
10 | 578
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | false
19 |
20 |
21 |
22 | 90
23 | 90
24 | 571
25 | 171
26 |
27 |
28 |
29 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
30 | <html><head><meta name="qrichtext" content="1" /><style type="text/css">
31 | p, li { white-space: pre-wrap; }
32 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;">
33 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:48pt; font-weight:600;">欢迎使用</span></p>
34 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:48pt; font-weight:600;">产品库存管理系统</span></p></body></html>
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ProductInventoryMS/images/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/ProductInventoryMS/images/add.png
--------------------------------------------------------------------------------
/ProductInventoryMS/images/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/ProductInventoryMS/images/delete.png
--------------------------------------------------------------------------------
/ProductInventoryMS/images/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/ProductInventoryMS/images/file.png
--------------------------------------------------------------------------------
/ProductInventoryMS/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/ProductInventoryMS/images/home.png
--------------------------------------------------------------------------------
/ProductInventoryMS/images/resource.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ProductInventoryMS/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/ProductInventoryMS/images/user.png
--------------------------------------------------------------------------------
/ProductInventoryMS/instockpage.cpp:
--------------------------------------------------------------------------------
1 | #include "instockpage.h"
2 | #include "ui_instockpage.h"
3 |
4 | InStockPage::InStockPage(QWidget *parent) :
5 | QWidget(parent),
6 | ui(new Ui::InStockPage)
7 | {
8 | ui->setupUi(this);
9 | creatInStockPage();
10 |
11 | }
12 |
13 | InStockPage::~InStockPage()
14 | {
15 | delete ui;
16 | }
17 |
18 | void InStockPage::creatInStockPage()
19 | {
20 | //连接槽函数
21 | connect(ui->addButton,&QPushButton::clicked,this,&InStockPage::addInStock);
22 | connect(ui->searchButton,&QPushButton::clicked,this,&InStockPage::searchInStockData);
23 | connect(ui->modifyButton,&QPushButton::clicked,this,&InStockPage::modifyInStock);
24 | connect(ui->deleteButton,&QPushButton::clicked,this,&InStockPage::deleteInStockData);
25 |
26 | inStockModel = new QSqlTableModel;
27 | inStockModel->setTable("InStock");//选择数据表
28 | inStockModel->setEditStrategy(QSqlTableModel::OnManualSubmit);//设置保存策略为手动提交
29 | inStockModel->setHeaderData(0,Qt::Horizontal, "入库编号");
30 | inStockModel->setHeaderData(1,Qt::Horizontal, "产品编号");
31 | inStockModel->setHeaderData(2,Qt::Horizontal, "产品名称");
32 | inStockModel->setHeaderData(3,Qt::Horizontal, "入库数量");
33 | inStockModel->setHeaderData(4,Qt::Horizontal, "入库时间");
34 | inStockModel->setHeaderData(5,Qt::Horizontal, "进货人");
35 | inStockModel->select();
36 |
37 | ui->tableView->setModel(inStockModel);
38 | ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);//使其不可编辑
39 |
40 | }
41 |
42 | void InStockPage::addInStock()
43 | {
44 | inStockDialog = new addInStockDialog(this);
45 | inStockDialog->show();
46 | connect(inStockDialog->inButton,&QPushButton::clicked,this,&InStockPage::insertInStockData);
47 | }
48 |
49 | //入库
50 | void InStockPage::insertInStockData()
51 | {
52 | QString Sno = inStockDialog->snoEdit->text();
53 | QString Sname = inStockDialog->snameEdit->text();
54 | QString Icount = inStockDialog->icountEdit->text();
55 | QString Iagent = inStockDialog->agentEdit->text();
56 |
57 | QSqlQuery *query=new QSqlQuery;
58 | QString str = QString("insert into InStock values('%1', '%2', '%3',getdate(),'%4')").arg(Sno).arg(Sname).arg(Icount).arg(Iagent);
59 | if(Sno==nullptr)
60 | {
61 | qDebug()<<"failed";
62 | QMessageBox::information(this,"入库","入库失败");
63 | }
64 | else if(query->exec(str))
65 | {
66 | qDebug()<<"successful";
67 | QMessageBox::information(this,"入库","入库成功");
68 | inStockModel->submitAll();
69 | }
70 | else
71 | {
72 | qDebug()<<"failed";
73 | QMessageBox::information(this,"入库","入库失败,该产品编号不存在");
74 | }
75 | }
76 |
77 | //查询数据
78 | void InStockPage::searchInStockData()
79 | {
80 | QString Ino = QString("Ino = '%1'").arg(ui->inIdEdit->text());
81 | QString Sno = QString("Sno = '%1'").arg(ui->idEdit->text());
82 | QString name = QString("Sname = '%1'").arg(ui->nameEdit->text());
83 | QString count = QString("Icount = '%1'").arg(ui->inCountEdit->text());
84 | QString time = QString("Itime = '%1'").arg(ui->inTimeEdit->text());
85 | QString agent = QString("Iagent = '%1'").arg(ui->inAgentEdit->text());
86 | QString filterStr = "";
87 | if(!ui->inIdEdit->text().isEmpty())
88 | filterStr.append(Ino);
89 | if(!ui->idEdit->text().isEmpty())
90 | {
91 | if(!filterStr.isEmpty())
92 | filterStr.append(" and ");
93 | filterStr.append(Sno);
94 | }
95 | if(!ui->nameEdit->text().isEmpty())
96 | {
97 | if(!filterStr.isEmpty())
98 | filterStr.append(" and ");
99 | filterStr.append(name);
100 | }
101 | if(!ui->inCountEdit->text().isEmpty())
102 | {
103 | if(!filterStr.isEmpty())
104 | filterStr.append(" and ");
105 | filterStr.append(count);
106 | }
107 | if(!ui->inTimeEdit->text().isEmpty())
108 | {
109 | if(!filterStr.isEmpty())
110 | filterStr.append(" and ");
111 | filterStr.append(time);
112 | }
113 | if(!ui->inAgentEdit->text().isEmpty())
114 | {
115 | if(!filterStr.isEmpty())
116 | filterStr.append(" and ");
117 | filterStr.append(agent);
118 | }
119 |
120 | inStockModel->setFilter(filterStr);
121 | inStockModel->select();
122 | }
123 |
124 | //选中一行的数据
125 | void InStockPage::modifyInStock()
126 | {
127 | inStockModifyDialog = new modifyInStockDialog(this);
128 | int curRow = ui->tableView->currentIndex().row();
129 | QSqlRecord record = inStockModel->record(curRow);
130 |
131 | QString sno = record.value(1).toString();
132 | inStockModifyDialog->snoEdit->setText(sno);
133 | QString sname = record.value(2).toString();
134 | inStockModifyDialog->snameEdit->setText(sname);
135 | QString icount = record.value(3).toString();
136 | inStockModifyDialog->icountEdit->setText(icount);
137 | QString iagent = record.value(5).toString();
138 | inStockModifyDialog->agentEdit->setText(iagent);
139 |
140 | connect(inStockModifyDialog->modifyInButton,&QPushButton::clicked,this,&InStockPage::modifyInStockData);
141 | inStockModifyDialog->show();
142 | }
143 |
144 | //修改数据
145 | void InStockPage::modifyInStockData()
146 | {
147 | QString sno = inStockModifyDialog->snoEdit->text();
148 | QString sname = inStockModifyDialog->snameEdit->text();
149 | QString icount = inStockModifyDialog->icountEdit->text();
150 | QString iagent = inStockModifyDialog->agentEdit->text();
151 |
152 | int curRow = ui->tableView->currentIndex().row();
153 | QSqlRecord record = inStockModel->record(curRow);
154 | record.setValue(1,sno);
155 | record.setValue(2,sname);
156 | record.setValue(3,icount);
157 | record.setValue(5,iagent);
158 |
159 | if(inStockModel->setRecord(curRow, record))
160 | {
161 | inStockModifyDialog->close();
162 | inStockModel->submitAll();
163 | ui->tableView->setEnabled(true);
164 | }
165 | }
166 |
167 | //删除数据
168 | void InStockPage::deleteInStockData()
169 | {
170 | int curRow = ui->tableView->currentIndex().row();
171 | inStockModel->removeRow(curRow);
172 | int ok = QMessageBox::warning(this,tr("删除当前行!"),tr("你确定删除当前行吗?"),QMessageBox::Yes,QMessageBox::No);
173 | if(ok == QMessageBox::No)
174 | inStockModel->revertAll(); //如果不删除,则撤销
175 | else
176 | inStockModel->submitAll(); //否则提交,在数据库中删除该行
177 | }
178 |
--------------------------------------------------------------------------------
/ProductInventoryMS/instockpage.h:
--------------------------------------------------------------------------------
1 | #ifndef INSTOCKPAGE_H
2 | #define INSTOCKPAGE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "sqlserver.h"
9 | #include "sqlserver.h"
10 | #include "addinstockdialog.h"
11 | #include "modifyinstockdialog.h"
12 |
13 | namespace Ui {
14 | class InStockPage;
15 | }
16 |
17 | class InStockPage : public QWidget
18 | {
19 | Q_OBJECT
20 |
21 | public:
22 | explicit InStockPage(QWidget *parent = nullptr);
23 | ~InStockPage();
24 | void creatInStockPage();
25 |
26 | void addInStock();
27 | void insertInStockData();
28 | void searchInStockData();
29 | void modifyInStock();
30 | void modifyInStockData();
31 | void deleteInStockData();
32 |
33 | private:
34 | Ui::InStockPage *ui;
35 | QSqlTableModel* inStockModel;
36 | SqlServer *mysql;
37 | SqlServer *sql;
38 | addInStockDialog *inStockDialog;
39 | modifyInStockDialog *inStockModifyDialog;
40 | };
41 |
42 | #endif // INSTOCKPAGE_H
43 |
--------------------------------------------------------------------------------
/ProductInventoryMS/instockpage.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | InStockPage
4 |
5 |
6 |
7 | 0
8 | 0
9 | 765
10 | 578
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 20
20 | 20
21 | 732
22 | 511
23 |
24 |
25 |
26 | -
27 |
28 |
-
29 |
30 |
31 |
32 | 618
33 | 16777215
34 |
35 |
36 |
37 |
38 | Agency FB
39 | 16
40 |
41 |
42 |
43 | 产品入库信息
44 |
45 |
46 |
47 | -
48 |
49 |
50 | Qt::Horizontal
51 |
52 |
53 |
54 | 40
55 | 20
56 |
57 |
58 |
59 |
60 | -
61 |
62 |
63 |
64 | 75
65 | 23
66 |
67 |
68 |
69 |
70 | 75
71 | 23
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 | 730
100 | 100
101 |
102 |
103 |
104 | QFrame::StyledPanel
105 |
106 |
107 | QFrame::Plain
108 |
109 |
110 |
111 |
112 | 7
113 | 11
114 | 711
115 | 81
116 |
117 |
118 |
119 |
-
120 |
121 |
-
122 |
123 |
124 | 入库编号
125 |
126 |
127 |
128 | -
129 |
130 |
131 | -
132 |
133 |
134 |
135 | 0
136 | 0
137 |
138 |
139 |
140 |
141 | 16777215
142 | 16777215
143 |
144 |
145 |
146 | 产品编号
147 |
148 |
149 |
150 | -
151 |
152 |
153 |
154 | 0
155 | 0
156 |
157 |
158 |
159 |
160 | 16777215
161 | 16777215
162 |
163 |
164 |
165 |
166 | -
167 |
168 |
169 |
170 | 0
171 | 0
172 |
173 |
174 |
175 |
176 | 16777215
177 | 16777215
178 |
179 |
180 |
181 | 产品名称
182 |
183 |
184 |
185 | -
186 |
187 |
188 |
189 | 16777215
190 | 16777215
191 |
192 |
193 |
194 |
195 | -
196 |
197 |
198 |
199 | 0
200 | 0
201 |
202 |
203 |
204 |
205 | 16777215
206 | 16777215
207 |
208 |
209 |
210 | 入库数量
211 |
212 |
213 |
214 | -
215 |
216 |
217 |
218 |
219 | -
220 |
221 |
-
222 |
223 |
224 | 入库时间
225 |
226 |
227 |
228 | -
229 |
230 |
231 | -
232 |
233 |
234 |
235 | 0
236 | 0
237 |
238 |
239 |
240 |
241 | 16777215
242 | 16777215
243 |
244 |
245 |
246 | 进货人
247 |
248 |
249 |
250 | -
251 |
252 |
253 |
254 | 0
255 | 0
256 |
257 |
258 |
259 |
260 | 16777215
261 | 16777215
262 |
263 |
264 |
265 |
266 | -
267 |
268 |
269 | Qt::Horizontal
270 |
271 |
272 |
273 | 40
274 | 20
275 |
276 |
277 |
278 |
279 | -
280 |
281 |
282 |
283 | 0
284 | 0
285 |
286 |
287 |
288 |
289 | 16777215
290 | 16777215
291 |
292 |
293 |
294 | 查询
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 | -
305 |
306 |
307 |
308 | 0
309 | 0
310 |
311 |
312 |
313 | QAbstractItemView::NoEditTriggers
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
--------------------------------------------------------------------------------
/ProductInventoryMS/loginwindow.cpp:
--------------------------------------------------------------------------------
1 | #include "loginwindow.h"
2 | #include "ui_loginwindow.h"
3 |
4 | LoginWindow::LoginWindow(QWidget *parent) :
5 | QMainWindow(parent),
6 | ui(new Ui::LoginWindow)
7 | {
8 | ui->setupUi(this);
9 | sql = new SqlServer;
10 | if(sql->initSql())
11 | qDebug()<<"连接成功";
12 | else
13 | qDebug()<<"连接失败";
14 |
15 | //注册、登录、退出按钮
16 | connect(ui->passwordEdit, SIGNAL(returnPressed()), this, SLOT(on_loginButton_clicked()));
17 | connect(ui->quitButton, &QPushButton::clicked, this, &LoginWindow::on_quitButton_clicked);
18 |
19 | }
20 |
21 | LoginWindow::~LoginWindow()
22 | {
23 | delete ui;
24 | }
25 |
26 |
27 | //注册
28 | void LoginWindow::on_registerButton_clicked()
29 | {
30 | QString name = ui->nameEdit->text();
31 | QString password = ui->passwordEdit->text();
32 | QString role = "CommonAdmin";
33 | if(name == nullptr || password == nullptr)
34 | {
35 | QMessageBox::information(this,"注册","注册失败,账号或密码为空");
36 | }
37 | else if(!sql->registerUser(name,password,role))
38 | {
39 | qDebug()<<"failed";
40 | QMessageBox::information(this,"注册","注册失败,账号已存在");
41 | }
42 | else
43 | {
44 | qDebug()<<"successful";
45 | QMessageBox::information(this,"注册","注册成功");
46 | }
47 | }
48 |
49 |
50 |
51 | //登录
52 | void LoginWindow::on_loginButton_clicked()
53 | {
54 | MainWindow *homepage = new MainWindow;
55 |
56 | QString name = ui->nameEdit->text();
57 | QString password = ui->passwordEdit->text();
58 |
59 | if(name == nullptr || password == nullptr)
60 | {
61 | QMessageBox::information(this, "提示", "账号或密码输入为空\n请继续输入");
62 | }
63 | else if(!sql->loginUser(name,password))
64 | {
65 | qDebug()<<"failed";
66 | QMessageBox::information(this, "提示", "账号或密码输入错误\n请重新输入");
67 | }
68 | else
69 | {
70 | qDebug()<<"successful";
71 | this->close();
72 | homepage->show();
73 | //QMessageBox::information(this,"登录","登录成功");
74 | }
75 | }
76 |
77 | //退出
78 | void LoginWindow::on_quitButton_clicked()
79 | {
80 | this->close();
81 | }
82 |
83 | //密码显示
84 | void LoginWindow::on_checkBox_stateChanged(int arg1)
85 | {
86 | if(arg1)
87 | {
88 | ui->passwordEdit->setEchoMode(QLineEdit::Password);
89 | }
90 | else
91 | {
92 | ui->passwordEdit->setEchoMode(QLineEdit::Normal);
93 | }
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/ProductInventoryMS/loginwindow.h:
--------------------------------------------------------------------------------
1 | #ifndef LOGINWINDOW_H
2 | #define LOGINWINDOW_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include "mainwindow.h"
12 | #include "sqlserver.h"
13 |
14 | namespace Ui {
15 | class LoginWindow;
16 | }
17 |
18 | class LoginWindow : public QMainWindow
19 | {
20 | Q_OBJECT
21 |
22 | public:
23 | explicit LoginWindow(QWidget *parent = nullptr);
24 | ~LoginWindow();
25 | QMap manager_data;
26 |
27 | private slots:
28 |
29 | void on_loginButton_clicked();
30 |
31 | void on_quitButton_clicked();
32 |
33 | void on_checkBox_stateChanged(int arg1);
34 |
35 | void on_registerButton_clicked();
36 |
37 |
38 |
39 | private:
40 | Ui::LoginWindow *ui;
41 | SqlServer *sql;
42 | };
43 | #endif // LOGINWINDOW_H
44 |
--------------------------------------------------------------------------------
/ProductInventoryMS/loginwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | LoginWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 500
10 | 340
11 |
12 |
13 |
14 |
15 | 500
16 | 340
17 |
18 |
19 |
20 |
21 | 500
22 | 340
23 |
24 |
25 |
26 | 产品库存管理系统
27 |
28 |
29 |
30 | -
31 |
32 |
-
33 |
34 |
35 |
36 | 0
37 | 90
38 |
39 |
40 |
41 |
42 | 16777215
43 | 500
44 |
45 |
46 |
47 |
48 | 30
49 |
50 |
51 |
52 | <html><head/><body><p align="center">欢迎登录系统</p></body></html>
53 |
54 |
55 |
56 | -
57 |
58 |
-
59 |
60 |
61 |
62 | 0
63 | 60
64 |
65 |
66 |
67 |
68 | 150
69 | 150
70 |
71 |
72 |
73 |
74 | 18
75 |
76 |
77 |
78 | 账号:
79 |
80 |
81 |
82 | -
83 |
84 |
85 |
86 | 0
87 | 40
88 |
89 |
90 |
91 |
92 | 15
93 |
94 |
95 |
96 |
97 | -
98 |
99 |
100 | Qt::Horizontal
101 |
102 |
103 |
104 | 40
105 | 20
106 |
107 |
108 |
109 |
110 |
111 |
112 | -
113 |
114 |
-
115 |
116 |
117 |
118 | 0
119 | 60
120 |
121 |
122 |
123 |
124 | 150
125 | 150
126 |
127 |
128 |
129 |
130 | 18
131 |
132 |
133 |
134 | 密码:
135 |
136 |
137 |
138 | -
139 |
140 |
141 |
142 | 0
143 | 40
144 |
145 |
146 |
147 |
148 | 15
149 |
150 |
151 |
152 |
153 |
154 |
155 | QLineEdit::Password
156 |
157 |
158 |
159 | -
160 |
161 |
162 |
163 |
164 |
165 | true
166 |
167 |
168 |
169 |
170 |
171 | -
172 |
173 |
-
174 |
175 |
176 |
177 | 0
178 | 50
179 |
180 |
181 |
182 |
183 | Agency FB
184 | 15
185 |
186 |
187 |
188 | 注册
189 |
190 |
191 |
192 | -
193 |
194 |
195 | Qt::Horizontal
196 |
197 |
198 |
199 | 40
200 | 20
201 |
202 |
203 |
204 |
205 | -
206 |
207 |
208 |
209 | 0
210 | 50
211 |
212 |
213 |
214 |
215 | 15
216 |
217 |
218 |
219 | 登录
220 |
221 |
222 |
223 | -
224 |
225 |
226 | Qt::Horizontal
227 |
228 |
229 |
230 | 40
231 | 60
232 |
233 |
234 |
235 |
236 | -
237 |
238 |
239 |
240 | 0
241 | 50
242 |
243 |
244 |
245 |
246 | 15
247 |
248 |
249 |
250 | 退出
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
--------------------------------------------------------------------------------
/ProductInventoryMS/main.cpp:
--------------------------------------------------------------------------------
1 | #include "loginwindow.h"
2 | #include "mainwindow.h"
3 | //#include "stockpage.h"
4 | #include
5 |
6 | int main(int argc, char *argv[])
7 | {
8 | QApplication a(argc, argv);
9 | LoginWindow w;
10 |
11 | w.show();
12 |
13 | return a.exec();
14 | }
15 |
--------------------------------------------------------------------------------
/ProductInventoryMS/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | #include "ui_mainwindow.h"
3 | #include "loginwindow.h"
4 |
5 |
6 | MainWindow::MainWindow(QWidget *parent) :
7 | QMainWindow(parent),
8 | ui(new Ui::MainWindow)
9 | {
10 | ui->setupUi(this);
11 | creatTool();
12 | creatStackWidget();
13 |
14 | }
15 |
16 | MainWindow::~MainWindow()
17 | {
18 | delete ui;
19 | }
20 |
21 | //工具栏设置
22 | void MainWindow::creatTool()
23 | {
24 | //右上角显示
25 | QWidget *spacer = new QWidget(this);
26 | spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
27 | ui->loginToolBar->addWidget(spacer);
28 | ui->loginToolBar->addAction(ui->loginAct);
29 | ui->loginToolBar->addAction(ui->ReLogin);
30 |
31 | LoginWindow *myLogin = new LoginWindow;
32 | //关闭
33 | connect(ui->ReLogin, &QAction::triggered, [this]()
34 | {
35 | this->close();
36 | });
37 | //打开登录界面,重新登录
38 | connect(ui->ReLogin, &QAction::triggered, myLogin, &QDialog::show);
39 | }
40 |
41 | void MainWindow::creatStackWidget()
42 | {
43 | stackWidget = new QStackedWidget;
44 | homespage = new HomePage;
45 | stockpage = new StockPage;
46 | instockpage = new InStockPage;
47 | outstockpage = new OutStockPage;
48 | userpage = new UserPage;
49 |
50 | stackWidget->addWidget(homespage);
51 | stackWidget->addWidget(stockpage);
52 | stackWidget->addWidget(instockpage);
53 | stackWidget->addWidget(outstockpage);
54 | stackWidget->addWidget(userpage);
55 | setCentralWidget(stackWidget);
56 |
57 | //切换
58 | connect(ui->homeAction,&QAction::triggered,this,&MainWindow::switchPages);
59 | connect(ui->stockAction,&QAction::triggered,this,&MainWindow::switchPages);
60 | connect(ui->inAction,&QAction::triggered,this,&MainWindow::switchPages);
61 | connect(ui->outAction,&QAction::triggered,this,&MainWindow::switchPages);
62 | connect(ui->userAction,&QAction::triggered,this,&MainWindow::switchPages);
63 | }
64 |
65 | void MainWindow::switchPages()
66 | {
67 | QAction *action = qobject_cast(sender());
68 | if(action->text() == "主页")
69 | stackWidget->setCurrentIndex(0);
70 | else if(action->text() == "库存管理")
71 | stackWidget->setCurrentIndex(1);
72 | else if(action->text() == "入库管理")
73 | stackWidget->setCurrentIndex(2);
74 | else if(action->text() == "出库管理")
75 | stackWidget->setCurrentIndex(3);
76 | else if(action->text() == "用户管理")
77 | stackWidget->setCurrentIndex(4);
78 | }
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/ProductInventoryMS/mainwindow.h:
--------------------------------------------------------------------------------
1 | #ifndef MAINWINDOW_H
2 | #define MAINWINDOW_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include "sqlserver.h"
17 | #include "homepage.h"
18 | #include "stockpage.h"
19 | #include "instockpage.h"
20 | #include "outstockpage.h"
21 | #include "userpage.h"
22 | #include "addstockdialog.h"
23 |
24 | namespace Ui {
25 | class MainWindow;
26 | }
27 |
28 | class MainWindow : public QMainWindow
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit MainWindow(QWidget *parent = nullptr);
34 | ~MainWindow();
35 | void creatTool();
36 | void creatNaviBar();
37 | void creatStackWidget();
38 | void switchPages();
39 |
40 | private:
41 | Ui::MainWindow *ui;
42 |
43 | QStackedWidget *stackWidget;
44 |
45 | QAction *homeAction;
46 | QAction *stockAction;
47 | QAction *enterAction;
48 | QAction *exitAction;
49 | QAction *userAction;
50 | QSqlTableModel* StockModel;
51 |
52 | HomePage *homespage;
53 | StockPage *stockpage;
54 | InStockPage *instockpage;
55 | OutStockPage *outstockpage;
56 | UserPage *userpage;
57 |
58 |
59 | };
60 |
61 | #endif // MAINWINDOW_H
62 |
--------------------------------------------------------------------------------
/ProductInventoryMS/mainwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | MainWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 800
10 | 600
11 |
12 |
13 |
14 | 产品库存管理系统
15 |
16 |
17 |
51 |
52 |
53 |
54 | false
55 |
56 |
57 | 状态
58 |
59 |
60 | false
61 |
62 |
63 | TopToolBarArea
64 |
65 |
66 | false
67 |
68 |
69 |
70 |
71 |
72 |
73 | 导航
74 |
75 |
76 | false
77 |
78 |
79 | LeftToolBarArea
80 |
81 |
82 | false
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | 已登录
94 |
95 |
96 |
97 |
98 | 退出
99 |
100 |
101 |
102 |
103 |
104 | :/images/home.png:/images/home.png
105 |
106 |
107 | 主页
108 |
109 |
110 |
111 |
112 |
113 | :/images/file.png:/images/file.png
114 |
115 |
116 | 库存管理
117 |
118 |
119 |
120 |
121 |
122 | :/images/user.png:/images/user.png
123 |
124 |
125 | 用户管理
126 |
127 |
128 |
129 |
130 |
131 | :/images/add.png:/images/add.png
132 |
133 |
134 | 入库管理
135 |
136 |
137 |
138 |
139 |
140 | :/images/delete.png:/images/delete.png
141 |
142 |
143 | 出库管理
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/ProductInventoryMS/modifyinstockdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "modifyinstockdialog.h"
2 | #include
3 |
4 | modifyInStockDialog::modifyInStockDialog(QWidget *parent)
5 | : QDialog(parent)
6 | {
7 | setWindowTitle(tr("修改"));
8 | QLabel *snoLabel = new QLabel("产品编号");
9 | snoEdit = new QLineEdit;
10 | QLabel *snameLabel = new QLabel("产品名称");
11 | snameEdit = new QLineEdit;
12 | QLabel *icountLabel = new QLabel("入库数量");
13 | icountEdit = new QLineEdit;
14 | QLabel *agentLabel = new QLabel("进货人");
15 | agentEdit = new QLineEdit;
16 | modifyInButton = new QPushButton("修改");
17 |
18 | QGridLayout *layout = new QGridLayout;
19 | layout->addWidget(snoLabel,0,0);//产品编号
20 | layout->addWidget(snoEdit,0,1);
21 | layout->addWidget(snameLabel,1,0);//产品名称
22 | layout->addWidget(snameEdit,1,1);
23 | layout->addWidget(icountLabel,2,0);//入库数量
24 | layout->addWidget(icountEdit,2,1);
25 | layout->addWidget(agentLabel,3,0);//进货人
26 | layout->addWidget(agentEdit,3,1);
27 | layout->addWidget(modifyInButton,4,1);
28 |
29 | setLayout(layout);
30 | setWindowModality(Qt::WindowModal);
31 | }
32 |
33 | modifyInStockDialog::~modifyInStockDialog()
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ProductInventoryMS/modifyinstockdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef MODIFYINSTOCKDIALOG_H
2 | #define MODIFYINSTOCKDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | class modifyInStockDialog : public QDialog
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | modifyInStockDialog(QWidget *parent = nullptr);
17 | ~modifyInStockDialog();
18 |
19 | QLineEdit *snoEdit;
20 | QLineEdit *snameEdit;
21 | QLineEdit *icountEdit;
22 | QLineEdit *agentEdit;
23 | QPushButton *modifyInButton;
24 | };
25 |
26 | #endif // MODIFYINSTOCKDIALOG_H
27 |
--------------------------------------------------------------------------------
/ProductInventoryMS/modifyoutstockdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "modifyoutstockdialog.h"
2 | #include
3 |
4 | modifyOutStockDialog::modifyOutStockDialog(QWidget *parent)
5 | : QDialog(parent)
6 | {
7 | setWindowTitle(tr("修改"));
8 | QLabel *snoLabel = new QLabel("产品编号");
9 | snoEdit = new QLineEdit;
10 | QLabel *snameLabel = new QLabel("产品名称");
11 | snameEdit = new QLineEdit;
12 | QLabel *ocountLabel = new QLabel("出库数量");
13 | ocountEdit = new QLineEdit;
14 | QLabel *clientLabel = new QLabel("客户");
15 | clientEdit = new QLineEdit;
16 | modifyOutButton = new QPushButton("修改");
17 |
18 | QGridLayout *layout = new QGridLayout;
19 | layout->addWidget(snoLabel,0,0);//产品编号
20 | layout->addWidget(snoEdit,0,1);
21 | layout->addWidget(snameLabel,1,0);//产品名称
22 | layout->addWidget(snameEdit,1,1);
23 | layout->addWidget(ocountLabel,2,0);//出库数量
24 | layout->addWidget(ocountEdit,2,1);
25 | layout->addWidget(clientLabel,3,0);//客户
26 | layout->addWidget(clientEdit,3,1);
27 | layout->addWidget(modifyOutButton,4,1);
28 |
29 | setLayout(layout);
30 | setWindowModality(Qt::WindowModal);
31 | }
32 |
33 | modifyOutStockDialog::~modifyOutStockDialog()
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ProductInventoryMS/modifyoutstockdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef MODIFYOUTSTOCKDIALOG_H
2 | #define MODIFYOUTSTOCKDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | class modifyOutStockDialog : public QDialog
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | modifyOutStockDialog(QWidget *parent = nullptr);
17 | ~modifyOutStockDialog();
18 |
19 | QLineEdit *snoEdit;
20 | QLineEdit *snameEdit;
21 | QLineEdit *ocountEdit;
22 | QLineEdit *clientEdit;
23 | QPushButton *modifyOutButton;
24 | };
25 |
26 |
27 | #endif // MODIFYOUTSTOCKDIALOG_H
28 |
--------------------------------------------------------------------------------
/ProductInventoryMS/modifystockdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "modifystockdialog.h"
2 | #include
3 |
4 | modifyStockDialog::modifyStockDialog(QWidget *parent)
5 | : QDialog(parent)
6 | {
7 | setWindowTitle(tr("修改"));
8 | QLabel *nameLabel = new QLabel("产品名称");
9 | nameEdit = new QLineEdit;
10 | QLabel *categoryLabel = new QLabel("所属类目");
11 | categoryEdit = new QComboBox;
12 | QStringList categoryList;
13 | categoryList<<"家电"<<"数码"<<"家具"<<"服饰"<<"食品"<<"其他"<<"";
14 | categoryEdit->addItems(categoryList);
15 | QLabel *speciLabel = new QLabel("产品数量");
16 | speciEdit = new QLineEdit;
17 | QLabel *addrLabel = new QLabel("产地");
18 | addrEdit = new QComboBox;
19 | QStringList addrList;
20 | addrList<<"北京"<<"上海"<<"浙江"<<"安徽"<<"广州"<<"深圳"<<"重庆"<<"其他"<<"";
21 | addrEdit->addItems(addrList);
22 | QLabel *manuLabel = new QLabel("制造商");
23 | manuEdit = new QLineEdit;
24 | QLabel *noteLabel = new QLabel("备注");
25 | noteEdit = new QLineEdit;
26 | modifyButton = new QPushButton("修改");
27 |
28 | QGridLayout *layout = new QGridLayout;
29 | layout->addWidget(nameLabel,0,0);//产品名称
30 | layout->addWidget(nameEdit,0,1);
31 | layout->addWidget(categoryLabel,1,0);//所属类目
32 | layout->addWidget(categoryEdit,1,1);
33 | layout->addWidget(speciLabel,2,0);//产品数量
34 | layout->addWidget(speciEdit,2,1);
35 | layout->addWidget(addrLabel,3,0);//产地
36 | layout->addWidget(addrEdit,3,1);
37 | layout->addWidget(manuLabel,4,0);//制造商
38 | layout->addWidget(manuEdit,4,1);
39 | layout->addWidget(noteLabel,5,0);//备注
40 | layout->addWidget(noteEdit,5,1);
41 | layout->addWidget(modifyButton,6,1);
42 |
43 | setLayout(layout);
44 | setWindowModality(Qt::WindowModal);
45 | }
46 |
47 | modifyStockDialog::~modifyStockDialog()
48 | {
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/ProductInventoryMS/modifystockdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef MODIFYSTOCKDIALOG_H
2 | #define MODIFYSTOCKDIALOG_H
3 |
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | class modifyStockDialog : public QDialog
13 | {
14 | Q_OBJECT
15 |
16 | public:
17 | modifyStockDialog(QWidget *parent = nullptr);
18 | ~modifyStockDialog();
19 |
20 | QLineEdit *nameEdit;
21 | QComboBox *addrEdit;
22 | QComboBox *categoryEdit;
23 | QLineEdit *manuEdit;
24 | QLineEdit *noteEdit;
25 | QLineEdit *speciEdit;
26 | QPushButton *modifyButton;
27 | };
28 |
29 | #endif // MODIFYSTOCKDIALOG_H
30 |
--------------------------------------------------------------------------------
/ProductInventoryMS/outstockpage.cpp:
--------------------------------------------------------------------------------
1 | #include "outstockpage.h"
2 | #include "ui_outstockpage.h"
3 |
4 | OutStockPage::OutStockPage(QWidget *parent) :
5 | QWidget(parent),
6 | ui(new Ui::OutStockPage)
7 | {
8 | ui->setupUi(this);
9 | creatOutStockPage();
10 |
11 | }
12 |
13 | OutStockPage::~OutStockPage()
14 | {
15 | delete ui;
16 | }
17 |
18 | void OutStockPage::creatOutStockPage()
19 | {
20 | //连接槽函数
21 | connect(ui->addButton,&QPushButton::clicked,this,&OutStockPage::addOutStock);
22 | connect(ui->searchButton,&QPushButton::clicked,this,&OutStockPage::searchOutStockData);
23 | connect(ui->modifyButton,&QPushButton::clicked,this,&OutStockPage::modifyOutStock);
24 | connect(ui->deleteButton,&QPushButton::clicked,this,&OutStockPage::deleteOutStockData);
25 |
26 | outStockModel = new QSqlTableModel;
27 | outStockModel->setTable("OutStock");//选择数据表
28 | outStockModel->setEditStrategy(QSqlTableModel::OnManualSubmit);//设置保存策略为手动提交
29 | outStockModel->setHeaderData(0,Qt::Horizontal, "出库编号");
30 | outStockModel->setHeaderData(1,Qt::Horizontal, "产品编号");
31 | outStockModel->setHeaderData(2,Qt::Horizontal, "产品名称");
32 | outStockModel->setHeaderData(3,Qt::Horizontal, "出库数量");
33 | outStockModel->setHeaderData(4,Qt::Horizontal, "出库时间");
34 | outStockModel->setHeaderData(5,Qt::Horizontal, "客户");
35 | outStockModel->select();
36 |
37 | ui->tableView->setModel(outStockModel);
38 | ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);//使其不可编辑
39 |
40 | }
41 |
42 | void OutStockPage::addOutStock()
43 | {
44 | outStockDialog = new addOutStockDialog(this);
45 | outStockDialog->show();
46 | connect(outStockDialog->outButton,&QPushButton::clicked,this,&OutStockPage::insertOutStockData);
47 | }
48 |
49 | //出库
50 | void OutStockPage::insertOutStockData()
51 | {
52 | QString Sno = outStockDialog->snoEdit->text();
53 | QString Sname = outStockDialog->snameEdit->text();
54 | QString Ocount = outStockDialog->ocountEdit->text();
55 | QString Oagent = outStockDialog->clientEdit->text();
56 |
57 | QSqlQuery *query=new QSqlQuery;
58 | QString str = QString("insert into OutStock values('%1', '%2', '%3',getdate(),'%4')").arg(Sno).arg(Sname).arg(Ocount).arg(Oagent);
59 | if(Sno==nullptr)
60 | {
61 | qDebug()<<"failed";
62 | QMessageBox::information(this,"出库","出库失败");
63 | }
64 | else if(query->exec(str))
65 | {
66 | qDebug()<<"successful";
67 | QMessageBox::information(this,"出库","出库成功");
68 | outStockModel->submitAll();
69 | }
70 | else
71 | {
72 | qDebug()<<"failed";
73 | QMessageBox::information(this,"出库","出库失败,产品库存不足");
74 | }
75 | }
76 |
77 | //查询数据
78 | void OutStockPage::searchOutStockData()
79 | {
80 | QString Ono = QString("Ono = '%1'").arg(ui->outIdEdit->text());
81 | QString Sno = QString("Sno = '%1'").arg(ui->idEdit->text());
82 | QString name = QString("Sname = '%1'").arg(ui->nameEdit->text());
83 | QString count = QString("Ocount = '%1'").arg(ui->outCountEdit->text());
84 | QString time = QString("Otime = '%1'").arg(ui->outTimeEdit->text());
85 | QString client = QString("Oclient = '%1'").arg(ui->clientEdit->text());
86 | QString filterStr = "";
87 | if(!ui->outIdEdit->text().isEmpty())
88 | filterStr.append(Ono);
89 | if(!ui->idEdit->text().isEmpty())
90 | {
91 | if(!filterStr.isEmpty())
92 | filterStr.append(" and ");
93 | filterStr.append(Sno);
94 | }
95 | if(!ui->nameEdit->text().isEmpty())
96 | {
97 | if(!filterStr.isEmpty())
98 | filterStr.append(" and ");
99 | filterStr.append(name);
100 | }
101 | if(!ui->outCountEdit->text().isEmpty())
102 | {
103 | if(!filterStr.isEmpty())
104 | filterStr.append(" and ");
105 | filterStr.append(count);
106 | }
107 | if(!ui->outTimeEdit->text().isEmpty())
108 | {
109 | if(!filterStr.isEmpty())
110 | filterStr.append(" and ");
111 | filterStr.append(time);
112 | }
113 | if(!ui->clientEdit->text().isEmpty())
114 | {
115 | if(!filterStr.isEmpty())
116 | filterStr.append(" and ");
117 | filterStr.append(client);
118 | }
119 |
120 | outStockModel->setFilter(filterStr);
121 | outStockModel->select();
122 | }
123 |
124 | //选中一行的数据
125 | void OutStockPage::modifyOutStock()
126 | {
127 | outStockModifyDialog = new modifyOutStockDialog(this);
128 | int curRow = ui->tableView->currentIndex().row();
129 | QSqlRecord record = outStockModel->record(curRow);
130 |
131 | QString ono = record.value(1).toString();
132 | outStockModifyDialog->snoEdit->setText(ono);
133 | QString sname = record.value(2).toString();
134 | outStockModifyDialog->snameEdit->setText(sname);
135 | QString ocount = record.value(3).toString();
136 | outStockModifyDialog->ocountEdit->setText(ocount);
137 | QString oclient = record.value(5).toString();
138 | outStockModifyDialog->clientEdit->setText(oclient);
139 |
140 | connect(outStockModifyDialog->modifyOutButton,&QPushButton::clicked,this,&OutStockPage::modifyOutStockData);
141 | outStockModifyDialog->show();
142 | }
143 |
144 | //修改数据
145 | void OutStockPage::modifyOutStockData()
146 | {
147 | QString ono = outStockModifyDialog->snoEdit->text();
148 | QString sname = outStockModifyDialog->snameEdit->text();
149 | QString ocount = outStockModifyDialog->ocountEdit->text();
150 | QString oclient = outStockModifyDialog->clientEdit->text();
151 |
152 | int curRow = ui->tableView->currentIndex().row();
153 | QSqlRecord record = outStockModel->record(curRow);
154 | record.setValue(1,ono);
155 | record.setValue(2,sname);
156 | record.setValue(3,ocount);
157 | record.setValue(5,oclient);
158 |
159 | if(outStockModel->setRecord(curRow, record))
160 | {
161 | outStockModifyDialog->close();
162 | outStockModel->submitAll();
163 | ui->tableView->setEnabled(true);
164 | }
165 | }
166 |
167 | //删除数据
168 | void OutStockPage::deleteOutStockData()
169 | {
170 | int curRow = ui->tableView->currentIndex().row();
171 | outStockModel->removeRow(curRow);
172 | int ok = QMessageBox::warning(this,tr("删除当前行!"),tr("你确定删除当前行吗?"),QMessageBox::Yes,QMessageBox::No);
173 | if(ok == QMessageBox::No)
174 | outStockModel->revertAll(); //如果不删除,则撤销
175 | else
176 | outStockModel->submitAll(); //否则提交,在数据库中删除该行
177 | }
178 |
--------------------------------------------------------------------------------
/ProductInventoryMS/outstockpage.h:
--------------------------------------------------------------------------------
1 | #ifndef OUTSTOCKPAGE_H
2 | #define OUTSTOCKPAGE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "sqlserver.h"
9 | #include "sqlserver.h"
10 | #include "addoutstockdialog.h"
11 | #include "modifyoutstockdialog.h"
12 |
13 | namespace Ui {
14 | class OutStockPage;
15 | }
16 |
17 | class OutStockPage : public QWidget
18 | {
19 | Q_OBJECT
20 |
21 | public:
22 | explicit OutStockPage(QWidget *parent = nullptr);
23 | ~OutStockPage();
24 |
25 | void creatOutStockPage();
26 | void addOutStock();
27 | void insertOutStockData();
28 | void searchOutStockData();
29 | void modifyOutStock();
30 | void modifyOutStockData();
31 | void deleteOutStockData();
32 |
33 | private:
34 | Ui::OutStockPage *ui;
35 | QSqlTableModel* outStockModel;
36 | SqlServer *mysql;
37 | SqlServer *sql;
38 | addOutStockDialog *outStockDialog;
39 | modifyOutStockDialog *outStockModifyDialog;
40 | };
41 | #endif // OUTSTOCKPAGE_H
42 |
--------------------------------------------------------------------------------
/ProductInventoryMS/outstockpage.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | OutStockPage
4 |
5 |
6 |
7 | 0
8 | 0
9 | 765
10 | 578
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 20
20 | 20
21 | 732
22 | 511
23 |
24 |
25 |
26 | -
27 |
28 |
-
29 |
30 |
31 |
32 | 618
33 | 16777215
34 |
35 |
36 |
37 |
38 | Agency FB
39 | 16
40 |
41 |
42 |
43 | 产品出库信息
44 |
45 |
46 |
47 | -
48 |
49 |
50 | Qt::Horizontal
51 |
52 |
53 |
54 | 40
55 | 20
56 |
57 |
58 |
59 |
60 | -
61 |
62 |
63 |
64 | 75
65 | 23
66 |
67 |
68 |
69 |
70 | 75
71 | 23
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 | 730
100 | 100
101 |
102 |
103 |
104 | QFrame::StyledPanel
105 |
106 |
107 | QFrame::Plain
108 |
109 |
110 |
111 |
112 | 7
113 | 11
114 | 711
115 | 81
116 |
117 |
118 |
119 |
-
120 |
121 |
-
122 |
123 |
124 | 出库编号
125 |
126 |
127 |
128 | -
129 |
130 |
131 | -
132 |
133 |
134 |
135 | 0
136 | 0
137 |
138 |
139 |
140 |
141 | 16777215
142 | 16777215
143 |
144 |
145 |
146 | 产品编号
147 |
148 |
149 |
150 | -
151 |
152 |
153 |
154 | 0
155 | 0
156 |
157 |
158 |
159 |
160 | 16777215
161 | 16777215
162 |
163 |
164 |
165 |
166 | -
167 |
168 |
169 |
170 | 0
171 | 0
172 |
173 |
174 |
175 |
176 | 16777215
177 | 16777215
178 |
179 |
180 |
181 | 产品名称
182 |
183 |
184 |
185 | -
186 |
187 |
188 |
189 | 16777215
190 | 16777215
191 |
192 |
193 |
194 |
195 | -
196 |
197 |
198 |
199 | 0
200 | 0
201 |
202 |
203 |
204 |
205 | 16777215
206 | 16777215
207 |
208 |
209 |
210 | 出库数量
211 |
212 |
213 |
214 | -
215 |
216 |
217 |
218 |
219 | -
220 |
221 |
-
222 |
223 |
224 | 出库时间
225 |
226 |
227 |
228 | -
229 |
230 |
231 | -
232 |
233 |
234 |
235 | 0
236 | 0
237 |
238 |
239 |
240 |
241 | 16777215
242 | 16777215
243 |
244 |
245 |
246 | 客户
247 |
248 |
249 |
250 | -
251 |
252 |
253 |
254 | 0
255 | 0
256 |
257 |
258 |
259 |
260 | 16777215
261 | 16777215
262 |
263 |
264 |
265 |
266 | -
267 |
268 |
269 | Qt::Horizontal
270 |
271 |
272 |
273 | 40
274 | 20
275 |
276 |
277 |
278 |
279 | -
280 |
281 |
282 |
283 | 0
284 | 0
285 |
286 |
287 |
288 |
289 | 16777215
290 | 16777215
291 |
292 |
293 |
294 | 查询
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 | -
305 |
306 |
307 |
308 | 0
309 | 0
310 |
311 |
312 |
313 | QAbstractItemView::NoEditTriggers
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
--------------------------------------------------------------------------------
/ProductInventoryMS/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | images/add.png
4 | images/delete.png
5 | images/file.png
6 | images/home.png
7 | images/resource.qrc
8 | images/user.png
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ProductInventoryMS/sqlserver.cpp:
--------------------------------------------------------------------------------
1 | #include "sqlserver.h"
2 |
3 | SqlServer::SqlServer()
4 | {
5 |
6 | }
7 |
8 | bool SqlServer::initSql()
9 | {
10 | db = QSqlDatabase::addDatabase("QODBC"); //数据库驱动类型为SQL Server
11 | qDebug()<<"ODBC driver?"<exec(str))
36 | return false;
37 | return true;
38 | }
39 |
40 | //登录读取信息
41 | bool SqlServer::loginUser(QString name,QString password)
42 | {
43 | query=new QSqlQuery;
44 | QString str=QString("select * from Manager where Maccount= '%1' and Mpassword = '%2' ").arg(name).arg(password);
45 | query->exec(str);
46 | return query->next();
47 | }
48 |
49 | bool SqlServer::insertStock(QString name,QString category,QString count,QString addr,QString manu,QString note)
50 | {
51 | query=new QSqlQuery;
52 | QString str = QString("insert into Stock values('%1', '%2', '%3','%4','%5','%6')").arg(name).arg(category).arg(count).arg(addr).arg(manu).arg(note);
53 | if(!query->exec(str))
54 | return false;
55 | return true;
56 | }
57 |
--------------------------------------------------------------------------------
/ProductInventoryMS/sqlserver.h:
--------------------------------------------------------------------------------
1 | #ifndef SQLSERVER_H
2 | #define SQLSERVER_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | class SqlServer
14 | {
15 | public:
16 | SqlServer();
17 | bool initSql();
18 | bool registerUser(QString name,QString password,QString role);
19 | bool loginUser(QString name,QString password);
20 | bool insertStock(QString name,QString Scategory,QString Scount,QString Saddr,QString Smanu,QString Snote);
21 |
22 | QSqlQuery *query;
23 | QSqlDatabase db;
24 | };
25 |
26 | #endif // SQLSERVER_H
27 |
--------------------------------------------------------------------------------
/ProductInventoryMS/stockpage.cpp:
--------------------------------------------------------------------------------
1 | #include "stockpage.h"
2 | #include "ui_stockpage.h"
3 |
4 | StockPage::StockPage(QWidget *parent) :
5 | QWidget(parent),
6 | ui(new Ui::StockPage)
7 | {
8 | ui->setupUi(this);
9 | creatStockPage();
10 |
11 | }
12 |
13 | StockPage::~StockPage()
14 | {
15 | delete ui;
16 | }
17 |
18 | void StockPage::creatStockPage()
19 | {
20 | //连接槽函数
21 | connect(ui->addButton,&QPushButton::clicked,this,&StockPage::addStock);
22 | connect(ui->searchButton,&QPushButton::clicked,this,&StockPage::searchStockData);
23 | connect(ui->modifyButton,&QPushButton::clicked,this,&StockPage::modifyStock);
24 | connect(ui->deleteButton,&QPushButton::clicked,this,&StockPage::deleteStockData);
25 |
26 | StockModel = new QSqlTableModel;
27 | StockModel->setTable("stock");//选择数据表
28 | StockModel->setEditStrategy(QSqlTableModel::OnManualSubmit);//设置保存策略为手动提交
29 | StockModel->setHeaderData(0,Qt::Horizontal, "序号");
30 | StockModel->setHeaderData(1,Qt::Horizontal, "产品名称");
31 | StockModel->setHeaderData(2,Qt::Horizontal, "所属类别");
32 | StockModel->setHeaderData(3,Qt::Horizontal, "产品数量");
33 | StockModel->setHeaderData(4,Qt::Horizontal, "产地");
34 | StockModel->setHeaderData(5,Qt::Horizontal, "制造商");
35 | StockModel->setHeaderData(6,Qt::Horizontal, "备注");
36 | StockModel->select();
37 |
38 | ui->tableView->setModel(StockModel);
39 | ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);//使其不可编辑
40 |
41 | }
42 |
43 | void StockPage::addStock()
44 | {
45 | stockDialog = new addStockDialog(this);
46 | stockDialog->show();
47 | connect(stockDialog->addButton,&QPushButton::clicked,this,&StockPage::insertStockData);
48 | }
49 |
50 | //添加数据
51 | void StockPage::insertStockData()
52 | {
53 | QString stockName = stockDialog->nameEdit->text();
54 | QString stockcategory = stockDialog->categoryEdit->currentText();
55 | QString stockSpeci = stockDialog->speciEdit->text();
56 | QString stockAddr = stockDialog->addrEdit->currentText();
57 | QString stockManu = stockDialog->manuEdit->text();
58 | QString stockNote = stockDialog->noteEdit->text();
59 |
60 | QSqlQuery *query=new QSqlQuery;
61 | QString str = QString("insert into Stock values('%1', '%2', '%3','%4','%5','%6')").arg(stockName).arg(stockcategory).arg(stockSpeci).arg(stockAddr).arg(stockManu).arg(stockNote);
62 | if(stockName==nullptr)
63 | {
64 | qDebug()<<"failed";
65 | QMessageBox::information(this,"添加","添加失败");
66 | }
67 | else if(query->exec(str))
68 | {
69 | qDebug()<<"successful";
70 | QMessageBox::information(this,"添加","添加成功");
71 | StockModel->submitAll();
72 | }
73 | else
74 | {
75 | qDebug()<<"failed";
76 | QMessageBox::information(this,"添加","添加失败\n"+query->lastError().text());
77 | }
78 | }
79 |
80 | //查询数据
81 | void StockPage::searchStockData()
82 | {
83 | QString id = QString("Sno = '%1'").arg(ui->idEdit->text());
84 | QString name = QString("Sname = '%1'").arg(ui->nameEdit->text());
85 | QString cate = QString("Scategory = '%1'").arg(ui->cateEdit->currentText());
86 | QString addr = QString("Saddr = '%1'").arg(ui->addrEdit->currentText());
87 | QString count = QString("Scount = '%1'").arg(ui->countEdit->text());
88 | QString manu = QString("Smanu = '%1'").arg(ui->manuEdit->text());
89 | QString filterStr = "";
90 | if(!ui->idEdit->text().isEmpty())
91 | filterStr.append(id);
92 | if(!ui->nameEdit->text().isEmpty())
93 | {
94 | if(!filterStr.isEmpty())
95 | filterStr.append(" and ");
96 | filterStr.append(name);
97 | }
98 | if(!ui->cateEdit->currentText().isEmpty())
99 | {
100 | if(!filterStr.isEmpty())
101 | filterStr.append(" and ");
102 | filterStr.append(cate);
103 | }
104 | if(!ui->addrEdit->currentText().isEmpty())
105 | {
106 | if(!filterStr.isEmpty())
107 | filterStr.append(" and ");
108 | filterStr.append(addr);
109 | }
110 | if(!ui->countEdit->text().isEmpty())
111 | {
112 | if(!filterStr.isEmpty())
113 | filterStr.append(" and ");
114 | filterStr.append(count);
115 | }
116 | if(!ui->manuEdit->text().isEmpty())
117 | {
118 | if(!filterStr.isEmpty())
119 | filterStr.append(" and ");
120 | filterStr.append(manu);
121 | }
122 |
123 | StockModel->setFilter(filterStr);
124 | StockModel->select();
125 | }
126 |
127 | //选中一行的数据
128 | void StockPage::modifyStock()
129 | {
130 | stockModifyDialog = new modifyStockDialog(this);
131 | int curRow = ui->tableView->currentIndex().row();
132 | QSqlRecord record = StockModel->record(curRow);
133 |
134 | QString name = record.value(1).toString();
135 | stockModifyDialog->nameEdit->setText(name);
136 | QString category = record.value(2).toString();
137 | stockModifyDialog->categoryEdit->setCurrentText(category);
138 | QString speci = record.value(3).toString();
139 | stockModifyDialog->speciEdit->setText(speci);
140 | QString address = record.value(4).toString();
141 | stockModifyDialog->addrEdit->setCurrentText(address);
142 | QString manu = record.value(5).toString();
143 | stockModifyDialog->manuEdit->setText(manu);
144 | QString note = record.value(6).toString();
145 | stockModifyDialog->noteEdit->setText(note);
146 |
147 | connect(stockModifyDialog->modifyButton,&QPushButton::clicked,this,&StockPage::modifyStockData);
148 | stockModifyDialog->show();
149 | }
150 |
151 | //修改数据
152 | void StockPage::modifyStockData()
153 | {
154 | QString stockName = stockModifyDialog->nameEdit->text();
155 | QString stockcategory = stockModifyDialog->categoryEdit->currentText();
156 | QString stockSpeci = stockModifyDialog->speciEdit->text();
157 | QString stockAddr = stockModifyDialog->addrEdit->currentText();
158 | QString stockManu = stockModifyDialog->manuEdit->text();
159 | QString stockNote = stockModifyDialog->noteEdit->text();
160 |
161 | int curRow = ui->tableView->currentIndex().row();
162 | QSqlRecord record = StockModel->record(curRow);
163 | record.setValue(1,stockName);
164 | record.setValue(2,stockcategory);
165 | record.setValue(3,stockSpeci);
166 | record.setValue(4,stockAddr);
167 | record.setValue(5,stockManu);
168 | record.setValue(6,stockNote);
169 |
170 | if(StockModel->setRecord(curRow, record))
171 | {
172 | stockModifyDialog->close();
173 | StockModel->submitAll();
174 | ui->tableView->setEnabled(true);
175 | }
176 | }
177 |
178 | //删除数据
179 | void StockPage::deleteStockData()
180 | {
181 | int curRow = ui->tableView->currentIndex().row();
182 | StockModel->removeRow(curRow);
183 | int ok = QMessageBox::warning(this,tr("删除当前行!"),tr("你确定删除当前行吗?"),QMessageBox::Yes,QMessageBox::No);
184 | if(ok == QMessageBox::No)
185 | StockModel->revertAll(); //如果不删除,则撤销
186 | else
187 | StockModel->submitAll(); //否则提交,在数据库中删除该行
188 | }
189 |
--------------------------------------------------------------------------------
/ProductInventoryMS/stockpage.h:
--------------------------------------------------------------------------------
1 | #ifndef STOCKPAGE_H
2 | #define STOCKPAGE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "sqlserver.h"
9 | #include "addstockdialog.h"
10 | #include "modifystockdialog.h"
11 |
12 | namespace Ui {
13 | class StockPage;
14 | }
15 |
16 | class StockPage : public QWidget
17 | {
18 | Q_OBJECT
19 |
20 | public:
21 | explicit StockPage(QWidget *parent = nullptr);
22 | ~StockPage();
23 | void creatStockPage();
24 |
25 | void addStock();
26 | void insertStockData();
27 | void searchStockData();
28 | void modifyStock();
29 | void modifyStockData();
30 | void deleteStockData();
31 |
32 | private:
33 | Ui::StockPage *ui;
34 | QSqlTableModel* StockModel;
35 | SqlServer *mysql;
36 | addStockDialog *stockDialog;
37 | SqlServer *sql;
38 | modifyStockDialog *stockModifyDialog;
39 | };
40 |
41 | #endif // STOCKPAGE_H
42 |
--------------------------------------------------------------------------------
/ProductInventoryMS/stockpage.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | StockPage
4 |
5 |
6 |
7 | 0
8 | 0
9 | 765
10 | 578
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 20
20 | 20
21 | 732
22 | 511
23 |
24 |
25 |
26 | -
27 |
28 |
-
29 |
30 |
31 |
32 | 618
33 | 16777215
34 |
35 |
36 |
37 |
38 | Agency FB
39 | 16
40 |
41 |
42 |
43 | 产品库存信息
44 |
45 |
46 |
47 | -
48 |
49 |
50 | Qt::Horizontal
51 |
52 |
53 |
54 | 40
55 | 20
56 |
57 |
58 |
59 |
60 | -
61 |
62 |
63 |
64 | 75
65 | 23
66 |
67 |
68 |
69 |
70 | 75
71 | 23
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 | 730
100 | 100
101 |
102 |
103 |
104 | QFrame::StyledPanel
105 |
106 |
107 | QFrame::Plain
108 |
109 |
110 |
111 |
112 | 7
113 | 11
114 | 711
115 | 81
116 |
117 |
118 |
119 |
-
120 |
121 |
-
122 |
123 |
124 |
125 | 0
126 | 0
127 |
128 |
129 |
130 |
131 | 16777215
132 | 16777215
133 |
134 |
135 |
136 | 产品编号
137 |
138 |
139 |
140 | -
141 |
142 |
143 |
144 | 0
145 | 0
146 |
147 |
148 |
149 |
150 | 16777215
151 | 16777215
152 |
153 |
154 |
155 |
156 | -
157 |
158 |
159 |
160 | 0
161 | 0
162 |
163 |
164 |
165 |
166 | 16777215
167 | 16777215
168 |
169 |
170 |
171 | 产品名称
172 |
173 |
174 |
175 | -
176 |
177 |
178 |
179 | 16777215
180 | 16777215
181 |
182 |
183 |
184 |
185 | -
186 |
187 |
188 |
189 | 0
190 | 0
191 |
192 |
193 |
194 |
195 | 16777215
196 | 16777215
197 |
198 |
199 |
200 | 所属类别
201 |
202 |
203 |
204 | -
205 |
206 |
207 |
208 | 0
209 | 0
210 |
211 |
212 |
213 |
214 | 16777215
215 | 16777215
216 |
217 |
218 |
-
219 |
220 |
221 |
222 |
223 | -
224 |
225 | 家电
226 |
227 |
228 | -
229 |
230 | 数码
231 |
232 |
233 | -
234 |
235 | 家具
236 |
237 |
238 | -
239 |
240 | 服饰
241 |
242 |
243 | -
244 |
245 | 食品
246 |
247 |
248 |
249 |
250 | -
251 |
252 |
253 |
254 | 0
255 | 0
256 |
257 |
258 |
259 |
260 | 16777215
261 | 16777215
262 |
263 |
264 |
265 | 产地
266 |
267 |
268 |
269 | -
270 |
271 |
272 |
273 | 0
274 | 0
275 |
276 |
277 |
278 |
279 | 16777215
280 | 16777215
281 |
282 |
283 |
-
284 |
285 |
286 |
287 |
288 | -
289 |
290 | 北京
291 |
292 |
293 | -
294 |
295 | 上海
296 |
297 |
298 | -
299 |
300 | 浙江
301 |
302 |
303 | -
304 |
305 | 安徽
306 |
307 |
308 | -
309 |
310 | 广州
311 |
312 |
313 | -
314 |
315 | 深圳
316 |
317 |
318 | -
319 |
320 | 重庆
321 |
322 |
323 |
324 |
325 |
326 |
327 | -
328 |
329 |
-
330 |
331 |
332 | 产品数量
333 |
334 |
335 |
336 | -
337 |
338 |
339 | -
340 |
341 |
342 |
343 | 0
344 | 0
345 |
346 |
347 |
348 |
349 | 16777215
350 | 16777215
351 |
352 |
353 |
354 | 制造商
355 |
356 |
357 |
358 | -
359 |
360 |
361 |
362 | 0
363 | 0
364 |
365 |
366 |
367 |
368 | 16777215
369 | 16777215
370 |
371 |
372 |
373 |
374 | -
375 |
376 |
377 | Qt::Horizontal
378 |
379 |
380 |
381 | 40
382 | 20
383 |
384 |
385 |
386 |
387 | -
388 |
389 |
390 |
391 | 0
392 | 0
393 |
394 |
395 |
396 |
397 | 16777215
398 | 16777215
399 |
400 |
401 |
402 | 查询
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 | -
413 |
414 |
415 |
416 | 0
417 | 0
418 |
419 |
420 |
421 | QAbstractItemView::NoEditTriggers
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
--------------------------------------------------------------------------------
/ProductInventoryMS/userpage.cpp:
--------------------------------------------------------------------------------
1 | #include "userpage.h"
2 | #include "ui_userpage.h"
3 |
4 | UserPage::UserPage(QWidget *parent) :
5 | QWidget(parent),
6 | ui(new Ui::UserPage)
7 | {
8 | ui->setupUi(this);
9 | creatUserPage();
10 | }
11 |
12 | UserPage::~UserPage()
13 | {
14 | delete ui;
15 | }
16 |
17 | void UserPage::creatUserPage()
18 | {
19 | //连接槽函数
20 | connect(ui->searchButton,&QPushButton::clicked,this,&UserPage::searchUserData);
21 |
22 | UserModel = new QSqlTableModel;
23 | UserModel->setTable("Manager");//选择数据表
24 | UserModel->setEditStrategy(QSqlTableModel::OnManualSubmit);//设置保存策略为手动提交
25 | UserModel->setHeaderData(0,Qt::Horizontal, "用户序号");
26 | UserModel->setHeaderData(1,Qt::Horizontal, "用户名");
27 | UserModel->setHeaderData(2,Qt::Horizontal, "账号");
28 | UserModel->setHeaderData(3,Qt::Horizontal, "密码");
29 | UserModel->setHeaderData(4,Qt::Horizontal, "职位");
30 | UserModel->select();
31 |
32 | ui->tableView->setModel(UserModel);
33 | ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);//使其不可编辑
34 |
35 | }
36 |
37 | //查询数据
38 | void UserPage::searchUserData()
39 | {
40 | QString id = QString("Mno = '%1'").arg(ui->idEdit->text());
41 | QString name = QString("Mname = '%1'").arg(ui->nameEdit->text());
42 | QString account = QString("Maccount = '%1'").arg(ui->accountEdit->text());
43 | QString role = QString("Mrole = '%1'").arg(ui->roleEdit->text());
44 | QString filterStr = "";
45 | if(!ui->idEdit->text().isEmpty())
46 | filterStr.append(id);
47 | if(!ui->nameEdit->text().isEmpty())
48 | {
49 | if(!filterStr.isEmpty())
50 | filterStr.append(" and ");
51 | filterStr.append(name);
52 | }
53 | if(!ui->accountEdit->text().isEmpty())
54 | {
55 | if(!filterStr.isEmpty())
56 | filterStr.append(" and ");
57 | filterStr.append(account);
58 | }
59 | if(!ui->roleEdit->text().isEmpty())
60 | {
61 | if(!filterStr.isEmpty())
62 | filterStr.append(" and ");
63 | filterStr.append(role);
64 | }
65 |
66 |
67 | UserModel->setFilter(filterStr);
68 | UserModel->select();
69 | }
70 |
--------------------------------------------------------------------------------
/ProductInventoryMS/userpage.h:
--------------------------------------------------------------------------------
1 | #ifndef USERPAGE_H
2 | #define USERPAGE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "sqlserver.h"
9 |
10 | namespace Ui {
11 | class UserPage;
12 | }
13 |
14 | class UserPage : public QWidget
15 | {
16 | Q_OBJECT
17 |
18 | public:
19 | explicit UserPage(QWidget *parent = nullptr);
20 | ~UserPage();
21 | void creatUserPage();
22 | void searchUserData();
23 |
24 | private:
25 | Ui::UserPage *ui;
26 | QSqlTableModel* UserModel;
27 | SqlServer *mysql;
28 | SqlServer *sql;
29 | };
30 |
31 | #endif // USERPAGE_H
32 |
--------------------------------------------------------------------------------
/ProductInventoryMS/userpage.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | UserPage
4 |
5 |
6 |
7 | 0
8 | 0
9 | 765
10 | 578
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 20
20 | 20
21 | 732
22 | 511
23 |
24 |
25 |
26 | -
27 |
28 |
-
29 |
30 |
31 |
32 | 618
33 | 16777215
34 |
35 |
36 |
37 |
38 | Agency FB
39 | 16
40 |
41 |
42 |
43 | 用户信息
44 |
45 |
46 |
47 | -
48 |
49 |
50 | Qt::Horizontal
51 |
52 |
53 |
54 | 40
55 | 20
56 |
57 |
58 |
59 |
60 |
61 |
62 | -
63 |
64 |
65 |
66 | 730
67 | 100
68 |
69 |
70 |
71 | QFrame::StyledPanel
72 |
73 |
74 | QFrame::Plain
75 |
76 |
77 |
78 |
79 | 7
80 | 11
81 | 711
82 | 81
83 |
84 |
85 |
86 |
-
87 |
88 |
-
89 |
90 |
91 |
92 | 0
93 | 0
94 |
95 |
96 |
97 |
98 | 16777215
99 | 16777215
100 |
101 |
102 |
103 | 用户序号
104 |
105 |
106 |
107 | -
108 |
109 |
110 |
111 | 0
112 | 0
113 |
114 |
115 |
116 |
117 | 16777215
118 | 16777215
119 |
120 |
121 |
122 |
123 | -
124 |
125 |
126 |
127 | 0
128 | 0
129 |
130 |
131 |
132 |
133 | 16777215
134 | 16777215
135 |
136 |
137 |
138 | 用户名
139 |
140 |
141 |
142 | -
143 |
144 |
145 |
146 | 16777215
147 | 16777215
148 |
149 |
150 |
151 |
152 | -
153 |
154 |
155 |
156 | 0
157 | 0
158 |
159 |
160 |
161 |
162 | 16777215
163 | 16777215
164 |
165 |
166 |
167 | 账号
168 |
169 |
170 |
171 | -
172 |
173 |
174 | -
175 |
176 |
177 |
178 | 0
179 | 0
180 |
181 |
182 |
183 |
184 | 16777215
185 | 16777215
186 |
187 |
188 |
189 | 职位
190 |
191 |
192 |
193 | -
194 |
195 |
196 |
197 |
198 | -
199 |
200 |
-
201 |
202 |
203 |
204 |
205 |
206 |
207 | -
208 |
209 |
210 | Qt::Horizontal
211 |
212 |
213 |
214 | 40
215 | 20
216 |
217 |
218 |
219 |
220 | -
221 |
222 |
223 |
224 | 0
225 | 0
226 |
227 |
228 |
229 |
230 | 16777215
231 | 16777215
232 |
233 |
234 |
235 | 查询
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 | -
246 |
247 |
248 |
249 | 0
250 | 0
251 |
252 |
253 |
254 | QAbstractItemView::NoEditTriggers
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ProductInventoryMS
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 |
--------------------------------------------------------------------------------
/img.assets/001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/001.png
--------------------------------------------------------------------------------
/img.assets/002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/002.png
--------------------------------------------------------------------------------
/img.assets/003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/003.png
--------------------------------------------------------------------------------
/img.assets/004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/004.png
--------------------------------------------------------------------------------
/img.assets/005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/005.png
--------------------------------------------------------------------------------
/img.assets/006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/006.png
--------------------------------------------------------------------------------
/img.assets/007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/007.png
--------------------------------------------------------------------------------
/img.assets/008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/008.png
--------------------------------------------------------------------------------
/img.assets/009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/009.png
--------------------------------------------------------------------------------
/img.assets/010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/010.png
--------------------------------------------------------------------------------
/img.assets/011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/011.png
--------------------------------------------------------------------------------
/img.assets/012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shy117/ProductInventoryMS/5bf5cf0e2eec75a0479f51b09a4828562c2cda69/img.assets/012.png
--------------------------------------------------------------------------------