This commit is contained in:
2020-07-15 20:53:37 +08:00
parent f02f8e2308
commit 2092e4ef94
46 changed files with 200 additions and 154 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -128,6 +128,7 @@ end
-- 关闭页面
function TRPCustList:hide()
self.filterValue = nil
end
-- 网络请求的回调cmd指命succ成功失败msg消息paras服务器下行数据

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
}