This commit is contained in:
2020-08-01 17:55:18 +08:00
parent 29a8a1dae3
commit 4435098171
160 changed files with 21247 additions and 2405 deletions

View File

@@ -14,6 +14,7 @@ function TRPNewOrder:init(csObj)
MyUtl.setContentView(getChild(self.transform, "PanelContent"), 132, 0)
---@type UIScrollView
uiobjs.scrollView = getCC(self.transform, "PanelContent", "UIScrollView")
uiobjs.scrollView.dampenStrength = MyUtl.dampenStrength
---@type UITable
uiobjs.Table = getCC(uiobjs.scrollView.transform, "Table", "UITable")
---@type CLUIFormRoot
@@ -149,7 +150,9 @@ function TRPNewOrder:setData(paras)
self.cust = paras
self.mdata = {}
local popInfor = DBOrder.getPopupList(DBOrder.PopListGroup.templateList)
self.mdata.templetId = popInfor.values[0]
if popInfor and #popInfor > 0 then
self.mdata.templetId = popInfor.values[0]
end
popInfor = DBOrder.getPopupList(DBOrder.PopListGroup.urgencyLevels)
self.mdata.urgency = popInfor.values[0]
local templateInfor = DBOrder.getTemplateInfor(self.mdata.templetId)
@@ -190,6 +193,8 @@ end
function TRPNewOrder:refreshContent()
self:showBaseFields()
self:showProducts()
-- 附件
self:showImages()
self.csSelf:invoke4Lua(self:wrapFunc(self.reposition), 0.1)
end
@@ -309,9 +314,6 @@ function TRPNewOrder:showExtentFiles(templetId)
local d = uiobjs.DetailFromRoot:getValue(true)
d.content = cfgInfor.content
uiobjs.DetailFromRoot:setValue(d)
-- 附件
self:showImages()
-----------------------------------
uiobjs.StepRoot:Reposition()
end
@@ -528,6 +530,16 @@ function TRPNewOrder:setEventDelegate()
MyUtl.toastW(err)
return
end
if self.images and #(self.images) > 0 then
for i, v in ipairs(self.images) do
if v.uploadInfor == nil then
MyUtl.toastW("附件还未全部上传成功")
return
end
end
end
local order = uiobjs.DetailFromRoot:getValue(true)
if self.cust then
order.phoneNo = self.cust.phoneNo
@@ -562,6 +574,15 @@ function TRPNewOrder:setEventDelegate()
end
end
order.wfType = "0" -- 0正常工单1退货工单
-- 附件
if self.images and #(self.images) > 0 then
order.wfOptions = {}
for i, v in ipairs(self.images) do
table.insert(order.wfOptions, v.uploadInfor)
end
end
-----------------------------------
showHotWheel()
NetProto.send.createWfInfo(
order,
@@ -641,7 +662,6 @@ function TRPNewOrder:onGetImage(path)
return
end
end
MyUtl.toastW("TODO:上传附件还没有做!!!!")
table.insert(self.images, {path = path, onDelete = self:wrapFunc(self.onDelImage)})
self:showImages()
end