![c++編寫倉庫管理系統(tǒng)_第1頁](http://file1.renrendoc.com/fileroot_temp2/2020-10/8/ba602f50-6c2b-4577-a16a-e158b6c142b5/ba602f50-6c2b-4577-a16a-e158b6c142b51.gif)
![c++編寫倉庫管理系統(tǒng)_第2頁](http://file1.renrendoc.com/fileroot_temp2/2020-10/8/ba602f50-6c2b-4577-a16a-e158b6c142b5/ba602f50-6c2b-4577-a16a-e158b6c142b52.gif)
![c++編寫倉庫管理系統(tǒng)_第3頁](http://file1.renrendoc.com/fileroot_temp2/2020-10/8/ba602f50-6c2b-4577-a16a-e158b6c142b5/ba602f50-6c2b-4577-a16a-e158b6c142b53.gif)
![c++編寫倉庫管理系統(tǒng)_第4頁](http://file1.renrendoc.com/fileroot_temp2/2020-10/8/ba602f50-6c2b-4577-a16a-e158b6c142b5/ba602f50-6c2b-4577-a16a-e158b6c142b54.gif)
![c++編寫倉庫管理系統(tǒng)_第5頁](http://file1.renrendoc.com/fileroot_temp2/2020-10/8/ba602f50-6c2b-4577-a16a-e158b6c142b5/ba602f50-6c2b-4577-a16a-e158b6c142b55.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、C+編寫倉庫管理系統(tǒng)/functions.h#include #include #include #include #include #include using namespace std;void denglu();void choice();void zhuce();char first_face();void in_storage();void select_time();void out_storage();void select_ele();void select_name();void select_kind();void select_all();void call();voi
2、d denglu() string username1,passport1,name1;string username,passport;ifstream storeFile(userdate.txt);if(!storeFile)coutnnt對不起,用戶文件丟失。nnt;system(pause);return; cout用戶登錄:endl;coutusername; coutpassport;bool flag=false;while(storeFileusername1passport1name1)if(username1=username&passport1=passport)fla
3、g=true; system(cls);cout登錄成功!endl;cout歡迎您,name1_endl;system(pause);else if(username1=username|passport1=passport)cout用戶名或密碼錯誤!endl;denglu();storeFile.close();call();choice();void choice()char a;a=first_face(); while(1) switch(a) case 1:in_storage();break; case 2:out_storage();break; case 3:select_el
4、e();break; case 4:system(cls);coutt謝謝您的使用!nntt; exit(0); break; default:break; char first_face()system(cls);/系統(tǒng)清屏cout=endl;cout* *endl;cout* 倉 庫 管 理 系 統(tǒng) *endl;cout* *endl;cout* 1. 商品入庫 *endl;cout* *endl;cout* 2. 商品出庫 *endl;cout* *endl;cout* 3. 商品查詢 *endl;cout* *endl;cout* 4. 退出系統(tǒng) *endl;cout* *endl;c
5、out=endl;return getch();/入庫void in_storage()system(cls);/系統(tǒng)清屏string name;/商品名double price;/價格string storeNo;/倉庫編號string kinds;/商品大類string shelfNo;/貨架號long count=0;/商品數(shù)量string time;/入庫時間coutn;cout商品入庫,請輸入相關(guān)信息:;coutendlname;coutendlprice;coutendlcount;coutendlstoreNo;coutendlkinds;coutendlshelfNo;cout
6、endltime;ofstream storeFile(store.txt, ios:app);storeFilesetiosflags(ios:left)setw(20)name setw(15)price setw(10)count setw(10) storeNo setw(20)kinds shelfNo setw(20)timeendl;storeFile.close();coutnnt該商品已經(jīng)入庫nnt;cout是否繼續(xù)?1.是 2.否a;if(a=1)in_storage();if(a=2)first_face();choice();system(pause);/系統(tǒng)暫停/ 出
7、庫void out_storage()system(cls);/系統(tǒng)清屏string name;/商品名coutendlt商品出庫,輸入出庫商品信息:endl;coutname;ifstream storeFile(store.txt);if(!storeFile)ofstream storeFile1(store.txt);storeFile1.close();coutnnt庫存為空nnt; cout是否繼續(xù)?1.是 2.否a; if(a=1)in_storage(); else if(a=2)first_face();choice();bool flag=false;string name
8、1;/商品名double price1;/價格string storeNo1;/倉庫編號string kinds1;/商品大類string shelfNo1;/貨架號long count1=0;/商品數(shù)量ofstream tempFile(temp.txt);while(storeFilename1price1count1storeNo1kinds1shelfNo1)if(name1=name)flag=true;elsetempFilesetiosflags(ios:left)setw(20)name1 setw(15)price1 setw(10)count1 setw(10)storeN
9、o1 setw(20)kinds1 shelfNo1endl;tempFile.close();storeFile.close();if(!flag)coutnnt倉庫中沒有該商品!nnt;system(pause);return;ofstream storeFile1(store.txt);ifstream tempFile1(temp.txt);storeFile1tempFile1.rdbuf();storeFile1.close();tempFile1.close();coutnt這些商品已經(jīng)出庫,請仔細檢查!nnt;cout是否繼續(xù)?1.是 2.否a;if(a=1)out_stora
10、ge();if(a=2)first_face();choice();system(pause);/查詢void select_ele()while (1)system(cls);coutnendl;coutt=endltendlt 商 品 查 詢endltendlt1. 按商品名稱查詢endltendlt2. 按入庫時間查詢endltendlt3. 查看所有商品endltendlt4. 按商品大類查詢endltendlt5. 返回endltendlt=endl;coutntt;char select=getch();switch(select) case 1:select_name();bre
11、ak; case 2:select_time();break;case 3:select_all();break;case 4:select_kind();break; case 5:first_face();choice();break; default:break;/按商品名稱查詢void select_name()system(cls);coutendlt按商品名查詢:endl;coutname;string name1;/商品名string time1;double price1;/價格string storeNo1;/倉庫編號string kinds1;/商品大類string she
12、lfNo1;/貨架號long count1=0;/商品數(shù)量ifstream storeFile(store.txt);if(!storeFile)coutnnt對不起,你的庫存為空nnt;system(pause);return;bool flag=false;coutn商品名 價格 商品數(shù)量 倉庫編號 商品大類 貨架號 入庫時間name1price1count1storeNo1kinds1shelfNo1time1)if(name1=name)flag=true;coutsetiosflags(ios:left) name1 price1 count1 storeNo1 kinds1 she
13、lfNo1 time1endl;storeFile.close();if(!flag)coutnn對不起,庫存中沒有這個商品;coutnendl;system(pause);void select_time()/按入庫時間查詢system(cls);coutnt按入庫時間查詢:endl ;couttime;string name1;/商品名double price1;/價格string storeNo1;/倉庫編號string kinds1;/商品大類string shelfNo1;/貨架號string time1;long count1=0;/商品數(shù)量ifstream storeFile(s
14、tore.txt);if(!storeFile)coutnnt對不起,你的庫存為空nnt;system(pause);return;bool flag=false;coutn商品名 setw(15)價格 setw(10)商品數(shù)量 setw(10)倉庫編號 setw(10)商品大類 setw(15)貨架號nname1price1count1storeNo1kinds1shelfNo1time1)if (time1=time)flag=true;coutsetiosflags(ios:left)setw(15)name1 setw(10)price1 setw(10)count1 setw(10)
15、storeNo1 setw(15)kinds1 shelfNo1endl;storeFile.close();if(!flag)coutnn對不起,倉庫中沒有這類商品!; coutnendl;system(pause);void select_all()/查看所有商品system(cls);string name1;/商品名string time1;/入庫時間double price1;/價格string storeNo1;/倉庫編號string kinds1;/商品大類string shelfNo1;/貨架號long count1=0;/商品數(shù)量ifstream storeFile(stor
16、e.txt);if(!storeFile)coutnnt對不起,你的庫存為空nnt;system(pause);return;bool flag=false;coutn商品名 價格 商品數(shù)量 倉庫編號 商品大類 貨架號 入庫時間name1price1count1storeNo1kinds1shelfNo1time1)flag=true;coutsetiosflags(ios:left) name1 price1 count1 storeNo1 kinds1 shelfNo1 time1endl;storeFile.close();system(pause);/按大類查詢void select_
17、kind()system(cls);coutnt按商品大類查詢:endl ;coutkinds;string name1;/商品名double price1;/價格string storeNo1;/倉庫編號string kinds1;/商品大類string shelfNo1;/貨架號string time1;/入庫時間long count1=0;/商品數(shù)量ifstream storeFile(store.txt);if(!storeFile)coutnnt對不起,你的庫存為空nnt;system(pause);return;bool flag=false;coutn商品名 價格 商品數(shù)量 倉庫
18、編號 商品大類 貨架號 入庫時間name1price1count1storeNo1kinds1shelfNo1time1)if (kinds1=kinds)flag=true;coutsetiosflags(ios:left)setw(15)name1 setw(10)price1 setw(10)count1 setw(10)storeNo1 setw(15)kinds1 shelfNo1 setw(15)time1endl;storeFile.close();if(!flag)coutnn對不起,庫存中沒有這類商品;coutnendl;system(pause);void zhuce()s
19、ystem(cls);/系統(tǒng)清屏string username,passport,passport1,name,miyao,jiami; coutusername;coutpassport; coutpassport1;if(passport=passport1)coutname; else if(passport!=passport1)cout兩次輸入的密碼不一致,請重新輸入!endl;while(passport!=passport1)coutpassport; coutpassport1;coutname;ofstream storeFile(userdate.txt, ios:app);storeFilesetiosflags(ios:left)setw(15)username setw(15)passport setw(10)nameendl;storeFile.close();system(cls);cout賬戶創(chuàng)建成功!歡迎您,nameendl;system(pause);system(cls);first_face();choice();void call()/提醒功能system(cls);ifstream storeFile(s
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公司在職員工培訓(xùn)服務(wù)合同書
- 礦山企業(yè)安全生產(chǎn)許可證頒發(fā)與管理作業(yè)指導(dǎo)書
- 反擔(dān)保合同協(xié)議1
- 游戲美術(shù)設(shè)計制作實戰(zhàn)手冊作業(yè)指導(dǎo)書
- 針紡織品銷售購銷合同
- 小學(xué)二年級數(shù)學(xué)上冊口算
- 2025年紹興a2貨運從業(yè)資格證模擬考試題
- 2024-2025學(xué)年高中語文專題一小說家想說些什么第1課在酒樓上學(xué)案蘇教版選修短篇小說蚜
- 七年級班級工作總結(jié)
- 四年級第一學(xué)期德育工作計劃
- C語言程序設(shè)計 教案
- 2025年牛津譯林版英語七年級下冊全冊單元重點知識點與語法匯編
- 《小學(xué)作文指導(dǎo)》課件
- 小學(xué)六年級數(shù)學(xué)方程應(yīng)用題100道及答案解析
- 2025新譯林版英語七年級下單詞表
- 海洋工程設(shè)備保溫保冷方案
- 主干光纜、支線光纜線路中斷應(yīng)急預(yù)案
- 跨學(xué)科主題學(xué)習(xí)的思考與策略
- 文藝演出排練指導(dǎo)服務(wù)合同
- 醫(yī)院消防安全培訓(xùn)課件(完美版)
- 行政法-9行政確認
評論
0/150
提交評論