PZXG.PRG
上传用户:hbmaozhan
上传日期:2013-01-31
资源大小:1007k
文件大小:32k
源码类别:

企业管理

开发平台:

VFP

  1.  HIDE POPUP pop2
  2.  HIDE MENU mainmenu
  3.  DEAC WINDOW win
  4.  ON KEY
  5.  SET SYSMENU OFF
  6.  SET COLOR TO W/N
  7.  CLOS DATABASES
  8.  CLEA
  9.  qq = 0
  10.  js = 0
  11.  k = 0
  12.  sl = 0
  13.  dw = '   '
  14.  dj = 0
  15.  USE pzk
  16.  IF jzbz='1'
  17.       ?? CHR(7)
  18.       CLOS DATABASES
  19.       SET COLOR TO W+/B
  20.       @ 0, 0, 23, 79 BOX '北北北北'
  21.       SET COLOR TO W+/N
  22.       @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
  23.       @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG 
  24.       @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5)  黄朝生研制  版权所有  南宁市建政路51号  邮编:530023 ' COLOR R/W 
  25.       SET CLOCK TO 23, 69
  26.       ON KEY LABEL Escape do Rquit
  27.       RETU
  28.  ENDI
  29.  SET CLOCK TO 0, 69
  30.  DELE ALL FOR zy='结转利润' .OR. zy='结转成本' .AND. shy='系统生成'
  31.  PACK
  32.  USE mxk
  33.  DELE ALL FOR zy='本月合计' .OR. zy='期末及累计'
  34.  PACK
  35.  USE pzk
  36.  SET INDEX TO pz
  37.  REIN
  38.  SELE 2
  39.  USE kmk
  40.  SELE 1
  41.  SET COLOR TO W/N
  42.  CLEA
  43.  DO pzgx
  44.  IF EOF()
  45.       SET COLOR TO G+/GR
  46.       @ 10, 20 CLEAR TO 14, 60
  47.       @ 11, 30 SAY '凭证库里没有凭证,'
  48.       @ 13, 30 SAY '按任意键返回 !'
  49.       x = INKEY(0)
  50.       CLOS DATABASES
  51.       SET COLOR TO W+/B
  52.       @ 0, 0, 23, 79 BOX '北北北北'
  53.       SET COLOR TO W+/N
  54.       @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
  55.       @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG 
  56.       @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5)  黄朝生研制  版权所有  南宁市建政路51号  邮编:530023 ' COLOR R/W 
  57.       ON KEY LABEL Escape do Rquit
  58.       SET CLOCK TO 23, 69
  59.       RETU
  60.  ENDI
  61.  DO pzgx
  62.  pz = 1
  63.  SET COLOR TO GR+/B
  64.  @ 5, 20 CLEAR TO 14, 55
  65.  @ 7, 26 SAY '请输入要修改的凭证号码:'
  66.  @ 9, 34 GET pz PICTURE '9999'
  67.  READ
  68.  DO pzgx
  69.  SEEK pz
  70.  sl1 = RECNO()
  71.  rq2 = rq
  72.  IF EOF() .OR. shy<>'       '
  73.       ?? CHR(7)
  74.       SET COLOR TO GR+/B
  75.       @ 5, 20 CLEAR TO 8, 60
  76.       @ 6, 30 SAY '对不起,凭证没有找到,'
  77.       @ 7, 30 SAY '或已经复核,无需修改!'
  78.       @ 8, 30 SAY '可使用查询功能查看.'
  79.       x = INKEY(0)
  80.       CLOS DATABASES
  81.       SET COLOR TO W+/B
  82.       @ 0, 0, 23, 79 BOX '北北北北'
  83.       SET COLOR TO W+/N
  84.       @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
  85.       @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG 
  86.       @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5)  黄朝生研制  版权所有  南宁市建政路51号  邮编:530023 ' COLOR R/W 
  87.       ON KEY LABEL Escape do Rquit
  88.       SET CLOCK TO 23, 69
  89.       RETU
  90.  ENDI
  91.  pz = 1
  92.  GOTO 1
  93.  pz = pzh
  94.  LOCA ALL FOR '      '$shy
  95.  IF EOF()
  96.       ?? CHR(7)
  97.       SET COLOR TO BG+/RB
  98.       @ 0, 0 CLEAR TO 3, 28
  99.       @ 1, 4 SAY '凭证已全部审核完毕!'
  100.       @ 2, 4 SAY '  无 需 修 改 !'
  101.       pd = INKEY(0)
  102.       DO qp
  103.       DO pzgx
  104.       @ 18, 0 CLEAR TO 24, 80
  105.  ELSE
  106.       GOTO sl1
  107.       pz = pzh
  108.       DO WHILE .T.
  109.            DO WHILE .T.
  110.                 SEEK pz
  111.                 pd = shy
  112.                 IF pd<>'       '
  113.                      pz = pz+1
  114.                 ELSE
  115.                      EXIT
  116.                 ENDI
  117.            ENDD
  118.            DO pzgx
  119.            LOCA ALL FOR pzh=pz .AND. shy='       '
  120.            IF EOF()
  121.                 PACK
  122.                 GOTO 1
  123.                 rq2 = rq
  124.                 pd1 = 1
  125.                 jyq = -1
  126.                 ?? CHR(7)
  127.                 SET COLOR TO BG+/RB
  128.                 @ 0, 0 CLEAR TO 3, 28
  129.                 @ 1, 4 SAY '凭证已全部修改完毕!'
  130.                 @ 2, 4 SAY '  您 辛 苦 了 !'
  131.                 pd = INKEY(0)
  132.                 DO qp
  133.                 DO pzgx
  134.                 @ 18, 0 CLEAR TO 24, 80
  135.                 EXIT
  136.            ENDI
  137.            @ 2, 50 SAY '                    '
  138.            @ 2, 50 SAY '总字第'
  139.            @ 2, 56 SAY pzh
  140.            @ 2, 66 SAY '号'
  141.            sl1 = RECNO()
  142.            pz = pz+1
  143.            SEEK pz
  144.            IF  .NOT. EOF()
  145.                 SKIP -1
  146.                 ml = RECNO()
  147.            ELSE
  148.                 GOTO BOTTOM
  149.                 ml = RECNO()
  150.            ENDI
  151.            pz = pz-1
  152.            GOTO BOTTOM
  153.            jyq = pzh
  154.            GOTO sl1
  155.            DO pzgx
  156.            @ 10, 74 SAY pds
  157.            @ 17, 66 SAY lry
  158.            @ 2, 30 SAY rq
  159.            SET COLOR TO B/GR
  160.            @ 18, 0 SAY '                                                 '
  161.            @ 18, 0 SAY ' PgUp上页:PgDn下页:F4下一张:F5修改一笔:F6增加:Delete删除:F10存盘:F7附件:Esc退出 '
  162.            SET COLOR TO W/N
  163.            GOTO BOTTOM
  164.            @ 19, 0 CLEAR TO 24, 80
  165.            pd = INT((ml+1-sl1)/6)
  166.            IF INT((ml+1-sl1)/6)=(ml+1-sl1)/6
  167.                 ys = pd
  168.            ELSE
  169.                 ys = pd+1
  170.            ENDI
  171.            GOTO sl1
  172.            IF 5<=ml-sl1
  173.                 bs = 1
  174.                 DO WHILE bs<=6
  175.                      @ 18+bs, 33 SAY zy
  176.                      DO slxs
  177.                      DO kmxs
  178.                      DO fsxs
  179.                      pd1 = RECNO()
  180.                      SKIP
  181.                      bs = bs+1
  182.                 ENDD
  183.                 reof = 'f'
  184.                 IF EOF()
  185.                      reof = 't'
  186.                      x = RECNO()-1
  187.                 ELSE
  188.                      x = RECNO()
  189.                 ENDI
  190.                 DO hjxs
  191.                 GOTO x
  192.                 bs = 1
  193.                 IF reof='f'
  194.                      SKIP -6
  195.                 ELSE
  196.                      SKIP -5
  197.                 ENDI
  198.                 SET COLOR TO G/B
  199.                 @ 4, 11 SAY zy
  200.                 SET COLOR TO W/N
  201.                 DO kmxs-1
  202.                 DO fsxs-1
  203.                 DO slxs-1
  204.                 yc = 1
  205.            ELSE
  206.                 x = RECNO()
  207.                 DO hjxs
  208.                 GOTO x
  209.                 pd = 1
  210.                 pd1 = 0
  211.                 bs = 1
  212.                 DO WHILE pd1<=ml-sl1
  213.                      @ 19+pd1, 33 SAY zy
  214.                      DO kmxs
  215.                      DO fsxs
  216.                      DO slxs
  217.                      pd = RECNO()
  218.                      SKIP
  219.                      pd1 = pd1+1
  220.                      bs = bs+1
  221.                 ENDD
  222.                 SKIP -pd1
  223.                 SET COLOR TO G/B
  224.                 @ 4, 11 SAY zy
  225.                 SET COLOR TO W/N
  226.                 bs = 1
  227.                 DO kmxs-1
  228.                 DO fsxs-1
  229.                 DO slxs-1
  230.                 yc = 1
  231.            ENDI
  232.            DO WHILE .T.
  233.                 pd = INKEY(0)
  234.                 DO CASE
  235.                      CASE pd=-6
  236.                           x = RECNO()
  237.                           GOTO sl1
  238.                           SET COLOR TO RB+/B
  239.                           ?? CHR(7)
  240.                           @ 0, 0 CLEAR TO 3, 28
  241.                           @ 1, 5 SAY '请输入凭证张数:' GET pds PICTURE '999'
  242.                           READ
  243.                           @ 10, 74 SAY pds
  244.                           DO qp
  245.                           GOTO x
  246.                      CASE pd=7
  247.                           bs2 = bs
  248.                           IF  .NOT. EOF() .AND.  .NOT. ml<=sl1
  249.                                x = RECNO()
  250.                                IF x=ml
  251.                                     x = x-1
  252.                                     IF bs=1
  253.                                          bs2 = 6
  254.                                     ELSE
  255.                                          bs2 = bs-1
  256.                                     ENDI
  257.                                ENDI
  258.                                ml = ml-1
  259.                                DELE
  260.                                PACK
  261.                           ELSE
  262.                                SET COLOR TO RB+/B
  263.                                ?? CHR(7)
  264.                                @ 0, 0 CLEAR TO 3, 28
  265.                                @ 1, 5 SAY '第一笔,请勿删除!'
  266.                                i = INKEY(0)
  267.                                DO qp
  268.                           ENDI
  269.                           qq = 1
  270.                           pd = INT((ml+1-sl1)/6)
  271.                           IF INT((ml+1-sl1)/6)=(ml+1-sl1)/6
  272.                                ys = pd
  273.                           ELSE
  274.                                ys = pd+1
  275.                           ENDI
  276.                           IF yc>ys
  277.                                yc = yc-1
  278.                           ENDI
  279.                           DO pzgx
  280.                           DO hjxs
  281.                           @ 19, 0 CLEAR TO 25, 81
  282.                           GOTO sl1+(yc-1)*6
  283.                           pd = RECNO()
  284.                           IF ml-pd>=6
  285.                                pd1 = 6
  286.                           ELSE
  287.                                pd1 = ml-pd+1
  288.                           ENDI
  289.                           bs = 1
  290.                           DO WHILE bs<=pd1
  291.                                @ 18+bs, 33 SAY zy
  292.                                DO kmxs
  293.                                DO fsxs
  294.                                DO slxs
  295.                                pd = RECNO()
  296.                                IF pd<>ml
  297.                                     SKIP
  298.                                     bs = bs+1
  299.                                ELSE
  300.                                     EXIT
  301.                                ENDI
  302.                           ENDD
  303.                           GOTO x
  304.                           bs = bs2
  305.                           @ 4, 11 SAY zy
  306.                           SET COLOR TO G/B
  307.                           @ 18+bs, 33 SAY zy
  308.                           SET COLOR TO W/N
  309.                           DO kmxs-1
  310.                           DO fsxs-1
  311.                           DO slxs-1
  312.                      CASE pd=-5
  313.                           CLOS INDEX
  314.                           qq = 1
  315.                           ml = ml+1
  316.                           slk = sl1
  317.                           INSE BLANK
  318.                           x = RECNO()
  319.                           REPL rq WITH rq2
  320.                           REPL pzh WITH pz
  321.                           SET COLOR TO N/W
  322.                           SELE 1
  323.                           pd = zzkm
  324.                           SET COLOR TO N/W
  325.                           pd = SUBSTR(pd, 1, 14)
  326.                           @ 7+bs, 2 SAY pd
  327.                           pd = mxkm
  328.                           pd = SUBSTR(pd, 1, 18)
  329.                           @ 7+bs, 18 SAY pd
  330.                           SET COLOR TO W/N
  331.                           @ 7+bs, 42 SAY jje
  332.                           @ ROW(), 58 SAY dje
  333.                           DO pzxg-1
  334.                           SELE 1
  335.                           SET INDEX TO pz
  336.                           REIN
  337.                           GOTO x-1
  338.                           sl1 = slk
  339.                           pd = INT((ml+1-sl1)/6)
  340.                           IF INT((ml+1-sl1)/6)=(ml+1-sl1)/6
  341.                                ys = pd
  342.                           ELSE
  343.                                ys = pd+1
  344.                           ENDI
  345.                           rbs = bs
  346.                           DO hjxs
  347.                           @ 19, 0 CLEAR TO 25, 81
  348.                           GOTO sl1+(yc-1)*6
  349.                           pd = RECNO()
  350.                           IF ml-pd>=6
  351.                                pd1 = 6
  352.                           ELSE
  353.                                pd1 = ml-pd+1
  354.                           ENDI
  355.                           bs = 1
  356.                           DO WHILE bs<=pd1
  357.                                @ 18+bs, 33 SAY zy
  358.                                DO kmxs
  359.                                DO fsxs
  360.                                DO slxs
  361.                                pd = RECNO()
  362.                                IF pd<>ml
  363.                                     SKIP
  364.                                     bs = bs+1
  365.                                ELSE
  366.                                     EXIT
  367.                                ENDI
  368.                           ENDD
  369.                           GOTO x-1
  370.                           bs = rbs
  371.                           @ 4, 11 SAY zy
  372.                           SET COLOR TO G/B
  373.                           @ 18+bs, 33 SAY zy
  374.                           SET COLOR TO W/N
  375.                           DO kmxs-1
  376.                           DO fsxs-1
  377.                           DO slxs-1
  378.                      ENDI
  379.                 CASE pd=1
  380.                      DO jsq-1
  381.                 CASE pd=5
  382.                      pd = RECNO()
  383.                      IF pd=sl1 .OR. bs=1 .OR. bs=0
  384.                           SET COLOR TO BG+/RB
  385.                           @ 0, 0 CLEAR TO 3, 28
  386.                           @ 1, 5 SAY '这是本页第一笔,'
  387.                           @ 2, 5 SAY '按任意键继续......'
  388.                           ?? CHR(7)
  389.                           pd = INKEY(0)
  390.                           DO qp
  391.                      ELSE
  392.                           @ 18+bs, 33 SAY zy
  393.                           DO fsxs
  394.                           DO kmxs
  395.                           DO slxs
  396.                           bs = bs-1
  397.                           SKIP -1
  398.                           @ 4, 11 SAY zy
  399.                           SET COLOR TO G/B
  400.                           @ 18+bs, 33 SAY zy
  401.                           SET COLOR TO W/N
  402.                           DO slxs-1
  403.                           DO kmxs-1
  404.                           DO fsxs-1
  405.                      ENDI
  406.                 CASE pd=24
  407.                      pd = RECNO()
  408.                      IF pd=sl1+ys*6 .OR. pd=ml .OR. bs=6
  409.                           SET COLOR TO BG+/RB
  410.                           @ 0, 0 CLEAR TO 3, 28
  411.                           @ 1, 5 SAY '这是本页最后一笔,'
  412.                           @ 2, 5 SAY '按任意键继续......'
  413.                           ?? CHR(7)
  414.                           pd = INKEY(0)
  415.                           DO qp
  416.                      ELSE
  417.                           SET COLOR TO W/N
  418.                           @ 18+bs, 33 SAY zy
  419.                           DO kmxs
  420.                           DO slxs
  421.                           SET COLOR TO W/N
  422.                           DO fsxs
  423.                           bs = bs+1
  424.                           pd1 = RECNO()
  425.                           IF pd1<ml
  426.                                SKIP 1
  427.                           ENDI
  428.                           @ 4, 11 SAY zy
  429.                           SET COLOR TO G/B
  430.                           @ 18+bs, 33 SAY zy
  431.                           SET COLOR TO W/N
  432.                           DO slxs-1
  433.                           DO kmxs-1
  434.                           DO fsxs-1
  435.                      ENDI
  436.                 CASE pd=3
  437.                      IF yc=ys
  438.                           SET COLOR TO BG+/RB
  439.                           @ 0, 0 CLEAR TO 3, 28
  440.                           @ 1, 4 SAY '这是本凭证最后一页,'
  441.                           @ 2, 4 SAY '按任意键继续......'
  442.                           ?? CHR(7)
  443.                           pd = INKEY(0)
  444.                           DO qp
  445.                      ELSE
  446.                           DO pzgx
  447.                           DO hjxs
  448.                           @ 19, 0 CLEAR TO 25, 81
  449.                           GOTO sl1+yc*6
  450.                           pd = RECNO()
  451.                           IF ml-pd>=6
  452.                                pd1 = 6
  453.                           ELSE
  454.                                pd1 = ml-pd+1
  455.                           ENDI
  456.                           bs = 1
  457.                           DO WHILE bs<=pd1
  458.                                @ 18+bs, 33 SAY zy
  459.                                DO kmxs
  460.                                DO fsxs
  461.                                DO slxs
  462.                                pd = RECNO()
  463.                                IF pd<>ml
  464.                                     SKIP
  465.                                     bs = bs+1
  466.                                ELSE
  467.                                     EXIT
  468.                                ENDI
  469.                           ENDD
  470.                           yc = yc+1
  471.                           SKIP -bs+1
  472.                           bs = 1
  473.                           @ 4, 11 SAY zy
  474.                           SET COLOR TO G/B
  475.                           @ 18+bs, 33 SAY zy
  476.                           SET COLOR TO W/N
  477.                           DO kmxs-1
  478.                           DO fsxs-1
  479.                           DO slxs-1
  480.                      ENDI
  481.                 CASE pd=18
  482.                      IF yc=1
  483.                           SET COLOR TO BG+/RB
  484.                           @ 0, 0 CLEAR TO 3, 28
  485.                           @ 1, 4 SAY '这是本凭证第一页,'
  486.                           @ 2, 4 SAY '按任意键继续......'
  487.                           ?? CHR(7)
  488.                           pd = INKEY(0)
  489.                           DO qp
  490.                      ELSE
  491.                           DO pzgx
  492.                           DO hjxs
  493.                           @ 19, 0 CLEAR TO 25, 81
  494.                           yc = yc-1
  495.                           GOTO sl1+yc*6-6
  496.                           bs = 1
  497.                           DO WHILE bs<=6
  498.                                @ 18+bs, 33 SAY zy
  499.                                DO kmxs
  500.                                DO fsxs
  501.                                DO slxs
  502.                                SKIP
  503.                                bs = bs+1
  504.                           ENDD
  505.                           SKIP -6
  506.                           @ 4, 11 SAY zy
  507.                           bs = 1
  508.                           SET COLOR TO G/B
  509.                           @ 18+bs, 33 SAY zy
  510.                           SET COLOR TO W/N
  511.                           DO kmxs-1
  512.                           DO fsxs-1
  513.                           DO slxs-1
  514.                           bs = 1
  515.                      ENDI
  516.                 CASE pd=-4
  517.                      qq = 1
  518.                      jyq = RECNO()
  519.                      @ 4, 11 GET zy VALID _zy()
  520.                      READ
  521.                      @ 4, 11 SAY zy
  522.                      @ 18+bs, 33 SAY zy
  523.                      pd = kmdm
  524.                      ysk = ys
  525.                      bs1 = bs
  526.                      DO km.prg
  527.                      bs = bs1
  528.                      DO kmxs
  529.                      pd = slbz
  530.                      pd2 = pd
  531.                      IF pd='2'
  532.                           IF '13k5'=SUBSTR(TRIM(kmdm), 1, 3)
  533.                                hh = 0
  534.                                zj = '1'
  535.                                DO slsr
  536.                                ys = ysk
  537.                           ELSE
  538.                                ? CHR(7)
  539.                                pd1 = 'F'
  540.                                SET COLOR TO RB+/B
  541.                                @ 0, 0 CLEAR TO 3, 28
  542.                                @ 1, 5 SAY '输入数量吗?' GET pd1
  543.                                READ
  544.                                DO qp
  545.                                IF pd1='y' .OR. pd1='Y'
  546.                                     SET COLOR TO RB+/B
  547.                                     @ 0, 0 CLEAR TO 3, 28
  548.                                     @ 1, 3 SAY '规格:'
  549.                                     @ 2, 3 SAY '数量:'
  550.                                     @ 3, 3 SAY '单价:'
  551.                                     SET COLOR TO W/N
  552.                                     @ 1, 9 GET gg PICTURE 'xxxxxxxxxxxx'
  553.                                     @ 2, 9 GET sl PICTURE '99999999.999'
  554.                                     @ 3, 9 GET dj PICTURE '999999999.99'
  555.                                     READ
  556.                                     pd1 = sl
  557.                                     pd = dj
  558.                                     pd1 = pd1*pd
  559.                                     DO WHILE .T.
  560.                                          SET COLOR TO RB+/B
  561.                                          @ 0, 0 CLEAR TO 3, 28
  562.                                          @ 1, 3 SAY '发生额是借方或贷方?'
  563.                                          @ 2, 5 SAY ' (+)=借 (-)=贷'
  564.                                          pd = INKEY(0)
  565.                                          DO qp
  566.                                          DO CASE
  567.                                               CASE pd=43
  568.                                                    @ 18+bs, 2 SAY gg
  569.                                                    @ 18+bs, 10 SAY sl
  570.                                                    @ 18+bs, 21 SAY dj
  571.                                                    REPL ssl WITH sl
  572.                                                    REPL sdj WITH dj
  573.                                                    REPL fsl WITH 0
  574.                                                    REPL fdj WITH 0
  575.                                                    EXIT
  576.                                               CASE pd=45
  577.                                                    @ 18+bs, 2 SAY gg
  578.                                                    @ 18+bs, 10 SAY sl
  579.                                                    @ 18+bs, 21 SAY dj
  580.                                                    REPL fsl WITH sl
  581.                                                    REPL fdj WITH dj
  582.                                                    REPL ssl WITH 0
  583.                                                    REPL sdj WITH 0
  584.                                                    EXIT
  585.                                               OTHE
  586.                                                    ?? CHR(7)
  587.                                          ENDC
  588.                                     ENDD
  589.                                     IF '135'=SUBSTR(ALLTRIM(kmdm), 1, 3)
  590.                                          REPL yysl WITH 0
  591.                                          ?? CHR(7)
  592.                                          SET COLOR TO GR+/G
  593.                                          @ 0, 0 CLEAR TO 3, 28
  594.                                          @ 1, 2 SAY '是否作购进或销售数?'
  595.                                          rx = 'Y'
  596.                                          @ 2, 2 SAY 'Y=是,其他=否 '
  597.                                          SET COLOR TO W+/BG
  598.                                          @ 2, 16 GET rx
  599.                                          READ
  600.                                          IF rx<>'Y' .AND. rx<>'y'
  601.                                               IF pd=43
  602.                                                    REPL yysl WITH sl
  603.                                               ELSE
  604.                                               ENDI
  605.                                          ENDI
  606.                                     ENDI
  607.                                     DO qp
  608.                                ELSE
  609.                                     pd2 = ' '
  610.                                ENDI
  611.                           ENDI
  612.                      ENDI
  613.                      SET COLOR TO N/W
  614.                      @ 7+bs, 42 SAY jje
  615.                      SET COLOR TO W/N
  616.                      k = INKEY(0)
  617.                      IF k=1
  618.                           DO jsq-1
  619.                           IF k=-7
  620.                                REPL jje WITH js
  621.                           ELSE
  622.                                @ 7+bs, 55 SAY ''
  623.                                k = INKEY(0)
  624.                                IF k=-7
  625.                                     REPL jje WITH js
  626.                                ELSE
  627.                                     KEYB CHR(k)
  628.                                     @ 7+bs, 42 GET jje PICTURE '@bz 9999999999.99'
  629.                                     READ
  630.                                ENDI
  631.                           ENDI
  632.                      ELSE
  633.                           IF k=-7
  634.                                REPL jje WITH js
  635.                           ENDI
  636.                           IF k=46 .OR. k=45 .OR. k>47 .AND. k<58
  637.                                KEYB CHR(k)
  638.                                @ 7+bs, 42 GET jje PICTURE '@bz 999999999.99'
  639.                                READ
  640.                           ENDI
  641.                      ENDI
  642.                      pd = jje
  643.                      IF pd<>0
  644.                           REPL dje WITH 0
  645.                      ENDI
  646.                      IF pd<0
  647.                           SET COLOR TO R+/N
  648.                           @ 7+bs, 42 SAY jje
  649.                           SET COLOR TO W/N
  650.                      ELSE
  651.                           @ 7+bs, 42 SAY jje
  652.                      ENDI
  653.                      IF pd=0
  654.                           @ 7+bs, 42 SAY '              '
  655.                           SET COLOR TO N/W
  656.                           @ 7+bs, 58 SAY dje
  657.                           SET COLOR TO W/N
  658.                           k = INKEY(0)
  659.                           IF k=1
  660.                                DO jsq-1
  661.                                IF k=-7
  662.                                     REPL dje WITH js
  663.                                ELSE
  664.                                     @ 7+bs, 71 SAY ''
  665.                                     k = INKEY(0)
  666.                                     IF k=-7
  667.                                          REPL dje WITH js
  668.                                     ELSE
  669.                                          KEYB CHR(k)
  670.                                          @ 7+bs, 58 GET dje PICTURE '@bz 9999999999.99'
  671.                                          READ
  672.                                     ENDI
  673.                                ENDI
  674.                           ELSE
  675.                                IF k=-7
  676.                                     REPL dje WITH js
  677.                                ENDI
  678.                                IF k=46 .OR. k=45 .OR. k>47 .AND. k<58
  679.                                     KEYB CHR(k)
  680.                                     @ 7+bs, 58 GET dje PICTURE '@bz 9999999999.99'
  681.                                     READ
  682.                                ENDI
  683.                           ENDI
  684.                           pd = dje
  685.                           IF pd<>0
  686.                                REPL jje WITH 0
  687.                           ENDI
  688.                           IF pd<0
  689.                                SET COLOR TO R+/N
  690.                                @ 7+bs, 58 SAY dje
  691.                                SET COLOR TO W/N
  692.                           ELSE
  693.                                @ 7+bs, 58 SAY dje
  694.                           ENDI
  695.                      ENDI
  696.                      SET COLOR TO G+/B
  697.                      IF jje<>0
  698.                           @ 7+bs, 58 SAY '              '
  699.                           @ 7+bs, 42 SAY jje
  700.                      ELSE
  701.                           @ 7+bs, 42 SAY '              '
  702.                           @ 7+bs, 58 SAY dje
  703.                      ENDI
  704.                      x = RECNO()
  705.                      DO hjxs
  706.                      GOTO x
  707.                 CASE pd=27
  708.                      IF qq=0
  709.                           pd = -1234567
  710.                           EXIT
  711.                      ELSE
  712.                           jyq = RECNO()
  713.                           SAVE SCREEN TO pm
  714.                           jyq = RECNO()
  715.                           SET COLOR TO RB+/N
  716.                           @ 11, 30 SAY '正在处理数据,请稍候 ... ...'
  717.                           SET COLOR TO W/N
  718.                           PACK
  719.                           rkm = ' '
  720.                           LOCA ALL FOR pzh=pz .AND. LEN(RTRIM(TRIM(kmdm)))=3
  721.                           IF  .NOT. EOF()
  722.                                rkm = kmdm
  723.                           ENDI
  724.                           SUM ALL FOR pzh=pz jje, dje TO a1, a2
  725.                           COUN ALL FOR pzh=pz TO a3
  726.                           IF a1=a2 .AND. a3<>1 .AND. rkm=' '
  727.                                pd = -1234567
  728.                                qq = 0
  729.                                EXIT
  730.                           ELSE
  731.                                REST SCREEN FROM pm
  732.                                IF a1<>a2 .OR. a3=1
  733.                                     ?? CHR(7)
  734.                                     SET COLOR TO BG+/RB
  735.                                     @ 0, 0 CLEAR TO 3, 28
  736.                                     @ 1, 3 SAY '凭证不平 . 请继续修改 ,'
  737.                                     @ 2, 7 SAY ' 按其他键继续!'
  738.                                     pd = INKEY(0)
  739.                                     DO qp
  740.                                     EXIT
  741.                                ELSE
  742.                                     SET COLOR TO BG+/RB
  743.                                     @ 0, 0 CLEAR TO 3, 28
  744.                                     @ 1, 3 SAY SUBSTR(rkm, 1, 3)+'是总帐科目.不能存盘!'
  745.                                     @ 2, 3 SAY '请把'+SUBSTR(rkm, 1, 3)+'换成明细科目....'
  746.                                     pd = INKEY(0)
  747.                                     DO qp
  748.                                     GOTO jyq
  749.                                ENDI
  750.                           ENDI
  751.                      ENDI
  752.                 CASE pd=-9
  753.                      SAVE SCREEN TO pm
  754.                      jyq = RECNO()
  755.                      SET COLOR TO RB+/N
  756.                      @ 11, 30 SAY '正在处理数据,请稍候 ... ...'
  757.                      SET COLOR TO W/N
  758.                      PACK
  759.                      rkm = ' '
  760.                      LOCA ALL FOR pzh=pz .AND. LEN(RTRIM(TRIM(kmdm)))=3
  761.                      IF  .NOT. EOF()
  762.                           rkm = kmdm
  763.                      ENDI
  764.                      SUM ALL FOR pzh=pz jje, dje TO a1, a2
  765.                      COUN ALL FOR pzh=pz TO a3
  766.                      IF a1=a2 .AND. a3<>1 .AND. rkm=' '
  767.                           EXIT
  768.                      ELSE
  769.                           REST SCREEN FROM pm
  770.                           IF a1<>a2 .OR. a3=1
  771.                                ?? CHR(7)
  772.                                SET COLOR TO BG+/RB
  773.                                @ 0, 0 CLEAR TO 3, 28
  774.                                @ 1, 3 SAY '凭证不平 . 请继续修改 ,'
  775.                                @ 2, 7 SAY ' 按其他键继续!'
  776.                                pd = INKEY(0)
  777.                                DO qp
  778.                                EXIT
  779.                           ELSE
  780.                                SET COLOR TO BG+/RB
  781.                                @ 0, 0 CLEAR TO 3, 28
  782.                                @ 1, 3 SAY SUBSTR(rkm, 1, 3)+'是总帐科目.不能存盘!'
  783.                                @ 2, 3 SAY '请把'+SUBSTR(rkm, 1, 3)+'换成明细科目....'
  784.                                pd = INKEY(0)
  785.                                DO qp
  786.                                GOTO jyq
  787.                           ENDI
  788.                      ENDI
  789.                 CASE pd=-3
  790.                      IF qq=0
  791.                           pz = pz+1
  792.                           EXIT
  793.                      ELSE
  794.                           jyq = RECNO()
  795.                           SAVE SCREEN TO pm
  796.                           jyq = RECNO()
  797.                           SET COLOR TO RB+/N
  798.                           @ 11, 30 SAY '正在处理数据,请稍候 ... ...'
  799.                           SET COLOR TO W/N
  800.                           PACK
  801.                           rkm = ' '
  802.                           LOCA ALL FOR pzh=pz .AND. LEN(RTRIM(TRIM(kmdm)))=3
  803.                           IF  .NOT. EOF()
  804.                                rkm = kmdm
  805.                           ENDI
  806.                           SUM ALL FOR pzh=pz jje, dje TO a1, a2
  807.                           COUN ALL FOR pzh=pz TO a3
  808.                           IF a1=a2 .AND. a3<>1 .AND. rkm=' '
  809.                                EXIT
  810.                           ELSE
  811.                                REST SCREEN FROM pm
  812.                                IF a1<>a2 .OR. a3=1
  813.                                     ?? CHR(7)
  814.                                     SET COLOR TO BG+/RB
  815.                                     @ 0, 0 CLEAR TO 3, 28
  816.                                     @ 1, 3 SAY '凭证不平 . 请继续修改 ,'
  817.                                     @ 2, 7 SAY ' 按其他键继续!'
  818.                                     pd = INKEY(0)
  819.                                     DO qp
  820.                                     EXIT
  821.                                ELSE
  822.                                     SET COLOR TO BG+/RB
  823.                                     @ 0, 0 CLEAR TO 3, 28
  824.                                     @ 1, 3 SAY SUBSTR(rkm, 1, 3)+'是总帐科目.不能存盘!'
  825.                                     @ 2, 3 SAY '请把'+SUBSTR(rkm, 1, 3)+'换成明细科目....'
  826.                                     pd = INKEY(0)
  827.                                     DO qp
  828.                                     GOTO jyq
  829.                                ENDI
  830.                           ENDI
  831.                      ENDI
  832.                 OTHE
  833.                      ?? CHR(7)
  834.            ENDC
  835.       ENDD
  836.       IF pd=-1234567
  837.            EXIT
  838.       ENDI
  839.  ENDD
  840.  ENDI
  841.  CLOS DATABASES
  842.  SET COLOR TO W+/B
  843.  @ 0, 0, 23, 79 BOX '北北北北'
  844.  SET COLOR TO W+/N
  845.  @ 1, 1, 22, 78 BOX '鞍鞍鞍鞍鞍'
  846.  @ 23, 28 SAY '当前数据的月份:'+STR(ryear, 4, 0)+'年'+STR(ryf, 2, 0)+'月' COLOR B+/BG 
  847.  @ 24, 0 SAY ' JQ001财务管理系统(Ver2.5)  黄朝生研制  版权所有  南宁市建政路51号  邮编:530023 ' COLOR R/W 
  848.  ON KEY LABEL Escape do Rquit 
  849.  SET CLOCK TO 23, 69
  850.  RETU
  851. *