Преглед изворни кода

【修改】图书信息管理;图书借阅管理;

新疆警官学校中职
dyy пре 2 година
родитељ
комит
4045b2468a
12 измењених фајлова са 106 додато и 68 уклоњено
  1. +15
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml
  2. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml
  4. +21
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.js
  5. +11
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml
  6. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml
  7. +8
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.js
  8. +5
    -12
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/BookBorrowService.cs
  9. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookBorrow/Book_borrowinfoEntity.cs
  10. +1
    -17
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/BookInfoService.cs
  11. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookInfo/Book_infoEntity.cs
  12. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js

+ 15
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml Прегледај датотеку

@@ -3,25 +3,26 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">借书时间</div>
<input id="BorrowTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#BorrowTime').trigger('change'); } })" />

<div class="col-xs-12 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">图书<font face="宋体">*</font></div>
<div id="BookID" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">还书时间</div>
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
<div class="col-xs-12 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">借阅时间<font face="宋体">*</font></div>
<input id="BorrowTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#BorrowTime').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo" >
<div class="lr-form-item-title">借书证</div>
<input id="LibraryCard" type="text" class="form-control" />
<div class="col-xs-12 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">借阅人<font face="宋体">*</font></div>
<div id="UserId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo" >
<div class="lr-form-item-title">书籍编号</div>
<input id="BookID" type="text" class="form-control" />
<div class="col-xs-12 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">借书证</div>
<input id="LibraryCard" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_borrowinfo" >
<div class="col-xs-12 lr-form-item" data-table="Book_borrowinfo">
<div class="lr-form-item-title">审核</div>
<input id="CheckMark" type="text" class="form-control" />
<input id="CheckMark" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookBorrow/Form.js")

+ 3
- 0
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) {


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Index.cshtml Прегледај датотеку

@@ -18,8 +18,8 @@
<input id="LibraryCard" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">书籍编号</div>
<input id="BookID" type="text" class="form-control" />
<div class="lr-form-item-title">图书名称</div>
<input id="BookName" type="text" class="form-control" />
</div>
</div>
</div>


+ 21
- 5
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',


+ 11
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Form.cshtml Прегледај датотеку

@@ -4,7 +4,7 @@
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">书名称<font face="宋体">*</font></div>
<div class="lr-form-item-title">书名称<font face="宋体">*</font></div>
<input id="BookName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
@@ -12,8 +12,8 @@
<input id="Collation" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">书籍ISBN</div>
<input id="ISBN" type="text" class="form-control" />
<div class="lr-form-item-title">书籍出版号<font face="宋体">*</font></div>
<input id="ISBN" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">书籍类别号</div>
@@ -28,21 +28,25 @@
<input id="Publisher" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">书籍编号</div>
<input id="BookCode" type="text" class="form-control" />
<div class="lr-form-item-title">书籍编号<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">出版时间</div>
<input id="PublishTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Birthday').trigger('change'); } })" />
<input id="PublishTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#PublishTime').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">入库时间</div>
<input id="AddTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Birthday').trigger('change'); } })" />
<input id="AddTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#AddTime').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">书籍价格</div>
<input id="Price" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">数量</div>
<input id="Amount" type="number" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Book_info">
<div class="lr-form-item-title">存放位置</div>
<div id="BookLocation"></div>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookInfo/Index.cshtml Прегледај датотеку

@@ -11,11 +11,11 @@
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">书名称</div>
<div class="lr-form-item-title">书名称</div>
<input id="BookName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">书籍ISBN</div>
<div class="lr-form-item-title">书籍出版号</div>
<input id="ISBN" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">


+ 8
- 7
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) {


+ 5
- 12
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<Book_borrowinfoEntity>(strSql.ToString(),dp, pagination);
}


+ 31
- 0
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
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
/// <summary>
/// 数量
/// </summary>
[Column("AMOUNT")]
public int? Amount { get; set; }
/// <summary>
/// 借阅人
/// </summary>
[Column("USERID")]
public string UserId { get; set; }
#endregion

#region 扩展操作
@@ -64,6 +74,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段

/// <summary>
/// 书籍名称
/// </summary>
[NotMapped]
public string BookName { get; set; }
/// <summary>
/// 书籍ISBN
/// </summary>
[NotMapped]
public string ISBN { get; set; }
/// <summary>
/// 书籍作者
/// </summary>
[NotMapped]
public string Author { get; set; }
/// <summary>
/// 书籍出版社
/// </summary>
[NotMapped]
public string Publisher { get; set; }
#endregion
}
}


+ 1
- 17
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();


+ 5
- 0
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
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
/// <summary>
/// 数量
/// </summary>
[Column("AMOUNT")]
public int? Amount { get; set; }
#endregion

#region 扩展操作


+ 2
- 2
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


Loading…
Откажи
Сачувај