c语言货物管理系统
⑴ c语言课程设计-仓库货物管理系统
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> struct Info { char num[15]; char name[15]; double price; int number; }; char menu() { char x; puts("\t\t Welcome to Cargo Warehouse Management Systerm "); puts("\t\t************************ MENU ************************\n"); puts("\t\t\t\t1.Append inform\n"); puts("\t\t\t\t2.Display inform\n"); puts("\t\t\t\t3.Search inform\n"); puts("\t\t\t\t4.Modify inform\n"); puts("\t\t\t\t5.Delete inform\n"); puts("\t\t\t\t6.Exit\n"); puts("\t\t******************************************************\n"); printf("Choose your number(1-6):[ ]\b\b"); while(1) { x=getchar(); getchar(); if(x<'1'||x>'6') printf("Input error,please input again(1-6):[ ]\b\b"); else break; } return x; 这个只是目录 具体的 你加 我
⑵ 仓库货物管理系统的程序怎么编写(用C语言)
将一个日期写成结构
typedef struct _BaseDate{
int year;
int month;
int day;
int hour;
int minute;
int second;
}BaseDate, *pBaseDate;
将这个信息写成一个结构如
typedef struct _BaseElem{
int nNumber;
char szName[256];
char szProctor[256];
BaseDate CreateTime;
BaseDate GoodTime;
int nProctStats;
_BaseElem *pNext;
}BaseElem, *pBaseElem;
然后应用此结构写一个链表结构的存储就可以了
⑶ C语言 仓库库存货物管理系统
去搜北京富通维尔科技有限公司网站,有很多这方面的设计资料
Ware-WMS是一套广泛适用于各种类型仓库管理的通用软件。该软件结合维尔公司多年为物流企业信息化的经验,从管理和操作角度出发,处处为仓储业务设想,努力通过信息化手段,提高仓库业务的操作效率、降低仓储成本,为提高企业管理能力和行业竞争力奠定坚实的基础。
Ware-WMS主要有以下特点:
1、快速安装部署以及广泛的适用性,能够适用于多种行业多种类型的仓库业务管理
2、全方位管理仓库内部业务,从入库、出库、库存、盘点,到自动补货、自动报警功能
3、快速与其他仓库信息化设备集成,如RF、RFID、立体货架、电子标签拣货设备等
4、高度业务容错功能,通过权限配置、工作流设置、状态履历跟踪,以及业务回退功能,层层把关,防止业务差错发生。
5、灵活应用和快速定制化,能够按照企业要求,快速定制出符合企业特殊业务的功能。
Ware-WMS主要功能:
1、仓库要素管理:多仓库、多货主、 多包装单位、立体货位
商品属性管理:生产日期、生产批号、颜色、尺寸、序列号、条形码
2、订单管理:入出库单录入/导入、 单据审核、单据查询、订单执行情况追踪
3、入库管理:进货检验、允许分批入库、自动码放指令、允许自由混放、高度容错
4、出库管理:多种拣货方式(按单进货、波次拣货)、先进先出、自由分配、高度容错
5、库内管理:库间移动、货位移动、盘点、次品管理等
6、流通加工:商品组装拆分、填充与包装、贴标签
7、费用管理:仓储租金、入出库操作费、日常管理费、各种杂费等
8、其他:支持RF作业、支持电子标签拣货设备、支持RFID作业
⑷ C语言写一个仓库管理系统
#include<stdio.h>#include<stdlib.h>#include<string.h>#include<malloc.h>#define max 32int ifempty=0;//标志,判断链表是无否为空typedef struct dnode /* 定义双向链表结构体 */ {int number; /* 货物编号 */char name[max]; /* 货物名称 */ int counter; /* 货物数量 */struct dnode *prior, *next;/* 定义两指针,分别指向其前驱和后继 */}dlnode; dlnode *create(dlnode *L);dlnode *input(dlnode *L);dlnode *output(dlnode *L);dlnode * outnum(dlnode *L);dlnode * outname(dlnode *L);dlnode *current(dlnode *L);void search(dlnode *L);void print(dlnode *L);void searchnum(dlnode *L);void searchname(dlnode *L);void display(dlnode *L) ;void main(){int x;dlnode *L;if(!(L=(dlnode *)malloc(sizeof(dlnode)))) //分配空间{printf("\n");exit(1);}create(L);///调用函数,创建头节点while(1){////////////////////////主菜单///////////////////////////printf(" ============================\n");printf(" 1. 货物出库和入库\n");printf(" 2. 查找货物表\n"); printf(" 3. 显示仓库货物表\n");printf(" 4. 输出到文件\n");printf(" 0. 退出\n");printf(" =============================\n");printf(" 选择0--3:");scanf("%d",&x);switch(x){case 2:search(L);break;//调用查找函数case 1:current(L);break;//调用入库出库函数case 3:display(L);break;//调用显示输出函数case 4:print(L);break;//调用打印函数case 0:printf("\n bye!see you!\n");getchar();getchar();exit(0);//退出程序default:printf("\n Enter erreor!please input 0--4!"); getchar();getchar();}}}dlnode *create(dlnode *L)//创建链表头节点{printf(" 欢迎使用我的仓库管理系统");getchar(); ifempty=0;///////初始化头节点的值////////L->next=NULL;L->prior=NULL;L->number=L->counter=0;strcpy(L->name," "); return L;}void search(dlnode *L) ///查找的主要菜单{int y;if(ifempty==0){printf("没有输入货物!\n");getchar();getchar();return;}else{while(1){printf("=====================\n");printf("1.按编号查询\n");printf("2.按货物名称查询\n");printf("0.返回上一层\n");printf("====================\n");printf("选择0--2:");scanf("%d",&y);switch(y){case 1:searchnum(L);break;//调用按编号查找的函数case 2:searchname(L);break;//调用按名称查找的函数case 0:return;//返回default:printf("enter error!Please input 0--2!\n\n");getchar();getchar();printf("\n\n");}}}}void searchnum(dlnode *L)///按编号查找的函数{int num,flag=0;//flag为是否找到的标志dlnode *head=L;if(ifempty==0){printf("没有货物被输入\n");getchar();getchar();return;}printf("输入你要查找的货物编号:\n");scanf("%d",&num);while((L=L->next)!=head){if(L->number==num){ flag=1;//flag为1时表示找到printf("找到指定编号货物 \n"); printf("\n编号:%d\n",L->number);printf("名称:%s\n",L->name) ;printf("数量:%d\n\n",L->counter); } }if(flag==0)//flag为0时表示没有找到printf("没有找到指定编号货物,请查看是否还有货物。\n");getchar();getchar();}void searchname(dlnode *L)//按名称查找的函数{int flag=0;//flag为是否找到的标志char na[32];dlnode *head=L;if(ifempty==0){printf("没有货物被输入\n");getchar();getchar();return;}printf("输入你要查找的货物名称\n");scanf("%s",&na);while((L=L->next)!=head){if(strcmp(L->name,na)==0){ flag=1;//flag为1时表示找到printf("找到指定名称货物 \n"); printf("\n编号:%d\n",L->number);printf("名称:%s\n",L->name) ;printf("数量:%d\n\n",L->counter); } }if(flag==0)//flag为0时表示没有找到printf("没有找到指定编号货物,请查看是否还有货物。\n\n");getchar();getchar();}dlnode *current(dlnode *L)//货物出库入库函数{int y;while(1){printf("========================\n");printf(" 1.货物入库\n");printf(" 2.货物出库\n");printf(" 0.返回上一层\n");printf("========================\n");printf(" 选择0--2:");scanf("%d",&y);switch(y){case 1:input(L);break;//调用入库函数case 2:output(L);break;//调用出库函数case 0:return(L);//返回上一层default:printf("enter error!Please input 0--2!");getchar();getchar();printf("\n\n");}}}dlnode *input(dlnode *L)//定义入库函数{dlnode *in,*head;head=in=(dlnode *)malloc(sizeof(dlnode));//分配空间head=L;printf("\n请输入货物数据:\n");printf("编号:");scanf("%d",&in->number);printf("名称:");scanf("%s",&in->name);printf("数量:");scanf("%d",&in->counter);if(L->next==NULL) //如果只有头节点,{ //把刚输入的in节点L->next=in; //跟在头节点后面L->prior=in; //in->next=L; //in->prior=L; //ifempty++; //ifempty加1}else{//如果当前L的下一个节点不是头节点while((L=L->next)!=head){//如果输入的数大于L->number,则插到L的前面if(L->number<in->number){in->next=L;in->prior=L->prior; L->prior->next=in;L->prior=in;ifempty++; //ifempty加1return(head);} }//输入的编号比其它编号都小,则插到最后个节点,并首尾相连head->prior->next=in;in->prior=head->prior;head->prior=in;in->next=head;ifempty++; //ifempty加1} return head;}dlnode *output(dlnode *L)//出库的函数{int y;dlnode *head=L;if(ifempty==0)//检测是否有货物输入{printf("没有货物输入系统\n");getchar();getchar();return(head);} while(1){printf("=============\n");printf("1.按编号出库\n");printf("2.按名称出库\n");printf("0.返回上一层\n");printf("==============\n");printf("选择0--2:");scanf("%d",&y);switch(y){case 1:outnum(L);break;//调用按编号出库函数case 2:outname(L);break;//调用按名称出库函数case 0:return(L);default:printf("enter error!Please input 0--2!");getchar();getchar();printf("\n\n");}}} dlnode *outnum(dlnode *L)//按编号出库函数{ int num;dlnode *head=L;printf("请输入出库货物的编号:");scanf("%d",&num);while((L=L->next)!=head){//如果找到就删除节点if(L->number==num){L->prior->next=L->next;L->next->prior=L->prior;ifempty--; //ifempty减1 printf("编号为%d的货物成功出库",num); getchar();getchar();return head; } }printf("没有此编号的货物,请查看是否还有货物。\n\n");getchar();getchar();return (head);}dlnode *outname(dlnode *L)//按名称出库函数{char na[32];dlnode *head=L;printf("请输入出库货物的名称:");scanf("%s",&na);while((L=L->next)!=head){//如果找到就删除节点if(strcmp(L->name,na)==0){L->prior->next=L->next;L->next->prior=L->prior;ifempty--; //ifempty减1 printf("名称为%s的货物成功出库",na);getchar();getchar();return (head);}}printf("没有此名称的货物,请查看是否还有货物。\n\n");getchar();getchar();return(head);} void display(dlnode *L)//显示货物清单{dlnode *head=L;if(ifempty==0){printf("没有货物可显示\n");getchar();getchar();return;}L=L->next;do{ printf("\n编号:%d\n",L->number);printf("名称:%s\n",L->name) ;printf("数量:%d\n\n",L->counter);}while((L=L->next)!=head);getchar();getchar(); }void print(dlnode *L){dlnode *head=L;L=L->next;char filename[max];FILE *out;if(ifempty==0){printf("没有货物可输出\n");getchar();getchar();return;}printf("请输入文件名称:");scanf("%s",filename);if((out=fopen(filename,"w"))==NULL){printf("打开文件失败!\n");getchar();getchar();return;}do{ fprintf(out,"编号:%d\n名称:%s\n数量:%d\n\n",L->number,L->name,L->counter);}while((L=L->next)!=head);printf("输出成功\n");getchar();getchar();fclose(out);}
⑸ 用c语言编写一个仓库货物管理系统的程序
个人觉得,题主的题的难度不亚于一个C语言的课程设计哈,在这提问不太合适。
就提供给你思路吧。
职工信息可以存入一个结构体数组中,此结构体元素包含有货物编号(unsigned int cargo_number;);货物名称(char cargo_name[10];);货物价格(unsigned int cargo_price;);货物数量(unsigned int cargo_price;)。。。其他元素,题主根据要求添加元素。
然后,构建函数用来添加货物名称:void add_cargo_info(...)(形参元素为结构体数组名),即手动添加货物信息,完事后记得要将信息写入磁盘文件中;
然后,构建函数显示信息,这个简单,void display_cargo_info(...)(形参为结构体数组名),用一个while循环输出即可;
然后,查询函数,void cargo_info_search(...)(形参可为多种,名字,编号。。。),同样用while循环搞定;
然后,修改信息,void cargo_info_update(...)(形参同为结构体数组),调用查找函数,找到要修改的货物,然后在此信息中修改即可;
然后,删除信息,void cargo_info_delete(...)(形参同为结构体数组),也是首先找到要删除的信息,然后要调用保存函数。
这个就是我的思路,题主可以参考,希望解决了题主的问题。
⑹ 急!C语言课程设计仓库货物管理系统(有代码)
把你的数组改成链表就行了呗。。
无非就是增删改查遍历。。。
或者你随便找个基本链表的代码,然后改吧改吧就行了。。无非就是换个链表存的结构体的问题。
课程设计都大同小异,搞得很高级的样子。
⑺ C语言仓库管理系统
仓库管理系统C语言C++数据结构链表课程设计
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <conio.h>
#define MAX 64
typedef struct node{ /* 定义结构体类型dnode */ int number; /* 货物编号 */ char name[MAX]; /* 货物名称 */ int counter; /* 货物数量 */ struct node *prior,*next; /* 前驱和后继指针 */}dnode;
dnode* head = NULL;
void output_one(dnode* n) /* 输出一条记录 */{ printf("%d\t%s\t%d\n", n->number, n->name, n->counter);}
void output() /* 输出所有记录 */{ dnode* pos = head; if(head == NULL) { return; } while (pos) { output_one(pos); /* 循环调用output_one */ pos = pos->next; }}
int insert() /* 插入一条数据 */{ dnode* pos = head; dnode* n = malloc(sizeof(dnode)); n->prior = NULL; n->next = NULL; printf("请输入货物编号:"); scanf("%d", &n->number); printf("请输入货物名称:"); scanf("%s", n->name); printf("请输入货物数量:"); scanf("%d", &n->counter); if(head==NULL) /* 如果还没有头节点,就作为头节点 */ { head = n; return 1; } while (pos) { if(pos->number > n->number) /* 按顺序查找,如果找到比自己大的,就插在它前面 */ { if(pos->prior) pos->prior->next = n; n->prior = pos->prior; pos->prior = n; if(pos->next) pos->next->prior = n; n->next = pos; return 1; } else if(pos->number == n->number) { free(n); return 0; /* 有重复数据,插入不成功 */ } if (!pos->next) /* 如果已经到链表尾部,插入到后面 */ { pos->next = n; n->prior = pos; return 1; } pos = pos->next;
} return 1;}
void init(){ while (1) /* 初始化,循环插入 */ { insert(); printf("按任意键继续输入,按Esc停止输入\n"); if(getch()==27) break; }}
int delete() /* 删除一条记录 */{ int num; dnode* pos = head; printf("请输入要删除的编号:"); scanf("%d", &num);
if(head == NULL) { return 0; } while (pos) { if(pos->number == num) /* 找到匹配的项 */ { if(pos->prior) pos->prior->next = pos->next; if(pos->next) pos->next->prior = pos->prior; free(pos); return 1; } pos = pos->next; } return 0; // 没找到}
int amend() /* 修改数量 */{ int num, count; dnode* pos = head; printf("请输入要修改的编号:"); scanf("%d", &num); printf("请输入要修改的数量:"); scanf("%d", &count); if(head == NULL) { return 0; } while (pos) { if(pos->number == num) { if (count == 0) /* 如果数量是0,就删除 */ { if(pos->prior) pos->prior->next = pos->next; if(pos->next) pos->next->prior = pos->prior; free(pos); return 1; } pos->counter = count; return 1; } pos = pos->next; } return 0; }
void search() /* 按编号查找 */{ int num; dnode* pos = head;
printf("请输入要查找的编号:"); scanf("%d", &num);
if(head == NULL) { return; } while (pos) { if(pos->number == num) { output_one(pos); /* 找到就打印 */ return; } pos = pos->next; }}
void search_by_name() /* 按名称查找 */{ char name[MAX]; dnode* pos = head; printf("请输入要查找的名称:"); scanf("%s", name);
if(head == NULL) { return; } while (pos) { if(!strcmp(pos->name, name)) output_one(pos); pos = pos->next; }}
int main(){ init(); while (1) { char ch; system("cls"); printf("\t\t\t\ti 增加新货物\n"); printf("\t\t\t\td 删除某种货物\n"); printf("\t\t\t\ta 修改某种货物的数量\n"); printf("\t\t\t\ts 查找指定的货物\n"); printf("\t\t\t\to 输出存货信息\n"); printf("\t\t\t\tq 退出程序\n"); ch = getch(); switch (ch) { case 'i': case 'I': insert(); break;
case 'd': case 'D': delete(); break;
case 'a': case 'A': amend(); break;
case 's': case 'S': printf("1. 按编号查找\n2. 按名称查找\n"); ch = getch(); if(ch == '1') { search(); } else if(ch == '2') { search_by_name(); } break;
case 'o': case 'O': output(); break;
case 'q': case 'Q': return 0; break; } printf("按任意键继续...\n"); getch(); } return 0;}
⑻ C语言设计仓库管理系统
c语言仓库管理帮实现
⑼ C语言编程仓库产品管理系统
这道题的难度不亚于一个C语言的课程设计哈,在这提问不太合适。
就提供给你思路吧。
职工信息可以存入一个结构体数组中,此结构体元素包含有货物编号(unsigned int cargo_number;);货物名称(char cargo_name[10];);货物价格(unsigned int cargo_price;);货物数量(unsigned int cargo_price;)。。。其他元素,题主根据要求添加元素。
然后,构建函数用来添加货物名称:void add_cargo_info(...)(形参元素为结构体数组名),即手动添加货物信息,完事后记得要将信息写入磁盘文件中;
然后,构建函数显示信息,这个简单,void display_cargo_info(...)(形参为结构体数组名),用一个while循环输出即可;
然后,查询函数,void cargo_info_search(...)(形参可为多种,名字,编号。。。),同样用while循环搞定;
然后,修改信息,void cargo_info_update(...)(形参同为结构体数组),调用查找函数,找到要修改的货物,然后在此信息中修改即可;
然后,删除信息,void cargo_info_delete(...)(形参同为结构体数组),也是首先找到要删除的信息,然后要调用保存函数。
这个就是我的思路,题主可以参考,希望解决了题主的问题。
⑽ C语言编程:货物管理系统
可以提供一个很类似的:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#defineN100
structhardware
{
intID;
charname[35];
intnum;
floatprice;
}output={0,"empty",0,0};
intmain()
{
voidinit(hardware*output);
voiddelect(void);
voidfoutput(void);
voidrenew(void);
inti=0,select;//记录静态链表的长度
do
{
printf("************************** ");
printf("*请输入您要执行的操作:* ");
printf("*0------>创建商品文件* ");
printf("*1------>更新商品信息* ");
printf("*2------>打印商品文件* ");
printf("*3------>删除商品信息* ");
printf("*4------>确定退出程序* ");
printf("************************** ");
printf("请输入您的选择:");
scanf("%d",&select);
if(select==4)
{
return0;
}
elseif(i==0&&select!=0)
{
printf("商品文件尚未建立,不能进行该操作! ");
select=5;
}
switch(select)
{
case0:init(&output);printf("文件commodity.dat已创建完成! ");i++;break;
case1:renew();printf("指定的信息已经更新完成. ");break;
case2:foutput();printf("指定的文件commodity.dat已经打印完成. ");break;
case3:delect();printf("库存为零的商品已经删除完成. ");break;
case4:break;
default:printf("输入有误!请重新输入. ");
}
}while(select!=4);
return0;
}
voidrenew(void)
{
FILE*pf;
hardware*tem;
inti=0,j,num,ID;
if((tem=(hardware*)malloc(sizeof(hardware)))==NULL)
{
printf("memoryerror! ");
exit(0);
}
printf("请输入您要您要更新的商品条数: ");
scanf("%d",&num);
while(i<num)
{
z:printf("请输入需要更新的商品号: ");
scanf("%d",&ID);
if(ID>N||ID<1)
{
printf("输入的商品号有误,请重新输入! ");
gotoz;
}
if((pf=fopen("D:\commodity.dat","rb+"))==NULL)
{
printf("openfileerror! ");
exit(0);
}
for(j=0;j<N;j++)//读出数据
{
if(!fread(tem,sizeof(hardware),1,pf))
{
printf("outputerror! ");
}
if(tem->ID==ID)
{
printf("记录号:%d 工具名%s 数量%d 价格%.3f ",tem->ID,tem->name,tem->num,tem->price);
printf(" 请输入新的商品信息: ");
printf("请输入需要更新的第%d件的工具名: ",i+1);
scanf("%s",tem->name);
printf("请输入需要更新的第%d件商品数量和价格(以空格隔开): ",i+1);
scanf("%d%f",&tem->num,&tem->price);
fseek(pf,-1L*sizeof(hardware),1);
if(!fwrite(tem,sizeof(hardware),1,pf))
{
printf("inputerror! ");
}
printf("第%d个商品数据更新成功! ",i+1);
break;
}//if
}//for
fclose(pf);
i++;
}//while
free(tem);
}
voidfoutput(void)
{
FILE*pf;
hardwaretem;
inti;
if((pf=fopen("D:\commodity.dat","rb"))==NULL)
{
printf("openfileerror! ");
exit(0);
}
printf(" *********打印列表如下:********* ");
for(i=0;i<N;i++)//读出数据
{
if(!fread(&tem,sizeof(hardware),1,pf))
{
printf("outputerror! ");
}
if(strcmp(tem.name,"empty"))//
{
printf("记录号:%d 工具名%s 数量%d 价格%.3f ",tem.ID,tem.name,tem.num,tem.price);
}
}
fclose(pf);
}
voiddelect(void)
{
FILE*pf;
hardware*tem;
inti;
if((tem=(hardware*)malloc(sizeof(hardware)))==NULL)
{
printf("memoryerror! ");
exit(0);
}
if((pf=fopen("D:\commodity.dat","rb+"))==NULL)
{
printf("openfileerror! ");
exit(0);
}
for(i=0;i<N;i++)//读出数据
{
fseek(pf,0,1);
if(!fread(tem,sizeof(hardware),1,pf))
{
printf("outputerror! ");
}
if(tem->num==0)
{
strcpy(tem->name,"empty");//
tem->price=0;
fseek(pf,-1L*sizeof(hardware),1);
if(!fwrite(tem,sizeof(hardware),1,pf))
{
printf("inputerror! ");
}
}//if
}//for
fclose(pf);
free(tem);
}
voidinit(hardware*output)
{
FILE*pf;
inti;
if((pf=fopen("D:\commodity.dat","wb"))==NULL)
{
printf("openfileerror! ");
exit(0);
}
for(i=0;i<N;i++)//初始化100个元素
{
output->ID=i+1;
if(!fwrite(output,sizeof(hardware),1,pf))
{
printf("inputerror! ");
}
}
fclose(pf);//关闭文件,完成初始化的所有操作
}