浏览代码

教材管理 使用明细

临城职教中职
ndbs 2 年前
父节点
当前提交
8201103c19
共有 13 个文件被更改,包括 402 次插入5 次删除
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookOutController.cs
  2. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  3. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js
  5. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/FormUse.cshtml
  6. +97
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/FormUse.js
  7. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.cshtml
  8. +92
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js
  9. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  10. +23
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs
  11. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs
  12. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs
  13. +54
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookOutController.cs 查看文件

@@ -46,7 +46,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet]
public ActionResult FormOut()
{
ViewBag.BookCode = "RK" + DateTime.Now.ToString("yyyyMMddHHmmss");
ViewBag.BookCode = "CK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>


+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs 查看文件

@@ -38,6 +38,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
ViewBag.BookCode = "KC" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormUse()
{
return View();
}
/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexInOut()
{
return View();
}
#endregion

#region 获取数据
@@ -91,6 +109,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormUseData(string keyValue)
{
var TextBookInOutData = textbookInOutIBLL.GetEntity(keyValue);
var TextBookInOutDetailData = textbookInOutIBLL.GetInOrOutEntity(TextBookInOutData.BookCode);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
TextBookInOrOut = TextBookInOutDetailData,
};
return Success(jsonData);
}
#endregion

#region 提交数据


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js 查看文件

@@ -51,7 +51,6 @@ var bootstrap = function ($, learun) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/DeleteForm', { keyValue: NewkeyValue }, function () {
refreshGirdData();
learun.layerClose(window.name);
});
}
});


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js 查看文件

@@ -50,6 +50,7 @@ var bootstrap = function ($, learun) {
}
});
$('#TextBookOut').jfGridSet('refreshdata', tempdatra);
learun.layerClose(window.name);
top.layer.close(index);
}
});


+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/FormUse.cshtml 查看文件

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookInOrOut"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.js")


+ 97
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/FormUse.js 查看文件

@@ -0,0 +1,97 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookInOrOut').jfGrid({
headData: [
{ label: '出/入库', name: 'CKORRK', width: 180, align: 'left' },
{ label: '库存单', name: 'InorOut', width: 180, align: 'left' },
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '出/入库数量', name: 'variate', width: 100, align: 'left' },
{ label: '出库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '出库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetFormUseData?keyValue=' + keyValue, function (data) {
console.log(data,123123)
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === temprow.ID) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookInOrOut').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookInOrOut' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
page.init();
}

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.cshtml 查看文件

@@ -0,0 +1,30 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout">
<div class="lr-layout-center ">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;明细查看</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.js")

+ 92
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js 查看文件

@@ -0,0 +1,92 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/FormUse?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
{ label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
{ label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" },
//{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" },
{ label: '出版社', name: 'Publisher', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 200, align: "left" },
{ label: '印次', name: 'Impression', width: 200, align: "left" },
{ label: '创建人', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
{ label: '修改人', name: 'UpTime', width: 200, align: "left" },
{ label: '修改用户', name: 'UpUserID', width: 200, align: "left" },
{ label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
{ label: '备注', name: 'Remark', width: 200, align: "left" },

],
mainId: 'ID',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = 'and IsDel = 0 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 查看文件

@@ -1179,6 +1179,8 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\FormUse.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\IndexInOut.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormDelete.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.js" />
@@ -7628,6 +7630,8 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormDelete.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\FormUse.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\IndexInOut.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 23
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs 查看文件

@@ -114,7 +114,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 获取KC实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetInOrOutEntity(string keyValue)
{
try
{
return textbookInOutService.GetInOrOutEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据


+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs 查看文件

@@ -146,7 +146,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
[Column("ISSUBMIT")]
public int? IsSubmit { get; set; }

/// <summary>
/// 出库货入库
/// </summary>
[NotMapped]
public string CKORRK { get; set; }
#endregion

#region 扩展操作


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs 查看文件

@@ -40,6 +40,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextbookInOutEntity GetKCEntity(string keyValue);
/// <summary>
/// 使用明细
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
IEnumerable<TextbookInOutEntity> GetInOrOutEntity(string keyValue);
#endregion

#region 提交数据


+ 54
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs 查看文件

@@ -4,6 +4,7 @@ using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -125,7 +126,59 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetInOrOutEntity(string keyValue)
{
try
{
List<TextbookInOutEntity> returnList = new List<TextbookInOutEntity>();
TextbookInOutEntity InOutList = new TextbookInOutEntity();
List<TextBookInEntity> InEntity = this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(x => x.InOutCode == keyValue).ToList();
List<TextBookOutEntity> OutEntity = this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(x => x.InOutCode == keyValue).ToList();
if (InEntity.Count() > 0 || OutEntity.Count() > 0)
{
for (int i = 0; i < InEntity.Count(); i++)
{
InOutList.CKORRK = "入库";
InOutList.InorOut = InEntity[i].InOutCode;
InOutList.BookCode = InEntity[i].BookCode;
InOutList.variate = InEntity[i].variate;
InOutList.CreateTime = InEntity[i].CreateTime;
InOutList.CrateUserID = InEntity[i].CrateUserID;
InOutList.Remark = InEntity[i].Remark;
returnList.Add(InOutList);
}
for (int j = 0; j < OutEntity.Count(); j++)
{
InOutList.CKORRK = "出库";
InOutList.InorOut = OutEntity[j].InOutCode;
InOutList.BookCode = OutEntity[j].BookCode;
InOutList.variate = OutEntity[j].Variate;
InOutList.CreateTime = InEntity[j].CreateTime;
InOutList.CrateUserID = InEntity[j].CrateUserID;
InOutList.Remark = OutEntity[j].Remark;
returnList.Add(InOutList);
}
returnList.OrderBy(x => x.CreateTime);
}
return returnList;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据


正在加载...
取消
保存