@@ -57,7 +57,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 查看 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormLook() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -13,34 +13,46 @@ | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">课程<font face="宋体">*</font></div> | <div class="lr-form-item-title">课程<font face="宋体">*</font></div> | ||||
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | <div class="lr-form-item-title">学年<font face="宋体">*</font></div> | ||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | <div class="lr-form-item-title">学期<font face="宋体">*</font></div> | ||||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | <div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | <div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | ||||
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div> | <div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div> | ||||
<div id="TextBookName" isvalid="yes" checkexpession="NotNull"></div> | |||||
<div id="TextBookName" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">书籍</div> | <div class="lr-form-item-title">书籍</div> | ||||
<input id="PublishNo" type="text" class="form-control" readonly /> | <input id="PublishNo" type="text" class="form-control" readonly /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">单价</div> | |||||
<input id="Price" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">作者</div> | <div class="lr-form-item-title">作者</div> | ||||
<input id="FirstAuthor" type="text" class="form-control" readonly /> | <input id="FirstAuthor" type="text" class="form-control" readonly /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">其他作者</div> | <div class="lr-form-item-title">其他作者</div> | ||||
<input id="OtherAuthor" type="text" class="form-control" readonly /> | <input id="OtherAuthor" type="text" class="form-control" readonly /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<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="TextBookIndent"> | |||||
<div class="lr-form-item-title">版次</div> | |||||
<input id="Edition" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | <div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | ||||
<div class="lr-form-item-title">订购数量</div> | <div class="lr-form-item-title">订购数量</div> | ||||
<input id="OrderNum" type="number" class="form-control" /> | <input id="OrderNum" type="number" class="form-control" /> | ||||
@@ -167,10 +167,13 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
select: function (item) { | select: function (item) { | ||||
////赋值 | ////赋值 | ||||
$("#Price").val(item.price); | |||||
$("#PublishNo").val(item.publishno); | $("#PublishNo").val(item.publishno); | ||||
$("#FirstAuthor").val(item.firstauthor); | $("#FirstAuthor").val(item.firstauthor); | ||||
$("#TextBookName").val(item.textbookname); | $("#TextBookName").val(item.textbookname); | ||||
$("#OtherAuthor").val(item.otherauthor); | $("#OtherAuthor").val(item.otherauthor); | ||||
$("#Publisher").val(item.publisher); | |||||
$("#Edition").val(item.edition); | |||||
} | } | ||||
}); | }); | ||||
$('#Status').val(0); | $('#Status').val(0); | ||||
@@ -0,0 +1,74 @@ | |||||
@{ | |||||
ViewBag.Title = "教材订单管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
@Html.AppendCssFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.css") | |||||
@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js") | |||||
<div class="lr-form-wrap"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | |||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">课程<font face="宋体">*</font></div> | |||||
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||||
<div id="Semester" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div> | |||||
<div id="TextBookName" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">书籍</div> | |||||
<input id="PublishNo" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">作者</div> | |||||
<input id="FirstAuthor" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">其他作者</div> | |||||
<input id="OtherAuthor" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | |||||
<div class="lr-form-item-title">订购数量</div> | |||||
<input id="OrderNum" type="number" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent"> | |||||
<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" data-table="TextBookIndent" style="display: none; "> | |||||
<div class="lr-form-item-title">当前信息</div> | |||||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; "> | |||||
<div class="lr-form-item-title">当前信息</div> | |||||
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent" style="display: none; "> | |||||
<div class="lr-form-item-title">状态</div> | |||||
<input id="Status" type="text" class="form-control" /> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">明细操作</div> | |||||
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||||
<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" /> | |||||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" /> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||||
<div id="TextBookIndentDetail"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/FormLook.js") |
@@ -0,0 +1,270 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-02-18 14:27 | |||||
* 描 述:教材订单管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var tempdatra = new Array(); | |||||
var order = 0; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
$("#detailadd").on('click', function () { | |||||
selectedRow = null; | |||||
learun.layerForm({ | |||||
id: 'formTextBookIndentDetail', | |||||
title: '新增明细', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail', | |||||
width: 600, | |||||
height: 350, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
$("#detailedit").on('click', function () { | |||||
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID'); | |||||
selectedRow = $('#TextBookIndentDetail').jfGridGet('rowdata'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formTextBookIndentDetail', | |||||
title: '编辑明细', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 350, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
$("#detaildel").on('click', function () { | |||||
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||||
if (res) { | |||||
order = 0; | |||||
$.each(tempdatra, function (key, val) { | |||||
if (tempdatra[key].ID === keyValue) { | |||||
// order -= tempdatra[key].TeachSum + tempdatra[key].StuSum; | |||||
tempdatra.splice(key, 1); | |||||
} else { | |||||
order += (parseInt(tempdatra[key].TeachSum) + parseInt(tempdatra[key].StuSum)); | |||||
} | |||||
}); | |||||
$("#OrderNum").val(order); | |||||
$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); | |||||
top.layer.close(index); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' }); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "请选择学年", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "请选择学年", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#TextBookIndentDetail').jfGrid({ | |||||
headData: [ | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' }, | |||||
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' }, | |||||
{ label: '备注', name: 'Remark', width: 100, align: 'left' }, | |||||
], | |||||
height: 400, | |||||
mainId: 'ID,IndentID', | |||||
reloadSelected: false, | |||||
}); | |||||
$('#TextBookName').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo', | |||||
param: { strWhere: " IsDel = '0' and IsValid ='true' " }, | |||||
height: 800, | |||||
width: 1100, | |||||
selectWord: 'textbookname', | |||||
value: 'textbookname', | |||||
text: 'textbookname', | |||||
headData: | |||||
[ | |||||
{ label: "教材号", name: "publishno", width: 150, align: "left" }, | |||||
{ label: "教材名称", name: "textbookname", width: 150, align: "left" }, | |||||
{ label: "作者", name: "firstauthor", width: 150, align: "left" }, | |||||
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" }, | |||||
{ label: "出版社", name: "publisher", width: 100, align: "left" }, | |||||
{ | |||||
label: "教材类型", name: "textbooktype", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'TextBookType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "教材性质", name: "textbooknature", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'TextBookNature', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "价格", name: "price", width: 50, align: "left" }, | |||||
{ label: "版次", name: "edition", width: 100, align: "left" }, | |||||
{ label: "印次", name: "impression", width: 100, align: "left" }, | |||||
], | |||||
select: function (item) { | |||||
////赋值 | |||||
$("#PublishNo").val(item.publishno); | |||||
$("#FirstAuthor").val(item.firstauthor); | |||||
$("#TextBookName").val(item.textbookname); | |||||
$("#OtherAuthor").val(item.otherauthor); | |||||
} | |||||
}); | |||||
$('#Status').val(0); | |||||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||||
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||||
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormData?keyValue=' + keyValue, function (data) { | |||||
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]); | |||||
//if (data[id].AAPrice) { | |||||
// pricecount = data[id].AAPrice; | |||||
//} | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
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); | |||||
} | |||||
//订购数量 | |||||
order = 0; | |||||
for (var i = 0; i < tempdatra.length; i++) { | |||||
order += (parseInt(tempdatra[i].TeachSum) + parseInt(tempdatra[i].StuSum)); | |||||
} | |||||
$("#OrderNum").val(order); | |||||
$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); | |||||
}; | |||||
function sortNumber(a, b) { | |||||
return a.StuSum - b.StuSum; | |||||
} | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/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 == 'TextBookIndent' && data[id]) { | |||||
keyValue = data[id].ID; | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('.lr-form-wrap').lrValidform()) { | |||||
return false; | |||||
} | |||||
var datas = $('#TextBookIndentDetail').jfGridGet('rowdatas'); | |||||
if (datas == null || datas.length == 0) { | |||||
learun.alert.warning("申请未包含明细!请先新增明细!"); | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var postData = {}; | |||||
var formData = $('[data-table="TextBookIndent"]').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.processId = processId; | |||||
} | |||||
postData.strEntity = JSON.stringify(formData); | |||||
postData.strTextBookIndentDetailList = JSON.stringify($('#TextBookIndentDetail').jfGridGet('rowdatas')); | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, formData, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -50,6 +50,7 @@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | <a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | ||||
<a id="lr_look" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -75,8 +75,8 @@ var bootstrap = function ($, learun) { | |||||
id: 'formTextBookIndent', | id: 'formTextBookIndent', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form', | url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form', | ||||
width: 800, | |||||
height: 600, | |||||
width: 1000, | |||||
height: 700, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -85,7 +85,7 @@ var bootstrap = function ($, learun) { | |||||
if (res) { | if (res) { | ||||
//processId = learun.newGuid(); | //processId = learun.newGuid(); | ||||
//res = top[id].save(processId, refreshGirdData); | //res = top[id].save(processId, refreshGirdData); | ||||
res = top[id].save('', function () { | |||||
res = top[id].save('', function () { | |||||
page.search(); | page.search(); | ||||
}); | }); | ||||
} | } | ||||
@@ -106,8 +106,8 @@ var bootstrap = function ($, learun) { | |||||
id: 'formTextBookIndent', | id: 'formTextBookIndent', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form?keyValue=' + keyValue, | ||||
width: 800, | |||||
height: 600, | |||||
width: 1000, | |||||
height: 700, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -171,6 +171,22 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 查看 | |||||
$('#lr_look').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formlook', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormLook?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 700, | |||||
btn: null, | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -222,21 +238,12 @@ var bootstrap = function ($, learun) { | |||||
{ label: "所选书籍", name: "TextBookName", width: 200, align: "left" }, | { label: "所选书籍", name: "TextBookName", width: 200, align: "left" }, | ||||
{ label: "书籍编码", name: "PublishNo", width: 150, align: "left" }, | { label: "书籍编码", name: "PublishNo", width: 150, align: "left" }, | ||||
{ label: "作者", name: "FirstAuthor", width: 100, align: "left" }, | { label: "作者", name: "FirstAuthor", width: 100, align: "left" }, | ||||
{ label: "其他作者", name: "OtherAuthor", width: 200, align: "left" }, | |||||
{ label: "其他作者", name: "OtherAuthor", width: 150, align: "left" }, | |||||
{ label: "出版社", name: "Publisher", width: 100, align: "left" }, | |||||
{ label: "版次", name: "Edition", width: 100, align: "left" }, | |||||
{ label: "单价", name: "Price", width: 100, align: "left" }, | |||||
{ label: "订购数量", name: "OrderNum", width: 100, align: "left" }, | { label: "订购数量", name: "OrderNum", width: 100, align: "left" }, | ||||
{ label: "备注", name: "Remark", width: 200, align: "left" }, | { label: "备注", name: "Remark", width: 200, align: "left" }, | ||||
{ label: "录入时间", name: "CreateTime", width: 100, align: "left" }, | |||||
{ | |||||
label: "当前用户", name: "CreateUserID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "状态", name: "Status", width: 100, align: "left", | label: "状态", name: "Status", width: 100, align: "left", | ||||
formatter: function (cellvalue) { | formatter: function (cellvalue) { | ||||
@@ -249,6 +256,18 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
{ label: "录入时间", name: "CreateTime", width: 100, align: "left" }, | |||||
{ | |||||
label: "创建用户", name: "CreateUserID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
sidx: 'CreateTime desc,Status desc', | sidx: 'CreateTime desc,Status desc', | ||||
@@ -1171,6 +1171,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\FormManageView.js" /> | <Content Include="Areas\EducationalAdministration\Views\TeachingPlan\FormManageView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\TeachingPlan\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\IndexManage.js" /> | <Content Include="Areas\EducationalAdministration\Views\TeachingPlan\IndexManage.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | ||||
@@ -7589,6 +7590,7 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Unit.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\Unit.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -91,6 +91,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("REMARK")] | [Column("REMARK")] | ||||
public string Remark { get; set; } | public string Remark { get; set; } | ||||
/// <summary> | /// <summary> | ||||
///出版社 | |||||
/// </summary> | |||||
[Column("PUBLISHER")] | |||||
public string Publisher { get; set; } | |||||
/// <summary> | |||||
/// 版次 | |||||
/// </summary> | |||||
[Column("EDITION")] | |||||
public string Edition { get; set; } | |||||
/// <summary> | |||||
/// 单价 | |||||
/// </summary> | |||||
[Column("PRICE")] | |||||
public decimal? Price { get; set; } | |||||
/// <summary> | |||||
/// Status | /// Status | ||||
/// </summary> | /// </summary> | ||||
[Column("STATUS")] | [Column("STATUS")] | ||||
@@ -271,14 +271,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="processId"></param> | /// <param name="processId"></param> | ||||
public void ChangeStatusByProcessId(int pastatus, string processId) | public void ChangeStatusByProcessId(int pastatus, string processId) | ||||
{ | { | ||||
var db = this.BaseRepository("CollegeMIS"); | |||||
try | try | ||||
{ | { | ||||
db.BeginTrans(); | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.processId == processId); | var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.processId == processId); | ||||
entity.Status = pastatus; | entity.Status = pastatus; | ||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
db.Update(entity); | |||||
if (pastatus == 2) | |||||
{ | |||||
//审核通过,添加征订数据 | |||||
} | |||||
db.Commit(); | |||||
} | } | ||||
catch (Exception e) | catch (Exception e) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (e is ExceptionEx) | if (e is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||