From 956a7e11c0b4fc66a62d3554621efcafd622ae87 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 9 Aug 2021 15:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B5=84=E4=BA=A7=E6=88=BF?= =?UTF-8?q?=E9=97=B4=E5=8F=B7=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Ass_Acceptance/Form.js | 13 ++-- .../Ass_AssetsOutApply/AssetsFormView.js | 3 + .../Views/Ass_AssetsOutApply/FormView.js | 71 +++++++++++++++++-- .../Views/Ass_AssetsOutItemApply/Form.js | 36 ++++++---- .../Ass_Storage_Room/AssStorageRoomService.cs | 7 +- 5 files changed, 105 insertions(+), 25 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js index e3c4d283c..2c86d52c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js @@ -122,15 +122,18 @@ var bootstrap = function ($, learun) { { label: '设备名称', name: 'AAIName', width: 150, align: 'left' }, - //{ - // label: '资产型号', name: 'AAIModel', width: 100, align: 'left' - //}, { - label: '规格型号', name: 'AAISpecification', width: 100, align: 'left' + label: '规格型号', name: 'AAIModel', width: 100, align: 'left' }, { label: '单位', name: 'AAIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { - + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sldw', + callback: function (_data) { + callback(_data.text); + } + }); } }, { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js index bf52c3c9b..93bba97e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js @@ -136,6 +136,9 @@ var bootstrap = function ($, learun) { { label: '规格型号', name: 'AOIModel ', width: 150, align: 'left' }, + //{ + // label: '数量', name: 'AOIStock', width: 80, align: 'left' + //}, { label: "调出部门", name: "AOIOldDepartment", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js index 8ccaa2477..64717dc5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js @@ -63,13 +63,13 @@ var bootstrap = function ($, learun) { label: '资产名称', name: 'AOIName', width: 150, align: 'left' }, { - label: '规格型号', name: 'AOISpecification', width: 100, align: 'left' + label: '规格型号', name: 'AOIModel', width: 150, align: 'left' }, //{ - // label: '数量', name: 'AOIStock', width: 80, align: 'left' + // label: '数量', name: 'AOIStock', width: 80, align: 'left' //}, { - label: "调出部门", name: "AOIOldDepartment", width: 100, align: "left", + label: "调出部门", name: "AOIOldDepartment", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', @@ -154,7 +154,70 @@ var bootstrap = function ($, learun) { }, { label: '备注', name: 'AOIContent', width: 150, align: 'left' - } + }, + + //{ + // label: '资产类别', name: 'AOITId', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', + // key: value, + // keyId: 'atid', + // callback: function (_data) { + // callback(_data['aname']); + // } + // }); + // } + //}, + //{ + // label: '单价', name: 'AOIPrice', width: 100, align: 'left' + //}, + + //{ + // label: '单位', name: 'AOIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'sldw', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + // } + //}, + //{ + // label: "使用人", name: "AOIUserPeople", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + // key: value, + // keyId: 'f_userid', + // callback: function (_data) { + // callback(_data['f_realname']); + // } + // }); + // } + //}, + //{ + // label: "新使用人", name: "AOINewUsePeople", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + // key: value, + // keyId: 'f_userid', + // callback: function (_data) { + // callback(_data['f_realname']); + // } + // }); + // } + //}, + //{ + // label: '资产型号', name: 'AOIModel', width: 100, align: 'left' + //}, + //{ + // label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' + //}, + //{ + // label: '用途', name: 'AOIUse', width: 100, align: 'left' + //}, ], height: 400, mainId: 'AOIId', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.js index 90b8dec14..db61791c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutItemApply/Form.js @@ -42,20 +42,25 @@ var bootstrap = function ($, learun) { allowSearch: true, url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', param: {}, - select: function (val) { - var storageId = ""; - if (val) { - storageId = val.value; - } - $('#AOIRoomId').lrselectRefresh({ - url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, - text: "RCode", - value: "RId", allowSearch: true - }); - } + //select: function (val) { + // var storageId = ""; + // if (val) { + // storageId = val.value; + // } + // $('#AOIRoomId').lrselectRefresh({ + // url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, + // text: "RCode", + // value: "RId", allowSearch: true + // }); + //} }); //原房间 - $('#AOIRoomId').lrselect({ value: 'RId', text: 'RCode', allowSearch: true }); + $('#AOIRoomId').lrselect({ + url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId', + text: "RCode", + value: "RId", allowSearch: true + }); + //$('#AOIRoomId').lrselect({ value: 'RId', text: 'RCode', allowSearch: true }); //新楼宇 $('#AOINewStorageId').lrselect({ type: 'tree', @@ -95,7 +100,7 @@ var bootstrap = function ($, learun) { }); $('#AOINewUsePeople').lrselect({ value: 'F_UserId', text: 'F_RealName' }); - + $("#AAOldCode").on('click', function () { learun.layerFormForPercent({ id: 'formitem_AAOldCode', @@ -214,14 +219,15 @@ var bootstrap = function ($, learun) { } }); $('#form').lrSetFormData(selectedRow); - // $('#AAOldCode').find('span').text(selectedRow.AOIName); + // $('#AAOldCode').find('span').text(selectedRow.AOIName); } } } }; refreshGirdData = function (temprow) { - learun.layerClose('formitem_AAOldCode',''); + learun.layerClose('formitem_AAOldCode', ''); var data = temprow[0]; + $('#AOITId').lrselectSet(data.AIASSClass); $('#AOICode').val(data.AICodeNumJY); $('#AOIName').val(data.AIASSName); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Storage_Room/AssStorageRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Storage_Room/AssStorageRoomService.cs index 70d0fedc3..cd3e7256a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Storage_Room/AssStorageRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Storage_Room/AssStorageRoomService.cs @@ -143,7 +143,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - string sql = $"select RId,RCode+'('+RFunction+')' as RCode from Ass_Storage_Room where StorageId='{storageId}'"; + string sql = $"select RId,RCode+'('+RFunction+')' as RCode from Ass_Storage_Room"; + + if (!string.IsNullOrEmpty(storageId)) + { + sql += $" where StorageId='{storageId}'"; + } sql += " order by RCode"; return this.BaseRepository().FindList(sql); }