當前位置:首頁 » 操作系統 » 直銷管理系統源碼

直銷管理系統源碼

發布時間: 2022-04-19 05:00:48

㈠ C++商場銷售管理系統 源代碼

/*************************************************
問題補充:設計一個收銀台結算程序:貨品的信息有貨品代碼、
貨品名稱、貨品價格、貨品數量等,該程序能根據貨品的輸入代碼
統計貨品價格,對多個貨品能做價格的累加統計並顯示清單,
另具有找零功能。
需求:
1、實現對貨品信息的輸入和查詢。
2、能根據貨品的輸入代碼統計貨品價格。
3、能對十個貨品的價格統計並顯示清單。
4、具有找零功能!
*************************************************/
//為了順便練習一下使用鏈表結構,所以用鏈表結構實現。
// -----By kuaidh00--------2008/01/08-------------
//****************************************************
#include <iostream>
#include <string>
#include <iomanip>
#include <stdio.h>

using namespace std;

struct Sale
{
//數據域。
string m_code;
string m_name;
float m_price;
unsigned int m_quantity;
//指針域。
struct Sale* next;
};

typedef struct Sale Node;//取外別名,Node.
typedef Node* Link;//取個別名,Link.

//創建鏈表。
Link Create(Link Head)
{
//-----初始化頭節點 Head-------
Head=(Link)new Node;//每次動態分配一個Node內存大小。
Head->m_code="";
Head->m_name="";
Head->m_price=0.0;
Head->m_quantity=0;
Head->next=NULL;

//-----
Link ptr;//定義一個用來運算的指針 ptr。
ptr=Head;//指到首節點。
Link DNode;//定義數據節點,用來存放數據。
char GoOn;
do
{
cout<<"商品信息錄入! "<<endl;
string code,name;
float price;
unsigned int quantity;
cout<<"輸入代碼:"<<endl;
cin>>code;
cout<<"輸入名稱:"<<endl;
cin>>name;
cout<<"輸入價格:"<<endl;
cin>>price;
while(cin.fail())
{
cout<<"請輸入正確的格式:"<<endl;
cin.clear();
fflush(stdin);
cin>>price;
}
cout<<"輸入數量:"<<endl;
cin>>quantity;
while(cin.fail())
{
cout<<"請輸入正確的格式:"<<endl;
cin.clear();
fflush(stdin);
cin>>quantity;
}
//----數據域-----
DNode=(Link)new Node;//每次動態分配一個Node內存大小。
DNode->m_code=code;
DNode->m_name=name;
DNode->m_price=price;
DNode->m_quantity=quantity;
//----指針域-----
DNode->next=NULL;//作為尾節點加入。
ptr->next=DNode;//鏈入鏈表中。
ptr=DNode;//使新節點成為下一次的前驅。
cout<<"商品信息錄入成功! 是否繼續錄入?(Y/N) ";
cin>>GoOn;

}while(GoOn=='Y'||GoOn=='y');
return Head;
}

//釋放鏈表。
void Release(Link Head)
{
Link ptr;
while(Head!=NULL)
{
ptr=Head;
Head=Head->next;
delete ptr;
}
}

//查詢。
Link Search(Link Head,string& code)
{
Link ptr;
//Link front;
ptr=Head;//定義一個用於操作的指針ptr。
//ptr=fornt->next;
while(ptr!=NULL)
{
if(ptr->m_code==code)
return ptr;
else
ptr=ptr->next;
}
cout<<"無此商品!"<<endl;
return ptr;//此時的ptr為NULL了。
}

//列印鏈表。
void Display(Link Head)
{
Link ptr;
ptr=Head->next;//,不要頭節點,只輸出數據節點。
cout<<"==========================================================="<<endl;
cout<<"===============所有商品信息清單============================"<<endl;
cout<<"==========================================================="<<endl;
cout<<"貨品代碼=======貨品名稱======貨品價格======貨品數量===="<<endl;
while(ptr!=NULL)
{
cout<<setw(15)<<left<<ptr->m_code
<<setw(15)<<left<<ptr->m_name
<<setw(15)<<left<<ptr->m_price
<<setw(15)<<left<<ptr->m_quantity<<endl;
ptr=ptr->next;
}
}
void Display_One(Link Head,string& code,unsigned quantity)
{
Link ptr;
ptr=Search(Head,code);//,不要頭節點,只輸出數據節點。
cout<<"貨品代碼=======貨品名稱======貨品價格======貨品數量======小計(元)===="<<endl;
cout<<setw(15)<<left<<ptr->m_code
<<setw(15)<<left<<ptr->m_name
<<setw(15)<<left<<ptr->m_price
<<setw(15)<<left<<quantity
<<setw(15)<<left<<quantity*ptr->m_price<<endl;

}

//單個商品小結。
float CheckOut(Link Head,string& code,unsigned quantity)
{
Link ptr;
float sum(0);
ptr=Search(Head,code);
sum=(ptr->m_price*quantity);
return sum;
}

//總結帳。
void Total(Link Head)
{
Link ptr;
ptr=Head;
float sum(0);
float factly;
char GoOn;
while(1)
{
cout<<"要結束商品買入請按\'N\',其它任意鍵表示繼續買入! "<<endl;
cin>>GoOn;
if(GoOn=='N'||GoOn=='n')
break;
else
{
string code;
unsigned int quantity;
cout<<"輸入要購買的商品代碼:"<<endl;
cin>>code;
cout<<"輸入要購買的數量:"<<endl;
cin>>quantity;
sum+=CheckOut(ptr,code,quantity);
cout<<"你購買的商品為:"<<endl;
Display_One(ptr,code,quantity);
}
}
cout<<"----------------------------------------------------"<<endl;
cout<<"你應該付 "<<sum<<"元!"<<endl;
cout<<"你實際付(元): ";
cin>>factly;
cout<<"應該找回你 "<<factly-sum<<"元!"<<endl;//找零。
}

int main()
{
//---------菜單選項----------------
Link Head=NULL;
//Head=Create(Head);

int loop=1;
while(loop)
{
cout<<"***************************************************"<<endl;
cout<<"*---------------------菜單選項--------------------*"<<endl;
cout<<"*-------------------------------------------------*"<<endl;
cout<<"* 1.輸入數據 2.買入商品 3.顯示數據 0.退出系統 *"<<endl;
cout<<"***************************************************"<<endl;
int menu;
cin>>menu;
if(cin.fail())
{
cout<<"請按菜單對應的數字選擇合適的操作,謝謝合作!"<<endl;
cin.clear();
fflush(stdin);
cin>>menu;
}
switch(menu)
{
case 0:
cout<<"已退出系統!"<<endl;
loop=0;
break;
case 1:
Head=Create(Head);
break;
case 2:
Total(Head);
break;
case 3:
Display(Head);
break;
}//switch(menu)
}//while(loop)

//Display(Head);
//Total(Head);
Release(Head);
return 0;
}

㈡ 商場電器銷售管理系統 c++源代碼

汗!

分太低了!

㈢ 求一份很簡單的進銷存管理系統的源碼,重謝100分,決不食言!

為何事先不給分,本身就沒有誠意。

㈣ 醫葯銷售管理系統源代碼

不可能得到 現在比較普遍的時空軟體 一個站點要4000多塊 醫葯公司一整套要幾萬 是不可能免費獲取的

㈤ 百川直銷會員管理系統源碼

源碼一般都是不會給你的, 微卡通會員管理軟體

㈥ 有沒有朋友能夠提供類似直銷的網路會員管理系統的源碼

呵呵~~想賺錢也不能這樣啊

㈦ 求java基於c/s的銷售管理系統源碼

c/s
還用java啊?找個學生管理系統改改就行了,功能不會太復雜吧。
博客管理系統還是比較少用java而且還是c/s模式開發的。
你是學生?或自己下個netbeans
ide
自己拉幾個控制項做做頁面也很快就出來了。

㈧ 國家商務直銷管理系統官網

國家商務直銷管理系統官網是國家商務直銷

㈨ 求C++商品銷售管理系統 程序源代碼,要求見下面。謝謝了先。急用。

能不能也給我。也急用呢。謝謝

㈩ 求一個基於JSP手機銷售管理系統源碼,資料庫最好是Mysql的!

手機銷售管理系統
手機信息查看 購物車 後台數據統計
資料庫 mysql

熱點內容
navicat導入sql失敗 發布:2024-09-30 17:09:29 瀏覽:313
醫院用電腦要什麼配置 發布:2024-09-30 17:08:51 瀏覽:569
vs怎麼與資料庫連接 發布:2024-09-30 17:08:47 瀏覽:167
如何在虛擬機里運行腳本 發布:2024-09-30 16:54:34 瀏覽:627
安卓錄屏怎麼錄內置聲音不錄屏 發布:2024-09-30 16:33:56 瀏覽:869
瑞薩編譯軟體安裝時顯示找不到 發布:2024-09-30 16:29:32 瀏覽:727
c語言怎麼用編譯器列印邊框 發布:2024-09-30 16:28:04 瀏覽:975
圖論演算法的應用 發布:2024-09-30 15:50:34 瀏覽:944
道家演算法 發布:2024-09-30 15:46:53 瀏覽:310
優酷下載電影存儲 發布:2024-09-30 15:44:18 瀏覽:695