From fa4b570faa94ec4af808df3209229184e0493c7d Mon Sep 17 00:00:00 2001
From: hwh2023 <598694955@qq.com>
Date: Wed, 19 Jul 2023 18:27:39 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=B4=A67=E4=B8=AA=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/Purchase_EduController.cs | 26 ++
.../Purchase_Edu_ApplyController.cs | 172 ++++++++
.../Purchase_Info_ApplyController.cs | 172 ++++++++
.../Purchase_Logistic_ApplyController.cs | 172 ++++++++
.../Purchase_Other_ApplyController.cs | 172 ++++++++
.../Purchase_Print_ApplyController.cs | 172 ++++++++
.../Purchase_Student_ApplyController.cs | 172 ++++++++
.../Purchase_Work_ApplyController.cs | 172 ++++++++
.../Views/Purchase_Edu/FormView.js | 4 +-
.../Views/Purchase_Edu/Index.js | 19 +-
.../Views/Purchase_Edu_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Edu_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Edu_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Edu_Apply/Form.js | 163 ++++++++
.../Views/Purchase_Edu_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Edu_Apply/FormView.js | 141 +++++++
.../Views/Purchase_Edu_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Edu_Apply/Index.js | 240 +++++++++++
.../Views/Purchase_Info/Index.js | 12 +
.../Views/Purchase_Info_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Info_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Info_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Info_Apply/Form.js | 163 ++++++++
.../Views/Purchase_Info_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Info_Apply/FormView.js | 141 +++++++
.../Views/Purchase_Info_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Info_Apply/Index.js | 240 +++++++++++
.../Views/Purchase_Logistic/Index.js | 12 +
.../Purchase_Logistic_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Logistic_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Logistic_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Logistic_Apply/Form.js | 163 ++++++++
.../Purchase_Logistic_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Logistic_Apply/FormView.js | 141 +++++++
.../Purchase_Logistic_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Logistic_Apply/Index.js | 240 +++++++++++
.../Views/Purchase_Other/Index.js | 12 +
.../Purchase_Other_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Other_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Other_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Other_Apply/Form.js | 163 ++++++++
.../Purchase_Other_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Other_Apply/FormView.js | 141 +++++++
.../Views/Purchase_Other_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Other_Apply/Index.js | 240 +++++++++++
.../Views/Purchase_Print/Index.js | 12 +
.../Purchase_Print_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Print_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Print_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Print_Apply/Form.js | 163 ++++++++
.../Purchase_Print_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Print_Apply/FormView.js | 141 +++++++
.../Views/Purchase_Print_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Print_Apply/Index.js | 240 +++++++++++
.../Views/Purchase_Student/Index.js | 12 +
.../Purchase_Student_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Student_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Student_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Student_Apply/Form.js | 163 ++++++++
.../Purchase_Student_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Student_Apply/FormView.js | 141 +++++++
.../Views/Purchase_Student_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Student_Apply/Index.js | 240 +++++++++++
.../Views/Purchase_Work/Index.js | 12 +
.../Views/Purchase_Work_Apply/FindBack.cshtml | 33 ++
.../Views/Purchase_Work_Apply/FindBack.js | 158 +++++++
.../Views/Purchase_Work_Apply/Form.cshtml | 47 +++
.../Views/Purchase_Work_Apply/Form.js | 163 ++++++++
.../Views/Purchase_Work_Apply/FormView.cshtml | 47 +++
.../Views/Purchase_Work_Apply/FormView.js | 141 +++++++
.../Views/Purchase_Work_Apply/Index.cshtml | 47 +++
.../Views/Purchase_Work_Apply/Index.js | 240 +++++++++++
.../Learun.Application.Web.csproj | 63 +++
.../XmlConfig/database.config | 1 +
.../XmlConfig/ioc.config | 8 +-
.../Learun.Application.WebApi.csproj | 1 +
.../Modules/Purchase/PurchaseEduApi.cs | 14 +
.../PurchaseApply/PurchaseEduApplyApi.cs | 152 +++++++
.../XmlConfig/ioc.config | 14 +
.../Learun.Application.Mapping.csproj | 14 +
.../Purchase_Edu_ApplydetailsMap.cs | 29 ++
.../Purchase_Edu_applyMap.cs | 29 ++
.../Purchase_Info_ApplydetailsMap.cs | 29 ++
.../Purchase_Info_applyMap.cs | 29 ++
.../Purchase_Logistic_ApplyMap.cs | 29 ++
.../Purchase_Logistic_ApplydetailsMap.cs | 29 ++
.../Purchase_Other_ApplyMap.cs | 29 ++
.../Purchase_Other_ApplydetailsMap.cs | 29 ++
.../Purchase_Print_ApplyMap.cs | 29 ++
.../Purchase_Print_ApplydetailsMap.cs | 29 ++
.../Purchase_Student_ApplyMap.cs | 29 ++
.../Purchase_Student_ApplydetailsMap.cs | 29 ++
.../Purchase_Work_ApplyMap.cs | 29 ++
.../Purchase_Work_ApplydetailsMap.cs | 29 ++
.../Learun.Application.TwoDevelopment.csproj | 35 ++
.../Purchase_Edu/Purchase_EduBLL.cs | 24 ++
.../Purchase_Edu/Purchase_EduEntity.cs | 7 +
.../Purchase_Edu/Purchase_EduIBLL.cs | 6 +
.../Purchase_Edu/Purchase_EduService.cs | 68 ++-
.../Purchase_Edu_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Edu_ApplyIBLL.cs | 82 ++++
.../Purchase_Edu_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Edu_ApplydetailsEntity.cs | 60 +++
.../Purchase_Edu_applyEntity.cs | 125 ++++++
.../Purchase_Info/Purchase_InfoEntity.cs | 5 +
.../Purchase_Info/Purchase_InfoService.cs | 9 +-
.../Purchase_Info_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Info_ApplyEntity.cs | 125 ++++++
.../Purchase_Info_ApplyIBLL.cs | 82 ++++
.../Purchase_Info_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Info_ApplydetailsEntity.cs | 60 +++
.../Purchase_LogisticEntity.cs | 5 +
.../Purchase_LogisticService.cs | 9 +-
.../Purchase_Logistic_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Logistic_ApplyEntity.cs | 125 ++++++
.../Purchase_Logistic_ApplyIBLL.cs | 82 ++++
.../Purchase_Logistic_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Logistic_ApplydetailsEntity.cs | 60 +++
.../Purchase_Other/Purchase_OtherEntity.cs | 5 +
.../Purchase_Other/Purchase_OtherService.cs | 9 +-
.../Purchase_Other_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Other_ApplyEntity.cs | 125 ++++++
.../Purchase_Other_ApplyIBLL.cs | 82 ++++
.../Purchase_Other_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Other_ApplydetailsEntity.cs | 60 +++
.../Purchase_Print/Purchase_PrintEntity.cs | 5 +
.../Purchase_Print/Purchase_PrintService.cs | 9 +-
.../Purchase_Print_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Print_ApplyEntity.cs | 125 ++++++
.../Purchase_Print_ApplyIBLL.cs | 82 ++++
.../Purchase_Print_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Print_ApplydetailsEntity.cs | 60 +++
.../Purchase_StudentEntity.cs | 5 +
.../Purchase_StudentService.cs | 9 +-
.../Purchase_Student_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Student_ApplyEntity.cs | 125 ++++++
.../Purchase_Student_ApplyIBLL.cs | 82 ++++
.../Purchase_Student_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Student_ApplydetailsEntity.cs | 60 +++
.../Purchase_Work/Purchase_WorkEntity.cs | 5 +
.../Purchase_Work/Purchase_WorkService.cs | 9 +-
.../Purchase_Work_ApplyBLL.cs | 249 +++++++++++
.../Purchase_Work_ApplyEntity.cs | 125 ++++++
.../Purchase_Work_ApplyIBLL.cs | 82 ++++
.../Purchase_Work_ApplyService.cs | 391 ++++++++++++++++++
.../Purchase_Work_ApplydetailsEntity.cs | 60 +++
.../Learun.Application.WorkFlow.csproj | 7 +
.../NodeMethod/PurchaseEduApplyMethod.cs | 29 ++
.../NodeMethod/PurchaseInfoApplyMethod.cs | 29 ++
.../NodeMethod/PurchaseLogisticApplyMethod.cs | 29 ++
.../NodeMethod/PurchaseOtherApplyMethod.cs | 29 ++
.../NodeMethod/PurchasePrintApplyMethod.cs | 29 ++
.../NodeMethod/PurchaseStudentApplyMethod.cs | 29 ++
.../NodeMethod/PurchaseWorkApplyMethod.cs | 29 ++
154 files changed, 14884 insertions(+), 29 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Edu_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Info_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Logistic_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Other_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Print_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Student_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Work_ApplyController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PurchaseApply/PurchaseEduApplyApi.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_applyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_applyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplyMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplydetailsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_applyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplydetailsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchaseEduApplyMethod.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchaseInfoApplyMethod.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchaseLogisticApplyMethod.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchaseOtherApplyMethod.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchasePrintApplyMethod.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchaseStudentApplyMethod.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/PurchaseWorkApplyMethod.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_EduController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_EduController.cs
index eee5a2aa8..e0f74a6e2 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_EduController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_EduController.cs
@@ -49,6 +49,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
#endregion
#region 获取数据
+ ///
+ /// 获取数据字典明显根据分类编号
+ ///
+ /// 分类编号
+ /// 查询条件
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetDetailList(string keyword)
+ {
+ var data = purchase_EduIBLL.GetDataList( keyword);
+ return JsonResult(data);
+ }
///
/// 获取页面显示列表数据
@@ -90,6 +103,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
}
///
/// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDetailData(string keyValue)
+ {
+ var Purchase_Edu_DetailsData = purchase_EduIBLL.GetPurchase_Edu_DetailsList(keyValue);
+
+ return Success(Purchase_Edu_DetailsData);
+ }
+ ///
+ /// 获取表单数据
///
///
[HttpGet]
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Edu_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Edu_ApplyController.cs
new file mode 100644
index 000000000..a3714031a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Edu_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplyController : MvcControllerBase
+ {
+ private Purchase_Edu_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Edu_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Edu_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Edu_ApplyEntity( keyValue );
+ var Purchase_Edu_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Edu_ApplydetailsList( Purchase_Edu_applyData.Id );
+ //var Purchase_EduData = purchase_Edu_ApplyIBLL.GetPurchase_EduEntity( Purchase_Edu_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Edu_apply = Purchase_Edu_applyData,
+ Purchase_Edu_applydetails = Purchase_Edu_applydetailsData,
+ //Purchase_Edu = Purchase_EduData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Edu_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Edu_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Edu_apply = Data,
+ Purchase_Edu_applydetails = Purchase_Edu_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Edu_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Info_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Info_ApplyController.cs
new file mode 100644
index 000000000..12308bb7a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Info_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplyController : MvcControllerBase
+ {
+ private Purchase_Info_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Info_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Info_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Info_ApplyEntity( keyValue );
+ var Purchase_Info_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Info_ApplydetailsList( Purchase_Info_applyData.Id );
+ //var Purchase_InfoData = purchase_Edu_ApplyIBLL.GetPurchase_InfoEntity( Purchase_Info_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Info_apply = Purchase_Info_applyData,
+ Purchase_Info_applydetails = Purchase_Info_applydetailsData,
+ //Purchase_Info = Purchase_InfoData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Info_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Info_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Info_apply = Data,
+ Purchase_Info_applydetails = Purchase_Info_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Info_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Logistic_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Logistic_ApplyController.cs
new file mode 100644
index 000000000..006e3c3d2
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Logistic_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplyController : MvcControllerBase
+ {
+ private Purchase_Logistic_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Logistic_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Logistic_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Logistic_ApplyEntity( keyValue );
+ var Purchase_Logistic_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Logistic_ApplydetailsList( Purchase_Logistic_applyData.Id );
+ //var Purchase_LogisticData = purchase_Edu_ApplyIBLL.GetPurchase_LogisticEntity( Purchase_Logistic_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Logistic_apply = Purchase_Logistic_applyData,
+ Purchase_Logistic_applydetails = Purchase_Logistic_applydetailsData,
+ //Purchase_Logistic = Purchase_LogisticData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Logistic_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Logistic_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Logistic_apply = Data,
+ Purchase_Logistic_applydetails = Purchase_Logistic_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Logistic_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Other_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Other_ApplyController.cs
new file mode 100644
index 000000000..547803aac
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Other_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplyController : MvcControllerBase
+ {
+ private Purchase_Other_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Other_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Other_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Other_ApplyEntity( keyValue );
+ var Purchase_Other_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Other_ApplydetailsList( Purchase_Other_applyData.Id );
+ //var Purchase_OtherData = purchase_Edu_ApplyIBLL.GetPurchase_OtherEntity( Purchase_Other_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Other_apply = Purchase_Other_applyData,
+ Purchase_Other_applydetails = Purchase_Other_applydetailsData,
+ //Purchase_Other = Purchase_OtherData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Other_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Other_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Other_apply = Data,
+ Purchase_Other_applydetails = Purchase_Other_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Other_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Print_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Print_ApplyController.cs
new file mode 100644
index 000000000..efae2c146
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Print_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplyController : MvcControllerBase
+ {
+ private Purchase_Print_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Print_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Print_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Print_ApplyEntity( keyValue );
+ var Purchase_Print_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Print_ApplydetailsList( Purchase_Print_applyData.Id );
+ //var Purchase_PrintData = purchase_Edu_ApplyIBLL.GetPurchase_PrintEntity( Purchase_Print_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Print_apply = Purchase_Print_applyData,
+ Purchase_Print_applydetails = Purchase_Print_applydetailsData,
+ //Purchase_Print = Purchase_PrintData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Print_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Print_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Print_apply = Data,
+ Purchase_Print_applydetails = Purchase_Print_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Print_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Student_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Student_ApplyController.cs
new file mode 100644
index 000000000..43e65636d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Student_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplyController : MvcControllerBase
+ {
+ private Purchase_Student_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Student_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Student_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Student_ApplyEntity( keyValue );
+ var Purchase_Student_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Student_ApplydetailsList( Purchase_Student_applyData.Id );
+ //var Purchase_StudentData = purchase_Edu_ApplyIBLL.GetPurchase_StudentEntity( Purchase_Student_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Student_apply = Purchase_Student_applyData,
+ Purchase_Student_applydetails = Purchase_Student_applydetailsData,
+ //Purchase_Student = Purchase_StudentData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Student_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Student_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Student_apply = Data,
+ Purchase_Student_applydetails = Purchase_Student_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Student_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Work_ApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Work_ApplyController.cs
new file mode 100644
index 000000000..2701eef94
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Purchase_Work_ApplyController.cs
@@ -0,0 +1,172 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Work_ApplyController : MvcControllerBase
+ {
+ private Purchase_Work_ApplyIBLL purchase_Edu_ApplyIBLL = new Purchase_Work_ApplyBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 查看页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ ///
+ /// 查找带回页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FindBack()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = purchase_Edu_ApplyIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Purchase_Work_applyData = purchase_Edu_ApplyIBLL.GetPurchase_Work_ApplyEntity( keyValue );
+ var Purchase_Work_applydetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Work_ApplydetailsList( Purchase_Work_applyData.Id );
+ //var Purchase_WorkData = purchase_Edu_ApplyIBLL.GetPurchase_WorkEntity( Purchase_Work_applydetailsData.purchaseid );
+ var jsonData = new {
+ Purchase_Work_apply = Purchase_Work_applyData,
+ Purchase_Work_applydetails = Purchase_Work_applydetailsData,
+ //Purchase_Work = Purchase_WorkData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var Data = purchase_Edu_ApplyIBLL.GetEntityByProcessId(processId);
+ var Purchase_Work_DetailsData = purchase_Edu_ApplyIBLL.GetPurchase_Work_ApplydetailsList(Data.Id);
+ var jsonData = new
+ {
+ Purchase_Work_apply = Data,
+ Purchase_Work_applydetails = Purchase_Work_DetailsData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ purchase_Edu_ApplyIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_applydetailsList, string strpurchase_EduEntity)
+ {
+ Purchase_Work_ApplyEntity entity = strEntity.ToObject();
+ List purchase_Edu_applydetailsList = strpurchase_Edu_applydetailsList.ToObject>();
+ purchase_Edu_ApplyIBLL.SaveEntity(keyValue,entity,purchase_Edu_applydetailsList);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动主键
+ /// 审核状态
+ /// 流程Id
+ ///
+ public ActionResult ModifyStatus(string keyValue, int status, string processId)
+ {
+ purchase_Edu_ApplyIBLL.ModifyStatus(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/FormView.js
index 14a97809d..6dd5b42c4 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/FormView.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/FormView.js
@@ -107,7 +107,7 @@ var bootstrap = function ($, learun) {
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
-
+
if (!!processId) {
formData.ProcessId = processId;
}
@@ -116,7 +116,7 @@ var bootstrap = function ($, learun) {
}
var postData = {};
postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData());
- postData.strpurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas'));
+ postData.strPurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas'));
//var postData = {
// strEntity: JSON.stringify(formData)
//};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Index.js
index ad5cffdc0..91b273053 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Index.js
@@ -123,7 +123,7 @@ var bootstrap = function ($, learun) {
selectedRow = $('#gridtable').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
if (selectedRow.Status !== 0) {
- learun.alert.warning("当前课程异动记录已提交!");
+ learun.alert.warning("当前记录已提交!");
return false;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
@@ -143,7 +143,7 @@ var bootstrap = function ($, learun) {
selectedRow = $('#gridtable').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
if (selectedRow.Status == 0) {
- learun.alert.warning("当前课程异动记录未提交,请提交后再查看!");
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
return false;
}
learun.layerForm({
@@ -206,6 +206,19 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ console.log(cellvalue)
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
@@ -222,7 +235,6 @@ var bootstrap = function ($, learun) {
refreshGirdData = function (res, postData) {
if (res && res.code && res.code == 200) {
// 发起流程
-
var postData = {
schemeCode: '2-7',// 填写流程对应模板编号
processId: processId,
@@ -231,7 +243,6 @@ var bootstrap = function ($, learun) {
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
-
}
page.search();
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.cshtml
new file mode 100644
index 000000000..3a30e163c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.js
new file mode 100644
index 000000000..6bad98fed
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.cshtml
new file mode 100644
index 000000000..be518add8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js
new file mode 100644
index 000000000..97f2f802d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Edu/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Edu_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Edu_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Edu_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Edu_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Edu_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Edu_applydetails').jfGridSet('removeRow', $('#Purchase_Edu_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Edu_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.cshtml
new file mode 100644
index 000000000..11e519200
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.js
new file mode 100644
index 000000000..063974ed6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Edu_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu_Apply"]').lrGetFormData());
+ postData.strPurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.cshtml
new file mode 100644
index 000000000..68c8cf8a7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.js
new file mode 100644
index 000000000..5bd2477eb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-1',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Index.js
index f17e425f2..c646895ed 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Index.js
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.cshtml
new file mode 100644
index 000000000..a06d6f9da
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.js
new file mode 100644
index 000000000..daccfed99
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Info_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.cshtml
new file mode 100644
index 000000000..939f81d0a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js
new file mode 100644
index 000000000..47c4b4044
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Info/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Info_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Info_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Info_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Info_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Info_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Info_applydetails').jfGridSet('removeRow', $('#Purchase_Info_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Info_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Info_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.cshtml
new file mode 100644
index 000000000..bdb13a65c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.js
new file mode 100644
index 000000000..1f5158728
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Info_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Info_Apply"]').lrGetFormData());
+ postData.strPurchase_Info_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.cshtml
new file mode 100644
index 000000000..f407956d7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.js
new file mode 100644
index 000000000..24f3e6d2b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-4',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Index.js
index 8bcd63bff..a6c08bdcf 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Index.js
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.cshtml
new file mode 100644
index 000000000..fbf4ec5de
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.js
new file mode 100644
index 000000000..e8f4f70f2
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.cshtml
new file mode 100644
index 000000000..a4f98441c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js
new file mode 100644
index 000000000..10927de49
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Logistic/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Logistic_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Logistic_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Logistic_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Logistic_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Logistic_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Logistic_applydetails').jfGridSet('removeRow', $('#Purchase_Logistic_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Logistic_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.cshtml
new file mode 100644
index 000000000..cd6a530fc
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.js
new file mode 100644
index 000000000..90adb1921
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Logistic_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic_Apply"]').lrGetFormData());
+ postData.strPurchase_Logistic_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.cshtml
new file mode 100644
index 000000000..8105a217d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.js
new file mode 100644
index 000000000..c09b52105
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-3',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Index.js
index 0ece33695..c674f85b6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Index.js
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.cshtml
new file mode 100644
index 000000000..159f45641
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.js
new file mode 100644
index 000000000..6c1637180
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Other_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.cshtml
new file mode 100644
index 000000000..44b90cb79
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js
new file mode 100644
index 000000000..e38e7140f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Other/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Other_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Other_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Other_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Other_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Other_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Other_applydetails').jfGridSet('removeRow', $('#Purchase_Other_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Other_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Other_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.cshtml
new file mode 100644
index 000000000..7b85e3680
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.js
new file mode 100644
index 000000000..c692e75cc
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Other_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Other_Apply"]').lrGetFormData());
+ postData.strPurchase_Other_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.cshtml
new file mode 100644
index 000000000..38c284168
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.js
new file mode 100644
index 000000000..13008974c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-2',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Index.js
index 9cb0708c0..5f6f08063 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Index.js
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.cshtml
new file mode 100644
index 000000000..d9505f68c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.js
new file mode 100644
index 000000000..54e05df54
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Print_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.cshtml
new file mode 100644
index 000000000..6af4d69dd
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js
new file mode 100644
index 000000000..df9ba1b78
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Print/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Print_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Print_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Print_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Print_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Print_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Print_applydetails').jfGridSet('removeRow', $('#Purchase_Print_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Print_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Print_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.cshtml
new file mode 100644
index 000000000..90a3c5de7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.js
new file mode 100644
index 000000000..42184039e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Print_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Print_Apply"]').lrGetFormData());
+ postData.strPurchase_Print_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.cshtml
new file mode 100644
index 000000000..c9a774c09
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.js
new file mode 100644
index 000000000..c7e98be01
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-6',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js
index ff15a67f7..5328a5b5b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Index.js
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.cshtml
new file mode 100644
index 000000000..53caf75a9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.js
new file mode 100644
index 000000000..2cf2957a5
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Student_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.cshtml
new file mode 100644
index 000000000..aa59b9066
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js
new file mode 100644
index 000000000..c0290cf6e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Student/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Student_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Student_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Student_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Student_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Student_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Student_applydetails').jfGridSet('removeRow', $('#Purchase_Student_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Student_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Student_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.cshtml
new file mode 100644
index 000000000..cc652eeee
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.js
new file mode 100644
index 000000000..d67948fe4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Student_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Student_Apply"]').lrGetFormData());
+ postData.strPurchase_Student_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml
new file mode 100644
index 000000000..7773478ca
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js
new file mode 100644
index 000000000..00de3bb60
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-8',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js
index fc365030d..5c8d8545a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Index.js
@@ -206,6 +206,18 @@ var bootstrap = function ($, learun) {
}
}
},
+ {
+ label: "报账状态", name: "ApplyStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '待报账';
+ } else if (cellvalue == 1) {
+ return '报账中';
+ } else if (cellvalue == 2) {
+ return '已报账';
+ }
+ }
+ },
],
mainId:'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.cshtml
new file mode 100644
index 000000000..54a3e69f3
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.cshtml
@@ -0,0 +1,33 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.js
new file mode 100644
index 000000000..513ee84cf
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FindBack.js
@@ -0,0 +1,158 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var refreshGirdData;
+var list=[];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetPageList',
+ headData: [
+ {
+ label: "部门", name: "DepartmentId", width: 150, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.DepartmentName;
+ }
+ },
+ {
+ label: "申请人", name: "CreatorId", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ return row.CreatorName;
+ }
+ },
+ { label: "总价格", name: "TotalAmount", width: 100, align: "left" },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ isMultiselect: true,
+ onSelectRow: function (rowdata, type) {
+ if (type) {
+ list.push(rowdata)
+ //let temp = {}
+ //list = list.reduce((prev, curv) => {
+ // if (temp[curv.StuNo]) { }
+ // else {
+ // temp[curv.StuNo] = true
+ // prev.push(curv)
+ // }
+ // return prev
+ //}, [])
+ } else {
+ list = $.grep(list, function (item, index) {
+ return item.Id!=rowdata.Id
+ })
+
+ }
+ console.log(list)
+ },
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetFormDetailData?keyValue=' + rowItem.Id,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left" },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ param.ApplyStatus = 0;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ //console.log(list)
+ if (list.length > 0) {
+ if (!!callBack) {
+ callBack(list);
+ return true;
+ }
+ } else {
+
+ }
+ //if (!$('body').lrValidform()) {
+ // return false;
+ //}
+ //var postData = {};
+ //postData.strEntity = JSON.stringify($('[data-table="Purchase_Work_apply"]').lrGetFormData());
+ //postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas'));
+ //postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData());
+ //$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // // 保存成功后才回调
+ // if (!!callBack) {
+ // callBack();
+ // }
+ //});
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.cshtml
new file mode 100644
index 000000000..d2ec67ae8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js
new file mode 100644
index 000000000..344830c79
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js
@@ -0,0 +1,163 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var acceptClick;
+var userinfo;
+var selectedRow;
+var refreshGirdData;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ userinfo = learun.clientdata.get(['userinfo']);//用户数据
+
+ $("#detailadd").on('click', function () {
+ selectedRow = null;
+ ///LogisticsManagement/Purchase_Work/GetDetailList
+ learun.layerForm({
+ id: 'findback',
+ title: '新增明细',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/FindBack',
+ width: 860,
+ height: 580,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ $("#detaildel").on('click', function () {
+ var keyValue = $('#Purchase_Work_applydetails').jfGridValue('purchaseid');
+ selectedRow = $('#Purchase_Work_applydetails').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#Purchase_Work_applydetails').jfGridSet('removeRow', selectedRow.purchaseid);
+
+ let totalamount = parseFloat($('#Totalamount').val());
+
+ totalamount -= selectedRow.TotalAmount;
+ $('#Totalamount').val(totalamount);
+ }
+ });
+ }
+ });
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#DepartmentId')[0].lrvalue = userinfo.departmentId;
+ learun.clientdata.getAsync('department', {
+ key: userinfo.departmentId,
+ callback: function (_data) {
+ $('#DepartmentId').val(_data.name);
+ }
+ });
+
+ $('#Creator')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#Creator').val(learun.clientdata.get(['userinfo']).realName);
+ $('#Createtime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#FilePath').lrUploader();
+ $('#Purchase_Work_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide:true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId:'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/GetFormData?keyValue=' + keyValue, function (data) {
+ console.log(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 (e) {
+ //console.log(e)
+ //计算总金额
+ let totalamount = 0;
+ //清楚所有
+ var datas = $('#Purchase_Work_applydetails').jfGridGet('rowdatas').length
+ for (var i = 0; i < datas; i++) {
+ $('#Purchase_Work_applydetails').jfGridSet('removeRow', $('#Purchase_Work_applydetails').jfGridGet('rowdatas')[0].purchaseid);
+ }
+
+ for (var i = 0; i < e.length; i++) {
+ var itemdata = {
+ 'Id': '',
+ 'Remark': e[i].Remark,
+ 'TotalAmount': e[i].TotalAmount,
+ 'CreateTime': e[i].CreateTime,
+ 'purchaseid': e[i].Id
+ };
+ $('#Purchase_Work_applydetails').jfGridSet('addRow', itemdata);
+ totalamount += e[i].TotalAmount;
+ }
+ $('#Totalamount').val(totalamount);
+
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Work_apply"]').lrGetFormData());
+ postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas'));
+ postData.strpurchase_EduEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData());
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.cshtml
new file mode 100644
index 000000000..f2374bd24
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.js
new file mode 100644
index 000000000..cad546f73
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/FormView.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-09-26 10:47
+ * 描 述:办公采购申请
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+//绑定原课程安排
+var bindData;
+//绑定新课程安排
+var bindDataNew;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#FilePath').lrUploader({ isUpload: false });
+ $('#Purchase_Work_applydetails').jfGrid({
+ headData: [
+ {
+ label: '采购单备注', name: 'Remark', width: 120, align: 'left'
+ },
+ {
+ label: '金额', name: 'TotalAmount', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'CreateTime', width: 120, align: 'left'
+ },
+ {
+ label: '时间', name: 'purchaseid', width: 120, align: 'left', ishide: true
+ }
+ ],
+ //isEdit:true,
+ isSubGrid: true,
+ mainId: 'purchaseid',
+ height: 400,
+ isSubGrid: true,
+ subGridExpanded: function (subContentId, rowItem) {
+ $('#' + subContentId).jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetFormDetailData?keyValue=' + rowItem.purchaseid,
+ headData: [
+ { label: "采购物品名称", name: "Name", width: 100, align: "left" },
+ { label: "价格", name: "Price", width: 130, align: "left" },
+ { label: "采购数量", name: "Quantity", width: 100, align: "left" },
+ { label: "单位", name: "Unit", width: 150, align: "left" },
+ { label: "用途", name: "UseTo", width: 150, align: "left", },
+ ],
+ mainId: 'LessonNo',
+ isPage: false,
+ sidx: 'ReviewTime desc'
+ });
+ var param;
+ param = param || {};
+ param.StuNo = rowItem.StuNo;
+ $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ });
+ },
+ initData: function () {
+ console.log(keyValue)
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/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]);
+ }
+ }
+ });
+ }
+ },
+ };
+ // 设置表单数据
+ setFormData = function (processId, param, callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/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 == 'ArrangeLessonTermAttemper') {
+ keyValue = data[id].Id;
+ //}
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback();
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+
+ if (!!processId) {
+ formData.ProcessId = processId;
+ }
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {};
+ postData.strEntity = JSON.stringify($('[data-table="Purchase_Work_Apply"]').lrGetFormData());
+ postData.strPurchase_Work_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas'));
+ //var postData = {
+ // strEntity: JSON.stringify(formData)
+ //};
+ $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml
new file mode 100644
index 000000000..809cd82ed
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.cshtml
@@ -0,0 +1,47 @@
+@{
+ ViewBag.Title = "教务报账申请";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js
new file mode 100644
index 000000000..68fb77fa9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Index.js
@@ -0,0 +1,240 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2023-07-14 12:15
+ * 描 述:教务报账申请
+ */
+var refreshGirdData;
+var selectedRow;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var startTime;
+ var endTime;
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 时间搜索框
+ $('#datesearch').lrdate({
+ dfdata: [
+ { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
+ { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
+ ],
+ // 月
+ mShow: false,
+ premShow: false,
+ // 季度
+ jShow: false,
+ prejShow: false,
+ // 年
+ ysShow: false,
+ yxShow: false,
+ preyShow: false,
+ yShow: false,
+ // 默认
+ dfvalue: '1',
+ selectfn: function (begin, end) {
+ startTime = begin;
+ endTime = end;
+ page.search();
+ }
+ });
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#DepartmentId').lrDepartmentSelect();
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/Form',
+ //url: top.$.rootUrl + '/lr_codedemo/griddemo/editindex',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/DeleteForm', { keyValue: keyValue}, function () {
+ //refreshGirdData();
+ page.search();
+ });
+ }
+ });
+ }
+ });
+ // 提交
+ $('#lr-sub').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status != 0) {
+ learun.alert.warning("当前记录已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
+ //selectedRow.ProcessId = processId;
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr-view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ if (selectedRow.Status == 0) {
+ learun.alert.warning("当前记录未提交,请提交后再查看!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work_Apply/GetPageList',
+ headData: [
+ { label: "填报部门", name: "DepartmentId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('department', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }},
+ { label: "填报人", name: "Creator", 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: "Createtime", width: 100, align: "left"},
+ { label: "收款人", name: "Payee", width: 100, align: "left"},
+ { label: "附件张数", name: "Attachcount", width: 100, align: "left"},
+ { label: "申请报账金额", name: "Totalamount", width: 100, align: "left"},
+ //{ label: "附件上传", name: "FilePath", width: 100, align: "left"},
+ { label: "核准金额", name: "Approvalamount", width: 100, align: "left" },
+ { label: "提交时间", name: "SubmitTime", width: 130, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '已提交';
+ } else {
+ return '未提交';
+ }
+ }
+ },
+ //{
+ // label: "审核用户", name: "CheckUserId", width: 100, align: "left",
+ // formatter: function (cellvalue, row) {
+ // return row.CheckUserName;
+ // }
+ //},
+ { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 1) {
+ return '审核中';
+ } else if (cellvalue == 2) {
+ return '审核通过';
+ } else {
+ return '草稿';
+ }
+ }
+ },
+ ],
+ mainId:'Id',
+ isPage: true
+ });
+ },
+ search: function (param) {
+ param = param || {};
+ param.StartTime = startTime;
+ param.EndTime = endTime;
+ $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ //$('#gridtable').jfGridSet('reload');
+
+ if (res && res.code && res.code == 200) {
+ // 发起流程
+
+ var postData = {
+ schemeCode: '1-7',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+
+ }
+ page.search();
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 15c756a9b..438dc7087 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -412,10 +412,16 @@
+
+
+
+
+
+
@@ -887,6 +893,7 @@
+
@@ -1394,22 +1401,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -6524,6 +6557,10 @@
+
+
+
+
@@ -7866,6 +7903,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
index 2e514e22d..72e20af2a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
@@ -12,4 +12,5 @@
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
index 2cdf00d01..75f772a16 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
@@ -42,8 +42,11 @@
+
+
+
-
+
@@ -100,6 +103,9 @@
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
index d556f76df..fcc90310e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
@@ -190,6 +190,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Purchase/PurchaseEduApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Purchase/PurchaseEduApi.cs
index 17981b90e..862b66dde 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Purchase/PurchaseEduApi.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Purchase/PurchaseEduApi.cs
@@ -28,6 +28,7 @@ namespace Learun.Application.WebApi
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
+ Get["/formdetail"] = GetFormDetails;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Post["/submit"] = Submit;
@@ -70,6 +71,19 @@ namespace Learun.Application.WebApi
};
return Success(jsonData);
}
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ ///
+ public Response GetFormDetails(dynamic _)
+ {
+ string keyValue = this.GetReqData();
+
+ var Purchase_Edu_DetailsData = purchaseeduIBLL.GetPurchase_Edu_DetailsList(keyValue);
+
+ return Success(Purchase_Edu_DetailsData);
+ }
/////
///// 获取页面显示列表数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PurchaseApply/PurchaseEduApplyApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PurchaseApply/PurchaseEduApplyApi.cs
new file mode 100644
index 000000000..183aa3f46
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PurchaseApply/PurchaseEduApplyApi.cs
@@ -0,0 +1,152 @@
+using Nancy;
+using Learun.Util;
+using System.Collections.Generic;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System;
+using Learun.Application.WorkFlow;
+
+namespace Learun.Application.WebApi
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2020-06-03 14:29
+ /// 描 述:系部数据
+ ///
+ public class PurchaseEduApplyApi : BaseApi
+ {
+ private Purchase_Edu_ApplyIBLL purchaseeduIBLL = new Purchase_Edu_ApplyBLL();
+ private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL();
+
+ ///
+ /// 注册接口
+ ///
+ public PurchaseEduApplyApi()
+ : base("/learun/adms/purchaseeduapply")
+ {
+ Get["/pagelist"] = GetPageList;
+ Get["/form"] = GetForm;
+ Post["/delete"] = DeleteForm;
+ Post["/save"] = SaveForm;
+ Post["/submit"] = Submit;
+ //Get["/shList"] = GetshList;
+ }
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表分页数据
+ ///
+ ///
+ ///
+ public Response GetPageList(dynamic _)
+ {
+ ReqPageParam parameter = this.GetReqData();
+ var data = purchaseeduIBLL.GetPageList(parameter.pagination, parameter.queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = parameter.pagination.total,
+ page = parameter.pagination.page,
+ records = parameter.pagination.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ ///
+ public Response GetForm(dynamic _)
+ {
+ string keyValue = this.GetReqData();
+ var Purchase_EduData = purchaseeduIBLL.GetPurchase_Edu_ApplyEntity(keyValue);
+ var Purchase_Edu_DetailsData = purchaseeduIBLL.GetPurchase_Edu_ApplydetailsList(Purchase_EduData.Id);
+ var jsonData = new
+ {
+ Purchase_Edu = Purchase_EduData,
+ Purchase_Edu_Details = Purchase_Edu_DetailsData,
+ };
+ return Success(jsonData);
+ }
+
+ /////
+ ///// 获取页面显示列表数据
+ /////
+ /////
+ /////
+ //public Response GetshList(dynamic _)
+ //{
+ // FundsApplyEntity parameter = this.GetReqData();
+ // var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(parameter.ProcessId);
+ // var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(FundsApplyData.Id);
+ // var jsonData = new
+ // {
+ // FundsApply = FundsApplyData,
+ // FundsApplyDetail = FundsApplyDetailData,
+ // };
+ // return Success(jsonData);
+ //}
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ ///
+ ///
+ public Response DeleteForm(dynamic _)
+ {
+ string keyValue = this.GetReqData();
+ purchaseeduIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ ///
+ ///
+ public Response SaveForm(dynamic _)
+ {
+ //Purchase_EduEntity entity = strEntity.ToObject();
+ //List purchase_Edu_DetailsList = strpurchase_Edu_DetailsList.ToObject>();
+ //purchase_EduIBLL.SaveEntity(keyValue, entity, purchase_Edu_DetailsList);
+ ReqFormEntity parameter = this.GetReqData();
+ Purchase_Edu_ApplyEntity entity = parameter.strEntity.ToObject();
+ List detailList = parameter.DetailList.ToObject>();
+ //var code = entity.EnCode;
+
+ purchaseeduIBLL.SaveEntity(parameter.keyValue, entity, detailList);
+ return Success("保存成功!");
+ }
+ ///
+ /// 提交
+ ///
+ ///
+ ///
+ public Response Submit(dynamic _)
+ {
+ string keyValue = this.GetReqData();
+ var processId = Guid.NewGuid().ToString();
+ purchaseeduIBLL.ModifyStatus(keyValue, 1, processId);
+ UserInfo userInfo = LoginUserInfo.Get();
+ nWFProcessIBLL.CreateFlow("2-1", processId, "", 1, "", userInfo);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ #region 私有类
+ ///
+ /// 表单实体类
+ ///
+ private class ReqFormEntity
+ {
+ public string keyValue { get; set; }
+ public string strEntity { get; set; }
+ public string DetailList { get; set; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config
index c2530ae49..54493820e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/ioc.config
@@ -17,6 +17,13 @@
+
+
+
+
+
+
+
@@ -42,6 +49,13 @@
+
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index d5e3e141d..0948d58d0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -130,15 +130,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -628,6 +640,8 @@
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_ApplydetailsMap.cs
new file mode 100644
index 000000000..f62c5615f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Edu_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_EDU_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_applyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_applyMap.cs
new file mode 100644
index 000000000..419a72a0e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Edu_applyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Edu_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_EDU_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_ApplydetailsMap.cs
new file mode 100644
index 000000000..5131d1be1
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Info_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_INFO_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_applyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_applyMap.cs
new file mode 100644
index 000000000..02b7e2830
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Info_applyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Info_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_INFO_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplyMap.cs
new file mode 100644
index 000000000..8a95a5569
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Logistic_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_LOGISTIC_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplydetailsMap.cs
new file mode 100644
index 000000000..dcbfae3e3
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Logistic_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Logistic_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_LOGISTIC_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplyMap.cs
new file mode 100644
index 000000000..6ede27ad9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Other_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_OTHER_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplydetailsMap.cs
new file mode 100644
index 000000000..7e6643c9b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Other_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Other_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_OTHER_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplyMap.cs
new file mode 100644
index 000000000..5caf1c14b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Print_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_PRINT_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplydetailsMap.cs
new file mode 100644
index 000000000..fa05e98ea
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Print_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Print_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_PRINT_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplyMap.cs
new file mode 100644
index 000000000..07e87690d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Student_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_STUDENT_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplydetailsMap.cs
new file mode 100644
index 000000000..bb6d210e9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Student_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Student_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_STUDENT_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplyMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplyMap.cs
new file mode 100644
index 000000000..de27234f8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplyMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Work_ApplyMap : EntityTypeConfiguration
+ {
+ public Purchase_Work_ApplyMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_WORK_APPLY");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplydetailsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplydetailsMap.cs
new file mode 100644
index 000000000..3e27504de
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Purchase_Work_ApplydetailsMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.LogisticsManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Work_ApplydetailsMap : EntityTypeConfiguration
+ {
+ public Purchase_Work_ApplydetailsMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("PURCHASE_WORK_APPLYDETAILS");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index aa74b1f0d..ffcab1128 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -392,26 +392,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1920,6 +1950,11 @@
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduBLL.cs
index 1592208fb..50d544f97 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduBLL.cs
@@ -42,6 +42,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetDataList(string queryJson)
+ {
+ try
+ {
+ return purchase_EduService.GetDataList( queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
///
/// 获取Purchase_Edu_Details表数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduEntity.cs
index 0b9a18ea0..7d8a50ee5 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
@@ -115,6 +120,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
this.Id = keyValue;
}
#endregion
+
+
#region 扩展字段
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduIBLL.cs
index 9c18c4821..f9f125ddb 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduIBLL.cs
@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
IEnumerable GetPageList(Pagination pagination, string queryJson);
///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetDataList(string queryJson);
+ ///
/// 获取Purchase_Edu_Details表数据
///
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduService.cs
index 3e987b1f1..9fc144ff1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu/Purchase_EduService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.Applystatus
");
strSql.Append(" FROM Purchase_Edu t ");
strSql.Append(" WHERE 1=1 ");
@@ -57,6 +57,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
dp.Add("@remark", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
strSql.Append(" AND (t.remark Like @remark) ");
}
+ if (!queryParam["ApplyStatus"].IsEmpty())
+ {
+ //报账状态
+ //采购审批通过且报账状态为0的数据
+ //dp.Add("@ApplyStatus", queryParam["ApplyStatus"].ToString(), DbType.String);
+ strSql.Append(" AND (t.ApplyStatus=0 and CheckStatus=2)");
+ }
return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
@@ -71,6 +78,57 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetDataList(string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.DepartmentName,
+ t.CreatorId,
+ t.CreatorName,
+ t.TotalAmount,
+ t.Remark,
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
+ ");
+ strSql.Append(" FROM Purchase_Edu t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["Crreator"].IsEmpty())
+ {
+ dp.Add("CreatorId", queryParam["Crreator"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND t.CreatorId = @CreatorId ");
+ }
+ if (!queryParam["keyword"].IsEmpty())
+ {
+ dp.Add("@remark", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
+ strSql.Append(" AND (t.remark Like @remark) ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
///
/// 获取Purchase_Edu_Details表数据
@@ -306,11 +364,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
- }
+ }
+ else
+ {
+ entity.Status = status;
+ }
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyBLL.cs
new file mode 100644
index 000000000..a7aef55d2
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplyBLL : Purchase_Edu_ApplyIBLL
+ {
+ private Purchase_Edu_ApplyService purchase_Edu_ApplyService = new Purchase_Edu_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return purchase_Edu_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Edu_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Edu_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return purchase_Edu_ApplyService.GetPurchase_Edu_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Edu_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Edu_ApplyEntity GetPurchase_Edu_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return purchase_Edu_ApplyService.GetPurchase_Edu_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Edu_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Edu_ApplydetailsEntity GetPurchase_Edu_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return purchase_Edu_ApplyService.GetPurchase_Edu_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Edu_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return purchase_Edu_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ purchase_Edu_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Edu_ApplyEntity entity,List purchase_Edu_applydetailsList)
+ {
+ try
+ {
+ purchase_Edu_ApplyService.SaveEntity(keyValue, entity,purchase_Edu_applydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ purchase_Edu_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ purchase_Edu_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyIBLL.cs
new file mode 100644
index 000000000..8c899ba47
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Edu_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Edu_applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Edu_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Edu_apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Edu_ApplyEntity GetPurchase_Edu_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Edu_applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Edu_ApplydetailsEntity GetPurchase_Edu_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Edu_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Edu_ApplyEntity entity,List purchase_Edu_applydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyService.cs
new file mode 100644
index 000000000..0336ded77
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Edu_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Edu_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Edu_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Edu_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Edu_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Edu_ApplyEntity GetPurchase_Edu_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Edu_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Edu_ApplydetailsEntity GetPurchase_Edu_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Edu_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Edu_ApplyEntity = GetPurchase_Edu_ApplyEntity(keyValue);
+ var Purchase_Edu_ApplydetailsEntity = GetPurchase_Edu_ApplydetailsEntity(Purchase_Edu_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Edu_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Edu_ApplyEntity entity,List Purchase_Edu_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Edu_ApplyEntityTmp = GetPurchase_Edu_ApplyEntity(keyValue);
+ var Purchase_Edu_ApplydetailsEntityTmp = GetPurchase_Edu_ApplydetailsEntity(Purchase_Edu_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Edu_ApplyEntityTmp.Id);
+ foreach (Purchase_Edu_ApplydetailsEntity item in Purchase_Edu_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Edu_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Edu_ApplydetailsEntity item in Purchase_Edu_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 2;
+ db.Update(purchasemodel);
+ }
+ }
+ else
+ {
+ //这里是回滚订单到草稿箱
+ entity.Status = status;
+ //把对应的账单数据报账状态回滚到待报账
+
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 0;
+ db.Update(purchasemodel);
+ }
+ }
+
+ //更新课程异动表的审核状态
+ entity.CheckStatus = status;
+ entity.CheckUserId = loginUserInfo.userId;
+ entity.CheckUserName = loginUserInfo.realName;
+ entity.CheckTime = now;
+ db.Update(entity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplydetailsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplydetailsEntity.cs
new file mode 100644
index 000000000..8d4d5a52c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_ApplydetailsEntity.cs
@@ -0,0 +1,60 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplydetailsEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// applyid
+ ///
+ [Column("APPLYID")]
+ public string applyid { get; set; }
+ ///
+ /// purchaseid
+ ///
+ [Column("PURCHASEID")]
+ public string purchaseid { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+
+ [NotMapped]
+ public string Remark { set; get; }
+ [NotMapped]
+ public double TotalAmount { set; get; }
+ [NotMapped]
+ public string CreateTime { set; get; }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_applyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_applyEntity.cs
new file mode 100644
index 000000000..4561f5c06
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Edu_Apply/Purchase_Edu_applyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Edu_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoEntity.cs
index 3e1ddb8ed..82911b53a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoService.cs
index 057f9ca7f..a6ac4e891 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info/Purchase_InfoService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
");
strSql.Append(" FROM Purchase_Info t ");
strSql.Append(" WHERE 1=1 ");
@@ -306,11 +306,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
+
+ }
+ else
+ {
+ entity.Status = status;
}
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyBLL.cs
new file mode 100644
index 000000000..14bf6146a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplyBLL : Purchase_Info_ApplyIBLL
+ {
+ private Purchase_Info_ApplyService Purchase_Info_ApplyService = new Purchase_Info_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return Purchase_Info_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Info_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Info_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return Purchase_Info_ApplyService.GetPurchase_Info_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Info_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Info_ApplyEntity GetPurchase_Info_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Info_ApplyService.GetPurchase_Info_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Info_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Info_ApplydetailsEntity GetPurchase_Info_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Info_ApplyService.GetPurchase_Info_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Info_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return Purchase_Info_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ Purchase_Info_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Info_ApplyEntity entity,List Purchase_Info_ApplydetailsList)
+ {
+ try
+ {
+ Purchase_Info_ApplyService.SaveEntity(keyValue, entity,Purchase_Info_ApplydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ Purchase_Info_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ Purchase_Info_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyEntity.cs
new file mode 100644
index 000000000..0acba7105
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyIBLL.cs
new file mode 100644
index 000000000..03e625d16
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Info_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Info_Applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Info_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Info_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Info_ApplyEntity GetPurchase_Info_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Info_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Info_ApplydetailsEntity GetPurchase_Info_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Info_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Info_ApplyEntity entity,List Purchase_Info_ApplydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyService.cs
new file mode 100644
index 000000000..52d62a93c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Info_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Info_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Info_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Info_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Info_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Info_ApplyEntity GetPurchase_Info_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Info_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Info_ApplydetailsEntity GetPurchase_Info_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Info_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Info_ApplyEntity = GetPurchase_Info_ApplyEntity(keyValue);
+ var Purchase_Info_ApplydetailsEntity = GetPurchase_Info_ApplydetailsEntity(Purchase_Info_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Info_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Info_ApplyEntity entity,List Purchase_Info_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Info_ApplyEntityTmp = GetPurchase_Info_ApplyEntity(keyValue);
+ var Purchase_Info_ApplydetailsEntityTmp = GetPurchase_Info_ApplydetailsEntity(Purchase_Info_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Info_ApplyEntityTmp.Id);
+ foreach (Purchase_Info_ApplydetailsEntity item in Purchase_Info_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Info_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Info_ApplydetailsEntity item in Purchase_Info_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 2;
+ db.Update(purchasemodel);
+ }
+ }
+ else
+ {
+ //这里是回滚订单到草稿箱
+ entity.Status = status;
+ //把对应的账单数据报账状态回滚到待报账
+
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 0;
+ db.Update(purchasemodel);
+ }
+ }
+
+ //更新课程异动表的审核状态
+ entity.CheckStatus = status;
+ entity.CheckUserId = loginUserInfo.userId;
+ entity.CheckUserName = loginUserInfo.realName;
+ entity.CheckTime = now;
+ db.Update(entity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplydetailsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplydetailsEntity.cs
new file mode 100644
index 000000000..807872dcf
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Info_Apply/Purchase_Info_ApplydetailsEntity.cs
@@ -0,0 +1,60 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Info_ApplydetailsEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// applyid
+ ///
+ [Column("APPLYID")]
+ public string applyid { get; set; }
+ ///
+ /// purchaseid
+ ///
+ [Column("PURCHASEID")]
+ public string purchaseid { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+
+ [NotMapped]
+ public string Remark { set; get; }
+ [NotMapped]
+ public double TotalAmount { set; get; }
+ [NotMapped]
+ public string CreateTime { set; get; }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticEntity.cs
index 79a7ef127..c768f4fcf 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticService.cs
index 7ff0a3311..36286cfde 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic/Purchase_LogisticService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
");
strSql.Append(" FROM Purchase_Logistic t ");
strSql.Append(" WHERE 1=1 ");
@@ -306,11 +306,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
+
+ }
+ else
+ {
+ entity.Status = status;
}
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyBLL.cs
new file mode 100644
index 000000000..289e7fc7c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplyBLL : Purchase_Logistic_ApplyIBLL
+ {
+ private Purchase_Logistic_ApplyService Purchase_Logistic_ApplyService = new Purchase_Logistic_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return Purchase_Logistic_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Logistic_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Logistic_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return Purchase_Logistic_ApplyService.GetPurchase_Logistic_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Logistic_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Logistic_ApplyEntity GetPurchase_Logistic_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Logistic_ApplyService.GetPurchase_Logistic_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Logistic_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Logistic_ApplydetailsEntity GetPurchase_Logistic_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Logistic_ApplyService.GetPurchase_Logistic_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Logistic_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return Purchase_Logistic_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ Purchase_Logistic_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Logistic_ApplyEntity entity,List Purchase_Logistic_ApplydetailsList)
+ {
+ try
+ {
+ Purchase_Logistic_ApplyService.SaveEntity(keyValue, entity,Purchase_Logistic_ApplydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ Purchase_Logistic_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ Purchase_Logistic_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyEntity.cs
new file mode 100644
index 000000000..d5c05b994
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyIBLL.cs
new file mode 100644
index 000000000..6e092e658
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Logistic_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Logistic_Applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Logistic_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Logistic_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Logistic_ApplyEntity GetPurchase_Logistic_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Logistic_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Logistic_ApplydetailsEntity GetPurchase_Logistic_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Logistic_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Logistic_ApplyEntity entity,List Purchase_Logistic_ApplydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyService.cs
new file mode 100644
index 000000000..e4f74641d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Logistic_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Logistic_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Logistic_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Logistic_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Logistic_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Logistic_ApplyEntity GetPurchase_Logistic_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Logistic_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Logistic_ApplydetailsEntity GetPurchase_Logistic_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Logistic_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Logistic_ApplyEntity = GetPurchase_Logistic_ApplyEntity(keyValue);
+ var Purchase_Logistic_ApplydetailsEntity = GetPurchase_Logistic_ApplydetailsEntity(Purchase_Logistic_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Logistic_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Logistic_ApplyEntity entity,List Purchase_Logistic_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Logistic_ApplyEntityTmp = GetPurchase_Logistic_ApplyEntity(keyValue);
+ var Purchase_Logistic_ApplydetailsEntityTmp = GetPurchase_Logistic_ApplydetailsEntity(Purchase_Logistic_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Logistic_ApplyEntityTmp.Id);
+ foreach (Purchase_Logistic_ApplydetailsEntity item in Purchase_Logistic_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Logistic_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Logistic_ApplydetailsEntity item in Purchase_Logistic_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 2;
+ db.Update(purchasemodel);
+ }
+ }
+ else
+ {
+ //这里是回滚订单到草稿箱
+ entity.Status = status;
+ //把对应的账单数据报账状态回滚到待报账
+
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 0;
+ db.Update(purchasemodel);
+ }
+ }
+
+ //更新课程异动表的审核状态
+ entity.CheckStatus = status;
+ entity.CheckUserId = loginUserInfo.userId;
+ entity.CheckUserName = loginUserInfo.realName;
+ entity.CheckTime = now;
+ db.Update(entity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplydetailsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplydetailsEntity.cs
new file mode 100644
index 000000000..9e0ff78e0
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Logistic_Apply/Purchase_Logistic_ApplydetailsEntity.cs
@@ -0,0 +1,60 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Logistic_ApplydetailsEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// applyid
+ ///
+ [Column("APPLYID")]
+ public string applyid { get; set; }
+ ///
+ /// purchaseid
+ ///
+ [Column("PURCHASEID")]
+ public string purchaseid { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+
+ [NotMapped]
+ public string Remark { set; get; }
+ [NotMapped]
+ public double TotalAmount { set; get; }
+ [NotMapped]
+ public string CreateTime { set; get; }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherEntity.cs
index 26b048a8c..dd3108577 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherService.cs
index 238eb1bd9..6d7ce2609 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other/Purchase_OtherService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
");
strSql.Append(" FROM Purchase_Other t ");
strSql.Append(" WHERE 1=1 ");
@@ -306,11 +306,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
+
+ }
+ else
+ {
+ entity.Status = status;
}
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyBLL.cs
new file mode 100644
index 000000000..fd7061c9e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplyBLL : Purchase_Other_ApplyIBLL
+ {
+ private Purchase_Other_ApplyService Purchase_Other_ApplyService = new Purchase_Other_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return Purchase_Other_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Other_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Other_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return Purchase_Other_ApplyService.GetPurchase_Other_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Other_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Other_ApplyEntity GetPurchase_Other_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Other_ApplyService.GetPurchase_Other_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Other_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Other_ApplydetailsEntity GetPurchase_Other_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Other_ApplyService.GetPurchase_Other_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Other_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return Purchase_Other_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ Purchase_Other_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Other_ApplyEntity entity,List Purchase_Other_ApplydetailsList)
+ {
+ try
+ {
+ Purchase_Other_ApplyService.SaveEntity(keyValue, entity,Purchase_Other_ApplydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ Purchase_Other_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ Purchase_Other_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyEntity.cs
new file mode 100644
index 000000000..4ee2f25b9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyIBLL.cs
new file mode 100644
index 000000000..3b36de4e1
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Other_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Other_Applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Other_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Other_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Other_ApplyEntity GetPurchase_Other_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Other_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Other_ApplydetailsEntity GetPurchase_Other_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Other_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Other_ApplyEntity entity,List Purchase_Other_ApplydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyService.cs
new file mode 100644
index 000000000..87e23727d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Other_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Other_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Other_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Other_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Other_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Other_ApplyEntity GetPurchase_Other_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Other_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Other_ApplydetailsEntity GetPurchase_Other_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Other_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Other_ApplyEntity = GetPurchase_Other_ApplyEntity(keyValue);
+ var Purchase_Other_ApplydetailsEntity = GetPurchase_Other_ApplydetailsEntity(Purchase_Other_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Other_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Other_ApplyEntity entity,List Purchase_Other_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Other_ApplyEntityTmp = GetPurchase_Other_ApplyEntity(keyValue);
+ var Purchase_Other_ApplydetailsEntityTmp = GetPurchase_Other_ApplydetailsEntity(Purchase_Other_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Other_ApplyEntityTmp.Id);
+ foreach (Purchase_Other_ApplydetailsEntity item in Purchase_Other_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Other_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Other_ApplydetailsEntity item in Purchase_Other_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 2;
+ db.Update(purchasemodel);
+ }
+ }
+ else
+ {
+ //这里是回滚订单到草稿箱
+ entity.Status = status;
+ //把对应的账单数据报账状态回滚到待报账
+
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 0;
+ db.Update(purchasemodel);
+ }
+ }
+
+ //更新课程异动表的审核状态
+ entity.CheckStatus = status;
+ entity.CheckUserId = loginUserInfo.userId;
+ entity.CheckUserName = loginUserInfo.realName;
+ entity.CheckTime = now;
+ db.Update(entity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplydetailsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplydetailsEntity.cs
new file mode 100644
index 000000000..6def4c412
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Other_Apply/Purchase_Other_ApplydetailsEntity.cs
@@ -0,0 +1,60 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Other_ApplydetailsEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// applyid
+ ///
+ [Column("APPLYID")]
+ public string applyid { get; set; }
+ ///
+ /// purchaseid
+ ///
+ [Column("PURCHASEID")]
+ public string purchaseid { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+
+ [NotMapped]
+ public string Remark { set; get; }
+ [NotMapped]
+ public double TotalAmount { set; get; }
+ [NotMapped]
+ public string CreateTime { set; get; }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintEntity.cs
index 78e89212c..362342e33 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintService.cs
index ff51ffa03..5462301e9 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print/Purchase_PrintService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
");
strSql.Append(" FROM Purchase_Print t ");
strSql.Append(" WHERE 1=1 ");
@@ -306,11 +306,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
+
+ }
+ else
+ {
+ entity.Status = status;
}
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyBLL.cs
new file mode 100644
index 000000000..eb6f74411
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplyBLL : Purchase_Print_ApplyIBLL
+ {
+ private Purchase_Print_ApplyService Purchase_Print_ApplyService = new Purchase_Print_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return Purchase_Print_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Print_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Print_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return Purchase_Print_ApplyService.GetPurchase_Print_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Print_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Print_ApplyEntity GetPurchase_Print_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Print_ApplyService.GetPurchase_Print_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Print_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Print_ApplydetailsEntity GetPurchase_Print_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Print_ApplyService.GetPurchase_Print_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Print_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return Purchase_Print_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ Purchase_Print_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Print_ApplyEntity entity,List Purchase_Print_ApplydetailsList)
+ {
+ try
+ {
+ Purchase_Print_ApplyService.SaveEntity(keyValue, entity,Purchase_Print_ApplydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ Purchase_Print_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ Purchase_Print_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyEntity.cs
new file mode 100644
index 000000000..b0de07c91
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyIBLL.cs
new file mode 100644
index 000000000..1e60ced72
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Print_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Print_Applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Print_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Print_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Print_ApplyEntity GetPurchase_Print_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Print_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Print_ApplydetailsEntity GetPurchase_Print_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Print_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Print_ApplyEntity entity,List Purchase_Print_ApplydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyService.cs
new file mode 100644
index 000000000..106ef4865
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Print_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Print_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Print_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Print_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Print_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Print_ApplyEntity GetPurchase_Print_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Print_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Print_ApplydetailsEntity GetPurchase_Print_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Print_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Print_ApplyEntity = GetPurchase_Print_ApplyEntity(keyValue);
+ var Purchase_Print_ApplydetailsEntity = GetPurchase_Print_ApplydetailsEntity(Purchase_Print_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Print_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Print_ApplyEntity entity,List Purchase_Print_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Print_ApplyEntityTmp = GetPurchase_Print_ApplyEntity(keyValue);
+ var Purchase_Print_ApplydetailsEntityTmp = GetPurchase_Print_ApplydetailsEntity(Purchase_Print_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Print_ApplyEntityTmp.Id);
+ foreach (Purchase_Print_ApplydetailsEntity item in Purchase_Print_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Print_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Print_ApplydetailsEntity item in Purchase_Print_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 2;
+ db.Update(purchasemodel);
+ }
+ }
+ else
+ {
+ //这里是回滚订单到草稿箱
+ entity.Status = status;
+ //把对应的账单数据报账状态回滚到待报账
+
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 0;
+ db.Update(purchasemodel);
+ }
+ }
+
+ //更新课程异动表的审核状态
+ entity.CheckStatus = status;
+ entity.CheckUserId = loginUserInfo.userId;
+ entity.CheckUserName = loginUserInfo.realName;
+ entity.CheckTime = now;
+ db.Update(entity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplydetailsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplydetailsEntity.cs
new file mode 100644
index 000000000..ae8d1990c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Print_Apply/Purchase_Print_ApplydetailsEntity.cs
@@ -0,0 +1,60 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Print_ApplydetailsEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// applyid
+ ///
+ [Column("APPLYID")]
+ public string applyid { get; set; }
+ ///
+ /// purchaseid
+ ///
+ [Column("PURCHASEID")]
+ public string purchaseid { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+
+ [NotMapped]
+ public string Remark { set; get; }
+ [NotMapped]
+ public double TotalAmount { set; get; }
+ [NotMapped]
+ public string CreateTime { set; get; }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentEntity.cs
index b8a243d47..7165d5f70 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentService.cs
index fb4f61b8a..e41fcb298 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student/Purchase_StudentService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
");
strSql.Append(" FROM Purchase_Student t ");
strSql.Append(" WHERE 1=1 ");
@@ -306,11 +306,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
+
+ }
+ else
+ {
+ entity.Status = status;
}
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyBLL.cs
new file mode 100644
index 000000000..099202684
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplyBLL : Purchase_Student_ApplyIBLL
+ {
+ private Purchase_Student_ApplyService Purchase_Student_ApplyService = new Purchase_Student_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return Purchase_Student_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Student_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Student_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return Purchase_Student_ApplyService.GetPurchase_Student_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Student_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Student_ApplyEntity GetPurchase_Student_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Student_ApplyService.GetPurchase_Student_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Student_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Student_ApplydetailsEntity GetPurchase_Student_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Student_ApplyService.GetPurchase_Student_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Student_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return Purchase_Student_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ Purchase_Student_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Student_ApplyEntity entity,List Purchase_Student_ApplydetailsList)
+ {
+ try
+ {
+ Purchase_Student_ApplyService.SaveEntity(keyValue, entity,Purchase_Student_ApplydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ Purchase_Student_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ Purchase_Student_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyEntity.cs
new file mode 100644
index 000000000..947ae37cf
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyIBLL.cs
new file mode 100644
index 000000000..df5af98f6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Student_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Student_Applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Student_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Student_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Student_ApplyEntity GetPurchase_Student_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Student_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Student_ApplydetailsEntity GetPurchase_Student_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Student_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Student_ApplyEntity entity,List Purchase_Student_ApplydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyService.cs
new file mode 100644
index 000000000..e73842001
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Student_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Student_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Student_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Student_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Student_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Student_ApplyEntity GetPurchase_Student_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Student_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Student_ApplydetailsEntity GetPurchase_Student_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Student_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Student_ApplyEntity = GetPurchase_Student_ApplyEntity(keyValue);
+ var Purchase_Student_ApplydetailsEntity = GetPurchase_Student_ApplydetailsEntity(Purchase_Student_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Student_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Student_ApplyEntity entity,List Purchase_Student_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Student_ApplyEntityTmp = GetPurchase_Student_ApplyEntity(keyValue);
+ var Purchase_Student_ApplydetailsEntityTmp = GetPurchase_Student_ApplydetailsEntity(Purchase_Student_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Student_ApplyEntityTmp.Id);
+ foreach (Purchase_Student_ApplydetailsEntity item in Purchase_Student_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Student_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Student_ApplydetailsEntity item in Purchase_Student_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 2;
+ db.Update(purchasemodel);
+ }
+ }
+ else
+ {
+ //这里是回滚订单到草稿箱
+ entity.Status = status;
+ //把对应的账单数据报账状态回滚到待报账
+
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 0;
+ db.Update(purchasemodel);
+ }
+ }
+
+ //更新课程异动表的审核状态
+ entity.CheckStatus = status;
+ entity.CheckUserId = loginUserInfo.userId;
+ entity.CheckUserName = loginUserInfo.realName;
+ entity.CheckTime = now;
+ db.Update(entity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplydetailsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplydetailsEntity.cs
new file mode 100644
index 000000000..6c23eaf94
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Student_Apply/Purchase_Student_ApplydetailsEntity.cs
@@ -0,0 +1,60 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Student_ApplydetailsEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// applyid
+ ///
+ [Column("APPLYID")]
+ public string applyid { get; set; }
+ ///
+ /// purchaseid
+ ///
+ [Column("PURCHASEID")]
+ public string purchaseid { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+
+ [NotMapped]
+ public string Remark { set; get; }
+ [NotMapped]
+ public double TotalAmount { set; get; }
+ [NotMapped]
+ public string CreateTime { set; get; }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkEntity.cs
index 7cbc4b8b0..0cb8a2f33 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkEntity.cs
@@ -94,6 +94,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
///
[Column("ProcessId")]
public string ProcessId { get; set; }
+ ///
+ /// 报账状态
+ ///
+ [Column("APPLYSTATUS")]
+ public int ApplyStatus { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkService.cs
index 80352f790..39d00c7a7 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work/Purchase_WorkService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
t.CreatorName,
t.TotalAmount,
t.Remark,
- t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime
+ t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId,t.CreateTime,t.ApplyStatus
");
strSql.Append(" FROM Purchase_Work t ");
strSql.Append(" WHERE 1=1 ");
@@ -306,11 +306,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//审核通过
if (status == 2)
{
-
+
+ }
+ else
+ {
+ entity.Status = status;
}
//更新课程异动表的审核状态
- entity.Status = 1;
entity.CheckStatus = status;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckUserName = loginUserInfo.realName;
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyBLL.cs
new file mode 100644
index 000000000..984a9e9b6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyBLL.cs
@@ -0,0 +1,249 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Work_ApplyBLL : Purchase_Work_ApplyIBLL
+ {
+ private Purchase_Work_ApplyService Purchase_Work_ApplyService = new Purchase_Work_ApplyService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return Purchase_Work_ApplyService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Work_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Work_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ return Purchase_Work_ApplyService.GetPurchase_Work_ApplydetailsList(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Work_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Work_ApplyEntity GetPurchase_Work_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Work_ApplyService.GetPurchase_Work_ApplyEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Work_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Work_ApplydetailsEntity GetPurchase_Work_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return Purchase_Work_ApplyService.GetPurchase_Work_ApplydetailsEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Work_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return Purchase_Work_ApplyService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ Purchase_Work_ApplyService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Purchase_Work_ApplyEntity entity,List Purchase_Work_ApplydetailsList)
+ {
+ try
+ {
+ Purchase_Work_ApplyService.SaveEntity(keyValue, entity,Purchase_Work_ApplydetailsList);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ Purchase_Work_ApplyService.ModifyStatus(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改课程异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ try
+ {
+ Purchase_Work_ApplyService.ModifyStatusByProcessId(status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyEntity.cs
new file mode 100644
index 000000000..7d873cad0
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyEntity.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Work_ApplyEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// DepartmentId
+ ///
+ [Column("DEPARTMENTID")]
+ public string DepartmentId { get; set; }
+ ///
+ /// Creator
+ ///
+ [Column("CREATOR")]
+ public string Creator { get; set; }
+ ///
+ /// Createtime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? Createtime { get; set; }
+ ///
+ /// Payee
+ ///
+ [Column("PAYEE")]
+ public string Payee { get; set; }
+ ///
+ /// Attachcount
+ ///
+ [Column("ATTACHCOUNT")]
+ public string Attachcount { get; set; }
+ ///
+ /// Totalamount
+ ///
+ [Column("TOTALAMOUNT")]
+ public decimal? Totalamount { get; set; }
+ ///
+ /// FilePath
+ ///
+ [Column("FILEPATH")]
+ public string FilePath { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// Approvalamount
+ ///
+ [Column("APPROVALAMOUNT")]
+ public decimal? Approvalamount { get; set; }
+ ///
+ /// Status
+ ///
+ [Column("STATUS")]
+ public int Status { get; set; }
+ ///
+ /// SubmitTime
+ ///
+ [Column("SUBMITTIME")]
+ public DateTime? SubmitTime { get; set; }
+ ///
+ /// CheckTime
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// CheckUserId
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// CheckUserName
+ ///
+ [Column("CHECKUSERNAME")]
+ public string CheckUserName { get; set; }
+ ///
+ /// CheckStatus
+ ///
+ [Column("CHECKSTATUS")]
+ public int CheckStatus { get; set; }
+ ///
+ /// ProcessId
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyIBLL.cs
new file mode 100644
index 000000000..e9e706485
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyIBLL.cs
@@ -0,0 +1,82 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public interface Purchase_Work_ApplyIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Purchase_Work_Applydetails表数据
+ ///
+ ///
+ IEnumerable GetPurchase_Work_ApplydetailsList(string keyValue);
+ ///
+ /// 获取Purchase_Work_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Work_ApplyEntity GetPurchase_Work_ApplyEntity(string keyValue);
+ ///
+ /// 获取Purchase_Work_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ Purchase_Work_ApplydetailsEntity GetPurchase_Work_ApplydetailsEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ Purchase_Work_ApplyEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Purchase_Work_ApplyEntity entity,List Purchase_Work_ApplydetailsList);
+ #endregion
+
+
+ #region 扩展数据
+ ///
+ /// 提交课程异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatus(string keyValue, int status, string processId);
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ void ModifyStatusByProcessId(int status, string processId);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyService.cs
new file mode 100644
index 000000000..58d2d7113
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Purchase_Work_Apply/Purchase_Work_ApplyService.cs
@@ -0,0 +1,391 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.LogisticsManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2023-07-14 12:15
+ /// 描 述:教务报账申请
+ ///
+ public class Purchase_Work_ApplyService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.DepartmentId,
+ t.Creator,
+ t.Createtime,
+ t.Payee,
+ t.Attachcount,
+ t.Totalamount,
+ t.FilePath,
+ t.Approvalamount,
+ t.Status,
+ t.submittime,
+ t.checktime,
+ t.checkstatus
+ ");
+ strSql.Append(" FROM Purchase_Work_Apply t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( t.Createtime >= @startTime AND t.Createtime <= @endTime ) ");
+ }
+ if (!queryParam["DepartmentId"].IsEmpty())
+ {
+ dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
+ strSql.Append(" AND t.DepartmentId = @DepartmentId ");
+ }
+ if (!queryParam["Payee"].IsEmpty())
+ {
+ dp.Add("Payee", "%" + queryParam["Payee"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Payee Like @Payee ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Work_Applydetails表数据
+ ///
+ /// 主键
+ ///
+ public IEnumerable GetPurchase_Work_ApplydetailsList(string keyValue)
+ {
+ try
+ {
+ string sql = "select a.*,b.Remark,b.Createtime,b.totalamount from Purchase_Work_Applydetails a left join Purchase_Edu b on b.id=a.purchaseid where applyid='"+keyValue+"'";
+ var data = this.BaseRepository("CollegeMIS").FindList(sql);// as List;
+ //this.BaseRepository("CollegeMIS").FindList(t => t.applyid == keyValue);
+ return data;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Work_Apply表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Work_ApplyEntity GetPurchase_Work_ApplyEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Purchase_Work_Applydetails表实体数据
+ ///
+ /// 主键
+ ///
+ public Purchase_Work_ApplydetailsEntity GetPurchase_Work_ApplydetailsEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t=>t.applyid == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取主表实体数据
+ /// 流程实例ID
+ ///
+ ///
+ public Purchase_Work_ApplyEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var Purchase_Work_ApplyEntity = GetPurchase_Work_ApplyEntity(keyValue);
+ var Purchase_Work_ApplydetailsEntity = GetPurchase_Work_ApplydetailsEntity(Purchase_Work_ApplyEntity.Id);
+ db.Delete(t=>t.Id == keyValue);
+ db.Delete(t=>t.applyid == Purchase_Work_ApplyEntity.Id);
+
+ //同时要更新对应账单的报账状态
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Purchase_Work_ApplyEntity entity,List Purchase_Work_ApplydetailsList)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var Purchase_Work_ApplyEntityTmp = GetPurchase_Work_ApplyEntity(keyValue);
+ var Purchase_Work_ApplydetailsEntityTmp = GetPurchase_Work_ApplydetailsEntity(Purchase_Work_ApplyEntityTmp.Id);
+ entity.Modify(keyValue);
+ db.Update(entity);
+ db.Delete(t=>t.applyid == Purchase_Work_ApplyEntityTmp.Id);
+ foreach (Purchase_Work_ApplydetailsEntity item in Purchase_Work_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = Purchase_Work_ApplyEntityTmp.Id;
+ db.Insert(item);
+ }
+
+ }
+ else
+ {
+ entity.Create();
+ db.Insert(entity);
+ foreach (Purchase_Work_ApplydetailsEntity item in Purchase_Work_ApplydetailsList)
+ {
+ item.Create();
+ item.applyid = entity.Id;
+ db.Insert(item);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+
+
+ #region 扩展数据
+
+ ///
+ /// 提交异动记录
+ ///
+ /// 课程异动表主键
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatus(string keyValue, int status, string processId)
+ {
+ try
+ {
+ var now = DateTime.Now;
+ var db = this.BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == keyValue);
+ if (entity != null)
+ {
+ entity.Status = status;
+ entity.ProcessId = processId;
+ entity.SubmitTime = now;
+ entity.CheckStatus = 1;
+ db.Update(entity);
+
+ //所有子表数据状态更新为报账中
+ var details= this.BaseRepository("CollegeMIS").FindList(x => x.applyid == keyValue);
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity(x => x.Id == item.purchaseid);
+ purchasemodel.ApplyStatus = 1;
+ db.Update(purchasemodel);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 修改异动表的审核状态
+ ///
+ /// 审核状态
+ /// 流程Id
+ public void ModifyStatusByProcessId(int status, string processId)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ var now = DateTime.Now;
+ var loginUserInfo = LoginUserInfo.Get();
+ try
+ {
+ var entity = db.FindEntity(x => x.ProcessId == processId);
+ if (entity != null)
+ {
+ //获取所有的账单数据
+ var details = this.BaseRepository("CollegeMIS").FindList(x => x.applyid == entity.Id);
+ //审核通过
+ if (status == 2)
+ {
+ foreach (var item in details)
+ {
+ var purchasemodel = this.BaseRepository("CollegeMIS").FindEntity