From 4045b2468a8209c2d876fb05df7340d4a5d768fa Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 11 Nov 2022 11:03:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=9B=BE?= =?UTF-8?q?=E4=B9=A6=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9B=E5=9B=BE?= =?UTF-8?q?=E4=B9=A6=E5=80=9F=E9=98=85=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/BookBorrow/Form.cshtml | 29 ++++++++--------- .../Views/BookBorrow/Form.js | 3 ++ .../Views/BookBorrow/Index.cshtml | 4 +-- .../Views/BookBorrow/Index.js | 26 +++++++++++++--- .../Views/BookInfo/Form.cshtml | 18 ++++++----- .../Views/BookInfo/Index.cshtml | 4 +-- .../Views/BookInfo/Index.js | 15 ++++----- .../BookBorrow/BookBorrowService.cs | 17 +++------- .../BookBorrow/Book_borrowinfoEntity.cs | 31 +++++++++++++++++++ .../BookInfo/BookInfoService.cs | 18 +---------- .../BookInfo/Book_infoEntity.cs | 5 +++ .../LearunApp-2.2.0/config.js | 4 +-- 12 files changed, 106 insertions(+), 68 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml index aa8883f02..65d792a19 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml @@ -3,25 +3,26 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
借书时间
- + +
+
图书*
+
-
-
还书时间
- +
+
借阅时间*
+
-
-
借书证
- +
+
借阅人*
+
-
-
书籍编号
- +
+
借书证
+
-
+
审核
- +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookBorrow/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js index 8eaa05bd6..bbf6ab106 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js @@ -15,6 +15,9 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $("#BookID").lrDataSourceSelect({ code: 'BookInfo', value: 'id', text: 'bookname' }); + $("#UserId").lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); + }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml index 3df951628..638528194 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml @@ -18,8 +18,8 @@
-
书籍编号
- +
图书名称
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js index 9dc653200..486f9c9eb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js @@ -98,13 +98,29 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/BookBorrow/GetPageList', headData: [ - { label: "借书时间", name: "BorrowTime", width: 130, align: "left"}, - { label: "还书时间", name: "ReturnTime", width: 130, align: "left"}, - { label: "借书证", name: "LibraryCard", width: 100, align: "left"}, - { label: "书籍编号", name: "BookID", width: 100, align: "left"}, + { label: "图书名称", name: "BookName", width: 100, align: "left" }, + { label: "书籍出版号", name: "ISBN", width: 100, align: "left" }, + { label: "书籍作者", name: "Author", width: 100, align: "left" }, + { label: "书籍出版社", name: "Publisher", width: 100, align: "left" }, + { label: "数量", name: "Amount", width: 100, align: "left" }, + { label: "借阅时间", name: "BorrowTime", width: 130, align: "left" }, + { + label: "借阅人姓名", name: "UserId", width: 130, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "借书证", name: "LibraryCard", width: 100, align: "left" }, { label: "审核", name: "CheckMark", width: 100, align: "left"}, ], mainId:'ID', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml index 76fe6638d..f0de48bfc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml @@ -4,7 +4,7 @@ }
-
书籍名称*
+
图书名称*
@@ -12,8 +12,8 @@
-
书籍ISBN
- +
书籍出版号*
+
书籍类别号
@@ -28,21 +28,25 @@
-
书籍编号
- +
书籍编号*
+
出版时间
- +
入库时间
- +
书籍价格
+
+
数量
+ +
存放位置
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml index e2bdc7563..d844f4f79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml @@ -11,11 +11,11 @@
-
书籍名称
+
图书名称
-
书籍ISBN
+
书籍出版号
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js index d16cb59d1..ca6d77fbc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js @@ -26,8 +26,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/BookInfo/Form', - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -41,8 +41,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/BookInfo/Form?keyValue=' + keyValue, - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -69,12 +69,12 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/BookInfo/GetPageList', headData: [ - { label: "书籍名称", name: "BookName", width: 100, align: "left" }, + { label: "图书名称", name: "BookName", width: 100, align: "left" }, { label: "书籍提要", name: "Collation", width: 100, align: "left" }, - { label: "书籍ISBN", name: "ISBN", width: 100, align: "left" }, + { label: "书籍出版号", name: "ISBN", width: 100, align: "left" }, { label: "书籍类别号", name: "BookType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -94,6 +94,7 @@ var bootstrap = function ($, learun) { { label: "出版时间", name: "PublishTime", width: 100, align: "left" }, { label: "入库时间", name: "AddTime", width: 100, align: "left" }, { label: "书籍价格", name: "Price", width: 100, align: "left" }, + { label: "数量", name: "Amount", width: 100, align: "left" }, { label: "存放位置", name: "BookLocation", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs index 969b5dd38..665548fe8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs @@ -29,16 +29,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.BorrowTime, - t.ReturnTime, - t.LibraryCard, - t.BookID, - t.CheckMark - "); + strSql.Append("SELECT t.*,b.BookName,b.ISBN,b.Author,b.Publisher "); strSql.Append(" FROM Book_borrowinfo t "); + strSql.Append(" left join Book_info b on t.BookID=b.ID "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -54,10 +47,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("LibraryCard", "%" + queryParam["LibraryCard"].ToString() + "%", DbType.String); strSql.Append(" AND t.LibraryCard Like @LibraryCard "); } - if (!queryParam["BookID"].IsEmpty()) + if (!queryParam["BookName"].IsEmpty()) { - dp.Add("BookID", "%" + queryParam["BookID"].ToString() + "%", DbType.String); - strSql.Append(" AND t.BookID Like @BookID "); + dp.Add("BookName", "%" + queryParam["BookName"].ToString() + "%", DbType.String); + strSql.Append(" AND b.BookName Like @BookName "); } return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs index 8113df78e..e80a91479 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs @@ -44,6 +44,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CHECKMARK")] public string CheckMark { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } + /// + /// 借阅人 + /// + [Column("USERID")] + public string UserId { get; set; } #endregion #region 扩展操作 @@ -64,6 +74,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + + /// + /// 书籍名称 + /// + [NotMapped] + public string BookName { get; set; } + /// + /// 书籍ISBN + /// + [NotMapped] + public string ISBN { get; set; } + /// + /// 书籍作者 + /// + [NotMapped] + public string Author { get; set; } + /// + /// 书籍出版社 + /// + [NotMapped] + public string Publisher { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs index ad4901284..0e68d167e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs @@ -29,23 +29,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.BookName, - t.Collation, - t.ISBN, - t.BookType, - t.Author, - t.Publisher, - t.BookCode, - t.PublishTime, - t.AddTime, - t.Price, - t.BookLocation, - t.CheckMark, - t.Remark - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM Book_info t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs index 0a0741ecc..e1339d497 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs @@ -84,6 +84,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CHECKMARK")] public string CheckMark { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index d304bee48..b14aeb67f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -23,11 +23,11 @@ export default { "apiHost": [ // "http://cyzjzx.gnway.cc:31218/"//测试地址接口 // "http://cyzjzx.gnway.cc:29904/"//正式地址接口 - "http://192.168.10.58:8012/" + "http://192.168.10.31:8088/" ], // "webHost":"http://cyzjzx.gnway.cc:30549/",//测试地址 // "webHost":"http://wxd3f.cyzjzx.com/",//正式地址 - "webHost":"http://192.168.10.58:8009/", + "webHost":"http://192.168.10.31:8087/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428