mm
This commit is contained in:
@@ -78,10 +78,15 @@ DBMessage.clean = function()
|
||||
db.lastGetTime = {}
|
||||
end
|
||||
|
||||
DBMessage.onGetMessage = function(type, list)
|
||||
DBMessage.onGetMessage = function(type, list, meta)
|
||||
if not list then
|
||||
return
|
||||
end
|
||||
if meta and meta.current_page == 1 then
|
||||
db.list = {}
|
||||
db.list[type] = {}
|
||||
db.lastGetTime = {}
|
||||
end
|
||||
db.list = db.list or {}
|
||||
db.list[type] = db.list[type] or {}
|
||||
db.lastGetTime = db.lastGetTime or {}
|
||||
|
||||
@@ -25,7 +25,7 @@ end
|
||||
|
||||
DBRoot.funcs = {
|
||||
[NetProto.cmds.announcement_query] = function(data) -- 公告
|
||||
DBMessage.onGetMessage(DBMessage.MsgType.Sys, data.result.data)
|
||||
DBMessage.onGetMessage(DBMessage.MsgType.Sys, data.result.data, data.result.meta)
|
||||
end,
|
||||
[NetProto.cmds.booking_query] = function(data) -- 待跟进客户
|
||||
DBMessage.onGetMessage(DBMessage.MsgType.Task4Cust, data.result.data)
|
||||
|
||||
@@ -291,7 +291,7 @@ NetProto.cmds = {
|
||||
workFlowQuery = "workFlowQuery", -- 工单列表
|
||||
backToGH = "backToGH", -- 返回公海
|
||||
delCustomerInfo = "delCustomerInfo", -- 删除客户
|
||||
loadProductType = "loadProductType", -- 产品类型
|
||||
loadProductType = "loadProductType", -- 商品类型
|
||||
pageGHQueryList = "pageGHQueryList", -- 公海列表
|
||||
getFromGH = "getFromGH", -- 获取客户
|
||||
list_followUp_tasks = "list_followUp_tasks", --预约记录
|
||||
|
||||
@@ -32,7 +32,12 @@ function _cell.show(go, data)
|
||||
uiobjs.boxCollider.size = Vector3(mData.width, 150, 0)
|
||||
uiobjs.Background.spriteName = mData.Background
|
||||
uiobjs.Checkmark.spriteName = mData.Checkmark
|
||||
_cell.setReddotNum(0)
|
||||
if mData.id == 1 then
|
||||
local unreadNum = DBMessage.getUnreadNum(DBMessage.MsgType.Sys)
|
||||
_cell.setReddotNum(unreadNum)
|
||||
else
|
||||
_cell.setReddotNum(0)
|
||||
end
|
||||
end
|
||||
|
||||
function _cell.setReddotNum(num)
|
||||
|
||||
@@ -106,13 +106,11 @@ end
|
||||
|
||||
-- 网络请求的回调;cmd:指命,succ:成功失败,msg:消息;paras:服务器下行数据
|
||||
function CSPMsg.procNetwork(cmd, succ, msg, paras)
|
||||
--[[
|
||||
if(succ == 1) then
|
||||
if(cmd == "xxx") then
|
||||
-- TODO:
|
||||
end
|
||||
if (succ == NetSuccess) then
|
||||
if cmd == NetProto.cmds.readNotice then
|
||||
CSPMsg.setList()
|
||||
end
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
||||
-- 处理ui上的事件,例如点击等
|
||||
|
||||
@@ -46,17 +46,7 @@ function TRPFollowList:initFilters()
|
||||
d = {}
|
||||
d.title = "跟进类型"
|
||||
d.key = DBCust.FilterGroup.followUpTypeList
|
||||
d.key2 = "followTypeUp"
|
||||
d.list = DBCust.getFilter(DBCust.FilterGroup.followUpTypeList)
|
||||
if d.list and #(d.list) > 0 then
|
||||
-- table.insert(d.list, 1, {name = "全部", value = -1})
|
||||
table.insert(self.filters, d)
|
||||
end
|
||||
|
||||
d = {}
|
||||
d.title = "跟进类型"
|
||||
d.key = DBCust.FilterGroup.followUpTypeList
|
||||
d.key2 = "followTypeUp"
|
||||
d.key2 = "followUpType"
|
||||
d.list = DBCust.getFilter(DBCust.FilterGroup.followUpTypeList)
|
||||
if d.list and #(d.list) > 0 then
|
||||
-- table.insert(d.list, 1, {name = "全部", value = -1})
|
||||
|
||||
@@ -155,10 +155,14 @@ function TRPNewFollow:showBaseFields()
|
||||
-- 工单模板
|
||||
filedInfor = {}
|
||||
filedInfor.attr = v
|
||||
if self.isNewFollow then
|
||||
filedInfor.showMode = _FieldMode.inputOnly
|
||||
else
|
||||
if v.id == "custName" then
|
||||
filedInfor.showMode = _FieldMode.showOnly
|
||||
else
|
||||
if self.isNewFollow then
|
||||
filedInfor.showMode = _FieldMode.inputOnly
|
||||
else
|
||||
filedInfor.showMode = _FieldMode.showOnly
|
||||
end
|
||||
end
|
||||
if filedInfor.attr.attrType == DBCust.FieldType.multext then
|
||||
filedInfor.onMultTextInputChg = self:wrapFunc(self.reposition)
|
||||
|
||||
@@ -563,7 +563,7 @@ function TRPNewOrder:setEventDelegate()
|
||||
order.ifProduct = templateInfor.ifProduct
|
||||
if uiobjs.gridProjects.gameObject.activeInHierarchy then
|
||||
if self.selectedProducts == nil or #(self.selectedProducts) <= 0 then
|
||||
MyUtl.toastW("请添加产品")
|
||||
MyUtl.toastW("请添加商品")
|
||||
return
|
||||
end
|
||||
order.prodJson = self.selectedProducts
|
||||
|
||||
@@ -157,9 +157,11 @@ function TRPOceanList:initCell(cell, data)
|
||||
end
|
||||
|
||||
function TRPOceanList:onClickCell(cell, data)
|
||||
showHotWheel()
|
||||
NetProto.send.get_customerById(
|
||||
data.id,
|
||||
function(content)
|
||||
hideHotWheel()
|
||||
if content.success then
|
||||
local cust = content.result
|
||||
if cust then
|
||||
|
||||
@@ -27,7 +27,7 @@ function TRPProductDetail:initFiledsAttr()
|
||||
local attr
|
||||
self.baseFiledsAttr = {}
|
||||
attr = {}
|
||||
attr.attrName = "产品名称"
|
||||
attr.attrName = "商品名称"
|
||||
attr.id = "name"
|
||||
attr.attrType = DBCust.FieldType.text
|
||||
attr.ifMust = 0
|
||||
@@ -35,7 +35,7 @@ function TRPProductDetail:initFiledsAttr()
|
||||
table.insert(self.baseFiledsAttr, attr)
|
||||
|
||||
attr = {}
|
||||
attr.attrName = "产品单价"
|
||||
attr.attrName = "商品单价"
|
||||
attr.id = "price"
|
||||
attr.attrType = DBCust.FieldType.text
|
||||
attr.ifMust = 0
|
||||
@@ -43,7 +43,7 @@ function TRPProductDetail:initFiledsAttr()
|
||||
table.insert(self.baseFiledsAttr, attr)
|
||||
|
||||
attr = {}
|
||||
attr.attrName = "产品库存"
|
||||
attr.attrName = "商品库存"
|
||||
attr.id = "num"
|
||||
attr.attrType = DBCust.FieldType.text
|
||||
attr.ifMust = 0
|
||||
@@ -51,7 +51,7 @@ function TRPProductDetail:initFiledsAttr()
|
||||
table.insert(self.baseFiledsAttr, attr)
|
||||
|
||||
attr = {}
|
||||
attr.attrName = "产品类型"
|
||||
attr.attrName = "商品类型"
|
||||
attr.id = "prodTypeName"
|
||||
attr.attrType = DBCust.FieldType.text
|
||||
attr.ifMust = 0
|
||||
@@ -59,7 +59,7 @@ function TRPProductDetail:initFiledsAttr()
|
||||
table.insert(self.baseFiledsAttr, attr)
|
||||
|
||||
attr = {}
|
||||
attr.attrName = "产品描述"
|
||||
attr.attrName = "商品描述"
|
||||
attr.id = "productDesc"
|
||||
attr.attrType = DBCust.FieldType.multext
|
||||
attr.ifMust = 0
|
||||
|
||||
@@ -61,7 +61,11 @@ function TRPSelectProduct:appList(list)
|
||||
end
|
||||
|
||||
function TRPSelectProduct:initCell(cell, data)
|
||||
cell:init(data, nil)
|
||||
cell:init(data, self:wrapFunc(self.onClickCell))
|
||||
end
|
||||
|
||||
function TRPSelectProduct:onClickCell(cell, data)
|
||||
getPanelAsy("PanelProductDetail", onLoadedPanelTT, data.data)
|
||||
end
|
||||
|
||||
function TRPSelectProduct:onEndList(tail)
|
||||
|
||||
Reference in New Issue
Block a user