up
This commit is contained in:
@@ -41,6 +41,7 @@ MyUtl.callCust = function(cust)
|
||||
end
|
||||
cust.jsonStr = cust.jsonStr or {}
|
||||
local phones = ArrayList()
|
||||
local phonesVal = ArrayList()
|
||||
|
||||
local taskId = tostring(cust.taskId)
|
||||
local fields = DBCust.getFieldsByTask(taskId)
|
||||
@@ -48,15 +49,17 @@ MyUtl.callCust = function(cust)
|
||||
if attr.attrType == DBCust.FieldType.phone then
|
||||
local phNo = cust.jsonStr[joinStr(attr.id, "_", attr.attrName)]
|
||||
if not isNilOrEmpty(phNo) then
|
||||
phones:Add(joinStr(attr.attrName,": ", phNo))
|
||||
phones:Add(joinStr(attr.attrName, ": ", phNo))
|
||||
phonesVal:Add(phNo)
|
||||
end
|
||||
end
|
||||
end
|
||||
if phones.Count > 0 then
|
||||
phones:Insert(0, joinStr("默认: ",cust.phoneNo))
|
||||
phones:Insert(0, joinStr("默认: ", cust.phoneNo))
|
||||
phonesVal:Insert(0, cust.phoneNo)
|
||||
CLUIPopListPanel.show(
|
||||
phones,
|
||||
phones,
|
||||
phonesVal,
|
||||
function(val, selectedItem)
|
||||
if val then
|
||||
MyUtl.doCall(cust.custId, val)
|
||||
@@ -83,4 +86,18 @@ MyUtl.doCall = function(custId, phoneNo)
|
||||
)
|
||||
end
|
||||
|
||||
MyUtl.toast = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.normal, staySec)
|
||||
end
|
||||
MyUtl.toastS = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.success, staySec)
|
||||
end
|
||||
MyUtl.toastW = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.warning, staySec)
|
||||
end
|
||||
|
||||
MyUtl.toastE = function(msg, staySec)
|
||||
CLToastRoot.toast(msg, CLToastRoot.Type.error, staySec)
|
||||
end
|
||||
|
||||
return MyUtl
|
||||
|
||||
Reference in New Issue
Block a user