2020-07-08
This commit is contained in:
@@ -29,13 +29,26 @@ local mApplicationPauseDelegate = {}
|
||||
|
||||
CLLMainLua.init = function()
|
||||
MyCfg.mode = GameMode.none
|
||||
-- 日志logveiw
|
||||
if ReporterMessageReceiver.self ~= nil then
|
||||
ReporterMessageReceiver.self.gameObject:SetActive(true)
|
||||
ReporterMessageReceiver.self.luaPath = "KOK/upgradeRes/priority/lua/toolkit/KKLogListener.lua"
|
||||
ReporterMessageReceiver.self:setLua()
|
||||
end
|
||||
-- 设置显示状态栏
|
||||
AndroidStatusBar.setFlags(AndroidStatusBar.WINDOW_FLAG_FORCE_NOT_FULLSCREEN)
|
||||
AndroidStatusBar.setColor(AndroidStatusBar.DEFAULT_WHITE_COLOR)
|
||||
-- Screen.fullScreen = false
|
||||
-- AndroidStatusBar.setColor(AndroidStatusBar.DEFAULT_BACKGROUND_COLOR)
|
||||
-- AndroidStatusBar.statusBarState = AndroidStatusBar.States.Visible
|
||||
-- AndroidStatusBar.dimmed = false
|
||||
-- AndroidStatusBar.setFlags(AndroidStatusBar.WINDOW_FLAG_FORCE_NOT_FULLSCREEN)
|
||||
|
||||
CS.ApplicationChrome.statusBarState = CS.ApplicationChrome.States.Visible
|
||||
CS.ApplicationChrome.dimmed = false
|
||||
|
||||
--设置帧率
|
||||
Application.targetFrameRate = 10
|
||||
QualitySettings.SetQualityLevel(1, false)
|
||||
Time.fixedDeltaTime = 60
|
||||
-- QualitySettings.SetQualityLevel(1, false)
|
||||
Time.fixedDeltaTime = 0.5
|
||||
|
||||
-- 设置是否测试环境
|
||||
if (Prefs.getTestMode()) then
|
||||
@@ -48,16 +61,11 @@ CLLMainLua.init = function()
|
||||
|
||||
local fps = CLMainBase.self:GetComponent("CLFPS")
|
||||
fps.displayRect = Rect(10, 200, 640, 40)
|
||||
fps.enabled = false
|
||||
-- if Net.self.switchNetType == NetWorkType.publish then
|
||||
-- fps.enabled = false
|
||||
-- end
|
||||
|
||||
if Net.self.switchNetType == NetWorkType.publish then
|
||||
fps.enabled = false
|
||||
end
|
||||
|
||||
-- 日志logveiw
|
||||
if ReporterMessageReceiver.self ~= nil then
|
||||
ReporterMessageReceiver.self.luaPath = "KOK/upgradeRes/priority/lua/toolkit/KKLogListener.lua"
|
||||
ReporterMessageReceiver.self:setLua()
|
||||
end
|
||||
|
||||
-- 统计sprite的使用情况
|
||||
if CLCfgBase.self.isEditMode and CLCfgBase.self.isContBorrowSpriteTimes then
|
||||
@@ -161,7 +169,10 @@ function CLLMainLua.onCheckUpgrader(isHaveUpdated)
|
||||
end
|
||||
|
||||
function CLLMainLua.begain()
|
||||
pcall(CLLMainLua.init)
|
||||
local success, msg = pcall(CLLMainLua.init)
|
||||
if not success then
|
||||
printe(msg)
|
||||
end
|
||||
|
||||
-- 处理开始
|
||||
if (CLCfgBase.self.isEditMode) then
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
---@field taskId
|
||||
---@field serviceNo
|
||||
---@field companyid
|
||||
---@field jsonstr
|
||||
---@field jsonStr
|
||||
---@field dealflag
|
||||
---@field custFrom
|
||||
---@field customerLabel
|
||||
@@ -57,8 +57,8 @@ DBCust.onGetFilter = function(data)
|
||||
db.filtersPopup[k].options = ArrayList()
|
||||
db.filtersPopup[k].values = ArrayList()
|
||||
|
||||
db.filtersPopup[k].options:Add("")
|
||||
db.filtersPopup[k].values:Add("")
|
||||
-- db.filtersPopup[k].options:Add("")
|
||||
-- db.filtersPopup[k].values:Add("")
|
||||
for i, s in ipairs(cells) do
|
||||
db.filtersPopup[k].options:Add(s.name)
|
||||
db.filtersPopup[k].values:Add(tostring(s.value))
|
||||
|
||||
@@ -17,7 +17,6 @@ DBRoot.clean = function()
|
||||
DBMessage.clean()
|
||||
DBCust.clean()
|
||||
DBStatistics.clean()
|
||||
DBUser.clean()
|
||||
end
|
||||
|
||||
DBRoot.funcs = {
|
||||
|
||||
@@ -17,8 +17,4 @@ function DBUser.getUserById(loginNo)
|
||||
return db[loginNo]
|
||||
end
|
||||
|
||||
function DBUser.clean()
|
||||
db = {}
|
||||
end
|
||||
|
||||
return DBUser
|
||||
|
||||
@@ -232,7 +232,8 @@ NetProto.cmds = {
|
||||
custtype_report = "custtype_report", -- 客户类型分布
|
||||
order_report = "order_report", -- 客户类型分布
|
||||
target_report = "target_report", -- 客户类型分布
|
||||
update_customer = "update_customer" -- 更新客户信息
|
||||
update_customer = "update_customer", -- 更新客户信息
|
||||
save_customer = "save_customer", -- 新建客户
|
||||
}
|
||||
---------------------------------------------------------------------------------------
|
||||
---------------------------------------------------------------------------------------
|
||||
@@ -381,7 +382,7 @@ NetProto.sendSocket = function(content, callback, timeOutSec)
|
||||
return
|
||||
end
|
||||
content.operator = NetProto.loginNo
|
||||
content.loginno = content.loginno or NetProto.loginNo
|
||||
content.loginNo = content.loginNo or NetProto.loginNo
|
||||
content.companyId = NetProto.comanyId
|
||||
content.callbackId = setCallback(callback, content, timeOutSec)
|
||||
local contentStr = json.encode(content)
|
||||
@@ -437,7 +438,7 @@ end
|
||||
NetProto.send.person_view_query = function(callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.person_view_query
|
||||
content.loginno = NetProto.loginNo
|
||||
content.loginNo = NetProto.loginNo
|
||||
content.groupId = NetProto.groupId
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
@@ -455,8 +456,8 @@ NetProto.send.query_cust_calllog = function(phoneNo, loginNo, current_page, call
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.query_cust_calllog
|
||||
content.groupId = NetProto.groupId
|
||||
content.loginno = loginNo or NetProto.loginNo
|
||||
content.phone = phoneNo
|
||||
content.loginNo = loginNo or NetProto.loginNo
|
||||
content.phoneNo = phoneNo
|
||||
content.current_page = current_page or 1
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
@@ -465,7 +466,7 @@ NetProto.send.sales_view_query = function(loginNo, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.sales_view_query
|
||||
content.groupId = NetProto.groupId
|
||||
content.loginno = loginNo or NetProto.loginNo
|
||||
content.loginNo = loginNo or NetProto.loginNo
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
@@ -474,7 +475,7 @@ NetProto.send.custtype_report = function(loginNo, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.custtype_report
|
||||
content.groupId = NetProto.groupId
|
||||
content.loginno = loginNo or NetProto.loginNo
|
||||
content.loginNo = loginNo or NetProto.loginNo
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
@@ -483,7 +484,7 @@ NetProto.send.order_report = function(loginNo, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.order_report
|
||||
content.groupId = NetProto.groupId
|
||||
content.loginno = loginNo or NetProto.loginNo
|
||||
content.loginNo = loginNo or NetProto.loginNo
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
@@ -492,7 +493,7 @@ NetProto.send.target_report = function(loginNo, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.target_report
|
||||
content.groupId = NetProto.groupId
|
||||
content.loginno = loginNo or NetProto.loginNo
|
||||
content.loginNo = loginNo or NetProto.loginNo
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
@@ -504,5 +505,14 @@ NetProto.send.update_customer = function(customer, callback, timeOutSec)
|
||||
content.customer = customer
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
|
||||
NetProto.send.save_customer = function(customer, callback, timeOutSec)
|
||||
local content = {}
|
||||
content.action = NetProto.cmds.save_customer
|
||||
content.loginNo = NetProto.loginNo
|
||||
content.groupId = NetProto.groupId
|
||||
content.customer = customer
|
||||
NetProto.sendSocket(content, callback, timeOutSec)
|
||||
end
|
||||
------------------------------------------------------
|
||||
return NetProto
|
||||
|
||||
@@ -40,6 +40,8 @@ Directory = CS.System.IO.Directory
|
||||
MemoryStream = CS.System.IO.MemoryStream
|
||||
---@type UnityEngine.Color
|
||||
Color = CS.UnityEngine.Color
|
||||
---@type UnityEngine.Screen
|
||||
Screen = CS.UnityEngine.Screen
|
||||
---@type System.GC
|
||||
GC = CS.System.GC
|
||||
|
||||
|
||||
@@ -36,17 +36,17 @@ end
|
||||
|
||||
---public 拨号
|
||||
MyUtl.callCust = function(cust)
|
||||
if type(cust.jsonstr) == "string" then
|
||||
cust.jsonstr = json.decode(cust.jsonstr)
|
||||
if type(cust.jsonStr) == "string" then
|
||||
cust.jsonStr = json.decode(cust.jsonStr)
|
||||
end
|
||||
cust.jsonstr = cust.jsonstr or {}
|
||||
cust.jsonStr = cust.jsonStr or {}
|
||||
local phones = ArrayList()
|
||||
|
||||
local taskId = tostring(cust.taskId)
|
||||
local fields = DBCust.getFieldsByTask(taskId)
|
||||
for i, attr in ipairs(fields) do
|
||||
if attr.attrType == DBCust.FieldType.phone then
|
||||
local phNo = cust.jsonstr[joinStr(attr.id, "_", attr.attrName)]
|
||||
local phNo = cust.jsonStr[joinStr(attr.id, "_", attr.attrName)]
|
||||
if not isNilOrEmpty(phNo) then
|
||||
phones:Add(joinStr(attr.attrName,": ", phNo))
|
||||
end
|
||||
|
||||
@@ -32,9 +32,9 @@ function _cell.setSelect(val)
|
||||
mData.selected = val
|
||||
if val then
|
||||
uiobjs.bg.color = ColorEx.getColor(0xff2990dc)
|
||||
uiobjs.Label.color = ColorEx.getColor(0xff2990dc)
|
||||
uiobjs.Label.color = ColorEx.getColor(0xffffffff)
|
||||
else
|
||||
uiobjs.bg.color = ColorEx.getColor(0xff999999)
|
||||
uiobjs.bg.color = ColorEx.getColor(0xfff4f4f4)
|
||||
uiobjs.Label.color = ColorEx.getColor(0xff999999)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -101,7 +101,7 @@ end
|
||||
function _cell.onFinisInitFields()
|
||||
isFieldLoading = false
|
||||
uiobjs.Table:Reposition()
|
||||
uiobjs.formRoot:setValue(cust.jsonstr)
|
||||
uiobjs.formRoot:setValue(cust.jsonStr)
|
||||
Utl.doCallback(mData.onFinish)
|
||||
hideHotWheel()
|
||||
end
|
||||
|
||||
@@ -86,8 +86,8 @@ do
|
||||
ButtonOK.localPosition = pos
|
||||
SetActive(Spriteline2.gameObject, false)
|
||||
else
|
||||
ButtonCancel.localPosition = buttonOkOrgPositon
|
||||
ButtonOK.localPosition = buttonCancelOrgPositon
|
||||
ButtonCancel.localPosition = buttonCancelOrgPositon
|
||||
ButtonOK.localPosition = buttonOkOrgPositon
|
||||
NGUITools.SetActive(ButtonCancel.gameObject, true)
|
||||
lbButtonCancel.text = lbbutton2
|
||||
SetActive(Spriteline2.gameObject, true)
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
-- xx界面
|
||||
local CLLPPopList = {}
|
||||
|
||||
---@type Coolape.CLPanelLua
|
||||
local csSelf = nil
|
||||
---@type UnityEngine.Transform
|
||||
local transform = nil
|
||||
local uiobjs = {}
|
||||
|
||||
-- 初始化,只会调用一次
|
||||
function CLLPPopList.init(csObj)
|
||||
csSelf = csObj
|
||||
transform = csObj.transform
|
||||
---@type UISprite
|
||||
uiobjs.SpriteBg = getCC(transform, "Bottom/offset/SpriteBg", "UISprite")
|
||||
---@type CLUIPopListPanel
|
||||
uiobjs.popList = csSelf:GetComponent("CLUIPopListPanel")
|
||||
uiobjs.list = getChild(transform, "Bottom/offset/List")
|
||||
end
|
||||
|
||||
-- 设置数据
|
||||
function CLLPPopList.setData(paras)
|
||||
end
|
||||
|
||||
--当有通用背板显示时的回调
|
||||
function CLLPPopList.onShowFrame()
|
||||
end
|
||||
|
||||
-- 显示,在c#中。show为调用refresh,show和refresh的区别在于,当页面已经显示了的情况,当页面再次出现在最上层时,只会调用refresh
|
||||
function CLLPPopList.show()
|
||||
if uiobjs.popList.items.Count == 1 then
|
||||
uiobjs.SpriteBg.height = 170
|
||||
uiobjs.list.localPosition = Vector3(0, -340, 0)
|
||||
elseif uiobjs.popList.items.Count == 2 then
|
||||
uiobjs.SpriteBg.height = 340
|
||||
uiobjs.list.localPosition = Vector3(0, -170, 0)
|
||||
else
|
||||
uiobjs.SpriteBg.height = 510
|
||||
uiobjs.list.localPosition = Vector3.zero
|
||||
end
|
||||
end
|
||||
|
||||
-- 刷新
|
||||
function CLLPPopList.refresh()
|
||||
end
|
||||
|
||||
-- 关闭页面
|
||||
function CLLPPopList.hide()
|
||||
end
|
||||
|
||||
-- 网络请求的回调;cmd:指命,succ:成功失败,msg:消息;paras:服务器下行数据
|
||||
function CLLPPopList.procNetwork(cmd, succ, msg, paras)
|
||||
--[[
|
||||
if(succ == NetSuccess) then
|
||||
if(cmd == "xxx") then
|
||||
-- TODO:
|
||||
end
|
||||
end
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 处理ui上的事件,例如点击等
|
||||
function CLLPPopList.uiEventDelegate(go)
|
||||
local goName = go.name
|
||||
--[[
|
||||
if(goName == "xxx") then
|
||||
--TODO:
|
||||
end
|
||||
--]]
|
||||
end
|
||||
|
||||
-- 当顶层页面发生变化时回调
|
||||
function CLLPPopList.onTopPanelChange(topPanel)
|
||||
end
|
||||
|
||||
-- 当按了返回键时,关闭自己(返值为true时关闭)
|
||||
function CLLPPopList.hideSelfOnKeyBack()
|
||||
return true
|
||||
end
|
||||
|
||||
--------------------------------------------
|
||||
return CLLPPopList
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e471a865b3e54bffac09db464d469c4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -143,9 +143,9 @@ do
|
||||
CLLPSplash.upgradeGame(MapEx.getString(map, "url"))
|
||||
end
|
||||
if MapEx.getBool(map, "force") then
|
||||
CLUIUtl.showConfirm(LGet("MsgHadNewVerApp"), true, LGet("Update"), doUpgradeApp, "", nil)
|
||||
CLUIUtl.showConfirm(LGet("MsgHadNewVerApp"), true, "更新", doUpgradeApp, "", nil)
|
||||
else
|
||||
CLUIUtl.showConfirm(LGet("MsgHadNewVerApp"), false, LGet("Update"), doUpgradeApp, LGet("UpdateLater"), CLLPSplash.updateRes)
|
||||
CLUIUtl.showConfirm(LGet("MsgHadNewVerApp"), false, "更新", doUpgradeApp, "忽略", CLLPSplash.updateRes)
|
||||
end
|
||||
else
|
||||
CLLPSplash.updateRes()
|
||||
@@ -153,7 +153,7 @@ do
|
||||
end
|
||||
|
||||
local onGetVerError = function(msg, orgs)
|
||||
CLAlert.add(LGet("MsgCheckAppUpgradeFail"), Color.white, 1)
|
||||
-- CLAlert.add(LGet("MsgCheckAppUpgradeFail"), Color.white, 1)
|
||||
CLLPSplash.updateRes()
|
||||
end
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ end
|
||||
---@param paras _ParamTRPCustDetail
|
||||
function TRPCustDetail:setData(paras)
|
||||
self.mdata = paras
|
||||
if type(self.mdata.jsonstr) == "string" then
|
||||
self.mdata.jsonstr = json.decode(self.mdata.jsonstr)
|
||||
if type(self.mdata.jsonStr) == "string" then
|
||||
self.mdata.jsonStr = json.decode(self.mdata.jsonStr)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ end
|
||||
|
||||
function TRPCustList:onShowRefreshFlg()
|
||||
-- printe("TRPCustList:onShowRefreshFlg")
|
||||
uiobjs.ButtonHeadList.transform.localPosition = Vector3(0, 250, 0)
|
||||
uiobjs.ButtonHeadList.transform.localPosition = Vector3(0, 300, 0)
|
||||
SetActive(uiobjs.ButtonHeadList.gameObject, true)
|
||||
end
|
||||
function TRPCustList:onhideRefreshFlg()
|
||||
@@ -86,7 +86,7 @@ function TRPCustList:onEndList(tail)
|
||||
-- 取得下一页
|
||||
NetProto.send.list_customers(self.filterValue, queryKey, self.pageInfo.current_page + 1)
|
||||
else
|
||||
uiobjs.ButtonEndList.localPosition = tail.transform.localPosition + Vector3.up * -270
|
||||
uiobjs.ButtonEndList.localPosition = tail.transform.localPosition + Vector3.up * -300
|
||||
SetActive(uiobjs.ButtonEndList.gameObject, true)
|
||||
end
|
||||
end
|
||||
@@ -141,6 +141,8 @@ function TRPCustList:procNetwork(cmd, succ, msg, paras)
|
||||
hideHotWheel()
|
||||
elseif cmd == NetProto.cmds.update_customer then
|
||||
uiobjs.Grid:refreshContentOnly()
|
||||
elseif cmd == NetProto.cmds.save_customer then
|
||||
self:refreshList()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,6 +29,8 @@ function TRPNewCust:init(csObj)
|
||||
uiobjs.starGridPrefab2 = getChild(uiobjs.starGrid2.transform, "00000").gameObject
|
||||
|
||||
uiobjs.ExtendRoot = getCC(uiobjs.Table.transform, "ExtendRoot", "CLCellLua")
|
||||
---@type CLUIFormRoot
|
||||
uiobjs.ExtendFormRoot = uiobjs.ExtendRoot:GetComponent("CLUIFormRoot")
|
||||
uiobjs.elements = uiobjs.DetailRoot.gameObject:GetComponentsInChildren(typeof(CLUIElement), true)
|
||||
uiobjs.ButtonSave = getChild(self.transform, "Top/ButtonSave")
|
||||
end
|
||||
@@ -48,9 +50,10 @@ function TRPNewCust:setData(paras)
|
||||
self.mdata.serviceNo = NetProto.loginNo
|
||||
self.mdata.customerLabel = 1
|
||||
end
|
||||
if type(self.mdata.jsonstr) == "string" then
|
||||
self.mdata.jsonstr = json.decode(self.mdata.jsonstr)
|
||||
if type(self.mdata.jsonStr) == "string" then
|
||||
self.mdata.jsonStr = json.decode(self.mdata.jsonStr)
|
||||
end
|
||||
self.mdata.jsonStr = self.mdata.jsonStr or {}
|
||||
end
|
||||
|
||||
---public 当有通用背板显示时的回调
|
||||
@@ -140,6 +143,9 @@ function TRPNewCust:onClickStar(cell, data)
|
||||
v.value = false
|
||||
end
|
||||
end
|
||||
if self.isNewCust then
|
||||
self.mdata.customerLabel = data.index
|
||||
end
|
||||
CLUIUtl.resetList4Lua(uiobjs.starGrid2, uiobjs.starGridPrefab2, stars, self:wrapFunc(self.initStarCell))
|
||||
if (not self.isNewCust) and data.index ~= self.mdata.customerLabel then
|
||||
-- 说明更改了星级
|
||||
@@ -169,12 +175,17 @@ function TRPNewCust:setElementMode(el)
|
||||
local input = el:GetComponent("UIInput")
|
||||
local inputOnGUI = el:GetComponent("UIInputOnGUI")
|
||||
local boxcollider = el:GetComponent("BoxCollider")
|
||||
local ButtonReset = getCC(el.transform, "ButtonReset", "MyInputReset")
|
||||
|
||||
if (not self.isNewCust) and (el.jsonKey == "taskId" or el.jsonKey == "phoneNo") then
|
||||
boxcollider.enabled = false
|
||||
else
|
||||
boxcollider.enabled = true
|
||||
end
|
||||
|
||||
if ButtonReset then
|
||||
ButtonReset.disabled = (not self.isNewCust)
|
||||
end
|
||||
if input then
|
||||
if isPopList or isPopCheckbox then
|
||||
input.enabled = false
|
||||
@@ -266,7 +277,7 @@ function TRPNewCust:sendModifymsg(key, val, isExtend)
|
||||
local content = {}
|
||||
content.id = self.mdata.custId
|
||||
if isExtend then
|
||||
content.jsonstr = {[key] = val}
|
||||
content.jsonStr = {[key] = val}
|
||||
else
|
||||
content[key] = val
|
||||
end
|
||||
@@ -278,10 +289,11 @@ function TRPNewCust:sendModifymsg(key, val, isExtend)
|
||||
if result.success then
|
||||
-- 更新本地数据
|
||||
if isExtend then
|
||||
self.mdata.jsonstr[key] = val
|
||||
self.mdata.jsonStr[key] = val
|
||||
else
|
||||
self.mdata[key] = val
|
||||
end
|
||||
CLAlert.add("修改成功", Color.white, 1)
|
||||
end
|
||||
end
|
||||
)
|
||||
@@ -295,7 +307,7 @@ function TRPNewCust:onPopupFieldValChg4Extend(go)
|
||||
local el = go:GetComponent("CLUIElement")
|
||||
if el then
|
||||
local err = el:checkValid()
|
||||
if (not isNilOrEmpty(el.value)) and tostring(el.value) ~= tostring(self.mdata.jsonstr[el.jsonKey]) then
|
||||
if (not isNilOrEmpty(el.value)) and tostring(el.value) ~= tostring(self.mdata.jsonStr[el.jsonKey]) then
|
||||
if isNilOrEmpty(err) then
|
||||
-- 有修改,发送数据
|
||||
self:sendModifymsg(el.jsonKey, el.value, true)
|
||||
@@ -329,7 +341,7 @@ function TRPNewCust:onClickInputField4Extend(go)
|
||||
end
|
||||
|
||||
function TRPNewCust:onFinishSetField4Extend(key, val)
|
||||
if tostring(val) ~= tostring(self.mdata.jsonstr[key]) then
|
||||
if tostring(val) ~= tostring(self.mdata.jsonStr[key]) then
|
||||
self:sendModifymsg(key, val, true)
|
||||
end
|
||||
end
|
||||
@@ -337,6 +349,27 @@ end
|
||||
function TRPNewCust:setEventDelegate()
|
||||
self.EventDelegate = {
|
||||
ButtonSave = function()
|
||||
local err = uiobjs.DetailRoot:checkValid()
|
||||
err = joinStr(err, uiobjs.ExtendFormRoot:checkValid())
|
||||
if not isNilOrEmpty(err) then
|
||||
CLAlert.add(err, Color.yellow, 1)
|
||||
return
|
||||
end
|
||||
|
||||
local cust = uiobjs.DetailRoot:getValue(true)
|
||||
cust.customerLabel = self.mdata.customerLabel
|
||||
local jsonStr = uiobjs.ExtendFormRoot:getValue(true)
|
||||
cust.jsonStr = jsonStr
|
||||
showHotWheel()
|
||||
NetProto.send.save_customer(
|
||||
cust,
|
||||
function(content)
|
||||
if content.success then
|
||||
getPanelAsy("PanelCustDetail", onLoadedPanel, cust)
|
||||
end
|
||||
hideHotWheel()
|
||||
end
|
||||
)
|
||||
end,
|
||||
InputTask = function()
|
||||
if self.isNewCust then
|
||||
|
||||
Reference in New Issue
Block a user