diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemApplyController.cs index d24464c39..78d71de36 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemApplyController.cs @@ -48,6 +48,16 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { return View(); } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormJY() + { + return View(); + } + /// /// 采购表单页 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Form.js index 59353a542..89c6cb2e5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Form.js @@ -148,7 +148,17 @@ var bootstrap = function ($, learun) { } }, { - label: '库位', name: 'AAIStoragePosition', width: 100, align: 'left' + label: '库位', name: 'AAIStoragePosition', 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['rname']); + } + }); + } }, { label: '英文名称', name: 'AAIEName', width: 100, align: 'left' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJY.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJY.js index 8afbed9c4..2792c1203 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJY.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJY.js @@ -32,7 +32,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'formitem', title: '新增明细', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/Form', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/FormJY', width: 860, height: 600, callBack: function (id) { @@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'formitem', title: '编辑明细', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/Form?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/FormJY?keyValue=' + keyValue, width: 860, height: 600, callBack: function (id) { @@ -94,7 +94,7 @@ var bootstrap = function ($, learun) { $('#Ass_AssetsInfoItemApply').jfGrid({ headData: [ { - label: '资产编号', name: 'AAICode', width: 150, align: 'left' + label: '采购临时编号', name: 'AAICode', width: 150, align: 'left' }, { label: '资产名称', name: 'AAIName', width: 150, align: 'left' @@ -157,7 +157,17 @@ var bootstrap = function ($, learun) { } }, { - label: '库位', name: 'AAIStoragePosition', width: 100, align: 'left' + label: '库位', name: 'AAIStoragePosition', 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['rname']); + } + }); + } }, { label: '英文名称', name: 'AAIEName', width: 100, align: 'left' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJYHC.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJYHC.js index 7db342604..a58e82c9a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJYHC.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormJYHC.js @@ -157,7 +157,17 @@ var bootstrap = function ($, learun) { } }, { - label: '库位', name: 'AAIStoragePosition', width: 100, align: 'left' + label: '库位', name: 'AAIStoragePosition', 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['rname']); + } + }); + } }, { label: '英文名称', name: 'AAIEName', width: 100, align: 'left' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormViewJY.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormViewJY.js index f65f27180..d4eff5243 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormViewJY.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/FormViewJY.js @@ -148,7 +148,17 @@ var bootstrap = function ($, learun) { } }, { - label: '库位', name: 'AAIStoragePosition', width: 100, align: 'left' + label: '库位', name: 'AAIStoragePosition', 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['rname']); + } + }); + } }, { label: '英文名称', name: 'AAIEName', width: 100, align: 'left' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/IndexJY.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/IndexJY.js index dec2a3205..a0290834b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/IndexJY.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/IndexJY.js @@ -58,7 +58,7 @@ var bootstrap = function ($, learun) { title: '新增', url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/FormJY', width: 1000, - height: 700, + height: 800, callBack: function (id) { var res = false; // 验证数据 @@ -91,7 +91,7 @@ var bootstrap = function ($, learun) { title: '采购编辑', url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/FormJY?keyValue=' + keyValue, width: 1000, - height: 700, + height: 800, callBack: function (id) { var res = false; // 验证数据 @@ -111,7 +111,7 @@ var bootstrap = function ($, learun) { title: '编辑', url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/FormJY?keyValue=' + keyValue, width: 1000, - height: 700, + height: 800, callBack: function (id) { var res = false; // 验证数据 @@ -138,7 +138,7 @@ var bootstrap = function ($, learun) { title: '查看采购申请', url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/FormViewJY?keyValue=' + keyValue, width: 1000, - height: 600, + height: 700, btn: null }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.cshtml new file mode 100644 index 000000000..15eaf9421 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.cshtml @@ -0,0 +1,89 @@ +@{ + ViewBag.Title = "入库申请明细"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +@Html.AppendCssFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.css") +@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js") +
+
+
选择已登记资产*
+
+
+
+
资产类别*
+
+
+
+
采购临时编号*
+ +
+
+
资产名称*
+ +
+
+
英文名称
+ +
+
+
资产型号
+ +
+
+
生产厂家
+ +
+
+
资产规格
+ +
+
+
用途
+ +
+
+
资产来源
+
+
+
+
供应商
+
+
+
+
单价*
+ +
+
+
数量*
+ +
+
+
数量单位
+
+
+
+
排序*
+ +
+
+
楼宇名称*
+
+
+
+
房间号
+
+
+
+
生成明细*
+
+
+
+
入库照片
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.js new file mode 100644 index 000000000..4423a23fe --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJY.js @@ -0,0 +1,165 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-03-26 11:41 + * 描 述:入库申请明细 + */ +var acceptClick; +var keyValue = request('keyValue'); +var selectedRow; +var bootstrap = function ($, learun) { + "use strict"; + selectedRow = top["layer_formAss_AssetsInfoApply"].selectedRow; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#AAIAssType').lrDataItemSelect({ code: 'AssType' }); + $('#AAITId').lrselect({ + type: 'tree', + // 展开最大高度 + maxHeight: 200, + // 是否允许搜索 + allowSearch: true, + // 访问数据接口地址 + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree' + }); + $("#AAOldCode").lrlayerselect({ + treeUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree', + treeParentId: 'atptid', + treeValueId: 'atid', + treeTextId: 'aname', + dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetList', + dataTreeId: 'ATId', + dataValueId: 'AId', + dataTextId: 'AName', + + grid: [ + //{ label: '资产编号', name: 'ACode', width: 200, align: 'left' }, + { label: '资产名称', name: 'AName', width: 200, align: 'left' }, + { label: "英文名称", name: "AEName", width: 200, align: "left" }, + { label: "资产型号", name: "AModel", width: 200, align: "left" }, + { label: "生产厂家", name: "AManufacturer", width: 200, align: "left" }, + { + label: "供应商", name: "ASupplierId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + } + ], + select: function (values, texts) { + if (values && values.length > 0) { + //绑定 + //$("#AAITId").attr("readonly", "readonly"); + //$("#AAICode").attr("readonly", "readonly"); + //$("#AAIName").attr("readonly", "readonly"); + //$("#AAIUnit").attr("readonly", "readonly"); + //$("#AAIHasDetail").attr("readonly", "readonly"); + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { + data = data.Ass_AssetsInfo; + $('#AAITId').lrselectSet(data.ATId); + $('#AAICode').val(data.ACode); + $('#AAIName').val(data.AName); + $('#AAIUnit').lrselectSet(data.AUnit); + $('#AAIHasDetail').lrselectSet(data.HasDetail); + $('#AAIEName').val(data.AEName); + $('#AAIModel').val(data.AModel); + $('#AAIManufacturer').val(data.AManufacturer); + $('#AAISpecification').val(data.ASpecification); + }); + } + }, + unknowselect: function () { + $("#AAOldCode").find('span').text(""); + //$("#AAITId").removeAttr("readonly"); + //$("#AAICode").removeAttr("readonly"); + //$("#AAIName").removeAttr("readonly"); + //$("#AAIUnit").removeAttr("readonly"); + //$("#AAIHasDetail").removeAttr("readonly"); + $('#AAITId').lrselectSet(""); + $('#AAICode').val(""); + $('#AAIName').val(""); + $('#AAIUnit').lrselectSet(""); + $('#AAIHasDetail').lrselectSet(""); + $('#AAIEName').val(""); + $('#AAIModel').val(""); + $('#AAIManufacturer').val(""); + $('#AAISpecification').val(""); + }, + isMultiple: false + }); + $('#AAISource').lrDataItemSelect({ code: 'zcly' }); + $('#AAISupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); + $('#AAIUnit').lrDataItemSelect({ code: 'sldw' }); + //$('#AAIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#AAIStorageId').lrselect({ + type: 'tree', + allowSearch: true, + url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', + param: {}, + select: function (val) { + var storageId = ""; + if (val) { + storageId = val.value; + } + $('#AAIStoragePosition').lrselectRefresh({ + url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, + text: "RCode", + value: "RId" + }); + } + }); + //房间 + $('#AAIStoragePosition').lrselect({ value: 'RId', text: 'RCode' }); + $('#AAIHasDetail').lrDataItemSelect({ + code: 'YesOrNoBit', select: function (item) { + if (item != null && item != undefined) { + if (item.id === true || item.id === "true") { + $("#AAIStock").attr("checkexpession", "PositiveInteger"); + } else { + $("#AAIStock").attr("checkexpession", "PositiveFloatint"); + } + } + } + }); + $('#AAIPhoto').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + $("#AAOldCode").find('span').text(selectedRow.AAIName); + } + } + + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = $('body').lrGetFormData(); + if (!!keyValue) { + if (!!selectedRow) { + postData.AAIId = selectedRow.AAIId; + } + } else { + postData.AAIId = learun.newGuid(); + } + if (!!callBack) { + callBack(postData); + return true; + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJYHC.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJYHC.js index 9d1e1766b..4652724a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJYHC.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/FormJYHC.js @@ -38,7 +38,7 @@ var bootstrap = function ($, learun) { dataTextId: 'AName', grid: [ - { label: '耗材编号', name: 'ACode', width: 200, align: 'left' }, + //{ label: '耗材编号', name: 'ACode', width: 200, align: 'left' }, { label: '耗材名称', name: 'AName', width: 200, align: 'left' }, { label: "英文名称", name: "AEName", width: 200, align: "left" }, { label: "耗材型号", name: "AModel", width: 200, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index e91548038..6a45e969e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -872,6 +872,7 @@ + @@ -7347,6 +7348,7 @@ +