Kaynağa Gözat

招生来源计划,招生来源编辑回显

新疆体育高职分支
ndbs 1 yıl önce
ebeveyn
işleme
ae0b8b5278
7 değiştirilmiş dosya ile 327 ekleme ve 25 silme
  1. +15
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Controllers/EnrollmentMajorPlanSourceController.cs
  2. +7
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/Form.cshtml
  3. +11
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/Form.js
  4. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/SourceIndex.cshtml
  5. +210
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/SourceIndex.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +43
    -10
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlanSource/EnrollmentMajorPlanSourceService.cs

+ 15
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Controllers/EnrollmentMajorPlanSourceController.cs Dosyayı Görüntüle

@@ -25,7 +25,7 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -34,7 +34,12 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}

public ActionResult SourceIndex()
{
return View();
}
#endregion

@@ -47,7 +52,7 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson )
public ActionResult GetList(string queryJson)
{
var data = enrollmentMajorPlanSourceIBLL.GetList(queryJson);
return Success(data);
@@ -82,8 +87,12 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var data = enrollmentMajorPlanSourceIBLL.GetEntity(keyValue);
return Success(data);
var EnrollmentMajorPlanSourceData = enrollmentMajorPlanSourceIBLL.GetEntity(keyValue);
var jsonData = new
{
EnrollmentMajorPlanSource = EnrollmentMajorPlanSourceData,
};
return Success(jsonData);
}
#endregion

@@ -110,7 +119,7 @@ namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue,EnrollmentMajorPlanSourceEntity entity)
public ActionResult SaveForm(string keyValue, EnrollmentMajorPlanSourceEntity entity)
{
enrollmentMajorPlanSourceIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");


+ 7
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/Form.cshtml Dosyayı Görüntüle

@@ -3,31 +3,31 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item">
<div class="col-xs-12 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">专业计划<font face="宋体">*</font></div>
<div id="MajorPlanId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="col-xs-6 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">省<font face="宋体">*</font></div>
<div id="ProvinceNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="col-xs-6 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">市<font face="宋体">*</font></div>
<div id="CityNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="col-xs-6 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">县<font face="宋体">*</font></div>
<div id="AreaNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="col-xs-6 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">已录人数<font face="宋体">*</font></div>
<input id="JoinNum" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly/>
</div>
<div class="col-xs-6 lr-form-item">
<div class="col-xs-6 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">人数<font face="宋体">*</font></div>
<input id="Num" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="col-xs-12 lr-form-item" data-table="EnrollmentMajorPlanSource" >
<div class="lr-form-item-title">备注<font face="宋体">*</font></div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>


+ 11
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/Form.js Dosyayı Görüntüle

@@ -117,8 +117,17 @@ var bootstrap = function ($, learun) {
});
},
initData: function () {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlanSource/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]);
}
}
});
}
}
};


+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/SourceIndex.cshtml Dosyayı Görüntüle

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "EnrollmentMajorPlan";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">省</div>
<div id="ProvinceNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">市</div>
<div id="CityNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">县</div>
<div id="AreaNo"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/SourceIndex.js")

+ 210
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AdmissionsPlatform/Views/EnrollmentMajorPlanSource/SourceIndex.js Dosyayı Görüntüle

@@ -0,0 +1,210 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-09-11 14:55
* 描 述:EnrollmentMajorPlan
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#ProvinceNo').lrDataSourceSelect({
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',
select: function (item) {
if (!!item) {
$('#CityNo').lrselectRefresh({
url: "/DIC_CITY/GetListByProvinceCode",
param: { ProvinceCode: item.pcode },
value: 'CCODE',
text: 'CNAME'
});
$('#RegionNo').lrselectRefresh({
url: "",
data: []
});
}
}
});
$('#CityNo').lrselect({
select: function (item) {
if (!!item) {
$('#AreaNo').lrselectRefresh({
url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode",
param: { cityCode: item.CCODE },
value: 'ACODE',
text: 'ANAME'
});
}
}
});
$('#AreaNo').lrselect();
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlan/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark == true) {
learun.alert.warning("当前项目已审核不能编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlan/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark == true) {
learun.alert.warning("选中项已审核不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlan/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//启用
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark.indexOf('1') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否审核选中项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlan/EnableDisable', { keyValue: keyValue, status: "1" }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_uncheck').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark.indexOf('0') != -1) {
learun.alert.warning("选中记录中包含未审核项目!");
return;
}
learun.layerConfirm('是否去审核选中项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlan/EnableDisable', { keyValue: keyValue, status: "0" }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/AdmissionsPlatform/EnrollmentMajorPlanSource/GetList',
headData: [
{
label: '省', name: 'ProvinceNo', width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
key: value,
keyId: 'pcode',
callback: function (_data) {
callback(_data['pname']);
}
});
}
},
{
label: '市', name: 'CityNo', width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
key: value,
keyId: 'ccode',
callback: function (_data) {
callback(_data['cname']);
}
});
}
},
{
label: '县', name: 'AreaNo', width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA',
key: value,
keyId: 'acode',
callback: function (_data) {
callback(_data['aname']);
}
});
}
},

{ label: '人数', name: 'Num', width: 200, align: "left" },
],
mainId: 'ID',
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Dosyayı Görüntüle

@@ -906,6 +906,7 @@
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\BindTeacherForm.js" />
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\RegistrateIndex.js" />
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\ReportIndex.js" />
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\SourceIndex.js" />
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlan\MajorIndex.js" />
<Content Include="Areas\AppManager\Views\DTImg\Form.css" />
<Content Include="Areas\AppManager\Views\DTImg\Form.js" />
@@ -8301,6 +8302,7 @@
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\FormView.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\SalarySheet\FormView.cshtml" />
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlan\MajorIndex.cshtml" />
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\SourceIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 43
- 10
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AdmissionsPlatform/EnrollmentMajorPlanSource/EnrollmentMajorPlanSourceService.cs Dosyayı Görüntüle

@@ -40,16 +40,30 @@ namespace Learun.Application.TwoDevelopment.AdmissionsPlatform
{
try
{
//参考写法
//var queryParam = queryJson.ToJObject();
// 虚拟参数
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM EnrollmentMajorPlanSource t ");
return this.BaseRepository("CollegeMIS").FindList<EnrollmentMajorPlanSourceEntity>(strSql.ToString());
strSql.Append(@" select ProvinceNo,CityNo,AreaNo,sum(num) as num
from EnrollmentMajorPlanSource t");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
// 虚拟参数
if (!queryParam["ProvinceNo"].IsEmpty())
{
dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String);
strSql.Append(" AND t.ProvinceNo = @ProvinceNo ");
}
if (!queryParam["CityNo"].IsEmpty())
{
dp.Add("CityNo", queryParam["CityNo"].ToString(), DbType.String);
strSql.Append(" AND t.CityNo = @CityNo ");
}
if (!queryParam["AreaNo"].IsEmpty())
{
dp.Add("AreaNo", queryParam["AreaNo"].ToString(), DbType.String);
strSql.Append(" AND t.AreaNo = @AreaNo ");
}
strSql.Append(" Group by ProvinceNo,CityNo,AreaNo ");
return this.BaseRepository("CollegeMIS").FindList<EnrollmentMajorPlanSourceEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
@@ -78,7 +92,26 @@ namespace Learun.Application.TwoDevelopment.AdmissionsPlatform
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM EnrollmentMajorPlanSource t ");
return this.BaseRepository("CollegeMIS").FindList<EnrollmentMajorPlanSourceEntity>(strSql.ToString(), pagination);
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
// 虚拟参数
if (!queryParam["ProvinceNo"].IsEmpty())
{
dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String);
strSql.Append(" AND t.ProvinceNo = @ProvinceNo ");
}
if (!queryParam["CityNo"].IsEmpty())
{
dp.Add("CityNo", queryParam["CityNo"].ToString(), DbType.String);
strSql.Append(" AND t.CityNo = @CityNo ");
}
if (!queryParam["AreaNo"].IsEmpty())
{
dp.Add("AreaNo", queryParam["AreaNo"].ToString(), DbType.String);
strSql.Append(" AND t.AreaNo = @AreaNo ");
}
return this.BaseRepository("CollegeMIS").FindList<EnrollmentMajorPlanSourceEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{


Yükleniyor…
İptal
Kaydet