超市仓库管理系统_程序

上传人:博****1 文档编号:490320307 上传时间:2023-11-15 格式:DOC 页数:38 大小:239KB
返回 下载 相关 举报
超市仓库管理系统_程序_第1页
第1页 / 共38页
超市仓库管理系统_程序_第2页
第2页 / 共38页
超市仓库管理系统_程序_第3页
第3页 / 共38页
超市仓库管理系统_程序_第4页
第4页 / 共38页
超市仓库管理系统_程序_第5页
第5页 / 共38页
点击查看更多>>
资源描述

《超市仓库管理系统_程序》由会员分享,可在线阅读,更多相关《超市仓库管理系统_程序(38页珍藏版)》请在金锄头文库上搜索。

1、超市仓库管理系统程序如下:#include #include#include #include#include 仓库管理系统.h#define N 500#defineLEN sizeof(struct product)#define ILEN sizeof(struct in_product)#define OLEN sizeof(struct out_product)#define QLEN sizeof(struct quit_product)void init()head=NULL;qhead=NULL;ihead=NULL;ohead=NULL;printf(ttn);printf(

2、tt n);printf(tt n);printf(tt n);printf(tt* n);printf(tt* n);printf(tt* 欢迎进入 * n);printf(tt* n);printf(tt*超市仓库管理系统* n);printf(tt* n);printf(tt* n);printf(tt n);printf(tt n);printf(tt n);printf(tt nn);printf(tttt1:入库管理 n);printf(tttt2:出库管理 n);printf(tttt3:退货管理 n);printf(tttt4:商品统计 n);printf(tttt0:退出系统

3、 n);voidmenu()printf(tttt1:添加数据 n);printf(tttt2:删除数据 n);printf(tttt3:修改数据 n);printf(tttt4:查看数据 n);printf(tttt其它 : 退回上一级菜单 n);void menu2()printf(tt n);printf(tt n);printf(tt n);printf(tt n);printf(tt * n);printf(tt * n);printf(tt * 欢迎进入 * n);printf(tt * n);printf(tt *超市仓库管理系统* n);printf(tt * n);print

4、f(tt * n);printf(tt n);printf(tt n);printf(tt n);printf(tt nn);printf(tttt1:入库管理 n);printf(tttt2:出库管理 n);printf(tttt3:退货管理 n);printf(tttt4:商品统计 n);printf(tttt0:退出系统 n);printf(ntttt输入错误,请重新输入!n);int Rkjl() /入库信息录入文件struct in_product pN,s;int i=0,j,n;FILE *pf,*pf1;pf=fopen( 入库信息记录 .dat,rb+);pf1=fopen(

5、 入库信息记录 .xls,r+);/printf( 入库编号商品编号入库商品名入库数量入库价格总价 n);for(i=0;fread(&pi,ILEN,1,pf)!=NULL;i+);/printf(%ldt%st%st%dt%dt%dn,pi.num,pi.p_num,pi.name,pi.amount,pi.price,pi.t_ price);for(j=0;ji;j+)for(n=0;npn+1.num)/入库编号小的先录入s=pn;pn=pn+1;pn+1=s;rewind(pf);fseek(pf1,56L,0);for(j=0;ji;j+)fwrite(&pj,ILEN,1,pf

6、);fprintf(pf1,%ldt%st%st%dt%dt%dn,pj.num,pj.p_num,pj.name,pj.amount,pj.price,p j.t_price);fclose(pf);fclose(pf1);return 0;int Ckjl() / 出库信息录入文件struct out_product pN,s;int i,j,n;FILE *pf,*pf1;pf=fopen( 出库信息记录 .dat,rb+);pf1=fopen( 出库信息记录 .xls,r+);/printf( 出库编号商品编号出库商品名出库数量出库价格总价 n);for(i=0;fread(&pi,O

7、LEN,1,pf)!=NULL;i+);/printf(%ldt%st%st%dt%dt%dn,pi.num,pi.p_num,pi.name,pi.amount,pi.price,pi.t_ price);for(j=0;ji;j+)for(n=0;npn+1.num)/出库编号小的先录入s=pn;pn=pn+1;pn+1=s;rewind(pf);fseek(pf1,56L,0);for(j=0;ji;j+)fwrite(&pj,OLEN,1,pf);fprintf(pf1,%ldt%st%st%dt%dt%dn,pj.num,pj.p_num,pj.name,pj.amount,pj.p

8、rice,p j.t_price);fclose(pf);fclose(pf1);return 0;int Thjl() / 退货信息录入文件 struct quit_product pN,s; int i,j,n;FILE *pf,*pf1;pf=fopen( 退货信息记录 .dat,rb+);pf1=fopen( 退货信息记录 .xls,r+);for(i=0;fread(&pi,QLEN,1,pf)!=NULL;i+);for(j=0;ji;j+)for(n=0;npn+1.num)/退货编号小的先录入s=pn;pn=pn+1;pn+1=s;rewind(pf);fseek(pf1,56

9、L,0);for(j=0;ji;j+)fwrite(&pj,QLEN,1,pf);fprintf(pf1,%ldt%st%st%dt%dt%dn,pj.num,pj.p_num,pj.name,pj.amount,pj.price,p j.t_price);fclose(pf);fclose(pf1);return 0;int insert_product() / 添加商品数据并录入文件struct product *p1,*p;FILE *pf;if(pf=fopen( 商品信息记录 .xls,r)=NULL)pf=fopen( 商品信息记录 .xls,w);fprintf(pf,%st%st%st%st%st%sn, 商品编号 , 商品名 , 型号 /规格 , 商品数量 , 进货价 , 销售 价 );fclose(pf);pf=fopen( 商品信息记录 .xls,a+);p1=(struct product *)malloc(LEN);p=head;if (p=NULL)printf(n下列数据将录入商品信息记录 文件中 !n);printf(n商品编号 :);

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 演讲稿/致辞

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号