diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml
index e48e641f0..5710497ad 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.cshtml
@@ -6,10 +6,11 @@
资产编号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js
index bc1eaa031..d204af350 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Form.js
@@ -15,16 +15,42 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
- $('#Name').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_encode',text: 'f_realname' });
- $('#Department').lrselect({
- type: 'tree',
- allowSearch: true,
- url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTreeNoCheck',
- param: {},
- });
$('#Unit').lrDataItemSelect({ code: 'sldw', allowSearch: true });
$('#Types').lrDataItemSelect({ code: 'AssType' });
$('#Status').lrDataItemSelect({ code: 'AssState' });
+ $('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
+ $('#Name').lrGirdSelect({
+ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=teacheruserdata',
+ height: 500,
+ width: 400,
+ selectWord: 'f_realname',
+ value: 'f_realname',
+ text: 'f_realname',
+ headData:
+ [
+ { label: "编号", name: "f_encode", width: 100, align: "left" },
+ { label: "姓名", name: "f_realname", width: 100, align: "left" },
+ {
+ label: "部门", name: "f_departmentid", 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']);
+ }
+ });
+ }
+ },
+ ],
+ select: function (item) {
+ ////赋值
+ $("#Name").val(item.f_realname);
+ $("#No").val(item.f_encode);
+ $("#Department").lrselectSet(item.f_departmentid);
+ }
+ });
},
initData: function () {
if (!!keyValue) {
@@ -45,11 +71,12 @@ var bootstrap = function ($, learun) {
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
- }
- var postData = {
- strEntity: JSON.stringify($('body').lrGetFormData())
- };
- $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ }
+ var postData = {};
+ var strEntity = $('body').lrGetFormData();
+ strEntity.Name = strEntity.No;
+ postData.strEntity = JSON.stringify(strEntity);
+ $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml
index dedcb9962..7bfba88cf 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml
@@ -35,8 +35,8 @@
资产类别
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js
index 60a48ecff..d63dc2f6a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js
@@ -18,6 +18,7 @@ var bootstrap = function ($, learun) {
}, 220, 400);
$('#Name').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_encode',text: 'f_realname' });
$('#Department').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' });
+ $('#Status').lrDataItemSelect({ code: 'AssState' });
$('#Types').lrDataItemSelect({ code: 'AssType' });
// 刷新
$('#lr_refresh').on('click', function () {
@@ -99,31 +100,21 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/GetPageList',
headData: [
{
- label: "资产类别", name: "Types", width: 100, align: "left",
+ label: "使用管理人", name: "Name", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
- code: 'AssType',
+ keyId: 'f_encode',
callback: function (_data) {
- callback(_data.text);
+ callback(_data['f_realname']);
}
});
}
},
{
- label: "使用管理人", name: "Name", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
- key: value,
- keyId: 'f_encode',
- callback: function (_data) {
- callback(_data['f_realname']);
- }
- });
- }},
- { label: "部门", name: "Department", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
+ label: "部门", name: "Department", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
@@ -134,8 +125,20 @@ var bootstrap = function ($, learun) {
});
}
},
- { label: "资产编号", name: "Code", width: 100, align: "left"},
- { label: "资产名称", name: "DeviceName", width: 100, align: "left"},
+ { label: "资产编号", name: "Code", width: 150, align: "left"},
+ { label: "资产名称", name: "DeviceName", width: 150, align: "left" },
+ {
+ label: "资产类别", name: "Types", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('dataItem', {
+ key: value,
+ code: 'AssType',
+ callback: function (_data) {
+ callback(_data.text);
+ }
+ });
+ }
+ },
//{ label: "配置描述", name: "Description", width: 100, align: "left" },
{ label: "品牌", name: "Brand", width: 120, align: "left" },
{ label: "型号", name: "Model", width: 120, align: "left" },
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml
index a5f718d8d..d1f4f7a68 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.cshtml
@@ -35,8 +35,8 @@
资产类别
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js
index 5ac4eed5a..d44cd4251 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/IndexMy.js
@@ -18,6 +18,7 @@ var bootstrap = function ($, learun) {
}, 220, 400);
$('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_encode', text: 'f_realname' });
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
+ $('#Status').lrDataItemSelect({ code: 'AssState' });
$('#Types').lrDataItemSelect({ code: 'AssType' });
// 刷新
$('#lr_refresh').on('click', function () {
@@ -98,18 +99,6 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/GetPageList',
headData: [
- {
- label: "资产类别", name: "Types", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'AssType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
{
label: "使用管理人", name: "Name", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -137,8 +126,19 @@ var bootstrap = function ($, learun) {
}
},
{ label: "资产编号", name: "Code", width: 100, align: "left" },
- { label: "资产名称", name: "DeviceName", width: 100, align: "left" },
- //{ label: "配置描述", name: "Description", width: 100, align: "left" },
+ { label: "资产名称", name: "DeviceName", width: 150, align: "left" },
+ {
+ label: "资产类别", name: "Types", width: 150, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('dataItem', {
+ key: value,
+ code: 'AssType',
+ callback: function (_data) {
+ callback(_data.text);
+ }
+ });
+ }
+ },
{ label: "品牌", name: "Brand", width: 120, align: "left" },
{ label: "型号", name: "Model", width: 120, align: "left" },
{ label: "参数", name: "Argument", width: 120, align: "left" },
@@ -155,6 +155,18 @@ var bootstrap = function ($, learun) {
}
},
{ label: "数量", name: "Nuantity", 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: 'AssState',
+ callback: function (_data) {
+ callback(_data.text);
+ }
+ });
+ }
+ },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'Id',
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs
index e371fc635..eb4972de7 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentEntity.cs
@@ -114,6 +114,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public void Create()
{
this.Id = Guid.NewGuid().ToString();
+ this.CreateTime = DateTime.Now;
+ this.CreateUser = LoginUserInfo.Get().userId;
}
///
/// 编辑调用
@@ -122,6 +124,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public void Modify(string keyValue)
{
this.Id = keyValue;
+ this.Modifytime = DateTime.Now;
+ this.ModifyUser = LoginUserInfo.Get().userId;
}
#endregion
#region 扩展字段
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs
index 63fba03ba..a7de939d0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs
@@ -76,6 +76,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Brand", queryParam["Brand"].ToString(), DbType.String);
strSql.Append(" AND t.Brand = @Brand ");
}
+ if (!queryParam["Status"].IsEmpty())
+ {
+ dp.Add("Status", queryParam["Status"].ToString(), DbType.String);
+ strSql.Append(" AND t.Status = @Status ");
+ }
if (!LoginUserInfo.Get().isSystem)
{
if (!LoginUserInfo.Get().roleIds.Contains("5a6e22b1-2a08-4258-9964-3cb7fbb9ebee"))