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

企业管理

开发平台:

VFP

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