up
This commit is contained in:
@@ -3,7 +3,7 @@ local db = {}
|
||||
|
||||
DBOrder.PopListGroup = {
|
||||
urgencyLevels = "urgencyLevels", -- 紧急程序
|
||||
templateList = "templateList", -- 订单模板
|
||||
templateList = "templateList" -- 订单模板
|
||||
}
|
||||
|
||||
DBOrder.onGetFilter = function(data)
|
||||
@@ -11,26 +11,76 @@ DBOrder.onGetFilter = function(data)
|
||||
|
||||
-- 转换成poplist
|
||||
db.filtersPopup = {}
|
||||
db.templateFields = {}
|
||||
db.templateInfor = {}
|
||||
db.nextHandlerList = {}
|
||||
for k, cells in pairs(data) do
|
||||
db.filtersPopup[k] = {}
|
||||
---@type System.Collections.ArrayList
|
||||
db.filtersPopup[k].options = ArrayList()
|
||||
db.filtersPopup[k].values = ArrayList()
|
||||
|
||||
-- db.filtersPopup[k].options:Add("")
|
||||
-- db.filtersPopup[k].values:Add("")
|
||||
for i, s in ipairs(cells) do
|
||||
local key = tostring(s.value)
|
||||
db.filtersPopup[k].options:Add(s.name)
|
||||
db.filtersPopup[k].values:Add(tostring(s.value))
|
||||
db.filtersPopup[k].values:Add(key)
|
||||
if k == DBOrder.PopListGroup.templateList then
|
||||
db.templateInfor[key] = s
|
||||
db.templateFields[key] = s.fieldAttr -- 设置任务的扩展字段
|
||||
-- db.templateFields[key]
|
||||
if s.nextHandlerList then
|
||||
db.nextHandlerList[key] = {} -- 下一步处理人
|
||||
db.nextHandlerList[key].options = ArrayList()
|
||||
db.nextHandlerList[key].values = ArrayList()
|
||||
for l, u in ipairs(s.nextHandlerList) do
|
||||
db.nextHandlerList[key].options:Add(u.loginName)
|
||||
db.nextHandlerList[key].values:Add(tostring(u.loginNo))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
DBCust.getPopupList = function(popGroup)
|
||||
DBOrder.getPopupList = function(popGroup)
|
||||
if popGroup then
|
||||
return db.filtersPopup[popGroup]
|
||||
end
|
||||
return db.filters
|
||||
end
|
||||
|
||||
DBOrder.getFields = function(templateId)
|
||||
if not templateId then
|
||||
return {}
|
||||
end
|
||||
templateId = tostring(templateId)
|
||||
return db.templateFields[templateId] or {}
|
||||
end
|
||||
|
||||
DBOrder.getTemplateInfor = function(templateId)
|
||||
if not templateId then
|
||||
return {}
|
||||
end
|
||||
templateId = tostring(templateId)
|
||||
return db.templateInfor[templateId] or {}
|
||||
end
|
||||
|
||||
DBOrder.getNextHandler = function(templateId)
|
||||
if not templateId then
|
||||
return nil
|
||||
end
|
||||
templateId = tostring(templateId)
|
||||
return db.nextHandlerList[templateId]
|
||||
end
|
||||
|
||||
--==============================================================================
|
||||
DBOrder.onGetProducts = function(content)
|
||||
db.products = content.productList
|
||||
end
|
||||
|
||||
DBOrder.getProducts = function()
|
||||
return db.products
|
||||
end
|
||||
--==============================================================================
|
||||
return DBOrder
|
||||
|
||||
Reference in New Issue
Block a user