⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.cpp

📁 用于参考的手机销售系统
💻 CPP
📖 第 1 页 / 共 5 页
字号:
			fflush(stdin);
			printf("\n\n\t\t\t确定要修改吗?(y/n):");
			gn=getchar();
			if(gn=='y'||gn=='Y')
			{
				system("cls");
				system("date/t");
				system("time/t");
				printf("\n\n\t\t→→→→→→→→→→→→→→→→→→→→→↓\n");
				printf("\t\t↑                                        ↓\n");
				printf("\t\t↑        请选择功能:                     ↓\n");
				printf("\t\t↑                                        ↓\n");
				printf("\t\t↑              1.修改姓名                ↓\n");
				printf("\t\t↑              2.修改卡号                ↓\n");
				printf("\t\t↑              3.修改联系电话            ↓\n");
				printf("\t\t↑              4.修改保修期              ↓\n");
				printf("\t\t↑              5.修改维修次数            ↓\n");
				printf("\t\t↑              0.返回上一级目录          ↓\n");
				printf("\t\t↑                                        ↓\n");
				printf("\t\t↑←←←←←←←←←←←←←←←←←←←←←\n");
				printf("\n\t\t\t\t请选择:");
				fflush(stdin);
				scanf("%d",&x);
				switch(x)
				{
				case 1:
					system("cls");
					system("date/t");
					system("time/t");
					printf("\n\t\t\t请输入修改后的姓名:");
					fflush(stdin);
					gets(customer[i].namme);
					break;
				case 2:
					do
					{
						system("cls");
						system("date/t");
						system("time/t");
						printf("\n\t\t\t请输入修改后的保修卡号码:");
						fflush(stdin);
						gets(kh);
						for(j=0;j<w;j++)
						{
							if(strcmp(kh,customer[j].Idcard)==0)
							{
								break;
							}
						}
						if(j<w)
						{
							printf("\n\n\t\t\t此卡号已经存在!!");
							fflush(stdin);
							gn=getchar();
							system("cls");
						}
						else
						{
							strcpy(customer[i].Idcard,kh);
							break;
						}
					}while(1);
					break;
				case 3:
					system("cls");
					system("date/t");
					system("time/t");
					printf("\n\t\t\t请输入修改后的联系电话:");
					fflush(stdin);
					gets(customer[i].phone);
					break;
				case 4:
					system("cls");
					system("date/t");
					system("time/t");
					printf("\n\t\t\t请输入修改后的保修期:");
					fflush(stdin);
					scanf("%d",&customer[i].bxq);
					break;
				case 5:
					system("cls");
					system("date/t");
					system("time/t");
					printf("\n\t\t\t请输入修改后的维修次数:");
					fflush(stdin);
					scanf("%d",&customer[i].wxcs);
					break;
				}
			}
			
		}
		else
		{
			system("cls");
			system("date/t");
			system("time/t");
			printf("\n\t\t       对不起,没有找到您要修改的信息.");
			fflush(stdin);
			gn=getchar();
			break;
		}
		printf("\n\n\t\t\t是否继续修改别的用户?(y/n):");
		fflush(stdin);
		ch=getchar();
	}while(ch=='y'||ch=='Y');
}

void wxsc()//保修信息删除
{
	char ch,kh[10],gn;
	int i,j;
	do
	{
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\t\t\t请输入保修卡号:");
		fflush(stdin);
		gets(kh);
		for(i=0;i<w;i++)
		{
			if(strcmp(kh,customer[i].Idcard)==0)
				break;
		}
		if(i<w)
		{
			system("cls");
			system("date/t");
			system("time/t");
			printf("\t\t\t  以下是查找到的保修信息");
			printf("\n\n================================================================================");
			printf("  卡号      姓名     联系电话    品牌        型号    购机时间  保修期  维修次数\n");
			printf("%6s %9s %12s %7s %11s   %4d/%2d/%2d   %2d        %d\n",customer[i].Idcard,customer[i].namme,customer[i].phone,customer[i].pp,customer[i].xh,customer[i].year,customer[i].month,customer[i].day,customer[i].bxq,customer[i].wxcs);
			fflush(stdin);
			printf("\n\n\t\t\t确定要删除吗?(y/n):");
			gn=getchar();
			if(gn=='y'||gn=='Y')
			{
				for(j=i;j<w;j++)
				{
					customer[i]=customer[i+1];
				}
				w--;
			}
			printf("\n\n\t\t\t  删除成功!");
			gn=getchar();
		}
		else
		{
			system("cls");
			system("date/t");
			system("time/t");
			printf("\n\n\t\t     对不起,找不到您要删除的用户信息.");
			fflush(stdin);
			gn=getchar();
		}
		printf("\n\n\t\t\t是否继续删除?(y/n):");
		fflush(stdin);
		ch=getchar();
	}while(ch=='y'||ch=='Y');
}

void bxfx()//返修
{
	char kh[10],gn;
	int i;
	do
	{
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\t\t\t请输入保修卡号:");
		fflush(stdin);
		gets(kh);
		for(i=0;i<w;i++)
		{
			if(strcmp(kh,customer[i].Idcard)==0)
				break;
		}
		if(i<w)
		{
			system("cls");
			system("date/t");
			system("time/t");
			printf("\t\t\t  以下是找查到的保修信息");
			printf("\n\n================================================================================");
			printf("  卡号      姓名     联系电话    品牌        型号    购机时间  保修期  维修次数\n");
			printf("%6s %9s %12s %7s %11s   %4d/%2d/%2d   %2d       %d\n",customer[i].Idcard,customer[i].namme,customer[i].phone,customer[i].pp,customer[i].xh,customer[i].year,customer[i].month,customer[i].day,customer[i].bxq,customer[i].wxcs);
			fflush(stdin);
			printf("\n\n\t\t\t确定是此用户返修?(y/n):");
			gn=getchar();
			fflush(stdin);
			if(gn=='y'||gn=='Y')
			{
				customer[i].wxcs+=1;
				printf("\n\n\t\t\t返修次数添加成功!");
				fflush(stdin);
				gn=getchar();
				fflush(stdin);
			}
			else
				break;
		}
		else
		{
			system("cls");
			system("date/t");
			system("time/t");
			printf("\n\n\n\t\t       对不起,没有找到返修用户的信息.");
			fflush(stdin);
			gn=getchar();
			break;
		}
		break;
	}while(1);
}

void rjsz()//软件设置模块
{
	int x;
	char gn;

	do
	{
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\n\t\t→→→→→→→→→→→→→→→→→→→→→↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑        请选择功能:                     ↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑              1.色彩设置                ↓\n");
		printf("\t\t↑              2.修改系统时间            ↓\n");
		printf("\t\t↑              3.修复有问题磁盘          ↓\n");
		printf("\t\t↑              4.显示软件所在目录        ↓\n");
		printf("\t\t↑              0.返回上一级目录          ↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑←←←←←←←←←←←←←←←←←←←←←\n");
		printf("\n\t\t\t\t请选择:");
		fflush(stdin);
		scanf("%d",&x);
		switch(x)
		{
		case 1:
			scsz();
			break;
		case 2:
			system("cls");
			system("time");
			fflush(stdin);
			gn=getchar();
			break;
		case 3:
			hfcp();
			break;
		case 4:
			system("cls");
			system("date/t");
			system("time/t");
			printf("\n\t\t软件所在目录:\n\n\t\t");
			system("chdir");
			fflush(stdin);
			gn=getchar();
			break;
		case 0:
			break;
		default:
			printf("\n\n\t\t\t选择错误,没有这个选项!");
			fflush(stdin);
			gn=getchar();
			break;
		}
		if(x==0)
			break;
	}while(1);
}

void scsz()//色彩设置
{
	int x;
	char gn;

	do
	{
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\n\t\t→→→→→→→→→→→→→→→→→→→→→↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑        请选择功能:                     ↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑              1.亮白色底粉红色字        ↓\n");
		printf("\t\t↑              2.蓝底亮白色字            ↓\n");
		printf("\t\t↑              3.红底亮白色字            ↓\n");
		printf("\t\t↑              4.绿底亮白色字            ↓\n");
		printf("\t\t↑              5.黑底亮白色字            ↓\n");
		printf("\t\t↑              6.湖蓝色底亮白色字        ↓\n");
		printf("\t\t↑              7.紫底亮白色字            ↓\n");
		printf("\t\t↑              0.返回上一级目录          ↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑←←←←←←←←←←←←←←←←←←←←←\n");
		printf("\n\t\t\t\t请选择:");
		fflush(stdin);
		scanf("%d",&x);
		switch(x)
		{
		case 1:
			system("color fc");
			break;
		case 2:
			system("color 1f");
			break;
		case 3:
			system("color 4f");
			break;
		case 4:
			system("color 2f");
			break;
		case 5:
			system("color 0f");
			break;
		case 6:
			system("color 3f");
			break;
		case 7:
			system("color 5f");
			break;
		case 0:
			break;
		default:
			printf("\n\n\t\t\t选择错误,没有这个选项!");
			fflush(stdin);
			gn=getchar();
			break;
		}
		if(x==0)
			break;
	}while(1);
}

void zjkc()//增加库存量
{
	int i,num,p,x,y;
	char gn,ch,xh[14];
	do
	{				
		fflush(stdin);
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\n\t\t\t库存手机的型号:");
		gets(xh);
		fflush(stdin);
		do
		{
			system("cls");
			system("date/t");
			system("time/t");
			printf("\t\t\t以下是符合要求的信息");
			printf("\n\n 序号      品牌         型号     进价\t售价\t数量\t进价总额\t盈利\n");
			p=0;
			for(i=0;i<k;i++)
			{
				if(strcmp(xh,kc[i].xh)==0)
				{	
					p++;
					kc[i].x=p;
					printf("%5d %9s %12s %8d %6d %7d %11d %11d\n",kc[i].x,kc[i].pp,kc[i].xh,kc[i].jg,kc[i].sj,kc[i].num,kc[i].sum,kc[i].lr);
				}

			}
			if(p==0)
			{
				system("cls");
				system("date/t");
				system("time/t");
				printf("\n\t\t\t库存中没有这款手机!");
				fflush(stdin);
				gn=getchar();
				break;
			}
			printf("\n\n\t\t\t请选择要增加库存的序号:");
			fflush(stdin);
			scanf("%d",&x);
			for(i=0;i<k-1;i++)
			{
				if(kc[i].x==x&&x!=0)
				{
					y=i;
					break;
				}
			}
			printf("\n\n\t\t\t增加数量:");
			fflush(stdin);
			scanf("%d",&num);
			kc[y].num+=num;
			system("cls");
			system("date/t");
			system("time/t");
			printf("\n\n\t\t\t增加库存量成功!");
			fflush(stdin);
			gn=getchar();
			break;
		}while(1);
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\n\n\t\t\t是否要继续增加库存量?(y/n):");
		fflush(stdin);
		ch=getchar();
	}while(ch=='y'||ch=='Y');
}

void hfcp()
{
	int x;
	char gn;

	do
	{
		system("cls");
		system("date/t");
		system("time/t");
		printf("\n\n\t\t→→→→→→→→→→→→→→→→→→→→→↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑        请选择功能:                     ↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑               1.修复C盘                ↓\n");
		printf("\t\t↑               2.修复D盘                ↓\n");
		printf("\t\t↑               3.修复E盘                ↓\n");
		printf("\t\t↑               4.修复F盘                ↓\n");
		printf("\t\t↑               5.修复G盘                ↓\n");
		printf("\t\t↑               6.修复H盘                ↓\n");
		printf("\t\t↑               7.修复I盘                ↓\n");
		printf("\t\t↑               0.返回上一级目录         ↓\n");
		printf("\t\t↑                                        ↓\n");
		printf("\t\t↑←←←←←←←←←←←←←←←←←←←←←\n");
		printf("\n\t\t\t\t请选择:");
		fflush(stdin);
		scanf("%d",&x);
		switch(x)
		{
		case 1:
			system("cls");
			system("chkdsk c:");
			fflush(stdin);
			gn=getchar();
			break;
		case 2:
			system("cls");
			system("chkdsk d:");
			fflush(stdin);
			gn=getchar();
			break;
		case 3:
			system("cls");
			system("chkdsk e:");
			fflush(stdin);
			gn=getchar();
			break;
		case 4:
			system("cls");
			system("chkdsk f:");
			fflush(stdin);
			gn=getchar();
			break;
		case 5:
			system("cls");
			system("chkdsk g:");
			fflush(stdin);
			gn=getchar();
			break;
		case 6:
			system("cls");
			system("chkdsk h:");
			fflush(stdin);
			gn=getchar();
			break;
		case 7:
			system("cls");
			system("chkdsk i:");
			fflush(stdin);
			gn=getchar();
			break;
		case 0:
			break;
		default:
			printf("\n\n\t\t\t选择错误,没有这个选项!");
			fflush(stdin);
			gn=getchar();
		}
		if(x==0)
			break;
	}while(1);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -