ImageVerifierCode 换一换
格式:DOC , 页数:21 ,大小:196.50KB ,
资源ID:4337184      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/4337184.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(仓库管理系统(c语言).doc)为本站上传会员【天****】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

仓库管理系统(c语言).doc

1、 作品名称 开发者: 一、 系统背景: 本软件能减轻对货物数目管理及价格盈亏等信息处理的工作量以便能快捷及时准确的调整货物的仓储量达到最合理化。可以使店主不失效率的节省大量精力用于其他方面 符合当今社会的商业形式而且本软件体积小操作简单是管理仓库的不二选择 二、 系统简介: 设计亮点: ◆三级菜单使操作更简便明了 ◆密码操作能有效保证客户信息的安全性 ◆独特的dos命令调用使信息存储的实体属性为隐藏且无扩展名大大增大了安全系数 ◆数据结构为链表摆脱了数据数量的限制 ◆提供三种查看模式并会标出排名 ◆退出店主模式时会提示是否保存若选择yes着进行保存操作 基本功能:

2、·在员工模式下可输入卖出货物的名称和数目程序自动在后台进行一系列的操作 ·新建数据并同时对其处理 ·修改数据 ·插入数据 ·删除数据 ·查找数据 ·查看数据 ·数据存档 ·修改密码 三、 系统结构图 #define LEN sizeof(struct shop) #include #include #include #include struct shop { char name[30]; float price_in; float price_out; in

3、t num_in; int num_now; int num_sold; float win; float percent; struct shop *next; }; int n=0; void main(void) { void auto1(struct shop **h_p); int menu1(struct shop **h_p); void print1(void); void assistant(struct shop *head); int password(void); int menu2(struct shop **h_p); void pr

4、int2(void); void creat(struct shop **h_p); void rewrite(struct shop **h_p); void insert(struct shop **h_p); void deleat(struct shop **h_p); void search(struct shop **h_p); void printall(struct shop **h_p); void save(struct shop *head); void password_set(void); int password_exi(struct shop *

5、h_p); int data_exi(struct shop **h_p); void load(struct shop **h_p); void save(struct shop *head); struct shop *addbuild(struct shop **h_p); void sort0(struct shop **h_p); int search1(struct shop **h_p,char a[30]); void sort1(struct shop **h_p); void sort2(struct shop **h_p); void sort3(st

6、ruct shop **h_p); void print3(void); void password_create(void); struct shop *addbuild(struct shop **h_p); int a; struct shop *head,**h_p; head=NULL; h_p=&head; auto1(h_p); do { a=menu1(h_p); } while(a!=3); system("cls"); printf("谢谢使用^_^"); getch(); } int menu1(struct shop **h_p)

7、 { int a,b; struct shop *head; head=*h_p; print1(); scanf("%d",&a); putchar('\n'); getchar(); do { switch(a) { case 1:assistant(head);break; case 2: if(password()) do { b=menu2(h_p); } while(b!=9); break; default:break; } if(a!=3) { system("cls"); print1(); scanf("%d",&a)

8、 } } while(a!=3); return(a); } int menu2(struct shop **h_p) { int b; char a; struct shop *head; head=*h_p; print2(); scanf("%d",&b); putchar('\n'); getchar(); do { switch(b) { case 1:creat(h_p);break; case 2:rewrite(h_p);break; case 3:insert(h_p);break; case 4:deleat(h_p

9、);break; case 5:search(h_p);break; case 6:printall(h_p);break; case 7:head=*h_p;save(head);break; case 8:password_set();break; default:break; } if(b!=9) { system("cls"); print2(); scanf("%d",&b); getchar(); } } while(b!=9); printf("\n保存吗?(y/n):"); putchar('\n'); scanf("%c",&a); if

10、a=='y') { head=*h_p; save(head); } return(b); } void auto1(struct shop **h_p) { if(password_exi(h_p) && data_exi(h_p)) load(h_p); } void print1(void) { system("cls"); printf("********************************************************************************\n"); printf("

11、 仓库管理系统 \n"); printf("********************************************************************************\n"); printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n"); printf(" #****************

12、 菜单 *****************# \n"); printf(" #| 1.员工模式 |# \n"); printf(" #| 2.店主模式 |# \n"); printf(" #| 3.退出

13、 |# \n"); printf(" #*********************************************# \n"); printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n"); printf("\n请选择(1-3):"); } void assistant(struct shop *head) { char a[5

14、0],c='y'; int b; struct shop *i; i=head; while(c=='y') { system("cls"); printf("\n请输入卖出的商品名称:\n"); gets(a); putchar('\n'); printf("\n请输入卖出的商品数量:\n"); scanf("%d",&b); putchar('\n'); while(strcmp(i->name,a)!=0&&i->next!=NULL) i=i->next; if(i->next!=NULL) { i->num_now-=b; i->win=(i->n

15、um_in-i->num_now)*(i->price_out-i->price_in); } else printf("\n此商品不存在或通知店主更新数据库\n"); printf("\n继续吗?(y/n):"); putchar('\n'); c=getchar(); getchar(); } save(head); } int password(void) { FILE*fp; char a[50],b[50]; int i; system("cls"); fp=fopen("c:\\y_secrea","rb"); fscanf(fp,"%s",

16、a); fclose(fp); printf("请输入密码:\n"); putchar('\n'); i=0; do { b[i]=getch(); printf("*"); i++; } while(b[i-1]!=13&&i<19); b[i-1]='\0'; if(strcmp(a,b)==0) return(1); else return(0); } void print2(void) { system("cls"); printf("**************************************************

17、\n"); printf(" 店主模式 \n"); printf("********************************************************************************\n"); printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

18、 \n"); printf(" #******************* 菜单 *****************# \n"); printf(" #| 1.新建 2.修改 |# \n"); printf(" #| 3.插入 4.删除 |# \n"); printf(

19、" #| 5.查找 6.查看 |# \n"); printf(" #| 7.保存 8.改密 |# \n"); printf(" #| 9.上一层 |# \n"); printf(" #************

20、 \n"); printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n"); printf("请选择(1-9):"); } void creat(struct shop **h_p) { struct shop *head,*i,*j; int f=1; head=NULL; n=0; printf("\n请输入数据 若完成 请在名称处输

21、0”.\n\n"); i=j=addbuild(&head); if(strcmp(i->name,"0")==0) f=0; while(f) { n++; if(n==1) head=j; f=1; printf("\n请输入下一种货物的数据.\n\n"); i=addbuild(&head); if(strcmp(i->name,"0")==0) { free(i); f=0; break; } j->next=i; j=i; } j->next=NULL; *h_p=head; } void rewrite(st

22、ruct shop **h_p) { char a[30]; struct shop *i,*j,*head; head=*h_p; i=head; do { printf("\n请输入要修改货物的名称:"); putchar('\n'); gets(a); if(n>=1&&!search1(h_p,a)) { printf("\n不存在的货物名称!\n"); getch(); if(head==NULL) goto end; } } while(n>=1&&!search1(h_p,a)); while(strcmp(a,i->name)!=0&&

23、i->next!=NULL) { i=i->next; } if(strcmp(a,i->name)==0) { printf("\n真的要修改吗??(y/n):"); putchar('\n'); if(getchar()=='y') { getchar(); j=addbuild(h_p); strcpy(i->name,j->name); i->price_in=j->price_in; i->price_out=j->price_out; i->num_in=j->num_in; i->num_now=j-

24、>num_now; i->num_sold=j->num_sold; i->win=j->win; i->percent=j->percent; free(j); printf("\n修改完成^_^\n\n"); } }end:; } void insert(struct shop **h_p) { struct shop *i,*j,*x,*head; head=*h_p; x=addbuild(h_p); i=j=head; while(strcmp(i->name,x->name)<0&&i->next!=NULL) {

25、 j=i; i=i->next; } if(strcmp(i->name,x->name)>=0) { if(i==head) head=x; else j->next=x; x->next=i; } else { i->next=x; x->next=NULL; } printf("\n插入完成^_^\n\n."); *h_p=head; } void deleat(struct shop **h_p) { struct sho

26、p*i,*j,*head; char a[30],b; head=*h_p; do { system("cls"); printf("\n请输入你要删除的货物的名称:\n"); putchar('\n'); gets(a); if(n>=1&&!search1(h_p,a)) { printf("\n不存在的货物名称!\n"); if(head==NULL) goto end; } } while(n>=1&&!search1(h_p,a)); printf("\n真的要删除吗?(y/n):"); putchar('\n'); b=getchar()

27、 getchar(); if(b=='y') { i=head; while(strcmp(i->name,a)!=0&&i->next!=NULL) { j=i; i=i->next; } if(strcmp(i->name,a)==0) { if(i==head) { head=i->next; free(i); } else j->next=i->next; n--; printf("\n删除完成^_^.\n\n");

28、 *h_p=head; } } end:; } void search(struct shop **h_p) { int begin,end,mid,t; char a[30]; struct shop *i,*head; head=*h_p; i=head; printf("\n请输入要查询货物的名称:"); putchar('\n'); gets(a); while((strcmp(i->name,a)!=0)&&i->next!=NULL) { i=i->next; } if((strcmp(i->name,a)==0)) {

29、 printf("\n名称\t进价\t售价\t进货数目 存货数目 销量 \t赢利\t利率\n"); printf("\n===============================================================================\n"); printf("%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f",i->name,i->price_in,i->price_out,i->num_in ,i->num_now,i->num_sold,i->win,i->percent); } else

30、 printf("\n此货物不存在!\n"); getch(); } void printall(struct shop **h_p) { int a,c; char b='y'; struct shop *i; while(b=='y') { do { system("cls"); print3(); scanf("%d",&a); } while(a!=1&&a!=2&&a!=3); switch(a) { case 1:sort1(h_p);break; case 2:sort2(h_p);break; case 3:so

31、rt3(h_p);break; default:break; } for(c=1,i=*h_p;i->next!=NULL;i=i->next,c++) { printf("\n名称\t进价\t售价\t进货数目 存货数目 销量 \t赢利\t利率\t排名\n"); printf("\n===============================================================================\n"); printf("%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f%8d",i->nam

32、e,i->price_in,i->price_out,i->num_in ,i->num_now,i->num_sold,i->win,i->percent,c); if(c%8==0) { getch(); getchar(); printf("按任意键继续。。。\n"); } } printf("\n名称\t进价\t售价\t进货数目 存货数目 销量 \t赢利\t利率\t排名\n"); printf("\n========================================================================

33、\n"); printf("%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f%8d",i->name,i->price_in,i->price_out,i->num_in ,i->num_now,i->num_sold,i->win,i->percent,c); getch(); getchar(); system("cls"); printf("查看其他排列方式?(y/n):"); scanf("%c",&b); putchar('\n'); } } void save(struct shop *head) { FIL

34、E *fp; struct shop *i; system("attrib c:\\y_data -h"); system("del c:\\y_data"); fp=fopen("c:\\y_data","wb+"); i=head; for(i=head;i->next!=NULL;i=i->next) { fprintf(fp,"%s%7.2f,%.2f,%d,%d,%d,%.2f,%.2f,",i->name,i->price_in,i->price_out,i->num_in ,i->num_now,i->num_sold,i->win,i->percent);

35、 } fprintf(fp,"%s%7.2f,%.2f,%d,%d,%d,%.2f,%.2f,",i->name,i->price_in,i->price_out,i->num_in ,i->num_now,i->num_sold,i->win,i->percent); fclose(fp); system("attrib c:\\y_data +h"); printf("\n^_^已保存\n"); } void password_set() { FILE *fp; int i,f=0,t=0; char a[20],b[20]; do { if(p

36、assword()) { do { system("cls"); printf("请输入新密码(3~19位):\n"); putchar('\n'); i=0; do { a[i]=getch(); printf("*"); i++; } while(a[i-1]!=13&&i<19); a[i-1]='\0'; printf("\n请确认新密码:\n"); putchar('\n'); i=0; do { b[i]=getch(); printf("*"); i++; } while(b[i-1]!=13&&i<19); b[i-1

37、]='\0'; if(strcmp(a,b)==0&&i>2) { t=1; system("attrib c:\\y_secrea -h"); system("del c:\\y_secrea"); fp=fopen("c:\\y_secrea","wb+"); fprintf(fp,"%s",a); fclose(fp); printf("\n密码修改完成^_^\n"); }; } while(t==0); } else f++; if(f==3) break; } while(t==0); } int pass

38、word_exi(struct shop **h_p) { FILE *fp; if((fp=fopen("c:\\y_secrea","rb"))!=NULL) { fclose(fp); return 1; } else { password_create(); creat(h_p); save(*h_p); return 0; } } int data_exi(struct shop **h_p) { FILE *fp; if((fp=fopen("c:\\y_data","rb"))!=NULL) { fclose(fp); r

39、eturn 1; } else { creat(h_p); save(*h_p); return 0; } } void load(struct shop **h_p) { FILE *fp; struct shop *head,*i,*j; head=NULL; j=i=(struct shop *)malloc(LEN); if((fp=fopen("c:\\y_data","rb"))!=NULL) { while(!feof(fp)) { fscanf(fp,"%s%f,%f,%d,%d,%d,%f,%f",i->name,&i->pr

40、ice_in,&i->price_out,&i->num_in,&i->num_now,&i->num_sold,&i->win,&i->percent); n++; if(n==1) head=j; if(!feof(fp)) i=(struct shop*)malloc(LEN); j->next=i; j=i; } j->next=NULL; *h_p=head; fclose(fp); } } struct shop *addbuild(struct shop **h_p) { struct shop *i; int b,f; float

41、 c; char a[30]; i=(struct shop *)malloc(LEN); do { f=0; printf("\n请输入名称:\n\n"); scanf("%s",a); if(n>=1&&search1(h_p,a)) { printf("\n名称重复!\n"); f=1; } } while(f); strcpy(i->name,a); if(strcmp(i->name,"0")==0) return(i); printf("请输入进价:\n\n"); scanf("%f",&c); i->price_in=c; printf(

42、"请输入售价:\n\n"); scanf("%f",&c); i->price_out=c; printf("请输入进货数目:\n\n"); scanf("%d",&b); i->num_in=b; printf("请输入现存数目:\n\n"); scanf("%d",&b); i->num_now=b; i->num_sold=i->num_in-i->num_now; i->win=(i->num_in-i->num_now)*(i->price_out-i->price_in); i->percent=(i->price_out-i->price_in)/(i->p

43、rice_in); return(i); } void sort0(struct shop **h_p) { struct shop *i,*j,*z,*sei,*jt,*seit; int ni,nj,np,t; char sm[30]; if(n>=2) for(i=*h_p,ni=1;i->next!=NULL;i=i->next,ni++) { strcpy(sm,i->name); np=ni; for(j=i->next,nj=ni+1;j->next!=NULL;j=j->next,nj++) if(strcmp(sm,j->name

44、)>0) { np=nj; strcpy(sm,j->name); } if(j->next==NULL) if(strcmp(sm,j->name)>0) np=nj; if(np!=ni) { for(t=1,j=*h_p;tnext,t++); jt=j->next; i=jt; if(ni==1) { seit=*h_p; z=*h_p; *h_p=j->next; j->next=z; } else { for(t=1,

45、sei=*h_p;tnext,t++); seit=sei->next; z=sei->next; sei->next=j->next; j->next=z; } z=jt->next; jt->next=seit->next; seit->next=z; } } } int search1(struct shop **h_p,char a[30]) { struct shop *i; int j; for(i=*h_p,j=1;jnext) { if(strcmp(a

46、i->name)==0) return 1; }; if(strcmp(a,i->name)==0) return 1; else return 0; } void sort1(struct shop **h_p) { struct shop *i,*j,*z,*sei,*jt,*seit; int ni,nj,np,t; int sm; if(n>=2) for(i=*h_p,ni=1;i->next!=NULL;i=i->next,ni++) { sm=i->num_sold; np=ni; for(j=i->next,nj=ni+

47、1;j->next!=NULL;j=j->next,nj++) if(smnum_sold) { np=nj; sm=j->num_sold; } if(j->next==NULL) if(smnum_sold) np=nj; if(np!=ni) { for(t=1,j=*h_p;tnext,t++); jt=j->next; i=jt; if(ni==1) { seit=*h_p; z=*h_p; *h_p=j->next; j->

48、next=z; } else { for(t=1,sei=*h_p;tnext,t++); seit=sei->next; z=sei->next; sei->next=j->next; j->next=z; } z=jt->next; jt->next=seit->next; seit->next=z; } } } void sort2(struct shop **h_p) { struct shop *i,*j,*z,*sei,*jt,*seit; int ni,n

49、j,np,t; float sm; if(n>=2) for(i=*h_p,ni=1;i->next!=NULL;i=i->next,ni++) { sm=i->win; np=ni; for(j=i->next,nj=ni+1;j->next!=NULL;j=j->next,nj++) if(smwin) { np=nj; sm=j->win; } if(j->next==NULL) if(smwin) np=nj; if(np!=ni) { for(t=1,j=*h_p;tn

50、ext,t++); jt=j->next; i=jt; if(ni==1) { seit=*h_p; z=*h_p; *h_p=j->next; j->next=z; } else { for(t=1,sei=*h_p;tnext,t++); seit=sei->next; z=sei->next; sei->next=j->next; j->next=z; } z=jt->next; jt->next=seit->next; s

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服