| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 732 人关注过本帖
标题:手机销售系统(下)
只看楼主 加入收藏
xs_cctv
Rank: 1
来 自:湖南
等 级:新手上路
帖 子:21
专家分:0
注 册:2008-8-19
结帖率:100%
收藏
 问题点数:0 回复次数:1 
手机销售系统(下)
void xg()//修改模块
{
    int i;
    int x,p=0;
    char pp[14],ch,gn;


    do
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\n\n\n\t\t\t请输入要修改的手机型号:");
        fflush(stdin);
        gets(pp);
        system("cls");
        system("date/t");
        system("time/t");
        printf("\t\t\t以下是符合要求的信息");
        printf("\n\n================================================================================");
        printf(" 序号      品牌         型号     进价\t售价\t数量\t进价总额\t盈利\n");
        for(i=0;i<k-1;i++)
        {
            if(strcmp(kc[i].xh,pp)==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);
            }
        }
        printf("\n\n\t\t\t请选择要修改的序号:");
        fflush(stdin);
        scanf("%d",&x);
        for(i=0;i<k-1;i++)
        {
            if(kc[i].x==x)
            {
                break;
            }
        }
        if(i<k-1)
        {
            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\n\n\t\t\t请输入修改后的品牌:");
                fflush(stdin);
                gets(kc[i].pp);
                printf("\n\n\t\t\t修改成功!");
                fflush(stdin);
                ch=getchar();
                break;
            case 2:
                system("cls");
                system("date/t");
                system("time/t");
                printf("\n\n\n\t\t\t请输入修改后的型号:");
                fflush(stdin);
                gets(kc[i].xh);
                printf("\n\n\t\t\t修改成功!");
                fflush(stdin);
                ch=getchar();
                break;
            case 3:
                system("cls");
                system("date/t");
                system("time/t");
                printf("\n\n\n\t\t\t请输入修改后的进价:");
                fflush(stdin);
                scanf("%d",&kc[i].jg);
                printf("\n\n\t\t\t修改成功!");
                fflush(stdin);
                ch=getchar();
                break;
            case 4:
                system("cls");
                system("date/t");
                system("time/t");
                printf("\n\n\n\t\t\t请输入修改后的售价:");
                fflush(stdin);
                scanf("%d",&kc[i].sj);
                printf("\n\n\t\t\t修改成功!");
                fflush(stdin);
                ch=getchar();
                break;
            case 5:
                system("cls");
                system("date/t");
                system("time/t");
                printf("\n\n\n\t\t\t请输入修改后的数量:");
                fflush(stdin);
                scanf("%d",&kc[i].num);
                printf("\n\n\t\t\t修改成功!");
                fflush(stdin);
                ch=getchar();
                break;
            case 0:
                break;
            }
        }
        else
        {
            printf("\n\n\t\t没有这个序号!");
            fflush(stdin);
            ch=getchar();
        }
        system("cls");
        printf("\n\n\n\t\t\t是否要继续修改?(y/n):");
        fflush(stdin);
        gn=getchar();
    }while(gn=='Y'||gn=='y');
}

void cr()//插入
{
    int i;
    char ch,gn;
    
    do
    {
        system("cls");
        system("date/t");
        system("time/t");
        fflush(stdin);
        printf("\t\t\t第%d条手机库存信息",k);
        printf("\n\n\n\t\t\t品牌(限10个英文字符):");
        gets(kc[k-1].pp);
        fflush(stdin);
        printf("\n\t\t\t型号(限14个英文字符):");
        gets(kc[k-1].xh);
        fflush(stdin);
        for(i=0;i<k-1;i++)
        {
            if((strcmp(kc[k-1].pp,kc[i].pp)==0)&&(strcmp(kc[k-1].xh,kc[i].xh)==0))
            {
                break;
            }
        }
        if(i<k-1)
        {
            system("cls");
            system("date/t");
            system("time/t");
            printf("\n\t\t\t这款手机已经存在!!");
            fflush(stdin);
            gn=getchar();
            break;
        }
        else
        {
            printf("\n\t\t\t进价:");
            fflush(stdin);
            scanf("%d",&kc[k-1].jg);
            printf("\n\t\t\t售价:");
            fflush(stdin);
            scanf("%d",&kc[k-1].sj);
            printf("\n\t\t\t数量:");
            fflush(stdin);
            scanf("%d",&kc[k-1].num);
            kc[k-1].sum=kc[k-1].jg*kc[k-1].num;
            kc[k-1].lr=0;
            k++;
        }
        printf("\n\n\n\n\t\t\t请问是否要继续添加?(y/n)");
        fflush(stdin);
        ch=getchar();
        fflush(stdin);
    }while(ch=='y'||ch=='Y');
}

void image()//加载页面
{
    int i=0,count1=0;
    printf("\n\n\t\t\t\t已通过验证");
    printf("\n\n\t\t\t      程序正在加载中");
    printf("\n\n\t\t\t      ");
    while(i<25000000000000)
    {
        i++;
        if(i%2500000==0)
        {
            printf(">");
            count1++;
            if(count1%15==0)
            {
                printf("\r\t\t\t                      \r\t\t\t      ");
            }
        }
        if(count1==60)
            break;
    }
}


void px()//排序模块
{
    char ch;
    struct sjkc temp;
    int x,i,j;
    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:
            system("cls");
            for(i=0;i<k-1;i++)
            {
                for(j=0;j<k-i-2;j++)
                {
                    if(kc[j].jg>kc[j+1].jg)
                    {
                        temp=kc[j];
                        kc[j]=kc[j+1];
                        kc[j+1]=temp;
                    }
                }
            }
            ck();
            fflush(stdin);
            ch=getchar();
            break;
        case 2:
            system("cls");
            for(i=0;i<k-1;i++)
            {
                for(j=0;j<k-i-2;j++)
                {
                    if(kc[j].sj>kc[j+1].sj)
                    {
                        temp=kc[j];
                        kc[j]=kc[j+1];
                        kc[j+1]=temp;
                    }
                }
            }
            ck();
            fflush(stdin);
            ch=getchar();
            break;
        case 3:
            system("cls");
            for(i=0;i<k-1;i++)
            {
                for(j=0;j<k-i-2;j++)
                {
                    if(kc[j].num>kc[j+1].num)
                    {
                        temp=kc[j];
                        kc[j]=kc[j+1];
                        kc[j+1]=temp;
                    }
                }
            }
            ck();
            fflush(stdin);
            ch=getchar();
            fflush(stdin);
            break;
        case 4:
            system("cls");
            for(i=0;i<k-1;i++)
            {
                for(j=0;j<k-i-2;j++)
                {
                    if(kc[j].lr>kc[j+1].lr)
                    {
                        temp=kc[j];
                        kc[j]=kc[j+1];
                        kc[j+1]=temp;
                    }
                }
            }
            ck();
            fflush(stdin);
            ch=getchar();
            fflush(stdin);
            break;
        case 0:
            break;
        default:
            printf("\n\n\t\t\t选择错误,请重新选择!");
            fflush(stdin);
            ch=getchar();
            fflush(stdin);
            break;
        }
        if(x==0)
            break;
    }while(1);
}

void ck()//排序中的查看模块
{
    int i;
    system("cls");
    system("date/t");
    system("time/t");
    printf("\t\t\t以下是排序后的库存信息\n\n");
    printf("\t  ============================================================");
    printf("\n\n      品牌         型号     进价\t售价\t数量\t进价总额\t盈利\n");
    for(i=0;i<k-1;i++)
    {
        printf("%10s %12s %8d %11d %7d %11d %11d\n",kc[i].pp,kc[i].xh,kc[i].jg,kc[i].sj,kc[i].num,kc[i].sum,kc[i].lr);
    }
}

void shanchu()//库存删除模块
{
    char xh[14],gn,x,ch;
    int i,p=0,j;
    do
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\n\t\t\t请输入要删除的手机型号:");
        fflush(stdin);
        gets(xh);
        system("cls");
        system("date/t");
        system("time/t");
        printf("\t\t\t以下是符合要求的信息");
        printf("\n\n================================================================================");
        printf(" 序号      品牌         型号     进价\t售价\t数量\t进价总额\t盈利\n");
        for(i=0;i<k-1;i++)
        {
            if(strcmp(kc[i].xh,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);
            }
        }
        printf("\n\n\t\t\t请选择要删除的序号:");
        fflush(stdin);
        scanf("%d",&x);
        for(i=0;i<k-1;i++)
        {
            if(kc[i].x==x)
            {
                break;
            }
        }
        if(i<k-1)
        {    
            printf("\n\n\t\t\t确定要删除?(y/n)");
            fflush(stdin);
            ch=getchar();
            if(ch=='y'||ch=='Y')
            {
                
                for(j=i;j<k-1;j++)
                {
                    kc[j]=kc[j+1];
                }
                k=k-1;
                printf("\n\n\t\t\t删除成功!");
                fflush(stdin);
                gn=getchar();
                fflush(stdin);
            }
        }
        else
        {
            system("cls");
            system("date/t");
            system("time/t");
            printf("\n\n\t\t\t对不起,这个序号不存在。");
            gn=getchar();
            fflush(stdin);
        }
        printf("\n\n\t\t\t要继续删除吗?(y/n)");
        ch=getchar();
        fflush(stdin);
    }while(ch=='y'||ch=='Y');
}

void bz()//帮助文档
{
    char ch;
    char bz[150]={"\t\t\t欢迎使用启鸣手机销售管理系统\n\n    本系统可以进行:\n\n    用户管理\t  库存管理\t  销售管理\t  售后服务\t  软件设置\n"};
    char yhgl[120]={"\n  1.用户管理\n    只有超级用户才能进入这个模块,这个模块里可以对用户进行“增”、“删”、“改”    、“查”等操作。"};
    char kcgl[200]={"\n\n  2.库存管理\n    这个模块可以对原有库存进行清空并录入新的库存,查看所有库存,增加新的库存信息    ,按条件查找记录,修改库存记录,删除库存,对库存进行排序等操作。"};
    char xsgl[120]={"\n\n  3.营业管理\n    这个模块可以实现销售,办理退货,查看营业业绩,查看退货记录等操作。"};
    char shfw[150]={"\n\n  4.售后服务\n    这个模块可以查看所有用户的保修信息,按保修卡卡号查找用户的信息,修改用户信息    ,删除用户信息,对用户的返修次数进行增加等操作。"};
    char rjsz[150]={"\n\n  5.软件设置\n    可以在这个模块里对整个操作界面的色彩进行选择,附加了“修改系统时间”、“修复    有问题磁盘”、“显示软件所在目录”的功能。"};
    system("cls");
    system("date/t");
    system("time/t");
    printf("%s",bz);
    printf("================================================================================");
    printf("%s%s%s%s%s",yhgl,kcgl,xsgl,shfw,rjsz);
    fflush(stdin);
    ch=getchar();
}

void kcxx()//输入库存信息模块
{
    char ch,username[20],userpassword[7],gn;
    int j,i,u=0;
    if(k>0)
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\n\t\t如果继续操作将会覆盖原数据,是否要继续?(y/n):");
        fflush(stdin);
        ch=getchar();
        u=0;
        do
        {
            if(ch=='y'||ch=='Y')
            {
                printf("\n\n\t\t\t         用户登陆");
                printf("\n\t\t\t============================");
                printf("\n\n\t\t\t     请输入用户名:");
                fflush(stdin);
                gets(username);
                printf("\n\t\t\t     请输入密码:");
                fflush(stdin);
                for(i=0;i<6;i++)
                {
                    userpassword[i]=getch();
                    printf("*");
                }
                userpassword[6]='\0';
                for(j=0;j<unum;j++)
                {
                    if((strcmp(user[j].username,username)==0)&&(strcmp(user[j].userpassword,userpassword)==0))
                    {
                        image();
                        break;
                    }
                }
                if(j<unum)
                {
                    system("cls");
                    system("date/t");
                    system("time/t");
                    printf("\n\n\t\t\t需要输入多少条手机库存信息?:");
                    fflush(stdin);
                    scanf("%d",&k);
                    fflush(stdin);
                    for(i=0;i<k-1;i++)
                    {
                        system("cls");
                        srkc(i);
                    }
                    do
                    {
                        system("cls");
                        system("date/t");
                        system("time/t");
                        srkc(k-1);
                        k++;
                        printf("\n\t\t\t是否继续输入?(y/n)");
                        fflush(stdin);
                        ch=getchar();
                    }while(ch=='y'||ch=='Y');
                }    
                else
                {
                    u++;                    
                    if(u==3)
                    {
                        system("cls");
                        system("date/t");
                        system("time/t");
                        printf("\n\n\n\t\t\t输入错误超过三次,达到重试上限!");
                        fflush(stdin);
                        gn=getchar();
                        break;
                    }
                    system("cls");
                    system("date/t");
                    system("time/t");
                    printf("\n\t\t\t    用户名或密码有误!");
                    printf("\n\n\t\t\t    是否继续登陆?  (y/n)");
                    fflush(stdin);
                    ch=getchar();
                    fflush(stdin);
                    if(ch=='y'||ch=='Y')
                    {
                        system("cls");
                        system("date/t");
                        system("time/t");
                    }
                }
            }
        }while(ch=='y'||ch=='Y');
    }
    else
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\n\n\t\t\t需要输入多少条手机库存信息?:");
        fflush(stdin);
        scanf("%d",&k);
        fflush(stdin);
        for(i=0;i<k-1;i++)
        {
            system("cls");
            srkc(i);
        }
        do
        {
            system("cls");
            system("date/t");
            system("time/t");
            srkc(k-1);
            k++;
            printf("\n\t\t\t是否继续输入?(y/n)");
            fflush(stdin);
            ch=getchar();
        }while(ch=='y'||ch=='Y');
    }
}

void kcgl()//库存管理
{
    int o;
    char ch;
    do
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\n\n\t\t→→→→→→→→→→→→→→→→→→→→→→↓");
        printf("\n\t\t↑                                          ↓");
        printf("\n\t\t↑      请选择功能:                         ↓");
        printf("\n\t\t↑                                          ↓");
        printf("\n\t\t↑             1.录入库存信息               ↓");
        printf("\n\t\t↑             2.查看库存信息               ↓");
        printf("\n\t\t↑             3.添加库存信息               ↓");
        printf("\n\t\t↑             4.查询库存信息               ↓");
        printf("\n\t\t↑             5.排序库存信息               ↓");
        printf("\n\t\t↑             6.修改库存信息               ↓");
        printf("\n\t\t↑             7.删除库存信息               ↓");
        printf("\n\t\t↑             8.增加库存量                 ↓");
        printf("\n\t\t↑             0.返回上一级目录             ↓");
        printf("\n\t\t↑                                          ↓");
        printf("\n\t\t↑←←←←←←←←←←←←←←←←←←←←←←");
        printf("\n\n\n\t\t\t请选择:");
        fflush(stdin);
        scanf("%d",&o);
        fflush(stdin);
        switch(o)
        {
        case 1:
            kcxx();
            break;
        case 2:
            sc();
            break;
        case 3:
            cr();
            break;
        case 4:
            cx();
            break;
        case 5:
            px();
            break;
        case 6:
            xg();
            break;
        case 7:
            shanchu();
            break;
        case 8:
            zjkc();
            break;
        case 0:
            break;
        default:
            printf("\n\t\t\t输入错误,没有这个选项,请重新选择!\n");
            fflush(stdin);
            ch=getchar();
            system("cls");
            break;
        }
        if(o==0)
        {
            break;
        }
    }while(1);
}

void shfw()//保修模块
{
    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↑              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:
            bxxx();
            break;
        case 2:
            bxcz();
            break;
        case 3:
            bxxg();
            break;
        case 4:
            wxsc();
            break;
        case 5:
            bxfx();
            break;
        case 0:
            break;
        default:
            printf("没有这个选项!");
            fflush(stdin);
            gn=getchar();
            break;
        }
        if(x==0)
            break;
    }while(1);
}

void bxxx()//保修信息模块
{
    char gn;
    int i;
    system("cls");
    system("date/t");
    system("time/t");
    printf("\t\t\t  以下是所有保修信息");
    printf("\n\n================================================================================");
    printf("  卡号      姓名     联系电话    品牌        型号    购机时间  保修期  维修次数\n");
    for(i=0;i<w;i++)
    {
        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);
    gn=getchar();
}

void bxcz()//保修查找
{
    char ch,kh[10],gn;
    int i;
    do
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\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);
            gn=getchar();
        }
        else
        {
            system("cls");
            system("date/t");
            system("time/t");
            printf("\n\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 bxxg()
{
    char ch,kh[10],gn;
    int i,x,j;
    do
    {
        system("cls");
        system("date/t");
        system("time/t");
        printf("\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')
            {
                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);
}
搜索更多相关主题的帖子: 手机 系统 销售 
2008-09-18 19:59
小小熊宝宝
Rank: 2
来 自:江苏无锡
等 级:论坛游民
威 望:2
帖 子:183
专家分:38
注 册:2008-8-12
收藏
得分:0 
不错,顶,很羡慕

欢迎加入C语言交流群:43287755
2008-09-19 12:41
快速回复:手机销售系统(下)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028052 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved