add file open
This commit is contained in:
@@ -25,6 +25,7 @@ function TRPNewFollowTask:init(csObj)
|
||||
|
||||
uiobjs.ButtonSave = getChild(self.transform, "Top/ButtonSave")
|
||||
uiobjs.ButtonCustDetail = getChild(self.transform, "ButtonCustDetail")
|
||||
uiobjs.ButtonNewFollow = getChild(self.transform, "ButtonNewFollow")
|
||||
end
|
||||
|
||||
function TRPNewFollowTask:initFiledsAttr()
|
||||
@@ -99,13 +100,16 @@ end
|
||||
function TRPNewFollowTask:show()
|
||||
if self.isNewFollow then
|
||||
SetActive(uiobjs.ButtonCustDetail.gameObject, false)
|
||||
SetActive(uiobjs.ButtonNewFollow.gameObject, false)
|
||||
else
|
||||
---@type Coolape.CLPanelLua
|
||||
local panel = CLPanelManager.getPanel("PanelCustDetail")
|
||||
if panel and panel.gameObject.activeInHierarchy then
|
||||
SetActive(uiobjs.ButtonCustDetail.gameObject, false)
|
||||
SetActive(uiobjs.ButtonNewFollow.gameObject, false)
|
||||
else
|
||||
SetActive(uiobjs.ButtonCustDetail.gameObject, true)
|
||||
SetActive(uiobjs.ButtonNewFollow.gameObject, true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -232,6 +236,8 @@ function TRPNewFollowTask:procNetwork(cmd, succ, msg, paras)
|
||||
if (succ == NetSuccess) then
|
||||
if cmd == NetProto.cmds.update_customer then
|
||||
self:refreshContent()
|
||||
elseif cmd == NetProto.cmds.create_followUp_record then
|
||||
self:refreshContent()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -245,6 +251,12 @@ function TRPNewFollowTask:setEventDelegate()
|
||||
return
|
||||
end
|
||||
self.mdata = uiobjs.DetailFromRoot:getValue(self.mdata, true)
|
||||
-- 时间处理
|
||||
local setDt = DateTime.Parse( self.mdata.bookingTime)
|
||||
if setDt:ToFileTime() < DateTime.Now:ToFileTime() then
|
||||
MyUtl.toastW("预约时间已过,请选择未来的预约时间")
|
||||
return
|
||||
end
|
||||
showHotWheel()
|
||||
NetProto.send.create_followUp_task(
|
||||
self.mdata,
|
||||
@@ -266,15 +278,27 @@ function TRPNewFollowTask:setEventDelegate()
|
||||
if content.success then
|
||||
local cust = content.result
|
||||
if cust then
|
||||
---@type _ParamTRPCustDetail
|
||||
local param = {}
|
||||
param.cust = cust
|
||||
param.bookingData = self.mdata
|
||||
param.needShowMore = false
|
||||
getPanelAsy(
|
||||
"PanelCustDetailSimple",
|
||||
onLoadedPanelTT,
|
||||
{cust = cust, isShowButtonGet = false}
|
||||
"PanelCustDetail",
|
||||
onLoadedPanelTF,
|
||||
param
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
end,
|
||||
ButtonNewFollow = function()
|
||||
---@type _ParamTRPNewFollow
|
||||
local param = {}
|
||||
param.cust = self.mdata
|
||||
param.bookingData = self.mdata
|
||||
getPanelAsy("PanelNewFollow", onLoadedPanelTT, param)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user