diff --git a/YLErpWeb/Hubs/TradeConfirmSendOAHub.cs b/YLErpWeb/Hubs/TradeConfirmSendOAHub.cs index fea2f3cf..fa4f4fd7 100644 --- a/YLErpWeb/Hubs/TradeConfirmSendOAHub.cs +++ b/YLErpWeb/Hubs/TradeConfirmSendOAHub.cs @@ -19,15 +19,21 @@ namespace YLErp.Web.Hubs public async Task StartProcessing(string jsonString) { - var req = JsonHelper.Deserialize(jsonString); + var req = JsonHelper.Deserialize>(jsonString); var client = Clients.Caller; - + + if (req == null || !req.ContainsKey("ids") || req["ids"] == null) + { + await client.SendAsync("ExceptionMessage", "参数错误:缺少交易ID列表"); + return; + } + if (Context.User == null) { await client.SendAsync("ExceptionMessage", "登录已失效,请重新登录"); return; } - + var user = Server.CacheProvider.Get("loginUser^" + Context.User.GetUserId()) as UserInfo; if (user == null) { @@ -44,7 +50,7 @@ namespace YLErp.Web.Hubs try { - await ProcessOAByIds(req.ids.ToString(), user); + await ProcessOAByIds(req["ids"].ToString(), user); isProcessing = false; await Clients.Caller.SendAsync("ProcessCompleted", ""); } diff --git a/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js b/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js index 1ef5520e..7945f2b8 100644 --- a/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js +++ b/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js @@ -663,10 +663,10 @@ function BatchDownLoadDoc() { '' + '' + ''; - if (page.IsZheQi) { + htmlContent += '
' + ''; - } + main.open2("批量下载交易确认书", htmlContent + '', @@ -904,8 +904,8 @@ function showToolName(cellValue, options, rowObject) { html += "" .template(rowObject.EncryptId, "发送Email"); } - var canUpload = page.canGenerate == true && rowObject.MetaDic.ContractDocUrl ? "" : "disabled"; - html += "".template(rowObject.MetaDic.ContractEncryptId, canUpload); + var canUpload = page.canGenerate == true ? "" : "disabled"; + html += "".template(rowObject.MetaDic.ContractEncryptId, canUpload); html += "".template(rowObject.id); return html; }