From 6131316db2e61c717a6fbd1db774b41b60c933e9 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 21 九月 2022 09:45:32 +0800 Subject: [PATCH] 优化查询 --- zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Index.cshtml | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Index.cshtml b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Index.cshtml index 0a95e18..87534de 100644 --- a/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/CooperatecustomCustomer/Index.cshtml @@ -17,6 +17,9 @@ var shengDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShengDropDown))'; var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))'; + var Baomingtimebegin = '@Html.Raw(ViewBag.Baomingtimebegin)'; + var Baomingtimeend = '@Html.Raw(ViewBag.Baomingtimeend)'; + loseherght = 60; gridConfig = { multiselect: true, selectcol: "Id" }; dataCol = [ @@ -50,7 +53,7 @@ } }, ]; - dataUrl = "/CooperatecustomCustomer/GetList"+"@(string.IsNullOrEmpty(Creater)?"": "?Ywjl=" + Creater)"; + dataUrl = "/CooperatecustomCustomer/GetList?Createtime=" + Baomingtimebegin + "|" + Baomingtimeend +"@(string.IsNullOrEmpty(Creater)?"": "&Ywjl=" + Creater)"; searchCol = [ { label: '瀹㈡埛鏉ユ簮', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys), cwidth: '5%', cccwidth: '8%' }, @@ -69,6 +72,19 @@ var _pageAdd = function () { OpenWindow("鏂板鍚堜綔瀹㈡埛", "98%", "100%", "/CooperatecustomCustomer/Edit/"); } + + var _pageSearch = function () { + $("#jqGrid").jqGrid('setGridParam', { + url: dataUrl = "/CooperatecustomCustomer/GetList"+"@(string.IsNullOrEmpty(Creater) ?"": "?Ywjl=" + Creater)", postData: jsons, page: 1 + }); //閲嶆柊杞藉叆 + var jsons = GetSearchEnd(); + if (jsons == false) { + msg.info("璇峰綍鍏ユ煡璇㈡潯浠�"); + return false; + } + LoadGrid(jsons); + } + var _pagePrint = function () { @@ -282,7 +298,17 @@ } - + }; + + $(function () { + + + + $("#PBSCreatetimeend").val(Baomingtimeend); + + $("#PBSCreatetimestart").val(Baomingtimebegin); + + }); </script> } -- Gitblit v1.9.1