@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Index() | public ActionResult Index() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
@@ -35,8 +35,27 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Form() | public ActionResult Form() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexBF() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormBF() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -71,8 +90,9 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var VehicleInfoData = vehicleInfoIBLL.GetVehicleInfoEntity( keyValue ); | |||||
var jsonData = new { | |||||
var VehicleInfoData = vehicleInfoIBLL.GetVehicleInfoEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
VehicleInfo = VehicleInfoData, | VehicleInfo = VehicleInfoData, | ||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
@@ -93,6 +113,19 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||||
vehicleInfoIBLL.DeleteEntity(keyValue); | vehicleInfoIBLL.DeleteEntity(keyValue); | ||||
return Success("删除成功!"); | return Success("删除成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 报废 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult UpdateStatus(string keyValue,string Status) | |||||
{ | |||||
vehicleInfoIBLL.UpdateStatus(keyValue, Status); | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
@@ -105,7 +138,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
VehicleInfoEntity entity = strEntity.ToObject<VehicleInfoEntity>(); | VehicleInfoEntity entity = strEntity.ToObject<VehicleInfoEntity>(); | ||||
vehicleInfoIBLL.SaveEntity(keyValue,entity); | |||||
vehicleInfoIBLL.SaveEntity(keyValue, entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | if (string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
} | } | ||||
@@ -47,10 +47,10 @@ | |||||
<div class="lr-form-item-title">审批文号<font face="宋体">*</font></div> | <div class="lr-form-item-title">审批文号<font face="宋体">*</font></div> | ||||
<input id="ApprovalNum" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="ApprovalNum" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="VehicleInfo" > | |||||
@*<div class="col-xs-6 lr-form-item" data-table="VehicleInfo" > | |||||
<div class="lr-form-item-title">车辆状态<font face="宋体">*</font></div> | <div class="lr-form-item-title">车辆状态<font face="宋体">*</font></div> | ||||
<div id="Status" isvalid="yes" checkexpession="NotNull" ></div> | <div id="Status" isvalid="yes" checkexpession="NotNull" ></div> | ||||
</div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="VehicleInfo" > | <div class="col-xs-12 lr-form-item" data-table="VehicleInfo" > | ||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | <textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | ||||
@@ -0,0 +1,15 @@ | |||||
@{ | |||||
ViewBag.Title = "车辆信息管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="VehicleInfo" > | |||||
<div class="lr-form-item-title">报废时间<font face="宋体">*</font></div> | |||||
<input id="ScrapTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ScrapTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VehicleInfo" > | |||||
<div class="lr-form-item-title">报废原因<font face="宋体">*</font></div> | |||||
<textarea id="ScrapReason" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/CustomFunction/Views/VehicleInfo/FormBF.js") |
@@ -0,0 +1,51 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-07-21 15:32 | |||||
* 描 述:车辆信息管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/CustomFunction/VehicleInfo/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]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/CustomFunction/VehicleInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -43,10 +43,11 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
<a id="lr_bf" class="btn btn-default"><i class="fa fa-trash-o"></i> 报废</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -56,13 +56,27 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/VehicleInfo/DeleteForm', { keyValue: keyValue}, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/VehicleInfo/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 报废 | |||||
$('#lr_bf').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认报废该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/VehicleInfo/UpdateStatus', { keyValue: keyValue, Status: '2' }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | // 打印 | ||||
$('#lr_print').on('click', function () { | $('#lr_print').on('click', function () { | ||||
$('#gridtable').jqprintTable(); | $('#gridtable').jqprintTable(); | ||||
@@ -73,51 +87,68 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/CustomFunction/VehicleInfo/GetPageList', | url: top.$.rootUrl + '/CustomFunction/VehicleInfo/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "品牌型号", name: "BrandModel", width: 100, align: "left"}, | |||||
{ label: "车辆类型", name: "Type", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'vehicleType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "号牌号码", name: "PlateNum", width: 100, align: "left"}, | |||||
{ label: "发动机号", name: "EngineNum", width: 100, align: "left"}, | |||||
{ label: "车辆识别码", name: "IdenCode", width: 100, align: "left"}, | |||||
{ label: "文本框排气量", name: "AirDisplacement", width: 100, align: "left"}, | |||||
{ label: "品牌型号", name: "BrandModel", width: 100, align: "left" }, | |||||
{ | |||||
label: "车辆类型", name: "Type", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'vehicleType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "号牌号码", name: "PlateNum", width: 100, align: "left" }, | |||||
{ label: "发动机号", name: "EngineNum", width: 100, align: "left" }, | |||||
{ label: "车辆识别码", name: "IdenCode", width: 100, align: "left" }, | |||||
{ label: "文本框排气量", name: "AirDisplacement", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "入户时间", name: "EntryTime", width: 100, align: "left", | label: "入户时间", name: "EntryTime", width: 100, align: "left", | ||||
formatter: function(value) { | |||||
return learun.formatDate(value,'yyyy-MM-dd'); | |||||
formatter: function (value) { | |||||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "座位数", name: "SeatNum", width: 100, align: "left" }, | |||||
{ label: "颜色", name: "Colour", width: 100, align: "left" }, | |||||
{ | |||||
label: "使用部门", name: "UseDeptId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "审批文号", name: "ApprovalNum", width: 100, align: "left" }, | |||||
{ | |||||
label: "车辆状态", name: "Status", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'VehicleStatus', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | } | ||||
}, | }, | ||||
{ label: "座位数", name: "SeatNum", width: 100, align: "left"}, | |||||
{ label: "颜色", name: "Colour", width: 100, align: "left"}, | |||||
{ label: "使用部门", name: "UseDeptId", width: 100, align: "left"}, | |||||
{ label: "审批文号", name: "ApprovalNum", width: 100, align: "left"}, | |||||
{ label: "车辆状态", name: "Status", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'VehicleStatus', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | ], | ||||
mainId:'Id', | |||||
mainId: 'Id', | |||||
isPage: true | isPage: true | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
param.Status = '1'; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -0,0 +1,56 @@ | |||||
@{ | |||||
ViewBag.Title = "车辆信息管理"; | |||||
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-12 lr-form-item"> | |||||
<div class="lr-form-item-title">品牌型号</div> | |||||
<input id="BrandModel" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">车辆类型</div> | |||||
<div id="Type"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">号牌号码</div> | |||||
<input id="PlateNum" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">发动机号</div> | |||||
<input id="EngineNum" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">车辆识别码</div> | |||||
<input id="IdenCode" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">座位数</div> | |||||
<input id="SeatNum" type="text" class="form-control" /> | |||||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 完善报废信息</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/CustomFunction/Views/VehicleInfo/IndexBF.js") |
@@ -0,0 +1,132 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-07-21 15:32 | |||||
* 描 述:车辆信息管理 | |||||
*/ | |||||
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); | |||||
}, 320, 400); | |||||
$('#Type').lrDataItemSelect({ code: 'vehicleType' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/CustomFunction/VehicleInfo/FormBF?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 350, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/VehicleInfo/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/CustomFunction/VehicleInfo/GetPageList', | |||||
headData: [ | |||||
{ label: "品牌型号", name: "BrandModel", width: 100, align: "left" }, | |||||
{ | |||||
label: "车辆类型", name: "Type", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'vehicleType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "号牌号码", name: "PlateNum", width: 100, align: "left" }, | |||||
{ label: "发动机号", name: "EngineNum", width: 100, align: "left" }, | |||||
{ label: "车辆识别码", name: "IdenCode", width: 100, align: "left" }, | |||||
{ label: "文本框排气量", name: "AirDisplacement", width: 100, align: "left" }, | |||||
{ | |||||
label: "入户时间", name: "EntryTime", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "座位数", name: "SeatNum", width: 100, align: "left" }, | |||||
{ label: "颜色", name: "Colour", width: 100, align: "left" }, | |||||
{ | |||||
label: "使用部门", name: "UseDeptId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "审批文号", name: "ApprovalNum", width: 100, align: "left" }, | |||||
{ | |||||
label: "车辆状态", name: "Status", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'VehicleStatus', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.Status = '2'; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -950,6 +950,8 @@ | |||||
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Index.js" /> | <Content Include="Areas\CustomFunction\Views\OfficialSealUse\Index.js" /> | ||||
<Content Include="Areas\CustomFunction\Views\OfficialSeal\Form.js" /> | <Content Include="Areas\CustomFunction\Views\OfficialSeal\Form.js" /> | ||||
<Content Include="Areas\CustomFunction\Views\OfficialSeal\Index.js" /> | <Content Include="Areas\CustomFunction\Views\OfficialSeal\Index.js" /> | ||||
<Content Include="Areas\CustomFunction\Views\VehicleInfo\FormBF.js" /> | |||||
<Content Include="Areas\CustomFunction\Views\VehicleInfo\IndexBF.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTermAttemper\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTermAttemper\Form.js" /> | ||||
@@ -7295,6 +7297,8 @@ | |||||
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Index.cshtml" /> | <Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Index.cshtml" /> | ||||
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Form.cshtml" /> | <Content Include="Areas\CustomFunction\Views\OfficialSealUse\Form.cshtml" /> | ||||
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Index.cshtml" /> | <Content Include="Areas\CustomFunction\Views\OfficialSealUse\Index.cshtml" /> | ||||
<Content Include="Areas\CustomFunction\Views\VehicleInfo\IndexBF.cshtml" /> | |||||
<Content Include="Areas\CustomFunction\Views\VehicleInfo\FormBF.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | ||||
@@ -93,7 +93,25 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void UpdateStatus(string keyValue, string Status) | |||||
{ | |||||
try | |||||
{ | |||||
vehicleInfoService.UpdateStatus(keyValue, Status); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||||
/// 日 期:2021-07-21 15:32 | /// 日 期:2021-07-21 15:32 | ||||
/// 描 述:车辆信息管理 | /// 描 述:车辆信息管理 | ||||
/// </summary> | /// </summary> | ||||
public class VehicleInfoEntity | |||||
public class VehicleInfoEntity | |||||
{ | { | ||||
#region 实体成员 | #region 实体成员 | ||||
/// <summary> | /// <summary> | ||||
@@ -128,7 +128,8 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||||
public void Create() | public void Create() | ||||
{ | { | ||||
this.Id = Guid.NewGuid().ToString(); | this.Id = Guid.NewGuid().ToString(); | ||||
this.CreateTime=DateTime.Now; | |||||
this.Status = "1"; | |||||
this.CreateTime = DateTime.Now; | |||||
var userInfo = LoginUserInfo.Get(); | var userInfo = LoginUserInfo.Get(); | ||||
this.CreateUserId = userInfo.userId; | this.CreateUserId = userInfo.userId; | ||||
this.CreateUserName = userInfo.realName; | this.CreateUserName = userInfo.realName; | ||||
@@ -37,6 +37,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
void DeleteEntity(string keyValue); | void DeleteEntity(string keyValue); | ||||
/// <summary> | /// <summary> | ||||
/// 报废 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="Status"></param> | |||||
void UpdateStatus(string keyValue, string Status); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -82,6 +82,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||||
dp.Add("SeatNum", "%" + queryParam["SeatNum"].ToString() + "%", DbType.String); | dp.Add("SeatNum", "%" + queryParam["SeatNum"].ToString() + "%", DbType.String); | ||||
strSql.Append(" AND t.SeatNum Like @SeatNum "); | strSql.Append(" AND t.SeatNum Like @SeatNum "); | ||||
} | } | ||||
if (!queryParam["Status"].IsEmpty()) | |||||
{ | |||||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Status= @Status "); | |||||
} | |||||
// | |||||
return this.BaseRepository("CollegeMIS").FindList<VehicleInfoEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<VehicleInfoEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -148,6 +154,25 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||||
} | } | ||||
} | } | ||||
public void UpdateStatus(string keyValue, string Status) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS") | |||||
.ExecuteBySql($"update VehicleInfo set [Status]='{Status}' where Id='{keyValue}'"); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||