diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml index 87e893354..a0f5518b7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml @@ -41,6 +41,10 @@
其他作者
+
+
订购数量
+ +
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js index 51171d966..6f0f00b3b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js @@ -17,7 +17,7 @@ var save; var selectedRow; var refreshGirdData; var tempdatra = new Array(); -var pricecount = 0; +var order = 0; var bootstrap = function ($, learun) { "use strict"; @@ -61,13 +61,16 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { + order = 0; $.each(tempdatra, function (key, val) { if (tempdatra[key].ID === keyValue) { - pricecount -= tempdatra[key].AAIPrice * tempdatra[key].AAIStock; + // order -= tempdatra[key].TeachSum + tempdatra[key].StuSum; tempdatra.splice(key, 1); + } else { + order += (parseInt(tempdatra[key].TeachSum) + parseInt(tempdatra[key].StuSum)); } }); - $("#AAPrice").val(pricecount); + $("#OrderNum").val(order); $('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); top.layer.close(index); } @@ -185,13 +188,13 @@ var bootstrap = function ($, learun) { } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); - if (data[id].AAPrice) { - pricecount = data[id].AAPrice; - } + //if (data[id].AAPrice) { + // pricecount = data[id].AAPrice; + //} } } }); - } + } } }; refreshGirdData = function (temprow) { @@ -205,16 +208,17 @@ var bootstrap = function ($, learun) { if (ifnewrow) { tempdatra.push(temprow); } - //总价计算 - pricecount = 0; - //for (var i = 0; i < tempdatra.length; i++) { - // pricecount += tempdatra[i].AAIPrice * tempdatra[i].AAIStock; - //} - //$("#AAPrice").val(pricecount); + //订购数量 + 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.AAIOrder - b.AAIOrder; + return a.StuSum - b.StuSum; } // 设置表单数据 setFormData = function (processId, param, callback) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml index 38680c397..6a50f756f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml @@ -9,11 +9,11 @@
教师人数*
- +
学生人数*
- +
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js index e88998eed..ada747980 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js @@ -174,10 +174,10 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetPageList', headData: [ - { label: "主键", name: "ID", width: 200, align: "left" }, + //{ label: "主键", name: "ID", width: 200, align: "left" }, { label: "专业部", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -223,6 +223,7 @@ var bootstrap = function ($, learun) { { label: "书籍编码", name: "PublishNo", width: 150, align: "left" }, { label: "作者", name: "FirstAuthor", width: 100, align: "left" }, { label: "其他作者", name: "OtherAuthor", width: 200, align: "left" }, + { label: "订购数量", name: "OrderNum", width: 100, align: "left" }, { label: "备注", name: "Remark", width: 200, align: "left" }, { label: "录入时间", name: "CreateTime", width: 100, align: "left" }, { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs index 81d1159c6..9ac8b4349 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2022-02-18 14:27 /// 描 述:教材订单管理 /// - public class TextBookIndentEntity + public class TextBookIndentEntity { #region 实体成员 /// @@ -79,6 +79,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("OTHERAUTHOR")] public string OtherAuthor { get; set; } + + /// + /// 订购数量 + /// + [Column("ORDERNUM")] + public int? OrderNum { get; set; } /// /// Remark ///