This commit is contained in:
2020-07-20 22:20:21 +08:00
parent 3429ffd1b1
commit 7dc1332dba
39 changed files with 3116 additions and 759 deletions

View File

@@ -46,7 +46,7 @@ MonoBehaviour:
material: {fileID: 0}
mSprites: []
mPixelSize: 1
mReplacement: {fileID: 0}
mReplacement: {fileID: 11400000, guid: 5ceb49909c25f471fb6d136b24c49d48, type: 3}
mCoordinates: 0
sprites: []
_isBorrowSpriteMode: 1

View File

@@ -28,7 +28,8 @@ DBCust.FilterGroup = {
dealFlagList = "dealFlagList", -- list 客户状态
loginNoList = "loginNoList", -- list 归属工号
taskList = "taskList", -- list 任务名称
followUpTypeList = "followUpTypeList" -- 跟进类型
followUpTypeList = "followUpTypeList", -- 跟进类型
opportunityList = "opportunityList" -- 商机
}
DBCust.FieldType = {
@@ -39,7 +40,7 @@ DBCust.FieldType = {
dateTime = "时间文本框",
text = "普通文本框",
phone = "电话号码框",
empty ="empty"
empty = "empty"
}
---@class _FieldMode
_FieldMode = {
@@ -47,7 +48,7 @@ _FieldMode = {
showOnly = 1, -- 纯展示模式
modifyOnly = 2, -- 修改模式
showAndModify = 3, -- 展示械式同时也可以modify
button = 4, -- 类似按钮的功能
button = 4 -- 类似按钮的功能
}
DBCust.onGetFilter = function(data)

View File

@@ -18,7 +18,7 @@ end
-- 注意c#侧不会在调用show时调用refresh
function _cell.show(go, data)
mData = data
uiobjs.widget.height = mData.height or 40
uiobjs.widget.height = mData.attr.height or 40
end
-- 取得数据

View File

@@ -66,6 +66,11 @@ function _cell.show(go, data)
attr = mData.attr
attr.ifMust = attr.ifMust or 0
if uiobjs.spriteBg then
uiobjs.spriteBg.height = mData.attr.height or 160
end
NGUITools.AddWidgetCollider(csSelf.gameObject, false)
local jsonKey
if attr.donotJoinKey then
jsonKey = attr.id

View File

@@ -0,0 +1,78 @@
-- xx单元
local _cell = {}
---@type Coolape.CLCellLua
local csSelf = nil
local transform = nil
---@type _DBCust
local mData = nil
local uiobjs = {}
-- 初始化,只调用一次
function _cell.init(csObj)
csSelf = csObj
transform = csSelf.transform
-- uiobjs.LabelCompanyName = getCC(transform, "LabelCompanyName", "UILabel")
-- uiobjs.LabelTime = getCC(transform, "LabelTime", "UILabel")
---@type UIPopupList
uiobjs.LabelStatus = getCC(transform, "LabelStatus", "UIPopupList")
-- uiobjs.LabelCustName = getCC(transform, "LabelCustName", "UILabel")
-- uiobjs.SpriteStatus = getCC(transform, "SpriteStatus", "UISprite")
uiobjs.LabelServerNo = getCC(transform, "LabelServerNo", "UILabel")
---@type CLUIFormRoot
uiobjs.formRoot = csSelf:GetComponent("CLUIFormRoot")
uiobjs.SpriteStatus = getChild(transform, "SpriteStatus")
uiobjs.SpriteHeadIcon = getCC(transform, "SpriteHeadBg/SpriteHeadIcon", "UITexture")
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)
uiobjs.formRoot:setValue(mData)
if tostring(mData.dealFlag) == "0" then
SetActive(uiobjs.SpriteStatus.gameObject, true)
else
SetActive(uiobjs.SpriteStatus.gameObject, false)
end
_cell.setHeadIcon()
end
function _cell.setHeadIcon()
---@type _DBUser
local user = DBUser.getUserById(mData.serviceNo)
if user then
uiobjs.LabelServerNo.text = user.loginName
DBUser.getIcon(
mData.serviceNo,
function(texture)
if texture and texture.name == user.imageUrl then
uiobjs.SpriteHeadIcon.mainTexture = texture
end
end
)
end
end
-- 取得数据
function _cell.getData()
return mData
end
function _cell.uiEventDelegate(go)
local goName = go.name
if goName == "ButtonFollow" then
getPanelAsy("PanelNewFollow", onLoadedPanelTT, mData)
elseif goName == "ButtonTask" then
getPanelAsy("PanelNewFollowTask", onLoadedPanelTT, mData)
elseif goName == "ButtonContact" then
MyUtl.callCust(mData)
end
end
--------------------------------------------
return _cell

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b1fa44cf428b641e7a576b154c7dacac
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -43,7 +43,7 @@ function CLLPStart.setLuasAtBegainning()
-- 日志监听
if ReporterMessageReceiver.self and ReporterMessageReceiver.self.gameObject then
-- if KKWhiteList.isWhiteName() then
ReporterMessageReceiver.self.gameObject:SetActive(true)
ReporterMessageReceiver.self.gameObject:SetActive(false)
-- else
-- ReporterMessageReceiver.self.gameObject:SetActive(false)
-- end

View File

@@ -8,6 +8,7 @@ local uiobjs = {}
function TRPCustDetail:init(csObj)
TRPCustDetail.super.init(self, csObj)
self:prepareMoreData()
self:setEventDelegate()
MyUtl.setContentView(getChild(self.transform, "PanelContent"), 132 + 400 + 160 + 60, 200)
@@ -27,8 +28,12 @@ function TRPCustDetail:init(csObj)
uiobjs.starGrid = getCC(uiobjs.Head.transform, "LabelStars/Grid", "UIGrid")
uiobjs.starGridPrefab = getChild(uiobjs.starGrid.transform, "00000").gameObject
---@type UIGrid
uiobjs.SpriteToggle = getCC(self.transform, "Top/SpriteToggle", "UIGrid")
local width = NumEx.getIntPart(CSPMain.contentRect.z / 4)
uiobjs.SpriteToggle.cellWidth = width
---@type UIToggle
uiobjs.ToggleDetail = getCC(self.transform, "Top/SpriteToggle/ToggleDetail", "UIToggle")
uiobjs.ToggleDetail = getCC(uiobjs.SpriteToggle.transform, "ToggleDetail", "UIToggle")
---@type CLUIFormRoot
uiobjs.DetailRoot = getCC(uiobjs.Table.transform, "DetailRoot", "CLUIFormRoot")
uiobjs.InputTask = getCC(uiobjs.DetailRoot.transform, "InputTask", "UIPopupList")
@@ -44,6 +49,51 @@ function TRPCustDetail:init(csObj)
uiobjs.ButtonEndList = getChild(uiobjs.Records.transform, "ButtonEndList")
uiobjs.ExtendRoot = getCC(uiobjs.Table.transform, "ExtendRoot", "CLCellLua")
---@type Coolape.CLUILoopGrid
uiobjs.OrderRoot = getCC(uiobjs.Table.transform, "OrderRoot", "CLUILoopGrid")
uiobjs.ButtonEndListOrder = getChild(uiobjs.OrderRoot.transform, "ButtonEndList")
uiobjs.MoreRoot = getCC(uiobjs.Table.transform, "MoreRoot", "CLCellLua")
end
function TRPCustDetail:prepareMoreData()
self.moreProcList = {}
---@type _ParamFieldAttr
local attr = {}
attr.id = "follows"
attr.attrName = "跟进记录"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.moreProcList, attr)
attr = {}
attr.id = "followTasks"
attr.attrName = "预约记录"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.moreProcList, attr)
attr = {}
attr.id = "smsList"
attr.attrName = "短信记录"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.moreProcList, attr)
attr = {}
attr.id = "opList"
attr.attrName = "操作记录"
attr.attrType = DBCust.FieldType.text
attr.ifMust = 0
attr.height = 180
attr.donotJoinKey = true
table.insert(self.moreProcList, attr)
end
-- 设置数据
@@ -72,6 +122,7 @@ end
-- 显示在c#中。show为调用refreshshow和refresh的区别在于当页面已经显示了的情况当页面再次出现在最上层时只会调用refresh
function TRPCustDetail:show()
self.records = nil
self.orders = nil
local optionInfor = DBCust.getFilter4Popup(DBCust.FilterGroup.dealFlagList)
uiobjs.LabelStatus:refreshItems(optionInfor.options, optionInfor.values)
uiobjs.InputStatus:refreshItems(optionInfor.options, optionInfor.values)
@@ -109,9 +160,12 @@ function TRPCustDetail:initStarCell(cell, data)
end
function TRPCustDetail:showDetail()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, true)
SetActive(uiobjs.ExtendRoot.gameObject, true)
SetActive(uiobjs.OrderRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, false)
SetActive(uiobjs.MoreRoot.gameObject, false)
uiobjs.DetailRoot:setValue(self.mdata)
-- uiobjs.ExtendRoot:init({data = self.mdata, isEditMode = false}, nil)
@@ -126,6 +180,7 @@ function TRPCustDetail:showDetail()
CLUIUtl.resetList4Lua(uiobjs.starGrid2, uiobjs.starGridPrefab2, stars, self:wrapFunc(self.initStarCell))
uiobjs.Table:Reposition()
uiobjs.scrollView.disableDragIfFits = true
uiobjs.scrollView:ResetPosition()
end
@@ -149,9 +204,12 @@ function TRPCustDetail:showExtentFiles(taskId)
end
function TRPCustDetail:showRecords()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, false)
SetActive(uiobjs.ExtendRoot.gameObject, false)
SetActive(uiobjs.OrderRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, true)
SetActive(uiobjs.MoreRoot.gameObject, false)
if self.records then
uiobjs.Records:setList(
self.records.data or {},
@@ -166,6 +224,7 @@ function TRPCustDetail:showRecords()
end
uiobjs.Table:Reposition()
uiobjs.scrollView.disableDragIfFits = false
uiobjs.scrollView:ResetPosition()
end
@@ -189,15 +248,115 @@ function TRPCustDetail:onEndList(tail)
end
end
function TRPCustDetail:showOrders()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, false)
SetActive(uiobjs.ExtendRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, false)
SetActive(uiobjs.OrderRoot.gameObject, true)
SetActive(uiobjs.MoreRoot.gameObject, false)
if self.orders then
uiobjs.OrderRoot:setList(
self.orders.data or {},
self:wrapFunc(self.initOrderCell),
self:wrapFunc(self.onOrderHeadList),
self:wrapFunc(self.onOrderEndList)
)
else
showHotWheel()
-- //TODO:
NetProto.send.query_cust_calllog(self.mdata.phoneNo, nil, 1)
uiobjs.OrderRoot:setList({}, self:wrapFunc(self.initOrderCell))
end
uiobjs.Table:Reposition()
uiobjs.scrollView.disableDragIfFits = false
uiobjs.scrollView:ResetPosition()
end
function TRPCustDetail:initOrderCell(cell, data)
cell:init(data, nil)
end
function TRPCustDetail:onOrderHeadList(head)
printw("到最顶端了")
end
function TRPCustDetail:onOrderEndList(tail)
printw("到最后了==" .. tail.name)
if self.orders and self.orders.meta.current_page < self.orders.meta.total_pages then
showHotWheel()
-- //TODO:取得下一页
NetProto.send.query_cust_calllog(self.mdata.phoneNo, nil, self.orders.meta.current_page + 1)
else
uiobjs.ButtonEndListOrder.localPosition = tail.transform.localPosition + Vector3.up * -270
SetActive(uiobjs.ButtonEndListOrder.gameObject, true)
end
end
function TRPCustDetail:showMore()
self:release()
SetActive(uiobjs.DetailRoot.gameObject, false)
SetActive(uiobjs.ExtendRoot.gameObject, false)
SetActive(uiobjs.Records.gameObject, false)
SetActive(uiobjs.OrderRoot.gameObject, false)
SetActive(uiobjs.MoreRoot.gameObject, true)
if not self.hasSetMoreProc then
self.hasSetMoreProc = true
---@type _ParamCellExtendFiledRoot
local param = {}
param.data = nil
param.onFinish = function()
uiobjs.scrollView:ResetPosition()
end
param.fields = {}
---@type _ParamCellExtendFiled
local filedInfor
for i, v in ipairs(self.moreProcList) do
filedInfor = {}
filedInfor.attr = v
filedInfor.showMode = _FieldMode.button
filedInfor.onClick = self:wrapFunc(self.onClickMoreProc)
table.insert(param.fields, filedInfor)
end
uiobjs.MoreRoot:init(param, nil)
end
uiobjs.Table:Reposition()
uiobjs.scrollView.disableDragIfFits = true
uiobjs.scrollView:ResetPosition()
end
---@param el CLUIElement
function TRPCustDetail:onClickMoreProc(el)
if el.jsonKey == "follows" then
-- 跟进记录
elseif el.jsonKey == "followTasks" then
-- 预约记录
elseif el.jsonKey == "smsList" then
-- 短信记录
elseif el.jsonKey == "opList" then
-- 操作记录
end
end
-- 刷新
function TRPCustDetail:refresh()
end
-- 关闭页面
function TRPCustDetail:hide()
function TRPCustDetail:release()
if uiobjs.ExtendRoot.luaTable then
uiobjs.ExtendRoot.luaTable.release()
end
if uiobjs.MoreRoot.luaTable then
uiobjs.MoreRoot.luaTable.release()
end
self.hasSetMoreProc = false
end
-- 关闭页面
function TRPCustDetail:hide()
self:release()
end
-- 网络请求的回调cmd指命succ成功失败msg消息paras服务器下行数据
@@ -243,6 +402,14 @@ function TRPCustDetail:setEventDelegate()
self.currToggle = 2
self:showRecords()
end,
ToggleOrders = function()
self.currToggle = 3
self:showOrders()
end,
ToggleMore = function()
self.currToggle = 4
self:showMore()
end,
ButtonNewFollow = function()
getPanelAsy("PanelNewFollow", onLoadedPanelTT, self.mdata)
end,

View File

@@ -32,13 +32,13 @@ function TRPNewFollow:initFiledsAttr()
attr = {}
attr.attrName = "商机"
attr.id = ""
attr.id = "opportunity"
attr.attrType = DBCust.FieldType.popuplist
attr.ifMust = 1
attr.ifMust = 0
attr.donotJoinKey = true
-- local popInfor = DBCust.getFilter4Popup(DBCust.FilterGroup.followUpTypeList)
-- attr.popOptions = popInfor.options
-- attr.popValues = popInfor.values
local popInfor = DBCust.getFilter4Popup(DBCust.FilterGroup.opportunityList)
attr.popOptions = popInfor.options
attr.popValues = popInfor.values
table.insert(self.baseFiledsAttr, attr)
attr = {}

View File

@@ -30,7 +30,7 @@ function TRPNewFollowTask:initFiledsAttr()
local attr
self.baseFiledsAttr = {}
attr = {}
attr.attrName = "跟进内容"
attr.attrName = "预约内容"
attr.id = "bookingNote"
attr.attrType = DBCust.FieldType.multext
attr.ifMust = 1
@@ -38,7 +38,7 @@ function TRPNewFollowTask:initFiledsAttr()
table.insert(self.baseFiledsAttr, attr)
attr = {}
attr.attrName = "跟进时间"
attr.attrName = "预约时间"
attr.id = "FollowUpTime"
attr.attrType = DBCust.FieldType.dateTime
attr.ifTime = 1
@@ -64,6 +64,7 @@ function TRPNewFollowTask:setData(paras)
self.mdata = {}
self.mdata.custId = paras.custId
self.mdata.taskId = paras.taskId
self.mdata.loginNo = NetProto.loginNo
self.isNewFollow = true
end

View File

@@ -346,17 +346,17 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 0.16078432, g: 0.5647059, b: 0.8627451, a: 1}
mPivot: 4
mWidth: 150
mWidth: 34
mHeight: 56
mDepth: 11
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 2
aspectRatio: 2.6785715
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 0}
mFont: {fileID: 7005176185871406937, guid: 7d76ebfe2dca9412195ae21f35d1b138, type: 3}
mText: 100%
mText: 0
mFontSize: 56
mFontStyle: 0
mAlignment: 0
@@ -910,7 +910,7 @@ MonoBehaviour:
aspectRatio: 1
mType: 3
mFillDirection: 4
mFillAmount: 0.307
mFillAmount: 0
mInvert: 1
mFlip: 0
centerType: 1

View File

@@ -2001,11 +2001,11 @@ MonoBehaviour:
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 2
aspectRatio: 1
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 0}
mFont: {fileID: 7005176185871406937, guid: 7d76ebfe2dca9412195ae21f35d1b138, type: 3}
mText: "\u4EFB\u52A1"
mText: "\u9884\u7EA6"
mFontSize: 48
mFontStyle: 0
mAlignment: 0

View File

@@ -676,7 +676,7 @@ MonoBehaviour:
EffectList: []
frameName: Frame1
frameObj: {fileID: 0}
titleKeyName: "\u8DDF\u65F6\u8BB0\u5F55"
titleKeyName: "\u8DDF\u8FDB\u8BB0\u5F55"
--- !u!1 &1165551577796406054
GameObject:
m_ObjectHideFlags: 0

View File

@@ -486,7 +486,7 @@ MonoBehaviour:
EffectList: []
frameName: Frame1
frameObj: {fileID: 0}
titleKeyName: "\u65B0\u5EFA\u8DDF\u8FDB\u4EFB\u52A1"
titleKeyName: "\u65B0\u5EFA\u9884\u7EA6"
--- !u!1 &7833718132027562127
GameObject:
m_ObjectHideFlags: 0

View File

@@ -691,7 +691,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
isPause: 0
luaPath: trCRM/upgradeRes/priority/lua/ui/cell/TRCellCustList.lua
luaPath: trCRM/upgradeRes/priority/lua/ui/cell/TRCellOrderList.lua
isNeedResetAtlase: 1
--- !u!114 &2570989324121443772
MonoBehaviour:
@@ -1324,7 +1324,7 @@ MonoBehaviour:
EffectList: []
frameName: Frame1
frameObj: {fileID: 0}
titleKeyName: "\u5BA2\u6237\u7BA1\u7406"
titleKeyName: "\u8BA2\u5355\u7BA1\u7406"
--- !u!1 &3548334101062895408
GameObject:
m_ObjectHideFlags: 0

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 71bd8a1a0ce3f4d31a41abe7ecb7ea1c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1 +1 @@
r8 (trCRM/resVer/Android/VerCtl/priority.ver8,cdf75ce3bff25ef5479dfe2b87de83aa8 %trCRM/resVer/Android/VerCtl/other.ver8,f015b5161f131b75152dbc02ba015a33
r8 (trCRM/resVer/Android/VerCtl/priority.ver8,fc95ef03321bc60d7ddb47a8158553a18 %trCRM/resVer/Android/VerCtl/other.ver8,f015b5161f131b75152dbc02ba015a33