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
ÿþ--[[
    x: WMS-61-41
     Tðy: :gðSsQT€:S-    ébsQT€ù[aŒxT
    \O€ÿHANXU
    åegÿ2023-12-28
 
    §~+RÿúVš[ (ô‹f,gµkãNx(Wy˜îv-N N*YOØSS)
 
    ýQpeÿ AfterCheckLaCode
 
    ŸRý€:
        -- 9hncsQT€ù[aŒ{|‹W<P >f:ysQT€ù[aŒx
    ôf9e°‹U_:
        V2.0  HAN 2024-1=22 
              US    ÔÞV„vpencù[aŒ N/fN*NjsonpeÄ~†N row_data[1].attrs 9e:N row_data.attrs
 
--]]
 
wms_base = require( "wms_base" )
function AfterCheckLaCode ( strLuaDEID )
    local nRet,strData
    -- ·ƒÖSb—g-NGrid-Nck(W‘„vpenc
 
 
    local row_data = {}
    nRet, row_data = m3.GetSysDataJson(strLuaDEID)
    if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "àeÕl·ƒÖS    -Npenc!"..row_data) end
    lua.Debug(strLuaDEID, debug.getinfo(1), "DataJson", row_data)
 
    row_attrs = row_data.attrs
    nCount = #row_attrs
    local strLaCode = ''
    local strAttr = ''
    local strValue = ''
    for n = 1, nCount do
        strAttr = row_attrs[n].attr
        strValue = row_attrs[n].value
        if (strAttr == "S_CODE") then
            strLaCode = strValue
        end
    end
 
    local returnVal = '{"attr":"S_LA_CODE","value":"' .. strLaCode .. '"}'
    returnVal = "[" .. returnVal .. "]"
    local strAction = '[{"action_type":"set_dlg_attr","value":' .. returnVal .. '}]'
    lua.Debug(strLuaDEID, debug.getinfo(1), "strAction", strAction)
    mobox.setAction(strLuaDEID, strAction)
end