SELECT * FROM kqb
INTO CURSOR a
GO TOP
DO WHILE NOT EOF()
bh=ALLTRIM(原因)+ALLTRIM(单位)
IF bh="病假天"
UPDATE kqb SET 总分=0.1 WHERE 原因="病假" AND 单位="天" AND 时间 between 1 AND 2
UPDATE kqb SET 总分=0.2 WHERE 原因="病假" AND 单位="天" AND 时间 between 3 AND 5
UPDATE kqb SET 总分=0.3 WHERE 原因="病假" AND 单位="天" AND 时间 between 6 AND 10
UPDATE kqb SET 总分=0.5 WHERE 原因="病假" AND 单位="天" AND 时间 between 11 AND 20
UPDATE kqb SET 总分=0.7 WHERE 原因="病假" AND 单位="天" AND 时间 between 21 AND 31
UPDATE kqb SET 总分=0.8*时间 WHERE 原因="病假" AND 单位="月"
ELSE
SELECT 标准 FROM bz WHERE 类型=bh INTO ARRAY a
UPDATE kqb SET 总分=时间*a WHERE ALLTRIM(原因)=LEFT(bh,4) AND ALLTRIM(单位)=RIGHT(bh,2)
ENDIF
SKIP
ENDDO
BROWSE
能实现但病假这块相当于固定命令,若标准一改又得改程序有哪位愿意帮下忙不