📄 change_acc.ec
字号:
/* change_acc */#include </u/ebcsav/include/sav.h>$include sqlca;$include sqlda;short menu();short menusel();void addspace();void addspacef();void mess();char y_n();char readdv();char readst();void prt_inum();void prt_dnum();void prtf_inum();void prtf_dnum();void delay();short num_time();#include </u/ebcsav/include/begin>short num_c2,num_c3,num,flag,i,ti;double x;long k;char st[26],sts[11];char stn[7];char c;FILE *pf;$ char s_num[2],nam[9],nam2[9],ter[2],cu_type[2],addres[25],addres2[25], statu[2],lin_num[2],s[13],fla[2],s_type[2],ope_num[2];$ long a_num,pas,pas2,cr_num,ope_date,int_date,las_date,las_month;$ double amoun,interes,maint_v,balanc,inte_rat;$ short cred_type;$ long cred_num;static char *title2[8]={"0.返回 ","1.双整 ","2.活期 ","3.零整 ", "4.存本取息 ","5.定活两便 ","6.大额 ","7.通知 "};static char *remind2[8]={" 返回主选择单 "," 修改整存整取储户信息 ", " 修改活期储蓄储户信息 "," 修改零存整取储户信息 ", " 修改存本取息储户信息 "," 修改定活两便储户信息 ", " 修改大额储蓄储户信息 "," 修改通知存款储户信息 "};static short menu_row2[8]={5,5,5,5,5,5,5,5}, menu_col2[8]={8,15,22,29,36,47,58,65};static char *title3[3]={"0.返回 ","1.人民币 ","2.外币 "};static char *remind3[3]={" 返回主选择单 "," 修改人民币储户信息 ", " 修改外币储户信息 "};static short menu_row3[3]={7,7,7},menu_col3[3]={8,15,24};move(0,29);$ database saving;printw("修 改 帐 户 信 息");num_c2=num_c3=0;k=op.num&0x7f;pf=fopen("/u/ebcsav/data/sav_sect.dat","r");fseek(pf,k*34-10,0);fread(sts,10,1,pf);fclose(pf);sts[10]='\0';for(i=0;i<7;i++) if(op.name[i]!='\0')stn[i]=op.name[i]^0xff; else stn[i]='\0';while(1) { move(2,0); clrtobot(); block(1,0,22,80); num=((op.type&1)==1)?7:2; block(4,6,3,(num==7)?68:26); num_c2=menu(title2,remind2,menu_row2,menu_col2,num,num_c2); num_c2=menusel(title2,remind2,menu_row2,menu_col2,num,num_c2,0); if(num_c2==0) break; if(num_c2>2||(op.type&3)==1) num_c3=1; else if((op.type&3)==2) num_c3=2; else { block(6,6,3,28); num_c3=menu(title3,remind3,menu_row3,menu_col3,2,num_c3); num_c3=menusel(title3,remind3,menu_row3,menu_col3,2,num_c3,0); } if(num_c3==0) continue; s_num[1]='\0'; move(10,6); addstr("营业所编号: "); if((op.num&0x80)!=0) { s_num[0]=op.num&0x7f; prt_inum((long)s_num[0],2); } else { readdv(&x,2); s_num[0]=x; } move(12,6); addstr("帐号: "); readdv(&x,9); a_num=x; switch(num_c2) { case 1: if(num_c3==1) { $ select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from r_fix where sec_num=$s_num and acc_num=$a_num; } else { $ select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from f_fix where sec_num=$s_num and acc_num=$a_num; } break; case 2: if(num_c3==1) { $ select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_demand where sec_num=$s_num and acc_num=$a_num; } else { $ select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from f_demand where sec_num=$s_num and acc_num=$a_num; } break; case 3: $ select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $balanc,$addres,$cr_num,$ope_date,$int_date,$statu,$fla, $las_date,$inte_rat,$interes,$las_month,$lin_num from r_dated where sec_num=$s_num and acc_num=$a_num; break; case 6: $ select * into $s_num,$a_num,$nam,$pas,$cu_type,$ter, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v from l_fix where sec_num=$s_num and acc_num=$a_num; break; case 7: $ select * into $s_num,$a_num,$nam,$pas,$cu_type, $amoun,$addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$lin_num from r_call where sec_num=$s_num and acc_num=$a_num; } if(sqlca.sqlcode!=0||statu[0]=='E'||statu[0]=='B') { move(20,27); mess((short)29); mess((short)4); getch(); continue; } if(pas!=0) { for(i=0;i<4;i++) { move(14,6); addstr("密码: "); readdv(&x,7); k=x; if(k==pas) break; move(20,27); mess((short)20); mess((short)2); } } else k=pas; if(k!=pas) { move(20,27); mess((short)30); mess((short)3); getch(); /*continue;*/ } move(20,27); addspace(30); if(toupper(statu[0])=='H'||toupper(statu[0])=='V'||toupper(statu[0])=='F') { move(20,27); mess((short)31); mess((short)3); getch(); continue; } move(2,0); clrtobot(); block(1,0,22,80); move(2,10); addstr("储蓄种类: "); move(2,48); addstr(&title2[num_c2][2]); move(3,10); addstr("帐 号: "); move(3,48); prt_inum((long)s_num[0],2); addstr("-"); prt_inum(a_num,9); move(4,10); addstr("姓 名: "); move(4,48); addstr(nam); if(num_c2==3) { if((fla[0]&1)==0) addstr(" (个人户)"); else addstr(" (集体户)"); } move(5,10); addstr("币 种: "); move(5,48); switch(toupper(cu_type[0])) { case 'C': addstr("加拿大元"); break; case 'F': addstr("法国法郎"); break; case 'H': addstr("港元"); break; case 'J': addstr("日元"); break; case 'M': addstr("德国马克"); break; case 'P': addstr("英镑"); break; case 'R': addstr("人民币"); break; case 'U': addstr("美元"); } if(cu_type[0]>'Z') addstr(" (自动转存)"); if(num_c2==1||num_c2==3||num_c2==6) { move(6,10); addstr("期 限: "); move(6,48); if(ter[0]<12) printw("%2d个月",ter[0]); else printw("%2d年",ter[0]/12); } move(7,10); if(num_c2==3) addstr("定 额: "); else addstr("金 额: "); move(7,48); prt_dnum(amoun,13); move(8,10); addstr("地 址: "); move(8,48); addstr(addres); move(9,10); addstr("凭 证 号: "); move(9,48); prt_inum(cr_num,7); move(10,10); addstr("开户日期: "); move(10,48); printw("%4d年%2d月%2d日",ope_date/10000,(ope_date%10000)/100, ope_date%100); move(11,10); addstr("起息日期: "); move(11,48); printw("%4d年%2d月%2d日",int_date/10000,(int_date%10000)/100, int_date%100); move(12,10); addstr("状 态: "); move(12,48); addstr("可存取"); if(statu[0]>'Z') addstr(" (曾经丢失过凭整)"); if(num_c2==3) { move(13,40); if((fla[0]&2)!=0) addstr("办过补存 "); if((fla[0]&4)!=0) addstr("办过增加定额 "); if((fla[0]&2)!=0) addstr("办过减少定额 "); } move(14,10); addstr("最后改变状态日期: "); move(14,48); printw("%4d年%2d月%2d日",las_date/10000,(las_date%10000)/100, las_date%100); move(15,10); if((num_c2==1||num_c2==6)&&toupper(statu[0])!='E') addstr("利 率: "); else addstr("累计利息: "); move(15,48); printw("%15.4f",interes); if(num_c2==1) { move(16,10); addstr("保 值: "); move(16,48); prt_dnum(maint_v,13); } else if(num_c2==2||num_c2==3||num_c2==7) { move(16,10); addstr("存折行号: "); move(16,48); prt_inum((long)lin_num[0],2); } if(num_c2==3) { move(17,10); addstr("余 额: "); move(17,48);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -