Explorar el Código

教材库存添加累计出库数量累计入库数量 及发现的Bug

临城职教中职
ndbs hace 2 años
padre
commit
52dc145fba
Se han modificado 11 ficheros con 53 adiciones y 20 borrados
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js
  5. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js
  6. +13
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js
  7. +4
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js
  8. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs
  9. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs
  10. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs
  11. +12
    -3
      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/Views/TextBookIn/Index.js Ver fichero

@@ -101,7 +101,7 @@ var bootstrap = function ($, learun) {
{ 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: '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" },


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js Ver fichero

@@ -64,6 +64,7 @@ var bootstrap = function ($, learun) {
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '数量', name: 'Variate', width: 100, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js Ver fichero

@@ -31,6 +31,7 @@ var bootstrap = function ($, learun) {
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '数量', name: 'Variate', width: 100, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js Ver fichero

@@ -34,6 +34,7 @@ var bootstrap = function ($, learun) {
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '数量', name: 'Variate', width: 100, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js Ver fichero

@@ -135,7 +135,7 @@ var bootstrap = function ($, learun) {
{ 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: '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" },


+ 13
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js Ver fichero

@@ -93,7 +93,7 @@ var bootstrap = function ($, learun) {
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
@@ -115,15 +115,20 @@ var bootstrap = function ($, learun) {
{ 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: 'Edition', width: 100, align: "left" },
{ label: '印次', name: 'Impression', width: 100, 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: 'FinallyNum', width: 100, align: "left" },
{ label: '累计入库数量', name: 'RKNum', width: 100, align: "left" },
{ label: '累计出库数量', name: 'CKNum', width: 100, align: "left" },
{
label: '是否提交', name: 'IsSubmit', width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "是" : "否";
}
},
{ label: '备注', name: 'Remark', width: 200, align: "left" },

],


+ 4
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js Ver fichero

@@ -39,7 +39,7 @@ var bootstrap = function ($, learun) {
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
@@ -61,15 +61,14 @@ var bootstrap = function ($, learun) {
{ 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: '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: 'RKNum', width: 100, align: "left" },
{ label: '累计出库数量', name: 'CKNum', width: 100, align: "left" },
{ label: '备注', name: 'Remark', width: 200, align: "left" },

],


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

@@ -225,7 +225,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
textbookInList[i].Impression = entity.Impression;
variate += textbookInList[i].variate;
}
this.BaseRepository("CollegeMIS").Insert(textbookInList);
db.Insert(textbookInList);

if (variate != 0 && variate > 0)
{
@@ -233,6 +233,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (newtextInOutEntity != null)
{
newtextInOutEntity.FinallyNum += variate;
newtextInOutEntity.RKNum += variate;
db.Update(newtextInOutEntity);
}
}


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs Ver fichero

@@ -259,7 +259,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
textbookOutList[i].Impression = entity.Impression;
variate += textbookOutList[i].Variate;
}
this.BaseRepository("CollegeMIS").Insert(textbookOutList);

db.Insert(textbookOutList);

if (variate != 0 && variate > 0)
{
@@ -267,6 +268,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (newtextInOutEntity != null)
{
newtextInOutEntity.FinallyNum -= variate;
newtextInOutEntity.CKNum += variate;

if (newtextInOutEntity.FinallyNum > 0 || newtextInOutEntity.FinallyNum == 0)
{
db.Update(newtextInOutEntity);


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

@@ -152,6 +152,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[NotMapped]
public string CKORRK { get; set; }

/// <summary>
/// 累计出库
/// </summary>
/// <returns></returns>
[Column("CKNUM")]
public decimal? CKNum { get; set; }
/// <summary>
/// 累计入库
/// </summary>
/// <returns></returns>
[Column("RKNUM")]
public decimal? RKNum { get; set; }
#endregion

#region 扩展操作


+ 12
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs Ver fichero

@@ -160,8 +160,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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.CreateTime = OutEntity[j].CreateTime;
InOutList.CrateUserID = OutEntity[j].CrateUserID;
InOutList.Remark = OutEntity[j].Remark;
returnList.Add(InOutList);
}
@@ -233,6 +233,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
else
{
entity.Create();
entity.CKNum = 0;
entity.RKNum = 0;
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
@@ -263,7 +265,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == item);
entity.IsSubmit = 1;
//添加入库总数
entity.RKNum += entity.FinallyNum;
db.Update(entity);
#region 将本次记录保存出库单
TextBookInEntity InEntity = new TextBookInEntity
{
ID = Guid.NewGuid().ToString(),
@@ -279,8 +284,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
Publisher = entity.Publisher,
Edition = entity.Edition,
Impression = entity.Impression,
variate = entity.FinallyNum
variate = entity.FinallyNum,
CreateTime = DateTime.Now,
CrateUserID = "system",
Remark = "初始数据删除需谨慎"
};
#endregion
db.Insert(InEntity);
}
db.Commit();


Cargando…
Cancelar
Guardar