uu
This commit is contained in:
@@ -97,7 +97,7 @@ function TRPCustDetail:prepareMoreData()
|
||||
attr.donotJoinKey = true
|
||||
table.insert(self.moreProcList, attr)
|
||||
--------------------------------------------
|
||||
|
||||
|
||||
self.sysFields = {}
|
||||
---@type _ParamFieldAttr
|
||||
local attr = {}
|
||||
@@ -359,21 +359,20 @@ function TRPCustDetail:showOrders()
|
||||
)
|
||||
else
|
||||
showHotWheel()
|
||||
-- //TODO:
|
||||
MyUtl.toastW("TODO:取何取得单个客户的订单???")
|
||||
NetProto.send.query_cust_calllog(self.mdata.phoneNo, nil, 1)
|
||||
NetProto.send.workFlowQuery({custId = self.mdata.custId}, "", 1)
|
||||
uiobjs.OrderRoot:setList({}, self:wrapFunc(self.initOrderCell))
|
||||
end
|
||||
|
||||
uiobjs.Table:Reposition()
|
||||
uiobjs.scrollView.disableDragIfFits = false
|
||||
uiobjs.scrollView:ResetPosition()
|
||||
self:reposition()
|
||||
end
|
||||
|
||||
function TRPCustDetail:initOrderCell(cell, data)
|
||||
cell:init(data, nil)
|
||||
cell:init(data, self:wrapFunc(self.onClickOrderCell))
|
||||
end
|
||||
|
||||
function TRPCustDetail:onClickOrderCell(cell, data)
|
||||
getPanelAsy("PanelOrderDetail", onLoadedPanelTT, data)
|
||||
end
|
||||
function TRPCustDetail:onOrderHeadList(head)
|
||||
printw("到最顶端了")
|
||||
end
|
||||
@@ -383,7 +382,7 @@ function TRPCustDetail:onOrderEndList(tail)
|
||||
if self.orders and self.orders.meta.current_page < self.orders.meta.total_pages then
|
||||
showHotWheel()
|
||||
-- //TODO:取得下一页
|
||||
NetProto.send.query_cust_calllog(self.mdata.phoneNo, nil, self.orders.meta.current_page + 1)
|
||||
NetProto.send.workFlowQuery({custId = self.mdata.custId}, "", self.orders.meta.current_page + 1)
|
||||
else
|
||||
uiobjs.ButtonEndListOrder.localPosition = tail.transform.localPosition + Vector3.up * -270
|
||||
SetActive(uiobjs.ButtonEndListOrder.gameObject, true)
|
||||
@@ -434,7 +433,7 @@ function TRPCustDetail:onClickMoreProc(el)
|
||||
elseif el.jsonKey == "smsList" then
|
||||
-- 短信记录
|
||||
elseif el.jsonKey == "opList" then
|
||||
-- 操作记录
|
||||
-- 操作记录
|
||||
end
|
||||
end
|
||||
|
||||
@@ -449,6 +448,9 @@ function TRPCustDetail:release()
|
||||
if uiobjs.MoreRoot.luaTable then
|
||||
uiobjs.MoreRoot.luaTable.release()
|
||||
end
|
||||
if uiobjs.SysRoot.luaTable then
|
||||
uiobjs.SysRoot.luaTable.release()
|
||||
end
|
||||
self.hasSetMoreProc = false
|
||||
end
|
||||
|
||||
@@ -481,11 +483,39 @@ function TRPCustDetail:procNetwork(cmd, succ, msg, paras)
|
||||
uiobjs.Records:appendList(result.data)
|
||||
end
|
||||
end
|
||||
elseif cmd == NetProto.cmds.workFlowQuery then
|
||||
local result = paras.result
|
||||
if self.orders == nil then
|
||||
self.orders = result
|
||||
else
|
||||
if self.orders.meta.current_page < result.meta.current_page then
|
||||
self.orders.meta = result.meta
|
||||
for i, v in ipairs(result.data) do
|
||||
table.insert(self.orders.data, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hideHotWheel()
|
||||
if self.orders and uiobjs.OrderRoot.gameObject.activeInHierarchy then
|
||||
if self.orders.meta.current_page == 1 then
|
||||
self:showOrders()
|
||||
else
|
||||
uiobjs.OrderRoot:appendList(result.data)
|
||||
end
|
||||
end
|
||||
elseif cmd == NetProto.cmds.update_customer then
|
||||
if self.currToggle == 1 then
|
||||
self:showDetail()
|
||||
uiobjs.Head:setValue(self.mdata)
|
||||
end
|
||||
elseif cmd == NetProto.cmds.delCustomerInfo or cmd == NetProto.cmds.backToGH then
|
||||
hideTopPanel(self.csSelf)
|
||||
elseif cmd == NetProto.cmds.createWfInfo then
|
||||
self.orders = nil
|
||||
if self.currToggle == 3 then
|
||||
self:showOrders()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user