From a6a84e6f677447342e8c5984fdc0b52241b92ce3 Mon Sep 17 00:00:00 2001 From: yzh <snbbt@21cn.com> Date: 星期四, 30 六月 2022 01:20:34 +0800 Subject: [PATCH] 客户管理分配个性产品优化、返回URL优化 --- web/Dao/GwClientDao.cs | 8 ++- web/Lib/Dao.dll | 0 web/web/Bin/Dao.dll | 0 web/web/GwOrderCreate.aspx.cs | 4 +- web/.vs/Web/v16/.suo | 0 web/web/GwOrderList.aspx.cs | 15 +++++++ web/web/GwClient.aspx | 50 +++++++++++++------------ web/web/GwOrderList.aspx | 4 ++ web/Lib/Dao.pdb | 0 web/web/Bin/Dao.pdb | 0 10 files changed, 51 insertions(+), 30 deletions(-) diff --git a/web/.vs/Web/v16/.suo b/web/.vs/Web/v16/.suo index 7f0360c..aea8cd4 100644 --- a/web/.vs/Web/v16/.suo +++ b/web/.vs/Web/v16/.suo Binary files differ diff --git a/web/Dao/GwClientDao.cs b/web/Dao/GwClientDao.cs index 93929f7..6d27537 100644 --- a/web/Dao/GwClientDao.cs +++ b/web/Dao/GwClientDao.cs @@ -586,6 +586,8 @@ //鏇存柊涓�у垎閰嶅鎴烽泦闀垮害澶т簬0鏃� string key2 = "UPDATE GW_PRODUCT SET CLIENT_IDS=:CLIENT_ID || ',' || CLIENT_IDS WHERE (CLIENT_IDS IS NOT NULL AND LENGTH(CLIENT_IDS) > 0) AND ID=:PRODUCT_ID "; + + list = new List<KeyValuePair<string, OracleParameter[]>>(); foreach (string str in productIdArray) { OracleParameter[] oracleParameterArray2 = new OracleParameter[2] @@ -594,7 +596,6 @@ new OracleParameter(":PRODUCT_ID", (object) str) }; - list = new List<KeyValuePair<string, OracleParameter[]>>(); list.Add(new KeyValuePair<string, OracleParameter[]>(key2, oracleParameterArray2)); } OracleHelper.ExecuteSqlTran(list, OracleHelper.Connection); @@ -602,6 +603,8 @@ //鏇存柊涓�у垎閰嶅鎴烽泦闀垮害涓�0鏃� string key3 = "UPDATE GW_PRODUCT SET CLIENT_IDS=:CLIENT_ID WHERE (CLIENT_IDS IS NULL OR LENGTH(CLIENT_IDS) <= 0) AND ID=:PRODUCT_ID "; + + list = new List<KeyValuePair<string, OracleParameter[]>>(); foreach (string str in productIdArray) { OracleParameter[] oracleParameterArray2 = new OracleParameter[2] @@ -609,8 +612,7 @@ new OracleParameter(":CLIENT_ID", (object) clientId), new OracleParameter(":PRODUCT_ID", (object) str) }; - - list = new List<KeyValuePair<string, OracleParameter[]>>(); + list.Add(new KeyValuePair<string, OracleParameter[]>(key3, oracleParameterArray2)); } OracleHelper.ExecuteSqlTran(list, OracleHelper.Connection); diff --git a/web/Lib/Dao.dll b/web/Lib/Dao.dll index 13df0d2..a549682 100644 --- a/web/Lib/Dao.dll +++ b/web/Lib/Dao.dll Binary files differ diff --git a/web/Lib/Dao.pdb b/web/Lib/Dao.pdb index 4c8353c..b9c9849 100644 --- a/web/Lib/Dao.pdb +++ b/web/Lib/Dao.pdb Binary files differ diff --git a/web/web/Bin/Dao.dll b/web/web/Bin/Dao.dll index 13df0d2..a549682 100644 --- a/web/web/Bin/Dao.dll +++ b/web/web/Bin/Dao.dll Binary files differ diff --git a/web/web/Bin/Dao.pdb b/web/web/Bin/Dao.pdb index 4c8353c..b9c9849 100644 --- a/web/web/Bin/Dao.pdb +++ b/web/web/Bin/Dao.pdb Binary files differ diff --git a/web/web/GwClient.aspx b/web/web/GwClient.aspx index 0b50c2b..a355801 100644 --- a/web/web/GwClient.aspx +++ b/web/web/GwClient.aspx @@ -224,33 +224,35 @@ //淇敼鍒嗛厤涓�т骇鍝侊細淇敼纭 $(document).on("click", ".action-updateProduct", function () { var productIdArray = []; - mytek.confirm("鏄惁闇�瑕佷慨鏀瑰鎴峰垎閰嶄釜鎬т骇鍝侊紵", "纭鍒嗛厤涓�т骇鍝侊紝璇疯皑鎱庢搷浣滐紒", function (b) { - if (b) { - $("#updateProductDialog #_ProductId").each(function () { - if ($(this).is(":checked")) { - productIdArray.push($(this).val()); - } - }); + //mytek.confirm("鏄惁闇�瑕佷慨鏀瑰鎴峰垎閰嶄釜鎬т骇鍝侊紵", "纭鍒嗛厤涓�т骇鍝侊紝璇疯皑鎱庢搷浣滐紒", function (b) { + //if (b) { + if (confirm("鏄惁闇�瑕佷慨鏀瑰鎴峰垎閰嶄釜鎬т骇鍝侊紵") == true) { + $("#updateProductDialog #_ProductId").each(function () { + if ($(this).is(":checked")) { + productIdArray.push($(this).val()); + } + }); - //var clientId = $("#updateProductDialog").data("id"); - var clientId = $("#updateProductDialog input[name='clientID']").val(); - $.ajax({ - url: "GwClient.ashx", - type: "POST", - data: { action: "updateProduct", clientId: clientId, productIdArray: $.toJSON(productIdArray) }, - success: function (result) { - if (result.OK) { - $("#updateProductDialog").modal("hide"); - loadPageList(); - } else { - mytek.alert(result.Message, result.OK); - } + //var clientId = $("#updateProductDialog").data("id"); + var clientId = $("#updateProductDialog input[name='clientID']").val(); + $.ajax({ + url: "GwClient.ashx", + type: "POST", + data: { action: "updateProduct", clientId: clientId, productIdArray: $.toJSON(productIdArray) }, + success: function (result) { + if (result.OK) { + $("#updateProductDialog").modal("hide"); + loadPageList(); + } else { + mytek.alert(result.Message, result.OK); } - }); + } + }); - //swal.close(); - } - }); + //swal.close(); + //} + //}); + } }); diff --git a/web/web/GwOrderCreate.aspx.cs b/web/web/GwOrderCreate.aspx.cs index 80fe7bb..783d379 100644 --- a/web/web/GwOrderCreate.aspx.cs +++ b/web/web/GwOrderCreate.aspx.cs @@ -97,7 +97,7 @@ gwClient = gwClientDao.Get(gwSp.ClientID); this.GwOrder.Company = gwClient.Company; this.GwOrder.Balance = long.Parse(gwClient.Balance.ToString()); //浣欓 - + /** if (gwClient.Is_Enable==1) { backUrl = "GwClient.aspx?IsEnable=1"; @@ -105,7 +105,7 @@ else { backUrl = "GwClient.aspx?IsEnable=0"; - } + }**/ } this.GwOrder.SpId = gwSp.SpID; diff --git a/web/web/GwOrderList.aspx b/web/web/GwOrderList.aspx index b801ca0..1fda705 100644 --- a/web/web/GwOrderList.aspx +++ b/web/web/GwOrderList.aspx @@ -151,6 +151,10 @@ </div> <div class="input-group m-b"> <input type="button" value="鏌ヨ" class="btn btn-primary action-query" /> + <% if (!string.IsNullOrEmpty(backUrl)) + { %> + <a class="btn btn-default action-back" href="javascript:;" onclick="return window.location = '<%=backUrl %>'">杩斿洖</a> + <% } %> </div> </div> <div class="table-responsive"> diff --git a/web/web/GwOrderList.aspx.cs b/web/web/GwOrderList.aspx.cs index 7123008..de99ec0 100644 --- a/web/web/GwOrderList.aspx.cs +++ b/web/web/GwOrderList.aspx.cs @@ -45,7 +45,20 @@ { if (!string.IsNullOrEmpty(this.AppContext.GetString("clientId"))) { - backUrl = "GwClient.aspx"; + GwClient gwClient = new GwClient(); + using (GwClientDao gwClientDao = new GwClientDao()) + { + gwClient = gwClientDao.Get(this.AppContext.GetString("clientId") ); + + if (gwClient.Is_Enable == 1) + { + backUrl = "GwClient.aspx?IsEnable=1"; + } + else + { + backUrl = "GwClient.aspx?IsEnable=0"; + } + } } return this.AppContext.GetString("clientId"); -- Gitblit v1.9.1