call modify

This commit is contained in:
2020-11-30 22:39:38 +08:00
parent afd1ec7926
commit 98f0941160
22 changed files with 135 additions and 97 deletions

View File

@@ -42,6 +42,39 @@ MyUtl.getSizeAdjust = function()
return _sizeAdjust
end
---@param cust _DBCust
MyUtl.showCallOption = function(cust)
---@type _ParamCLLPPopList2
local params = {}
params.title = "拨号选择"
params.list = {}
table.insert(
params.list,
{
index = 1,
name = joinStr("云拨号:", cust._phoneNo),
subname = joinStr("", DBCust.getTaskName(cust.custName))
}
)
table.insert(
params.list,
{
index = 2,
name = joinStr("本机拨号:", cust._phoneNo),
subname = joinStr("", DBCust.getTaskName(cust.custName))
}
)
params.callback = function(d)
local index = d.index
if index == 1 then
MyUtl.callCust(cust)
else
MyUtl.callCustByNative(cust.phoneNo, cust)
end
end
getPanelAsy("PanelPopList2", onLoadedPanelTT, params)
end
---public 拨号
MyUtl.callCust = function(cust)
if type(cust.jsonStr) == "string" then
@@ -147,7 +180,9 @@ MyUtl.callCustByNative = function(phoneNo, cust)
else
Application.OpenURL(joinStr("tel:", phoneNo))
end
getPanelAsy("PanelNewFollowSimple", onLoadedPanelTT, cust)
if cust then
getPanelAsy("PanelNewFollowSimple", onLoadedPanelTT, cust)
end
end
MyUtl.toast = function(msg, staySec)

View File

@@ -73,7 +73,7 @@ function _cell.uiEventDelegate(go)
elseif goName == "ButtonTask" then
getPanelAsy("PanelNewFollowTask", onLoadedPanelTT, mData)
elseif goName == "ButtonContact" then
MyUtl.callCust(mData)
MyUtl.showCallOption(mData)
end
end

View File

@@ -590,7 +590,7 @@ function TRPCustDetail:setEventDelegate()
getPanelAsy("PanelNewFollowTask", onLoadedPanelTT, self.mdata)
end,
ButtonCall = function()
MyUtl.callCust(self.mdata)
MyUtl.showCallOption(self.mdata)
end,
ButtonNewOrder = function()
getPanelAsy("PanelNewOrder", onLoadedPanelTT, self.mdata)

View File

@@ -193,6 +193,7 @@ function TRPMakeCall.uiEventDelegate(go)
MyUtl.toastW("请输入要呼叫的号码")
return
end
MyUtl.callCustByNative(InputNumber.value)
elseif goName == "ButtonCallYun" then
if InputNumber.value == nil or InputNumber.value == "" then
MyUtl.toastW("请输入要呼叫的号码")

View File

@@ -65,8 +65,10 @@ end
---@param paras _ParamTRPNewFollowSimple
function TRPNewFollowSimple:setData(paras)
self.mdata = {}
self.mdata.custId = paras.custId
self.mdata.taskId = paras.taskId
if paras then
self.mdata.custId = paras.custId
self.mdata.taskId = paras.taskId
end
self.mdata.followUpType = "0"
self.mdata.dealFlag = "0"
self.isNewFollow = true