lzh
2025-06-24 13c4a636539584ab977fddacfae884b3ec250aee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
ÿþ--[[
   x: hh-mobox-006
    Tðy: ;`pe
   \O€ÿSGX
   åegÿ2024-11-17
 
   ýQpeÿ GenerateViewHTML
   ŸRý€:
   
   ôf9e°‹U_:
 
--]] json = require("json")
mobox = require("OILua_JavelinExt")
m3 = require( "oi_base_mobox" )
 
function GenerateViewHTML(strLuaDEID)
    local nRet, strRetInfo
    --[[ ¹eWW1 ]]
    local count
    local strCondtion = "EXTRACT(YEAR FROM T_CREATE) = EXTRACT(YEAR FROM SYSDATE) AND S_OP_NAME IN('‰|™eeQ“^','™eeQ“^','ýVêzzXbÞV“^','Ëz“^eQ“^','ÝO)nPg™eeQ“^')"
    nRet, count = mobox.getDataObjCount(strLuaDEID, "Task", strCondtion)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖSûN¡R1Y%!"..count) end
 
    local strFKTitle1 = "t^¦^eQ“^;`ϑ";
    local strFKData1 = count;
    local strFKBack1 = "#8BC34A";
    --[[ ¹eWW2 ]]
    strCondtion = "EXTRACT(YEAR FROM T_CREATE) = EXTRACT(YEAR FROM SYSDATE) AND S_OP_NAME IN('‰|™eúQ“^','|TëSzzXb','Ǒ-'','Ëz“^úQ“^')"
    nRet, count = mobox.getDataObjCount(strLuaDEID, "Task", strCondtion)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖSûN¡R1Y%!"..count) end
    local strFKTitle2 = "t^¦^úQ“^;`ϑ";
    local strFKData2 = count;
    local strFKBack2 = "#FF9800";
 
    -- local strHtml = '<div class="table2">' ..
    --                     '<div style="width: 190px;height: 110px;background: '..strFKBack1..';border-radius: 7px;margin: 15% 11%;padding: 10px;">' ..
    --                     '<div style="color: #fff;font-size: 15px;">' .. strFKTitle1 .. '</div>' ..
    --                     '<div style="font-size: 40px;margin: 2px 0px 0px 0px;text-align: center;color: #fff;">' ..
    --                     strFKData1 .. '</div>' .. '</div>' .. '<div style="width: 190px;height: 110px;background: ' ..
    --                     strFKBack2 .. ';border-radius: 7px;margin: -33% 56%;padding: 10px;">' ..
    --                     '<div style=" color: #fff;font-size: 15px;">' .. strFKTitle2 .. '</div>' ..
    --                     '<div style="font-size: 40px;margin: 2px 0px 0px 0px;text-align: center;color: #fff;">' ..
    --                     strFKData2 .. '</div>' .. '</div>' .. '</div>'
 
    local strHtml = '<div class="table2" style="display: flex;    margin: 82px 82px;">' ..
                        '<div style="width: 190px;height: 110px;background: ' .. strFKBack1 ..
                        ';border-radius: 7px;padding: 10px;">' .. '<div style="color: #fff;font-size: 15px;">' ..
                        strFKTitle1 .. '</div>' ..
                        '<div style="font-size: 40px;margin: 2px 0px 0px 0px;text-align: center;color: #fff;">' ..
                        strFKData1 .. '</div>' .. '</div>' .. '<div style="margin-left: 59px;width: 190px;height: 110px;background: ' ..
                        strFKBack2 .. ';border-radius: 7px;padding: 10px;">' ..
                        '<div style=" color: #fff;font-size: 15px;">' .. strFKTitle2 .. '</div>' ..
                        '<div style="font-size: 40px;margin: 2px 0px 0px 0px;text-align: center;color: #fff;">' ..
                        strFKData2 .. '</div>' .. '</div>' .. '</div>'
    local action = {}
    action[1] = {
        action_type = "chart",
        value = {
            graphicType = "html",
            title = {
                text = ";`pe",
                align = "center",
                color = "#000",
                font = "®_oÅ–Ñž",
                fontSize = 16
            },
            html = strHtml
        }
    }
 
    -- lua.Debug( strLuaDEID, debug.getinfo(1), "action! ", action )
 
    nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action))
    if (nRet ~= 0) then
        lua.Error(strLuaDEID, debug.getinfo(1), "setAction1Y%! " .. strRetInfo .. ' action = ' .. strAction)
    end
end