Переглянути джерело

教材入库明细查看

临城职教中职
ndbs 2 роки тому
джерело
коміт
c35392361c
6 змінених файлів з 197 додано та 3 видалено
  1. +12
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs
  2. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.cshtml
  3. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.js
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.cshtml
  5. +15
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj

+ 12
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs Переглянути файл

@@ -49,6 +49,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
ViewBag.BookCode = "RK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 明细查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}

#endregion

#region 获取数据
@@ -84,12 +94,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult GetFormData(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
//var TextBookInData = textBookInIBLL.GetInEntity(TextBookInOutData.BookCode);
var TextBookInData = textBookInIBLL.GetInEntity(TextBookInOutData.BookCode);

var jsonData = new
{
TextBookInOut = TextBookInOutData,
//TextBookIn = TextBookInData,
TextBookIn = TextBookInData,
};
return Success(jsonData);
}


+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.cshtml Переглянути файл

@@ -0,0 +1,50 @@
@{
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="TextBookIn"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/FormView.js")

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.js Переглянути файл

@@ -0,0 +1,117 @@
/* * 版 本 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";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookIn').jfGrid({
headData: [
{ 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/TextBookIn/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIn' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookIn').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含入库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookInList = JSON.stringify($('#TextBookIn').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.cshtml Переглянути файл

@@ -24,6 +24,7 @@
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;教材入库</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;教材明细查看</a>
</div>
</div>
</div>


+ 15
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js Переглянути файл

@@ -20,7 +20,7 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
// 编辑
// 入库
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
@@ -45,6 +45,20 @@ var bootstrap = function ($, learun) {
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormView?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
},
// 初始化列表
initGird: function () {


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -1178,6 +1178,7 @@
<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\TextBookIn\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormIn.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormIn.js" />
@@ -7613,6 +7614,7 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormView.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


Завантаження…
Відмінити
Зберегти