@@ -0,0 +1,142 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.AssetManagementSystem; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-05-11 14:32 | |||||
/// 描 述:库房的房间号 | |||||
/// </summary> | |||||
public class AssStorageRoomController : MvcControllerBase | |||||
{ | |||||
private AssStorageRoomIBLL assStorageRoomIBLL = new AssStorageRoomBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = assStorageRoomIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Ass_Storage_RoomData = assStorageRoomIBLL.GetAss_Storage_RoomEntity( keyValue ); | |||||
var jsonData = new { | |||||
Ass_Storage_Room = Ass_Storage_RoomData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取左侧树形数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTree() | |||||
{ | |||||
var data = assStorageRoomIBLL.GetTree(); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取房间 | |||||
/// </summary> | |||||
/// <param name="storageId">库房Id</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetListForStorageId(string storageId) | |||||
{ | |||||
var data = assStorageRoomIBLL.GetListForStorageId(storageId); | |||||
return JsonResult(data); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
assStorageRoomIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
Ass_Storage_RoomEntity entity = strEntity.ToObject<Ass_Storage_RoomEntity>(); | |||||
assStorageRoomIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -48,7 +48,7 @@ var bootstrap = function ($, learun) { | |||||
{ label: '资产名称', name: 'aname', width: 150, align: 'left' }, | { label: '资产名称', name: 'aname', width: 150, align: 'left' }, | ||||
{ label: "英文名称", name: "aename", width: 100, align: "left" }, | { label: "英文名称", name: "aename", width: 100, align: "left" }, | ||||
{ | { | ||||
label: '所在库房', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
label: '楼宇名称', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
key: value, | key: value, | ||||
@@ -59,7 +59,19 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: '所在库位', name: 'aiistorageposition', width: 150, align: 'left' }, | |||||
{ | |||||
label: "房间号", name: "aiistorageposition", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: '是否在库', name: 'aiisinstorage', width: 150, align: 'left', formatter: function (val, row) { | label: '是否在库', name: 'aiisinstorage', width: 150, align: 'left', formatter: function (val, row) { | ||||
if (val) { | if (val) { | ||||
@@ -174,7 +186,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: '所在库房', name: 'AAIStorage', width: 150, align: 'left', | |||||
label: '楼宇名称', name: 'AAIStorage', width: 150, align: 'left', | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', | learun.clientdata.getAsync('custmerData', | ||||
{ | { | ||||
@@ -188,8 +200,21 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
//{ | |||||
// label: '所在库位', name: 'AAILocation', width: 150, align: 'left' | |||||
//}, | |||||
{ | { | ||||
label: '所在库位', name: 'AAILocation', width: 150, align: 'left' | |||||
label: "房间号", name: "AAILocation", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
{ | { | ||||
label: '是否在库', name: 'AAIIsInStorage', width: 150, align: 'left', formatter: function (val) { | label: '是否在库', name: 'AAIIsInStorage', width: 150, align: 'left', formatter: function (val) { | ||||
@@ -105,7 +105,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: '所在库房', name: 'AAIStorage', width: 150, align: 'left', | |||||
label: '楼宇名称', name: 'AAIStorage', width: 150, align: 'left', | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', | learun.clientdata.getAsync('custmerData', | ||||
{ | { | ||||
@@ -118,8 +118,21 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
//{ | |||||
// label: '所在库位', name: 'AAILocation', width: 150, align: 'left' | |||||
//}, | |||||
{ | { | ||||
label: '所在库位', name: 'AAILocation', width: 150, align: 'left' | |||||
label: "房间号", name: "AAILocation", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
{ | { | ||||
label: '是否在库', name: 'AAIIsInStorage', width: 150, align: 'left', formatter: function (val) { | label: '是否在库', name: 'AAIIsInStorage', width: 150, align: 'left', formatter: function (val) { | ||||
@@ -0,0 +1,31 @@ | |||||
@{ | |||||
ViewBag.Title = "库房的房间号"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ass_Storage_Room"> | |||||
<div class="lr-form-item-title">所在楼宇<font face="宋体">*</font></div> | |||||
<div id="StorageId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_Storage_Room"> | |||||
<div class="lr-form-item-title">房间名称<font face="宋体">*</font></div> | |||||
<input id="RName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_Storage_Room"> | |||||
<div class="lr-form-item-title">房间号<font face="宋体">*</font></div> | |||||
<input id="RCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ass_Storage_Room"> | |||||
<div class="lr-form-item-title">房间功能</div> | |||||
<input id="RFunction" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ass_Storage_Room"> | |||||
<div class="lr-form-item-title">面积</div> | |||||
<input id="RArea" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_Storage_Room"> | |||||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||||
<div id="REnabled" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/AssStorageRoom/Form.js") |
@@ -0,0 +1,52 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-05-11 14: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 () { | |||||
$('#REnabled').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData',value: 'sid',text: 'sname' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/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 + '/AssetManagementSystem/AssStorageRoom/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,50 @@ | |||||
@{ | |||||
ViewBag.Title = "库房的房间号"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout lr-layout-left-center" id="lr_layout" > | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlg ">楼宇名称</div> | |||||
<div id="dataTree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap "> | |||||
<div class="lr-layout-title"> | |||||
<span id="titleinfo" class="lrlg">列表信息</span> | |||||
</div> | |||||
<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="RName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<input id="RCode" 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_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_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/AssetManagementSystem/Views/AssStorageRoom/Index.js") |
@@ -0,0 +1,119 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-05-11 14:32 | |||||
* 描 述:库房的房间号 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 初始化左侧树形数据 | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
nodeClick: function (item) { | |||||
page.search({ StorageId: item.value }); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('RId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('RId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetPageList', | |||||
headData: [ | |||||
{ label: "名称", name: "RName", width: 100, align: "left"}, | |||||
{ label: "房间号", name: "RCode", width: 100, align: "left"}, | |||||
{ label: "房间功能", name: "RFunction", width: 100, align: "left"}, | |||||
{ label: "面积", name: "RArea", width: 100, align: "left" }, | |||||
{ label: "楼宇名称", name: "StorageId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||||
key: value, | |||||
keyId: 'sid', | |||||
callback: function (_data) { | |||||
callback(_data['sname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否启用", name: "REnabled", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
], | |||||
mainId:'RId', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -40,12 +40,12 @@ | |||||
<div id="ACReasonType" ></div> | <div id="ACReasonType" ></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsChangeItem" > | <div class="col-xs-12 lr-form-item" data-table="Ass_AssetsChangeItem" > | ||||
<div class="lr-form-item-title">所在库房</div> | |||||
<div class="lr-form-item-title">楼宇名称</div> | |||||
<div id="ACCStorageId" ></div> | <div id="ACCStorageId" ></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsChangeItem" > | <div class="col-xs-12 lr-form-item" data-table="Ass_AssetsChangeItem" > | ||||
<div class="lr-form-item-title">所在库位</div> | |||||
<input id="ACCStoragePosition" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="ACCStoragePosition"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsChangeItem/Form.js") | @Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsChangeItem/Form.js") |
@@ -19,7 +19,26 @@ var bootstrap = function ($, learun) { | |||||
$('#ACUserId').val(learun.clientdata.get(['userinfo']).realName); | $('#ACUserId').val(learun.clientdata.get(['userinfo']).realName); | ||||
$('#ACInOrOut').lrDataItemSelect({ code: 'InOrOut' }); | $('#ACInOrOut').lrDataItemSelect({ code: 'InOrOut' }); | ||||
$('#ACReasonType').lrDataItemSelect({ code: 'ReasonType' }); | $('#ACReasonType').lrDataItemSelect({ code: 'ReasonType' }); | ||||
$('#ACCStorageId').lrDataSourceSelect({ code: 'Ass_StorageData',value: 'sid',text: 'sname' }); | |||||
//$('#ACCStorageId').lrDataSourceSelect({ code: 'Ass_StorageData',value: 'sid',text: 'sname' }); | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -48,7 +48,26 @@ var bootstrap = function ($, learun) { | |||||
}, 220, 400); | }, 220, 400); | ||||
$('#ACInOrOut').lrDataItemSelect({ code: 'InOrOut' }); | $('#ACInOrOut').lrDataItemSelect({ code: 'InOrOut' }); | ||||
$('#ACReasonType').lrDataItemSelect({ code: 'ReasonType' }); | $('#ACReasonType').lrDataItemSelect({ code: 'ReasonType' }); | ||||
$('#ACCStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
//$('#ACCStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -143,7 +162,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "所在库房", name: "ACCStorageId", width: 150, align: "left", | |||||
label: "楼宇名称", name: "ACCStorageId", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
@@ -155,7 +174,20 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "所在库位", name: "ACCStoragePosition", width: 150, align: "left" } | |||||
//{ label: "房间号", name: "ACCStoragePosition", width: 150, align: "left" } | |||||
{ | |||||
label: "房间号", name: "AIIStoragePosition", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'ACIId', | mainId: 'ACIId', | ||||
isPage: true, | isPage: true, | ||||
@@ -3,25 +3,41 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">资产编号<font face="宋体">*</font></div> | |||||
<input id="ACode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">资产名称<font face="宋体">*</font></div> | |||||
<input id="AName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产分类<font face="宋体">*</font></div> | <div class="lr-form-item-title">资产分类<font face="宋体">*</font></div> | ||||
<div id="ATId" isvalid="yes" checkexpession="NotNull"></div> | <div id="ATId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产属性<font face="宋体">*</font></div> | <div class="lr-form-item-title">资产属性<font face="宋体">*</font></div> | ||||
<div id="AAssType" ></div> | |||||
<div id="AAssType"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产编号<font face="宋体">*</font></div> | |||||
<input id="ACode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">英文名称</div> | |||||
<input id="AEName" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产名称<font face="宋体">*</font></div> | |||||
<input id="AName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">单价<font face="宋体">*</font></div> | |||||
<input id="APrice" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">英文名称</div> | |||||
<input id="AEName" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">库存<font face="宋体">*</font></div> | |||||
<input id="AStock" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">数量单位</div> | |||||
<div id="AUnit"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | |||||
<div id="HasDetail" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产型号</div> | <div class="lr-form-item-title">资产型号</div> | ||||
@@ -31,49 +47,35 @@ | |||||
<div class="lr-form-item-title">生产厂家</div> | <div class="lr-form-item-title">生产厂家</div> | ||||
<input id="AManufacturer" type="text" class="form-control" /> | <input id="AManufacturer" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">用途</div> | |||||
<input id="AUse" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">规格</div> | |||||
<input id="ASpecification" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产来源</div> | <div class="lr-form-item-title">资产来源</div> | ||||
<div id="ASource"></div> | <div id="ASource"></div> | ||||
</div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">供应商</div> | <div class="lr-form-item-title">供应商</div> | ||||
<div id="ASupplierId"></div> | <div id="ASupplierId"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">参考单价<font face="宋体">*</font></div> | |||||
<input id="APrice" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">数量<font face="宋体">*</font></div> | |||||
<input id="AStock" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
<div class="lr-form-item-title">资产排序<font face="宋体">*</font></div> | |||||
<input id="AOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">数量单位</div> | |||||
<div id="AUnit"></div> | |||||
<div class="lr-form-item-title">规格</div> | |||||
<input id="ASpecification" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">排序<font face="宋体">*</font></div> | |||||
<input id="AOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
<div class="lr-form-item-title">用途</div> | |||||
<input id="AUse" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">楼宇名称<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" isvalid="yes" checkexpession="NotNull"></div> | <div id="AIIStorageId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">所在库位</div> | |||||
<input id="AIIStoragePosition" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfo"> | |||||
<div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | |||||
<div id="HasDetail" isvalid="yes" checkexpession="NotNull"></div> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="AIIStoragePosition" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产照片</div> | <div class="lr-form-item-title">资产照片</div> | ||||
@@ -82,6 +84,6 @@ | |||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfo"> | <div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfo"> | ||||
<div class="lr-form-item-title">资产描述</div> | <div class="lr-form-item-title">资产描述</div> | ||||
<textarea id="AContent" class="form-control" style="height: 150px;"></textarea> | <textarea id="AContent" class="form-control" style="height: 150px;"></textarea> | ||||
</div> | |||||
</div>*@ | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.js") | @Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.js") |
@@ -27,7 +27,27 @@ var bootstrap = function ($, learun) { | |||||
$('#ASource').lrDataItemSelect({ code: 'zcly' }); | $('#ASource').lrDataItemSelect({ code: 'zcly' }); | ||||
$('#AUnit').lrDataItemSelect({ code: 'sldw' }); | $('#AUnit').lrDataItemSelect({ code: 'sldw' }); | ||||
$('#HasDetail').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#HasDetail').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
//库房 | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
//$('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#ASupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); | $('#ASupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); | ||||
$('#AAssType').lrDataItemSelect({ code: 'AssType' }); | $('#AAssType').lrDataItemSelect({ code: 'AssType' }); | ||||
$('#APhoto').lrUploader(); | $('#APhoto').lrUploader(); | ||||
@@ -4,45 +4,20 @@ | |||||
} | } | ||||
<script> var newCode='@ViewBag.NewCode'</script> | <script> var newCode='@ViewBag.NewCode'</script> | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem" style="display: none"> | |||||
<div class="lr-form-item-title">明细编号<font face="宋体">*</font></div> | <div class="lr-form-item-title">明细编号<font face="宋体">*</font></div> | ||||
<input id="AICode" hidden="hidden" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="AICode" hidden="hidden" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">序号<font face="宋体">*</font></div> | |||||
<input id="AICodeNum" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">是否在库<font face="宋体">*</font></div> | |||||
<div id="AIIsInStorage" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">资产属性<font face="宋体">*</font></div> | |||||
<div id="AIAssType"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">所在库位</div> | |||||
<input id="AIIStoragePosition" type="text" class="form-control" /> | |||||
</div> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | @*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">报废时间<font face="宋体">*</font></div> | |||||
<input id="AScrapTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AScrapTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">报废提示时间<font face="宋体">*</font></div> | |||||
<div id="ScrapRemindTime"> </div> | |||||
<div class="lr-form-item-title">序号<font face="宋体">*</font></div> | |||||
<input id="AICodeNum" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div>*@ | </div>*@ | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">金隅编号</div> | |||||
<div class="lr-form-item-title">资产编号</div> | |||||
<input id="AICodeNumJY" type="text" class="form-control" /> | <input id="AICodeNumJY" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产名称</div> | |||||
<div class="lr-form-item-title">名称</div> | |||||
<input id="AIASSName" type="text" class="form-control" /> | <input id="AIASSName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
@@ -53,16 +28,42 @@ | |||||
<div class="lr-form-item-title">使用人员</div> | <div class="lr-form-item-title">使用人员</div> | ||||
<div id="AIUsePeople"></div> | <div id="AIUsePeople"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">楼宇名称<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="AIIStoragePosition" isvalid="yes" checkexpession="NotNull"></div> | |||||
@*<input id="AIIStoragePosition" type="text" class="form-control" />*@ | |||||
</div> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">是否在库<font face="宋体">*</font></div> | |||||
<div id="AIIsInStorage" checkexpession="NotNull"></div> | |||||
</div>*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产型号</div> | <div class="lr-form-item-title">资产型号</div> | ||||
<input id="AISpecificationtype" type="text" class="form-control" /> | <input id="AISpecificationtype" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">资产属性<font face="宋体">*</font></div> | |||||
<div id="AIAssType"></div> | |||||
</div> | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">报废时间<font face="宋体">*</font></div> | |||||
<input id="AScrapTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AScrapTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">报废提示时间<font face="宋体">*</font></div> | |||||
<div id="ScrapRemindTime"> </div> | |||||
</div>*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">计量单位</div> | <div class="lr-form-item-title">计量单位</div> | ||||
<div id="AIUnits" class="form-control"></div> | <div id="AIUnits" class="form-control"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产原值</div> | |||||
<div class="lr-form-item-title">资产价值</div> | |||||
<input id="AIAssValue" type="text" class="form-control" /> | <input id="AIAssValue" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
@@ -81,67 +82,10 @@ | |||||
<div class="lr-form-item-title">增加方式</div> | <div class="lr-form-item-title">增加方式</div> | ||||
<div id="AIAddType"></div> | <div id="AIAddType"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">入账日期</div> | |||||
<input id="AIAccountEntryTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIAccountEntryTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">行驶发证日期</div> | |||||
<input id="AIVehicleTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIVehicleTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">品牌</div> | |||||
<input id="AIBrand" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">生产厂家</div> | <div class="lr-form-item-title">生产厂家</div> | ||||
<input id="AIManufacturer" type="text" class="form-control" /> | <input id="AIManufacturer" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">产权形式</div> | |||||
<input id="AIPropertyRight" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">建筑结构</div> | |||||
<input id="AIBuildingStructure" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">权属证号</div> | |||||
<input id="AIOwnership" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">车辆用途</div> | |||||
<input id="AIVehicleUse" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">车牌号</div> | |||||
<input id="AIPlateNumber" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">车架号</div> | |||||
<input id="AIFrameNumber" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">使用性质</div> | |||||
<input id="AINatureOfUse" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">发动机号</div> | |||||
<input id="EngineNumber" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">会计凭证号</div> | |||||
<input id="AIAccountCertificate" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">排气量</div> | |||||
<input id="DischargeVolume" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">建筑面积</div> | |||||
<input id="AIBuiltArea" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产规格</div> | <div class="lr-form-item-title">资产规格</div> | ||||
<input id="AISpecification" type="text" class="form-control" /> | <input id="AISpecification" type="text" class="form-control" /> | ||||
@@ -164,7 +108,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">取得日期</div> | <div class="lr-form-item-title">取得日期</div> | ||||
<input id="TimeOfAcquisition"type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TimeOfAcquisition').trigger('change'); } })" /> | |||||
<input id="TimeOfAcquisition" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TimeOfAcquisition').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">产品序列号</div> | <div class="lr-form-item-title">产品序列号</div> | ||||
@@ -235,17 +179,20 @@ | |||||
<input id="AccumulatedDepreciation" type="text" class="form-control" /> | <input id="AccumulatedDepreciation" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">折旧年限</div> | |||||
<div class="lr-form-item-title">折旧年限(月)</div> | |||||
<input id="UsefulLife" type="text" class="form-control" /> | <input id="UsefulLife" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">月折旧额</div> | <div class="lr-form-item-title">月折旧额</div> | ||||
<input id="MonthlyDepreciation" type="text" class="form-control" /> | <input id="MonthlyDepreciation" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">残值率</div> | |||||
<input id="ResidualValueRate" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">残值率</div> | |||||
<input id="ResidualValueRate" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">权属说明</div> | <div class="lr-form-item-title">权属说明</div> | ||||
<textarea id="AIOwnerRemark" class="form-control" style="height:100px;"></textarea> | <textarea id="AIOwnerRemark" class="form-control" style="height:100px;"></textarea> | ||||
@@ -257,5 +204,66 @@ | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">入账日期</div> | |||||
<input id="AIAccountEntryTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIAccountEntryTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">行驶发证日期</div> | |||||
<input id="AIVehicleTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIVehicleTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">品牌</div> | |||||
<input id="AIBrand" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">产权形式</div> | |||||
<input id="AIPropertyRight" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">建筑结构</div> | |||||
<input id="AIBuildingStructure" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">权属证号</div> | |||||
<input id="AIOwnership" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">车辆用途</div> | |||||
<input id="AIVehicleUse" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">车牌号</div> | |||||
<input id="AIPlateNumber" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">车架号</div> | |||||
<input id="AIFrameNumber" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">使用性质</div> | |||||
<input id="AINatureOfUse" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">发动机号</div> | |||||
<input id="EngineNumber" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">会计凭证号</div> | |||||
<input id="AIAccountCertificate" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">排气量</div> | |||||
<input id="DischargeVolume" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">建筑面积</div> | |||||
<input id="AIBuiltArea" type="text" class="form-control" /> | |||||
</div>*@ | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Form.js") | @Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Form.js") |
@@ -15,7 +15,26 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
$('#AIIsInStorage').lrDataItemSelect({ | $('#AIIsInStorage').lrDataItemSelect({ | ||||
code: 'YesOrNoBit', select: function (val) { | code: 'YesOrNoBit', select: function (val) { | ||||
if (val) { | if (val) { | ||||
@@ -12,25 +12,23 @@ | |||||
} | } | ||||
</style> | </style> | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem" style="display: none"> | |||||
<div class="lr-form-item-title">明细编号<font face="宋体">*</font></div> | <div class="lr-form-item-title">明细编号<font face="宋体">*</font></div> | ||||
<input id="AICode" hidden="hidden" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="AICode" hidden="hidden" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<img id="photo" /> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
@*<div class="lr-form-item-title">编号<font face="宋体">*</font></div> | |||||
<input id="AICodeNum" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" />*@ | |||||
</div> | |||||
@*<img id="photo" />*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title" readonly="readonly">金隅资产编号</div> | |||||
<div class="lr-form-item-title" readonly="readonly">资产编号</div> | |||||
<input id="AICodeNumJY" type="text" class="form-control" /> | <input id="AICodeNumJY" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
@*<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div>*@ | |||||
@*<div class="lr-form-item-title">编号<font face="宋体">*</font></div> | |||||
<input id="AICodeNum" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" />*@ | |||||
</div> | </div> | ||||
<img id="photo" /> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产名称</div> | |||||
<div class="lr-form-item-title">名称</div> | |||||
<input id="AIASSName" readonly="readonly" type="text" class="form-control" /> | <input id="AIASSName" readonly="readonly" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
@@ -38,7 +36,7 @@ | |||||
<input id="AIIStoragePosition" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />*@ | <input id="AIIStoragePosition" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />*@ | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">单位组织</div> | |||||
<div class="lr-form-item-title">部门</div> | |||||
<div id="AIDepartment" readonly="readonly"></div> | <div id="AIDepartment" readonly="readonly"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
@@ -56,32 +54,42 @@ | |||||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">序号<font face="宋体">*</font></div> | |||||
<input id="AICodeNum" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div>*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">序号<font face="宋体">*</font></div> | |||||
<input id="AICodeNum" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
<div class="lr-form-item-title">使用人员</div> | |||||
<div id="AIUsePeople" readonly="readonly"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div> | |||||
@*<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div>*@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">所在库位<font face="宋体">*</font></div> | |||||
<input id="AIIStoragePosition" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="lr-form-item-title">楼宇名称<font face="宋体">*</font></div> | |||||
<div id="AIIStorageId" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">使用人员</div> | |||||
<div id="AIUsePeople" readonly="readonly"></div> | |||||
<div class="lr-form-item-title">房间号<font face="宋体">*</font></div> | |||||
<div id="AIIStoragePosition" readonly="readonly" isvalid="yes" checkexpession="NotNull"></div> | |||||
@*<input id="AIIStoragePosition" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />*@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产型号</div> | <div class="lr-form-item-title">资产型号</div> | ||||
<input id="AISpecificationtype" readonly="readonly" type="text" class="form-control" /> | <input id="AISpecificationtype" readonly="readonly" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">资产属性</div> | |||||
<div id="AIAssType" readonly="readonly" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">计量单位</div> | <div class="lr-form-item-title">计量单位</div> | ||||
<div id="AIUnits" readonly="readonly" class="form-control" ></div> | |||||
<div id="AIUnits" readonly="readonly" class="form-control"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产原值</div> | |||||
<div class="lr-form-item-title">资产价值</div> | |||||
<input id="AIAssValue" readonly="readonly" type="text" class="form-control" /> | <input id="AIAssValue" readonly="readonly" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
@@ -101,74 +109,116 @@ | |||||
<div id="AIAddType" readonly="readonly"></div> | <div id="AIAddType" readonly="readonly"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title" readonly="readonly">入账日期</div> | |||||
<input id="AIAccountEntryTime" readonly="readonly" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIAccountEntryTime').trigger('change'); } })" /> | |||||
<div class="lr-form-item-title">生产厂家</div> | |||||
<input id="AIManufacturer" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">资产规格</div> | |||||
<input id="AISpecification" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">用途</div> | |||||
<input id="AIUse" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">行驶发证日期</div> | |||||
<input id="AIVehicleTime" readonly="readonly" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIVehicleTime').trigger('change'); } })" /> | |||||
<div class="lr-form-item-title">采购组织形式</div> | |||||
<input id="ProcurementOrganizationForm" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">品牌</div> | |||||
<input id="AIBrand" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">预算项目编号</div> | |||||
<input id="BudgetItemNo" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">生产厂家</div> | |||||
<input id="AIManufacturer" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">取得方式</div> | |||||
<input id="MethodOfAcquisition" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">取得日期</div> | |||||
<input id="TimeOfAcquisition" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">产品序列号</div> | |||||
<input id="ProjectID" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">销售商</div> | |||||
<input id="Seller" type="text" readonly="readonly" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title" readonly="readonly">合同编号</div> | |||||
<input id="ContractNo" readonly="readonly" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIAccountEntryTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">发票号</div> | |||||
<input id="InvoiceNumber" readonly="readonly" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AIVehicleTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">配置标准分类名称</div> | |||||
<input id="ConfigurationName" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">产权形式</div> | |||||
<input id="AIPropertyRight" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">保修截止日期</div> | |||||
<input id="GuaranteeEndTime" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">建筑结构</div> | |||||
<input id="AIBuildingStructure" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">入账形式</div> | |||||
<input id="EntryForm" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">权属证号</div> | |||||
<input id="AIOwnership" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">价值类型</div> | |||||
<input id="ValueType" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">车辆用途</div> | |||||
<input id="AIVehicleUse" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">财政拨款</div> | |||||
<input id="FinancialAllocation" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">车牌号</div> | |||||
<input id="AIPlateNumber" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">非财政拨款</div> | |||||
<input id="NonFinancialAppropriation" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">车架号</div> | |||||
<input id="AIFrameNumber" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">使用状况</div> | |||||
<input id="Usage" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">使用性质</div> | |||||
<input id="AINatureOfUse" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">投入使用日期</div> | |||||
<input id="DateOfCommissioning" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">发动机号</div> | |||||
<input id="EngineNumber" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">管理部门</div> | |||||
<input id="AdministrativeDepartment" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">会计凭证号</div> | |||||
<input id="AIAccountCertificate" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">折旧状态</div> | |||||
<input id="DepreciationStatus" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">排气量</div> | |||||
<input id="DischargeVolume" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">折旧方法</div> | |||||
<input id="DepreciationMethod" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">建筑面积</div> | |||||
<input id="AIBuiltArea" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">已提折旧月数</div> | |||||
<input id="MonthsOfDepreciation" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">资产规格</div> | |||||
<input id="AISpecification" readonly="readonly" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">累计折旧</div> | |||||
<input id="AccumulatedDepreciation" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">用途</div> | |||||
<input id="AIUse" type="text" readonly="readonly" class="form-control" /> | |||||
<div class="lr-form-item-title">折旧年限</div> | |||||
<input id="UsefulLife" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">月折旧额</div> | |||||
<input id="MonthlyDepreciation" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
<div class="lr-form-item-title">残值率</div> | |||||
<input id="ResidualValueRate" readonly="readonly" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItem"> | ||||
<div class="lr-form-item-title">权属说明</div> | <div class="lr-form-item-title">权属说明</div> | ||||
<textarea id="AIOwnerRemark" readonly="readonly" class="form-control" style="height:100px;"></textarea> | <textarea id="AIOwnerRemark" readonly="readonly" class="form-control" style="height:100px;"></textarea> | ||||
@@ -15,7 +15,26 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
//$('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
$('#AIIsInStorage').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#AIIsInStorage').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#ScrapRemindTime').lrDataItemSelect({ code: 'ScrapRemindTime' }); | $('#ScrapRemindTime').lrDataItemSelect({ code: 'ScrapRemindTime' }); | ||||
$('#AIDepartment').lrselect({ | $('#AIDepartment').lrselect({ | ||||
@@ -29,6 +48,7 @@ var bootstrap = function ($, learun) { | |||||
$('#AIASSClass').lrDataSourceSelect({ code: 'Ass_AssetsType', value: 'atid', text: 'aname' }); | $('#AIASSClass').lrDataSourceSelect({ code: 'Ass_AssetsType', value: 'atid', text: 'aname' }); | ||||
$('#AIASSState').lrDataItemSelect({ code: 'AssState' }); | $('#AIASSState').lrDataItemSelect({ code: 'AssState' }); | ||||
$('#AIAddType').lrDataItemSelect({ code: 'AssAddType' }); | $('#AIAddType').lrDataItemSelect({ code: 'AssAddType' }); | ||||
$('#AIAssType').lrDataItemSelect({ code: 'AssType' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -46,12 +46,12 @@ | |||||
<input id="AIASSName" type="text" class="form-control" /> | <input id="AIASSName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">库房</div> | |||||
<div class="lr-form-item-title">楼宇名称</div> | |||||
<div id="AIIStorageId"></div> | <div id="AIIStorageId"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">库房位置</div> | |||||
<input id="AIIStoragePosition" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="AIIStoragePosition"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">资产状态</div> | <div class="lr-form-item-title">资产状态</div> | ||||
@@ -212,7 +212,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "所在库房", name: "AIIStorageId", width: 100, align: "left", | |||||
label: "楼宇名称", name: "AIIStorageId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
@@ -224,7 +224,19 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "所在库位", name: "AIIStoragePosition", width: 100, align: "left" }, | |||||
{ | |||||
label: "房间号", name: "AIIStoragePosition", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
//{ | //{ | ||||
// label: "报废时间", name: "AIIStoragePosition", width: 100, align: "left", formatter: function (cellvalue, row) { | // label: "报废时间", name: "AIIStoragePosition", width: 100, align: "left", formatter: function (cellvalue, row) { | ||||
@@ -177,7 +177,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "所在库房", name: "AIIStorageId", width: 100, align: "left", | |||||
label: "楼宇名称", name: "AIIStorageId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
@@ -189,7 +189,19 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "所在库位", name: "AIIStoragePosition", width: 100, align: "left" }, | |||||
{ | |||||
label: "房间号", name: "AIIStoragePosition", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
//{ | //{ | ||||
// label: "报废时间", name: "AIIStoragePosition", width: 100, align: "left", formatter: function (cellvalue, row) { | // label: "报废时间", name: "AIIStoragePosition", width: 100, align: "left", formatter: function (cellvalue, row) { | ||||
@@ -77,7 +77,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "所在库房", name: "AIIStorageId", width: 100, align: "left", | |||||
label: "楼宇名称", name: "AIIStorageId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
@@ -89,7 +89,19 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "所在库位", name: "AIIStoragePosition", width: 100, align: "left" }, | |||||
{ | |||||
label: "房间号", name: "AIIStoragePosition", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "资产型号", name: "AISpecificationtype", width: 100, align: "left" | label: "资产型号", name: "AISpecificationtype", width: 100, align: "left" | ||||
}, | }, | ||||
@@ -66,12 +66,12 @@ | |||||
<input id="AAIOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | <input id="AAIOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
<div class="lr-form-item-title">楼宇名称<font face="宋体">*</font></div> | |||||
<div id="AAIStorageId" isvalid="yes" checkexpession="NotNull"></div> | <div id="AAIStorageId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">所在库位</div> | |||||
<input id="AAIStoragePosition" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="AAIStoragePosition" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | <div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | ||||
@@ -100,7 +100,26 @@ var bootstrap = function ($, learun) { | |||||
$('#AAISource').lrDataItemSelect({ code: 'zcly' }); | $('#AAISource').lrDataItemSelect({ code: 'zcly' }); | ||||
$('#AAISupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); | $('#AAISupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); | ||||
$('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); | $('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); | ||||
$('#AAIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
//$('#AAIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
$('#AAIHasDetail').lrDataItemSelect({ | $('#AAIHasDetail').lrDataItemSelect({ | ||||
code: 'YesOrNoBit', select: function (item) { | code: 'YesOrNoBit', select: function (item) { | ||||
if (item != null && item != undefined) { | if (item != null && item != undefined) { | ||||
@@ -67,12 +67,12 @@ | |||||
<input id="AAIOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | <input id="AAIOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">所在库房<font face="宋体">*</font></div> | |||||
<div class="lr-form-item-title">楼宇名称<font face="宋体">*</font></div> | |||||
<div id="AAIStorageId" isvalid="yes" checkexpession="NotNull"></div> | <div id="AAIStorageId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">所在库位</div> | |||||
<input id="AAIStoragePosition" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="AAIStoragePosition" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | <div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | ||||
<div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | <div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | ||||
@@ -96,7 +96,26 @@ var bootstrap = function ($, learun) { | |||||
$('#AAISource').lrDataItemSelect({ code: 'zcly' }); | $('#AAISource').lrDataItemSelect({ code: 'zcly' }); | ||||
$('#AAISupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); | $('#AAISupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); | ||||
$('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); | $('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); | ||||
$('#AAIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
//$('#AAIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#AIIStorageId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AIIStoragePosition').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AIIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); | |||||
$('#AAIHasDetail').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#AAIHasDetail').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#AAIPhoto').lrUploader(); | $('#AAIPhoto').lrUploader(); | ||||
}, | }, | ||||
@@ -89,7 +89,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: '所在库房', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
label: '楼宇名称', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
key: value, | key: value, | ||||
@@ -41,7 +41,7 @@ var bootstrap = function ($, learun) { | |||||
{ label: '资产名称', name: 'aname', width: 150, align: 'left' }, | { label: '资产名称', name: 'aname', width: 150, align: 'left' }, | ||||
{ label: "英文名称", name: "aename", width: 100, align: "left" }, | { label: "英文名称", name: "aename", width: 100, align: "left" }, | ||||
{ | { | ||||
label: '所在库房', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
label: '楼宇名称', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
key: value, | key: value, | ||||
@@ -52,7 +52,20 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: '所在库位', name: 'aiistorageposition', width: 150, align: 'left' }, | |||||
//{ label: '房间号', name: 'aiistorageposition', width: 150, align: 'left' }, | |||||
{ | |||||
label: "房间号", name: "aiistorageposition", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: '是否在库', name: 'aiisinstorage', width: 150, align: 'left', formatter: function (val, row) { | label: '是否在库', name: 'aiisinstorage', width: 150, align: 'left', formatter: function (val, row) { | ||||
if (val) { | if (val) { | ||||
@@ -18,12 +18,12 @@ | |||||
<input id="AAIName" type="text" class="form-control" readonly="readonly" /> | <input id="AAIName" type="text" class="form-control" readonly="readonly" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_InventoryItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_InventoryItemApply"> | ||||
<div class="lr-form-item-title">所在库房</div> | |||||
<div class="lr-form-item-title">楼宇名称</div> | |||||
<div id="AAIStorage" readonly="readonly"></div> | <div id="AAIStorage" readonly="readonly"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_InventoryItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_InventoryItemApply"> | ||||
<div class="lr-form-item-title">所在库位</div> | |||||
<input id="AAILocation" type="text" class="form-control" readonly="readonly" /> | |||||
<div class="lr-form-item-title">房间号</div> | |||||
<div id="AAILocation" readonly="readonly"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_InventoryItemApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_InventoryItemApply"> | ||||
<div class="lr-form-item-title">是否在库</div> | <div class="lr-form-item-title">是否在库</div> | ||||
@@ -41,7 +41,7 @@ var bootstrap = function ($, learun) { | |||||
{ label: '资产名称', name: 'aname', width: 150, align: 'left' }, | { label: '资产名称', name: 'aname', width: 150, align: 'left' }, | ||||
{ label: "英文名称", name: "aename", width: 100, align: "left" }, | { label: "英文名称", name: "aename", width: 100, align: "left" }, | ||||
{ | { | ||||
label: '所在库房', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
label: '楼宇名称', name: 'aiistorageid', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | ||||
key: value, | key: value, | ||||
@@ -52,7 +52,19 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: '所在库位', name: 'aiistorageposition', width: 150, align: 'left' }, | |||||
{ | |||||
label: "房间号", name: "aiistorageposition", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||||
key: value, | |||||
keyId: 'rid', | |||||
callback: function (_data) { | |||||
callback(_data['rcode']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: '是否在库', name: 'aiisinstorage', width: 150, align: 'left', formatter: function (val, row) { | label: '是否在库', name: 'aiisinstorage', width: 150, align: 'left', formatter: function (val, row) { | ||||
if (val) { | if (val) { | ||||
@@ -88,7 +100,7 @@ var bootstrap = function ($, learun) { | |||||
$('#AAIName').val(data.aname); | $('#AAIName').val(data.aname); | ||||
$('#AAIStorage').lrselectSet(data.aiistorageid); | $('#AAIStorage').lrselectSet(data.aiistorageid); | ||||
$('#AAIIsInStorage').lrselectSet(data.aiisinstorage); | $('#AAIIsInStorage').lrselectSet(data.aiisinstorage); | ||||
$('#AAILocation').val(data.aiistorageposition); | |||||
$('#AAILocation').lrselectSet(data.aiistorageposition); | |||||
$('#AAIUnit').lrselectSet(data.aunit); | $('#AAIUnit').lrselectSet(data.aunit); | ||||
$('#AAIEName').val(data.aename); | $('#AAIEName').val(data.aename); | ||||
$('#AAIModel').val(data.amodel); | $('#AAIModel').val(data.amodel); | ||||
@@ -99,7 +111,27 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
isMultiple: false | isMultiple: false | ||||
}); | }); | ||||
$('#AAIStorage').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
//$('#AAIStorage').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||||
$('#AAIStorage').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var storageId = ""; | |||||
if (val) { | |||||
storageId = val.value; | |||||
} | |||||
$('#AAILocation').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||||
text: "RCode", | |||||
value: "RId" | |||||
}); | |||||
} | |||||
}); | |||||
//房间 | |||||
$('#AAILocation').lrselect({ value: 'RId', text: 'RCode' }); | |||||
$('#AAIIsInStorage').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#AAIIsInStorage').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); | $('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); | ||||
}, | }, | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.AssetManagementSystem; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-05-11 14:32 | |||||
/// 描 述:库房的房间号 | |||||
/// </summary> | |||||
public class Ass_Storage_RoomMap : EntityTypeConfiguration<Ass_Storage_RoomEntity> | |||||
{ | |||||
public Ass_Storage_RoomMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("ASS_STORAGE_ROOM"); | |||||
//主键 | |||||
this.HasKey(t => t.RId); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,189 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-05-11 14:32 | |||||
/// 描 述:库房的房间号 | |||||
/// </summary> | |||||
public class AssStorageRoomBLL : AssStorageRoomIBLL | |||||
{ | |||||
private AssStorageRoomService assStorageRoomService = new AssStorageRoomService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Ass_Storage_RoomEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return assStorageRoomService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Ass_Storage_Room表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Ass_Storage_RoomEntity GetAss_Storage_RoomEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return assStorageRoomService.GetAss_Storage_RoomEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取左侧树形数据 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public List<TreeModel> GetTree() | |||||
{ | |||||
try | |||||
{ | |||||
DataTable list = assStorageRoomService.GetSqlTree(); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (DataRow item in list.Rows) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id = item["SId"].ToString(), | |||||
text = item["SName"].ToString(), | |||||
value = item["SId"].ToString(), | |||||
showcheck = false, | |||||
checkstate = 0, | |||||
isexpand = true, | |||||
parentId = "0" | |||||
}; | |||||
treeList.Add(node); | |||||
} | |||||
return treeList.ToTree(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 根据库房Id获取房间号 | |||||
/// </summary> | |||||
/// <param name="storageId"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Ass_Storage_RoomEntity> GetListForStorageId(string storageId) | |||||
{ | |||||
try | |||||
{ | |||||
return assStorageRoomService.GetListForStorageId(storageId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
assStorageRoomService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Ass_Storage_RoomEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
assStorageRoomService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,59 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-05-11 14:32 | |||||
/// 描 述:库房的房间号 | |||||
/// </summary> | |||||
public interface AssStorageRoomIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Ass_Storage_RoomEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Ass_Storage_Room表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Ass_Storage_RoomEntity GetAss_Storage_RoomEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取左侧树结构 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
List<TreeModel> GetTree(); | |||||
/// <summary> | |||||
/// 获取房间号 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
IEnumerable<Ass_Storage_RoomEntity> GetListForStorageId(string storageId); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Ass_Storage_RoomEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,214 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-05-11 14:32 | |||||
/// 描 述:库房的房间号 | |||||
/// </summary> | |||||
public class AssStorageRoomService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Ass_Storage_RoomEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.RId, | |||||
t.RName, | |||||
t.RCode, | |||||
t.RFunction, | |||||
t.RArea, | |||||
t.REnabled, | |||||
t.StorageId | |||||
"); | |||||
strSql.Append(" FROM Ass_Storage_Room t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["RName"].IsEmpty()) | |||||
{ | |||||
dp.Add("RName", "%" + queryParam["RName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.RName Like @RName "); | |||||
} | |||||
if (!queryParam["RCode"].IsEmpty()) | |||||
{ | |||||
dp.Add("RCode", "%" + queryParam["RCode"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.RCode Like @RCode "); | |||||
} | |||||
if (!queryParam["StorageId"].IsEmpty()) | |||||
{ | |||||
dp.Add("StorageId",queryParam["StorageId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.StorageId = @StorageId "); | |||||
} | |||||
return this.BaseRepository().FindList<Ass_Storage_RoomEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Ass_Storage_Room表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Ass_Storage_RoomEntity GetAss_Storage_RoomEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository().FindEntity<Ass_Storage_RoomEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public DataTable GetSqlTree() | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository().FindTable(" select * from Ass_Storage where SIsEnabled=1 "); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取房间号 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Ass_Storage_RoomEntity> GetListForStorageId(string storageId) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"select RId,RName,RCode from Ass_Storage_Room where renabled=1 and StorageId='{storageId}'"; | |||||
return this.BaseRepository().FindList<Ass_Storage_RoomEntity>(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository().Delete<Ass_Storage_RoomEntity>(t=>t.RId == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, Ass_Storage_RoomEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository().Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,75 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-05-11 14:32 | |||||
/// 描 述:库房的房间号 | |||||
/// </summary> | |||||
public class Ass_Storage_RoomEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// RId | |||||
/// </summary> | |||||
[Column("RID")] | |||||
public string RId { get; set; } | |||||
/// <summary> | |||||
/// StorageId | |||||
/// </summary> | |||||
[Column("STORAGEID")] | |||||
public string StorageId { get; set; } | |||||
/// <summary> | |||||
/// RName | |||||
/// </summary> | |||||
[Column("RNAME")] | |||||
public string RName { get; set; } | |||||
/// <summary> | |||||
/// RCode | |||||
/// </summary> | |||||
[Column("RCODE")] | |||||
public string RCode { get; set; } | |||||
/// <summary> | |||||
/// RFunction | |||||
/// </summary> | |||||
[Column("RFUNCTION")] | |||||
public string RFunction { get; set; } | |||||
/// <summary> | |||||
/// RArea | |||||
/// </summary> | |||||
[Column("RAREA")] | |||||
public string RArea { get; set; } | |||||
/// <summary> | |||||
/// REnabled | |||||
/// </summary> | |||||
[Column("RENABLED")] | |||||
public bool? REnabled { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.RId = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.RId = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||