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

企业管理

开发平台:

VFP

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