Ver a proveniência

教材库存添加 提交按钮

教材入库 时间验证
临城职教中职
ndbs há 2 anos
ascendente
cometimento
8ed1174f4f
12 ficheiros alterados com 127 adições e 14 eliminações
  1. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.cshtml
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js
  4. +8
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.cshtml
  5. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.cshtml
  6. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js
  7. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +1
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs
  9. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs
  10. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs
  11. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs
  12. +37
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs

+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs Ver ficheiro

@@ -123,6 +123,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
if (string.IsNullOrEmpty(keyValue))
{
entity.IsDel = 0;
entity.IsSubmit = 0;
entity.FinallyNum = 0;
entity.CreateTime = DateTime.Now;
entity.CrateUserID = loginUserInfo.userId;
@@ -135,6 +136,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
textbookInOutIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SubmitForm(string keyValue)
{
textbookInOutIBLL.SubmitEntity(keyValue);
return Success("删除成功!");
}
#endregion

}


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.cshtml Ver ficheiro

@@ -20,7 +20,7 @@
</div>
<div class="col-xs-12 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">创建时间<font face="宋体">*</font></div>
<input id="CreateTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="isDateTime" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#CreateTime').trigger('change'); } })" />
<input id="CreateTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="DateTime" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#CreateTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">备注</div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js Ver ficheiro

@@ -89,6 +89,7 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
param.SqlParameter = ' and IsSubmit =1 ';
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};


+ 8
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.cshtml Ver ficheiro

@@ -8,15 +8,15 @@
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存编码<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull " readonly />
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></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" />
<div class="lr-form-item-title">教材<font face="宋体">*</font></div>
<input id="TextBookName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">教材号</div>
@@ -44,7 +44,11 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">印次</div>
<input id="Impression" type="text" class="form-control" />
<input id="Impression" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="FinallyNum" type="number" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.cshtml Ver ficheiro

@@ -22,7 +22,7 @@
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a> </div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js Ver ficheiro

@@ -10,6 +10,7 @@ var bootstrap = function ($, learun) {
var page = {
init: function () {
page.initGird();
console.log(223223223);
page.bind();
},
bind: function () {
@@ -40,6 +41,11 @@ var bootstrap = function ($, learun) {
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit');
if (IsSubmit == 1) {
learun.alert.warning("当前项目已提交,不可编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
@@ -56,6 +62,11 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit');
if (IsSubmit == 1) {
learun.alert.warning("当前项目已提交,不可删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/DeleteForm', { keyValue: keyValue }, function () {
@@ -64,6 +75,23 @@ var bootstrap = function ($, learun) {
});
}
});
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit');
if (IsSubmit == 1) {
learun.alert.warning("当前项目已提交,请勿重复提交!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/SubmitForm', { keyValue: keyValue }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
@@ -108,6 +136,7 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
param.SqlParameter = 'and IsDel = 0 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver ficheiro

@@ -841,7 +841,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextbookInOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" />
</ItemGroup>
<ItemGroup>


+ 1
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs Ver ficheiro

@@ -32,12 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.TextBookName,
t.CreateTime,
t.CrateUserID
");
strSql.Append(@" * ");
strSql.Append(" FROM TextBookIn t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();


+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs Ver ficheiro

@@ -166,6 +166,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void SubmitEntity(string keyValue)
{
try
{
textbookInOutService.SubmitEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs Ver ficheiro

@@ -140,6 +140,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
[Column("ISDEL")]
public int? IsDel { get; set; }
/// <summary>
/// ISSUBMIT
/// </summary>
/// <returns></returns>
[Column("ISSUBMIT")]
public int? IsSubmit { get; set; }
#endregion



+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs Ver ficheiro

@@ -55,6 +55,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextbookInOutEntity entity);
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
void SubmitEntity(string keyValue);
#endregion

}


+ 37
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs Ver ficheiro

@@ -63,9 +63,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var strSql = new StringBuilder();
strSql.Append("SELECT *");
strSql.Append(" FROM TextbookInOut t where 1=1 and IsDel = 0 ");
strSql.Append(" FROM TextbookInOut t where 1=1 ");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
if (!queryParam["SqlParameter"].IsEmpty())
{
string SqlParameter = queryParam["SqlParameter"].ToString();
strSql.Append(SqlParameter);
}
if (!queryParam["keyword"].IsEmpty())
{
strSql.Append(" and ( t.TextBookNo like @keyword or t.TextBookName like @keyword or t.FirstAuthor like @keyword )");
@@ -184,6 +189,37 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
public void SubmitEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == item);
entity.IsSubmit = 1;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


Carregando…
Cancelar
Guardar