This commit is contained in:
2020-07-11 20:53:21 +08:00
parent ab64739382
commit ac03de0387
69 changed files with 4130 additions and 1218 deletions

View File

@@ -0,0 +1,36 @@
DBOrder = {}
local db = {}
DBOrder.PopListGroup = {
urgencyLevels = "urgencyLevels", -- 紧急程序
templateList = "templateList", -- 订单模板
}
DBOrder.onGetFilter = function(data)
db.filters = data
-- 转换成poplist
db.filtersPopup = {}
for k, cells in pairs(data) do
db.filtersPopup[k] = {}
---@type System.Collections.ArrayList
db.filtersPopup[k].options = ArrayList()
db.filtersPopup[k].values = ArrayList()
-- 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))
end
end
end
DBCust.getPopupList = function(popGroup)
if popGroup then
return db.filtersPopup[popGroup]
end
return db.filters
end
return DBOrder

View File

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

View File

@@ -3,6 +3,7 @@ require "db.DBMessage"
require "db.DBCust"
require "db.DBStatistics"
require "db.DBUser"
require "db.DBOrder"
---@class DBRoot
DBRoot = {}
@@ -35,6 +36,10 @@ DBRoot.funcs = {
[NetProto.cmds.list_customers] = function(data)
DBCust.onGetCusts(data.result)
end,
[NetProto.cmds.load_wfTicket_Settings] = function(data)
DBOrder.onGetFilter(data.result)
end,
}
DBRoot.onReceiveData = function(cmd, data)

View File

@@ -241,6 +241,8 @@ NetProto.cmds = {
update_customer = "update_customer", -- 更新客户信息
save_customer = "save_customer", -- 新建客户
create_followUp_record = "create_followUp_record", -- 新建跟进
load_wfTicket_Settings = "load_wfTicket_Settings", -- 工单配置信息
selectProductInfo = "selectProductInfo", -- 商品列表
}
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
@@ -530,5 +532,21 @@ NetProto.send.create_followUp_record = function(followUpRecordJson, callback, ti
content.followUpRecordJson = followUpRecordJson
NetProto.sendSocket(content, callback, timeOutSec)
end
NetProto.send.load_wfTicket_Settings = function(callback, timeOutSec)
local content = {}
content.action = NetProto.cmds.load_wfTicket_Settings
content.loginNo = NetProto.loginNo
content.groupId = NetProto.groupId
NetProto.sendSocket(content, callback, timeOutSec)
end
NetProto.send.selectProductInfo = function(callback, timeOutSec)
local content = {}
content.action = NetProto.cmds.selectProductInfo
content.loginNo = NetProto.loginNo
content.groupId = NetProto.groupId
NetProto.sendSocket(content, callback, timeOutSec)
end
------------------------------------------------------
return NetProto

View File

@@ -116,9 +116,9 @@ end
function _cell.onFinisInitFields()
isLoading = false
uiobjs.Table:Reposition()
Utl.doCallback(mData.onFinish, csSelf.gameObject)
uiobjs.formRoot:setValue(mData.data)
hideHotWheel()
Utl.doCallback(mData.onFinish, csSelf.gameObject)
_cell.refresh()
end

View File

@@ -20,7 +20,7 @@ function CLLPWebView.init(csObj)
CLLPWebView.onCallOnStarted,
CLLPWebView.onCallOnLoaded
)
webView:setMargins(0, NumEx.getIntPart(130 / MyUtl.getSizeAdjust()), 0, 0)
webView:setMargins(0, NumEx.getIntPart(134 / MyUtl.getSizeAdjust()), 0, 0)
end
-- 设置数据
@@ -28,8 +28,17 @@ function CLLPWebView.setData(paras)
url = paras and paras.url or ""
end
--当有通用背板显示时的回调
function CLLPWebView.onShowFrame()
---public 当有通用背板显示时的回调
---@param cs Coolape.CLPanelLua
function CLLPWebView.onShowFrame(cs)
if cs.frameObj then
---@type _BGFrame1Param
local d = {}
-- d.title = LGet(cs.titleKeyName)
d.title = cs.titleKeyName
d.panel = csSelf
cs.frameObj:init(d)
end
end
function CLLPWebView.onCallFromJS(msg)
@@ -72,9 +81,6 @@ end
-- 处理ui上的事件例如点击等
function CLLPWebView.uiEventDelegate(go)
local goName = go.name
if goName == "ButtonQuit" then
hideTopPanel()
end
end
-- 当顶层页面发生变化时回调

View File

@@ -52,13 +52,15 @@ function TRPConnect.procNetwork(cmd, succ, msg, paras)
TRPConnect.getDataFromServer()
end
else
CLUIUtl.showConfirm(
"服务器连接失败,确认网络连接正常。",
function()
NetProto.socketInit(companyInfro.company_id, companyInfro.login_no)
end,
nil
)
if (cmd == "connect") then
CLUIUtl.showConfirm(
"服务器连接失败,确认网络连接正常。",
function()
NetProto.socketInit(companyInfro.company_id, companyInfro.login_no)
end,
nil
)
end
end
end
@@ -83,8 +85,10 @@ function TRPConnect.getDataFromServer()
5
)
NetProto.send.announcement_query()
-- NetProto.send.booking_query()
-- NetProto.send.replenish_query()
NetProto.send.booking_query()
NetProto.send.replenish_query()
NetProto.send.load_wfTicket_Settings()
NetProto.send.selectProductInfo()
end
-- 处理ui上的事件例如点击等

View File

@@ -114,15 +114,18 @@ function TRPNewOrder:setData(paras)
if paras and paras.orderId and paras.orderId > 0 then
self.isNewOrder = false
self.mdata = paras
if type(self.mdata.jsonStr) == "string" then
self.mdata.jsonStr = json.decode(self.mdata.jsonStr)
end
self.mdata.jsonStr = self.mdata.jsonStr or {}
self.cust = nil
else
--//TODO:初始值
self.isNewOrder = true
self.mdata = paras
self.cust = paras
self.mdata = {}
end
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 当有通用背板显示时的回调
@@ -161,7 +164,12 @@ function TRPNewOrder:showBaseFields()
---@type _ParamCellExtendFiledRoot
local param = {}
param.data = self.mdata or {}
param.onFinish = self:wrapFunc(self.setExtendFieldsMode)
param.onFinish = function(go)
if self.cust then
uiobjs.DetailFromRoot:setValue(self.cust, true)
end
self:setExtendFieldsMode(go)
end
param.fields = {}
---@type _ParamCellExtendFiled
local filedInfor