This commit is contained in:
2020-07-24 22:12:55 +08:00
parent 3f114a6fca
commit 67a1f974bf
117 changed files with 14258 additions and 2325 deletions

View File

@@ -55,6 +55,7 @@ function TRPCustDetail:init(csObj)
uiobjs.ButtonEndListOrder = getChild(uiobjs.OrderRoot.transform, "ButtonEndList")
uiobjs.MoreRoot = getCC(uiobjs.Table.transform, "MoreRoot", "CLCellLua")
uiobjs.SysRoot = getCC(uiobjs.Table.transform, "SysRoot", "CLCellLua")
end
function TRPCustDetail:prepareMoreData()
@@ -95,6 +96,69 @@ function TRPCustDetail:prepareMoreData()
attr.height = 180
attr.donotJoinKey = true
table.insert(self.moreProcList, attr)
--------------------------------------------
self.sysFields = {}
---@type _ParamFieldAttr
local attr = {}
attr.id = "loginNo"
attr.attrName = "创建人员"
attr.attrType = DBCust.FieldType.popuplist
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
local popInfor = DBUser.getPopList(DBUser.FilterGroup.user)
attr.popOptions = popInfor.options
attr.popValues = popInfor.values
table.insert(self.sysFields, attr)
---@type _ParamFieldAttr
attr = {}
attr.id = "groupId"
attr.attrName = "所属部门"
attr.attrType = DBCust.FieldType.popuplist
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
local popInfor = DBUser.getPopList(DBUser.FilterGroup.group)
attr.popOptions = popInfor.options
attr.popValues = popInfor.values
table.insert(self.sysFields, attr)
---@type _ParamFieldAttr
attr = {}
attr.id = "createTime"
attr.attrName = "创建时间"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.sysFields, attr)
---@type _ParamFieldAttr
attr = {}
attr.id = "updateTime"
attr.attrName = "更新时间"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.sysFields, attr)
---@type _ParamFieldAttr
attr = {}
attr.id = "lastFollowUpTime"
attr.attrName = "最后跟进"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.sysFields, attr)
---@type _ParamFieldAttr
attr = {}
attr.id = "followupTime"
attr.attrName = "下次跟进"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.sysFields, attr)
end
-- 设置数据
@@ -134,7 +198,7 @@ function TRPCustDetail:show()
uiobjs.InputFrom:refreshItems(optionInfor.options, optionInfor.values)
optionInfor = DBCust.getFilter4Popup(DBCust.FilterGroup.taskList)
uiobjs.InputTask:refreshItems(optionInfor.options, optionInfor.values)
local poplist = DBUser.getPopList()
local poplist = DBUser.getPopList(DBUser.FilterGroup.user)
uiobjs.InputLogin:refreshItems(poplist.options, poplist.values)
uiobjs.LabelLoginNo:refreshItems(poplist.options, poplist.values)
-- 设置星级
@@ -165,6 +229,7 @@ function TRPCustDetail:showDetail()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, true)
SetActive(uiobjs.ExtendRoot.gameObject, true)
SetActive(uiobjs.SysRoot.gameObject, true)
SetActive(uiobjs.OrderRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, false)
SetActive(uiobjs.MoreRoot.gameObject, false)
@@ -172,6 +237,7 @@ function TRPCustDetail:showDetail()
-- uiobjs.ExtendRoot:init({data = self.mdata, isEditMode = false}, nil)
self:showExtentFiles(self.mdata.taskId)
self:showSysFiles()
-- 设置星级
local stars = {}
@@ -186,6 +252,12 @@ function TRPCustDetail:showDetail()
uiobjs.scrollView:ResetPosition()
end
function TRPCustDetail:reposition()
uiobjs.Table:Reposition()
uiobjs.scrollView.disableDragIfFits = true
uiobjs.scrollView:ResetPosition()
end
---public 显示扩展字段
function TRPCustDetail:showExtentFiles(taskId)
---@type _ParamCellExtendFiledRoot
@@ -199,16 +271,36 @@ function TRPCustDetail:showExtentFiles(taskId)
for i, v in ipairs(fields) do
filedInfor = {}
filedInfor.attr = v
filedInfor.isEditMode = false
filedInfor.showMode = _FieldMode.showOnly
table.insert(param.fields, filedInfor)
end
uiobjs.ExtendRoot:init(param, nil)
end
---public 显示扩展字段
function TRPCustDetail:showSysFiles()
---@type _ParamCellExtendFiledRoot
local param = {}
param.data = self.mdata
param.onFinish = self:wrapFunc(self.reposition)
param.fields = {}
local fields = self.sysFields
---@type _ParamCellExtendFiled
local filedInfor
for i, v in ipairs(fields) do
filedInfor = {}
filedInfor.attr = v
filedInfor.showMode = _FieldMode.showOnly
table.insert(param.fields, filedInfor)
end
uiobjs.SysRoot:init(param, nil)
end
function TRPCustDetail:showRecords()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, false)
SetActive(uiobjs.ExtendRoot.gameObject, false)
SetActive(uiobjs.SysRoot.gameObject, false)
SetActive(uiobjs.OrderRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, true)
SetActive(uiobjs.MoreRoot.gameObject, false)
@@ -254,6 +346,7 @@ function TRPCustDetail:showOrders()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, false)
SetActive(uiobjs.ExtendRoot.gameObject, false)
SetActive(uiobjs.SysRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, false)
SetActive(uiobjs.OrderRoot.gameObject, true)
SetActive(uiobjs.MoreRoot.gameObject, false)
@@ -300,6 +393,7 @@ function TRPCustDetail:showMore()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, false)
SetActive(uiobjs.ExtendRoot.gameObject, false)
SetActive(uiobjs.SysRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, false)
SetActive(uiobjs.OrderRoot.gameObject, false)
SetActive(uiobjs.MoreRoot.gameObject, true)