upgrade
This commit is contained in:
@@ -18,6 +18,7 @@ function TRPCustDetail:init(csObj)
|
||||
|
||||
---@type UIScrollView
|
||||
uiobjs.scrollView = getCC(self.transform, "PanelContent", "UIScrollView")
|
||||
uiobjs.scrollView.dampenStrength = MyUtl.dampenStrength
|
||||
---@type UITable
|
||||
uiobjs.Table = getCC(uiobjs.scrollView.transform, "Table", "UITable")
|
||||
|
||||
@@ -79,6 +80,7 @@ function TRPCustDetail:prepareMoreData()
|
||||
attr.donotJoinKey = true
|
||||
table.insert(self.moreProcList, attr)
|
||||
|
||||
--[[
|
||||
attr = {}
|
||||
attr.id = "smsList"
|
||||
attr.attrName = "短信记录"
|
||||
@@ -96,6 +98,7 @@ function TRPCustDetail:prepareMoreData()
|
||||
attr.height = 180
|
||||
attr.donotJoinKey = true
|
||||
table.insert(self.moreProcList, attr)
|
||||
]]
|
||||
--------------------------------------------
|
||||
|
||||
self.sysFields = {}
|
||||
@@ -164,6 +167,7 @@ end
|
||||
-- 设置数据
|
||||
---@param paras _ParamTRPCustDetail
|
||||
function TRPCustDetail:setData(paras)
|
||||
---@type _DBCust
|
||||
self.mdata = paras
|
||||
self.mdata._phoneNo = MyUtl.hidePhone(self.mdata.phoneNo)
|
||||
if type(self.mdata.jsonStr) == "string" then
|
||||
@@ -248,6 +252,7 @@ function TRPCustDetail:showDetail()
|
||||
CLUIUtl.resetList4Lua(uiobjs.starGrid2, uiobjs.starGridPrefab2, stars, self:wrapFunc(self.initStarCell))
|
||||
|
||||
uiobjs.Table:Reposition()
|
||||
uiobjs.scrollView.restrictWithinPanel = true
|
||||
uiobjs.scrollView.disableDragIfFits = true
|
||||
uiobjs.scrollView:ResetPosition()
|
||||
end
|
||||
@@ -304,6 +309,11 @@ function TRPCustDetail:showRecords()
|
||||
SetActive(uiobjs.OrderRoot.gameObject, false)
|
||||
SetActive(uiobjs.Records.gameObject, true)
|
||||
SetActive(uiobjs.MoreRoot.gameObject, false)
|
||||
if self.records == nil or #(self.records.data) then
|
||||
SetActive(uiobjs.ButtonEndList.gameObject, true)
|
||||
else
|
||||
SetActive(uiobjs.ButtonEndList.gameObject, false)
|
||||
end
|
||||
if self.records then
|
||||
uiobjs.Records:setList(
|
||||
self.records.data or {},
|
||||
@@ -317,9 +327,7 @@ function TRPCustDetail:showRecords()
|
||||
uiobjs.Records:setList({}, self:wrapFunc(self.initRecordCell))
|
||||
end
|
||||
|
||||
uiobjs.Table:Reposition()
|
||||
uiobjs.scrollView.disableDragIfFits = false
|
||||
uiobjs.scrollView:ResetPosition()
|
||||
self:reposition()
|
||||
end
|
||||
|
||||
function TRPCustDetail:initRecordCell(cell, data)
|
||||
@@ -350,6 +358,12 @@ function TRPCustDetail:showOrders()
|
||||
SetActive(uiobjs.Records.gameObject, false)
|
||||
SetActive(uiobjs.OrderRoot.gameObject, true)
|
||||
SetActive(uiobjs.MoreRoot.gameObject, false)
|
||||
|
||||
if self.orders == nil or #(self.orders.data) then
|
||||
SetActive(uiobjs.ButtonEndListOrder.gameObject, true)
|
||||
else
|
||||
SetActive(uiobjs.ButtonEndListOrder.gameObject, false)
|
||||
end
|
||||
if self.orders then
|
||||
uiobjs.OrderRoot:setList(
|
||||
self.orders.data or {},
|
||||
@@ -419,17 +433,19 @@ function TRPCustDetail:showMore()
|
||||
end
|
||||
|
||||
uiobjs.Table:Reposition()
|
||||
uiobjs.scrollView.restrictWithinPanel = true
|
||||
uiobjs.scrollView.disableDragIfFits = true
|
||||
uiobjs.scrollView:ResetPosition()
|
||||
end
|
||||
|
||||
---@param el CLUIElement
|
||||
function TRPCustDetail:onClickMoreProc(el)
|
||||
MyUtl.toastW("TODO:" .. el.jsonKey)
|
||||
if el.jsonKey == "follows" then
|
||||
-- 跟进记录
|
||||
getPanelAsy("PanelFollowList", onLoadedPanelTT, {custId = self.mdata.custId})
|
||||
elseif el.jsonKey == "followTasks" then
|
||||
-- 预约记录
|
||||
getPanelAsy("PanelTaskList", onLoadedPanelTT, {custId = self.mdata.custId})
|
||||
elseif el.jsonKey == "smsList" then
|
||||
-- 短信记录
|
||||
elseif el.jsonKey == "opList" then
|
||||
|
||||
Reference in New Issue
Block a user