ios
This commit is contained in:
@@ -34,7 +34,7 @@ DBOrder.onGetFilter = function(data)
|
||||
db.nextHandlerList[key].options = ArrayList()
|
||||
db.nextHandlerList[key].values = ArrayList()
|
||||
for l, u in ipairs(s.nextHandlerList) do
|
||||
db.nextHandlerList[key].options:Add(u.loginName)
|
||||
db.nextHandlerList[key].options:Add(joinStr(u.loginNo, "_", u.loginName))
|
||||
db.nextHandlerList[key].values:Add(tostring(u.loginNo))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,13 +9,12 @@ local db = {}
|
||||
local icons = {}
|
||||
local poplist = {}
|
||||
|
||||
|
||||
function DBUser.onGetUsers(list)
|
||||
poplist.options = ArrayList()
|
||||
poplist.values = ArrayList()
|
||||
for i, v in ipairs(list) do
|
||||
db[v.loginNo] = v
|
||||
poplist.options:Add(v.loginName)
|
||||
poplist.options:Add(joinStr(v.loginNo, "_", v.loginName))
|
||||
poplist.values:Add(v.loginNo)
|
||||
end
|
||||
end
|
||||
@@ -26,7 +25,7 @@ end
|
||||
|
||||
---@return _DBUser
|
||||
function DBUser.getUserById(loginNo)
|
||||
local user = db[loginNo]
|
||||
local user = db[loginNo]
|
||||
if user == nil then
|
||||
printe("get user is nil=", loginNo)
|
||||
end
|
||||
|
||||
@@ -108,4 +108,21 @@ end
|
||||
MyUtl.confirm = function(msg, callback, buttonName)
|
||||
getPanelAsy("PanelConfirm2", onLoadedPanelTT, {msg = msg, callback = callback, buttonName = buttonName})
|
||||
end
|
||||
|
||||
MyUtl.isHidePhone = true
|
||||
function MyUtl.setIsHidePhone(val)
|
||||
MyUtl.isHidePhone = (val == 1 and true or false)
|
||||
end
|
||||
|
||||
MyUtl.hidePhone = function(phone)
|
||||
if not MyUtl.isHidePhone then
|
||||
return phone
|
||||
end
|
||||
if #phone > 8 then
|
||||
return joinStr(string.sub(phone, 1, 4), "****", string.sub(phone, 9))
|
||||
else
|
||||
return joinStr(string.sub(phone, 1, 4), "****")
|
||||
end
|
||||
end
|
||||
|
||||
return MyUtl
|
||||
|
||||
@@ -28,6 +28,7 @@ end
|
||||
-- 注意,c#侧不会在调用show时,调用refresh
|
||||
function _cell.show(go, data)
|
||||
mData = data
|
||||
mData._phoneNo = MyUtl.hidePhone(mData.phoneNo)
|
||||
mData.lastFollowUpTime = isNilOrEmpty(mData.lastFollowUpTime) and "无" or mData.lastFollowUpTime
|
||||
local optionInfor = DBCust.getFilter4Popup(DBCust.FilterGroup.dealFlagList)
|
||||
uiobjs.LabelStatus:refreshItems(optionInfor.options, optionInfor.values)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---@class _ParamCellExtendFiledRoot
|
||||
---@field data any
|
||||
---@field fields table _ParamCellExtendFiled的list
|
||||
---@field onLoadOneField function 当加载完成一个字段时
|
||||
---@field onFinish function 当加载完成
|
||||
|
||||
-- xx单元
|
||||
@@ -96,6 +97,7 @@ function _cell.onLoadField(name, go, orgs)
|
||||
cell:init(param, nil)
|
||||
table.insert(fieldsObjs, cell)
|
||||
uiobjs.Table:Reposition()
|
||||
Utl.doCallback(mData.onLoadOneField, cell)
|
||||
if index == #(mData.fields) then
|
||||
_cell.onFinisInitFields()
|
||||
else
|
||||
|
||||
@@ -195,6 +195,7 @@ function CLLPStart.doEnterGame()
|
||||
if isNilOrEmpty(currGroup) then
|
||||
if #(content.result) == 1 then
|
||||
Prefs.setCurrGroup(Prefs.getUserName(), json.encode(content.result[1]))
|
||||
MyUtl.setIsHidePhone(content.result[1].cover_phoneNo_flag)
|
||||
getPanelAsy("PanelConnect", onLoadedPanel)
|
||||
else
|
||||
---@type _ParamTRPSelectGroup
|
||||
@@ -216,10 +217,12 @@ function CLLPStart.doEnterGame()
|
||||
end
|
||||
end
|
||||
if useOldCurrGroup then
|
||||
MyUtl.setIsHidePhone(currGroup.cover_phoneNo_flag)
|
||||
getPanelAsy("PanelConnect", onLoadedPanel)
|
||||
else
|
||||
if #(content.result) == 1 then
|
||||
Prefs.setCurrGroup(Prefs.getUserName(), json.encode(content.result[1]))
|
||||
MyUtl.setIsHidePhone(content.result[1].cover_phoneNo_flag)
|
||||
getPanelAsy("PanelConnect", onLoadedPanel)
|
||||
else
|
||||
---@type _ParamTRPSelectGroup
|
||||
|
||||
@@ -50,6 +50,7 @@ end
|
||||
---@param paras _ParamTRPCustDetail
|
||||
function TRPCustDetail:setData(paras)
|
||||
self.mdata = paras
|
||||
self.mdata._phoneNo = MyUtl.hidePhone(self.mdata.phoneNo)
|
||||
if type(self.mdata.jsonStr) == "string" then
|
||||
self.mdata.jsonStr = json.decode(self.mdata.jsonStr)
|
||||
end
|
||||
|
||||
@@ -128,6 +128,7 @@ end
|
||||
|
||||
-- 关闭页面
|
||||
function TRPCustList:hide()
|
||||
self.filterValue = nil
|
||||
end
|
||||
|
||||
-- 网络请求的回调;cmd:指命,succ:成功失败,msg:消息;paras:服务器下行数据
|
||||
|
||||
@@ -97,6 +97,7 @@ function TRPLogin:setEventDelegate()
|
||||
formData,
|
||||
function(content, orgs)
|
||||
if content.success then
|
||||
MyUtl.setIsHidePhone(content.result.cover_phoneNo_flag)
|
||||
Prefs.setUserName(formData.phone)
|
||||
Prefs.setUserPsd(formData.password)
|
||||
|
||||
@@ -104,6 +105,7 @@ function TRPLogin:setEventDelegate()
|
||||
if isNilOrEmpty(currGroup) then
|
||||
if #(content.result) == 1 then
|
||||
Prefs.setCurrGroup(Prefs.getUserName(), json.encode(content.result[1]))
|
||||
MyUtl.setIsHidePhone(content.result[1].cover_phoneNo_flag)
|
||||
getPanelAsy("PanelConnect", onLoadedPanel)
|
||||
else
|
||||
---@type _ParamTRPSelectGroup
|
||||
@@ -113,6 +115,7 @@ function TRPLogin:setEventDelegate()
|
||||
getPanelAsy("PanelSelectCompany", onLoadedPanel, d)
|
||||
end
|
||||
else
|
||||
MyUtl.setIsHidePhone(currGroup.cover_phoneNo_flag)
|
||||
getPanelAsy("PanelConnect", onLoadedPanel)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -41,6 +41,7 @@ function TRPNewCust:setData(paras)
|
||||
if paras and paras.custId > 0 then
|
||||
self.isNewCust = false
|
||||
self.mdata = paras
|
||||
self.mdata._phoneNo = MyUtl.hidePhone(self.mdata.phoneNo)
|
||||
else
|
||||
self.isNewCust = true
|
||||
self.mdata = {}
|
||||
@@ -386,6 +387,7 @@ function TRPNewCust:setEventDelegate()
|
||||
end
|
||||
|
||||
local cust = uiobjs.DetailRoot:getValue(true)
|
||||
cust.phoneNo = cust._phoneNo
|
||||
cust.customerLabel = self.mdata.customerLabel
|
||||
local jsonStr = uiobjs.ExtendFormRoot:getValue(true)
|
||||
cust.jsonStr = jsonStr
|
||||
|
||||
@@ -73,7 +73,7 @@ function TRPNewOrder:initFiledsAttr()
|
||||
|
||||
attr = {}
|
||||
attr.attrName = "客户号码"
|
||||
attr.id = "phoneNo"
|
||||
attr.id = "_phoneNo"
|
||||
attr.attrType = DBCust.FieldType.text
|
||||
attr.ifMust = 1
|
||||
attr.donotJoinKey = true
|
||||
@@ -129,6 +129,7 @@ function TRPNewOrder:setData(paras)
|
||||
if paras and paras.orderId and paras.orderId > 0 then
|
||||
self.isNewOrder = false
|
||||
self.mdata = paras
|
||||
self.mdata._phoneNo = MyUtl.hidePhone(self.mdata.phoneNo)
|
||||
|
||||
if type(self.mdata.attrJson) == "string" then
|
||||
self.mdata.attrJson = json.decode(self.mdata.attrJson)
|
||||
@@ -324,15 +325,19 @@ function TRPNewOrder:setElementMode(el)
|
||||
local boxcollider = el:GetComponent("BoxCollider")
|
||||
local ButtonReset = getCC(el.transform, "ButtonReset", "MyInputReset")
|
||||
|
||||
if ButtonReset then
|
||||
ButtonReset.disabled = (not self.isNewOrder)
|
||||
end
|
||||
|
||||
if el.jsonKey == "taskId" or el.jsonKey == "phoneNo" then
|
||||
boxcollider.enabled = false
|
||||
if ButtonReset then
|
||||
ButtonReset.disabled = true
|
||||
end
|
||||
else
|
||||
boxcollider.enabled = true
|
||||
end
|
||||
|
||||
if ButtonReset then
|
||||
ButtonReset.disabled = (not self.isNewOrder)
|
||||
end
|
||||
if input then
|
||||
if isPopList or isPopCheckbox then
|
||||
input.enabled = false
|
||||
@@ -509,9 +514,14 @@ function TRPNewOrder:setEventDelegate()
|
||||
return
|
||||
end
|
||||
local order = uiobjs.DetailFromRoot:getValue(true)
|
||||
if self.cust then
|
||||
order.phoneNo = self.cust.phoneNo
|
||||
end
|
||||
order.custId = self.cust.custId
|
||||
local attrJson = uiobjs.ExtendFormRoot:getValue(true)
|
||||
order.attrJson = attrJson
|
||||
if uiobjs.ExtendFormRoot.gameObject.activeInHierarchy then
|
||||
local attrJson = uiobjs.ExtendFormRoot:getValue(true)
|
||||
order.attrJson = attrJson
|
||||
end
|
||||
if uiobjs.StepFormRoot.gameObject.activeInHierarchy then
|
||||
order = uiobjs.StepFormRoot:getValue(order, true)
|
||||
end
|
||||
|
||||
@@ -97,6 +97,7 @@ function TRPSelectCompany:setEventDelegate()
|
||||
end
|
||||
-- 缓存一下,下次进来后就不用再先公司了
|
||||
Prefs.setCurrGroup(Prefs.getUserName(), json.encode(selectedCompany))
|
||||
MyUtl.setIsHidePhone(selectedCompany.cover_phoneNo_flag)
|
||||
getPanelAsy("PanelConnect", onLoadedPanel)
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1681,7 +1681,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: faeca5bfa217c493c8446b842f01a3fa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
jsonKey: phoneNo
|
||||
jsonKey: _phoneNo
|
||||
formatValue:
|
||||
labeName: {fileID: 1280138961897951088}
|
||||
defaultName:
|
||||
@@ -8600,7 +8600,7 @@ MonoBehaviour:
|
||||
anchorOffset: 0
|
||||
softBorderPadding: 1
|
||||
renderQueue: 0
|
||||
startingRenderQueue: 3000
|
||||
startingRenderQueue: 3004
|
||||
mClipTexture: {fileID: 0}
|
||||
mAlpha: 1
|
||||
mClipping: 0
|
||||
@@ -11892,7 +11892,7 @@ MonoBehaviour:
|
||||
anchorOffset: 0
|
||||
softBorderPadding: 1
|
||||
renderQueue: 0
|
||||
startingRenderQueue: 3010
|
||||
startingRenderQueue: 3014
|
||||
mClipTexture: {fileID: 0}
|
||||
mAlpha: 1
|
||||
mClipping: 3
|
||||
|
||||
@@ -3310,7 +3310,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: faeca5bfa217c493c8446b842f01a3fa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
jsonKey: phoneNo
|
||||
jsonKey: _phoneNo
|
||||
formatValue:
|
||||
labeName: {fileID: 0}
|
||||
defaultName:
|
||||
|
||||
@@ -194,7 +194,7 @@ MonoBehaviour:
|
||||
mWidth: 575
|
||||
mHeight: 120
|
||||
mDepth: 6
|
||||
autoResizeBoxCollider: 0
|
||||
autoResizeBoxCollider: 1
|
||||
hideIfOffScreen: 0
|
||||
keepAspectRatio: 0
|
||||
aspectRatio: 4.7916665
|
||||
@@ -1143,7 +1143,7 @@ MonoBehaviour:
|
||||
mWidth: 575
|
||||
mHeight: 120
|
||||
mDepth: 6
|
||||
autoResizeBoxCollider: 0
|
||||
autoResizeBoxCollider: 1
|
||||
hideIfOffScreen: 0
|
||||
keepAspectRatio: 0
|
||||
aspectRatio: 7.0416665
|
||||
|
||||
@@ -5823,7 +5823,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: faeca5bfa217c493c8446b842f01a3fa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
jsonKey: phoneNo
|
||||
jsonKey: _phoneNo
|
||||
formatValue:
|
||||
labeName: {fileID: 5391889881658380677}
|
||||
defaultName:
|
||||
|
||||
@@ -687,7 +687,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
audioSource: {fileID: 0}
|
||||
mUrl:
|
||||
audioType: 13
|
||||
mDefaultAudioType: 20
|
||||
myClip: {fileID: 0}
|
||||
isPlaying: 0
|
||||
--- !u!1 &2195943103738195833
|
||||
|
||||
Reference in New Issue
Block a user