c++编写仓库管理系统Word文档下载推荐.docx
- 文档编号:19763393
- 上传时间:2023-01-09
- 格式:DOCX
- 页数:15
- 大小:41.56KB
c++编写仓库管理系统Word文档下载推荐.docx
《c++编写仓库管理系统Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《c++编写仓库管理系统Word文档下载推荐.docx(15页珍藏版)》请在冰豆网上搜索。
cout<
<
"
\n\n\t对不起,用户文件丢失。
。
。
\n\n\t"
;
system("
pause"
return;
}
用户登录:
"
endl;
cout<
请输入用户名:
cin>
>
username;
请输入密码:
passport;
boolflag=false;
while(storeFile>
username1>
passport1>
name1){
if(username1==username&
&
passport1==passport){
flag=true;
system("
cls"
登录成功!
欢迎您,"
name1<
A_A"
elseif(username1==username||passport1==passport){
用户名或密码错误!
denglu();
}}
storeFile.close();
call();
choice();
voidchoice()
chara;
a=first_face();
while
(1){switch(a){
case'
1'
:
in_storage();
break;
2'
out_storage();
3'
select_ele();
4'
\t谢谢您的使用!
\n\n\t\t"
exit(0);
default:
charfirst_face()
//系统清屏
===
======"
*
*"
仓库
管理系统
1.
商品入库
2.
商品出库
3.
商品查询
4.
退出系统
=="
*cout<
=====returngetch();
//入库
voidin_storage()
//系统清屏stringname;
//商品名doubleprice;
//价格stringstoreNo;
//仓库编号stringkinds;
//商品大类stringshelfNo;
//货架号longcount=0;
//商品数量stringtime;
//入库时间
\n"
商品入库,请输入相关信息:
ofstreamstoreFile("
store.txt"
ios:
app);
storeFile<
setiosflags(ios:
left)<
setw(20)<
name<
setw(15)<
price<
setw(10)<
count<
<
storeNo<
kinds<
shelfNo<
time<
\n\n\t该商品已经入库\n\n\t"
是否继续?
1•是2•否"
endl;
inta;
cin>
a;
if(a==1){in_storage();
if(a==2){
first_face();
choice();
//系统暂停
//出库
voidout_storage()
stringname;
//商品名
endl<
\t商品出库,输入出库商品信息:
\n\t商品名称:
name;
ofstreamstoreFile1("
storeFile1.close();
\n\n\t库存为空……\n\n\t"
elseif(a==2){
boolflag=false;
stringname1;
doubleprice1;
//价格
stringstoreNo1;
//仓库编号
stringkinds1;
//商品大类
stringshelfNo1;
//货架号
longcount1=0;
//商品数量
ofstreamtempFile("
temp.txt"
name1>
price1>
count1>
storeNo1>
kinds1>
shelfNo1){
if(name1==name)
else
tempFile<
price1<
count1<
storeNo1<
kinds1<
shelfNo1<
tempFile.close();
flag)
\n\n\t仓库中没有该商品!
ifstreamtempFile1("
storeFile1<
tempFile1.rdbuf();
tempFile1.close();
\n\t这些商品已经出库,请仔细检查!
if(a==1){out_storage();
//查询
voidselect_ele()
while
(1)
\t===========================
\t"
endl
\t商品查询"
\t1.按商品名称查询"
\t2.按入库时间查询"
endl<
\t3.查看所有商品"
!
\n\n\t"
\t4.按商品大类查询"
\t5.返回"
\t================================="
\n\t\t"
charselect=getch();
switch(select)
select_name();
select_time();
select_all();
select_kind();
5'
//按商品名称查询
voidselect_name()
\t按商品名查询:
\n\t输入商品名:
stringtime1;
doubleprice1;
//价格stringstoreNo1;
//仓库编号stringkinds1;
//商品大类stringshelfNo1;
//货架号longcount1=0;
//商品数量ifstreamstoreFile("
\n\n\t对不起,你的库存为空\n\n\t"
\n商品名"
价格"
商品数量"
仓库编号"
商品大类"
货架号"
入库时间"
while(storeFile>
shelfNo1>
time1){
time1<
\n\n对不起,库存中没有这个商品”;
);
voidselect_time()//按入库时间查询
\n\t按入库时间查询:
endl;
\n\t输入入库时间(例如:
2014.01.01):
;
stringtime;
time;
stringname1;
doubleprice1;
stringstoreNo1;
stringkinds1;
stringshelfNo1;
stringtime1;
longcount1=0;
价格"
仓库编号"
货架号\n"
while(storeFile>
time1)
if(time1==time)
\n\n对不起,仓库中没有这类商品!
voidselect_all()//查看所有商品
//按大类查询
voidselect_kind()
\n\t按商品大类查询:
endl;
\n\t输入大类名:
stringkinds;
kinds;
货架号"
if(kinds1==kinds)
\n\n对不起,库存中没有这类商品"
voidzhuce()
stringusername,passport,passport1,name,miyao,jiami;
请再次输入密码:
passport1;
if(passport==passport1){
请输入您的姓名:
elseif(passport!
=passport1){
两次输入的密码不一致,请重新输入!
while(passport!
=passport1)
storeFile<
username<
passport<
账户创建成功!
欢迎您,"
voidcall()//提醒功能
longcount=50;
来自仓库的消息!
======================================"
if(count1<
count||count1==count)
库存不足,请及时补充!
:
_<
}cout<
storeFile.close();
//主函数
#include"
functions.h"
intmain()
intnum1;
欢迎使用仓库管理系统"
请选择操作!
1.登录2.注册3.退出"
Technicalsupport:
@njupt-zyh"
num1;
if(num1==1){denglu();
elseif(num1==3){exit
(1);
if(num1==2){
zhuce();
}charfirst_face();
return0;
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- c+ 编写 仓库 管理 系统