@@ -184,11 +184,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <summary> | /// <summary> | ||||
/// ispl:是否批量调拨 | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpPost] | [HttpPost] | ||||
[ValidateAntiForgeryToken] | [ValidateAntiForgeryToken] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveForm(string keyValue, string strEntity, string strass_AssetsOutItemApplyList) | |||||
public ActionResult SaveForm(string keyValue, string strEntity, string strass_AssetsOutItemApplyList, bool ispl = false) | |||||
{ | { | ||||
Ass_AssetsOutApplyEntity entity = strEntity.ToObject<Ass_AssetsOutApplyEntity>(); | Ass_AssetsOutApplyEntity entity = strEntity.ToObject<Ass_AssetsOutApplyEntity>(); | ||||
if (string.IsNullOrEmpty(keyValue)) | if (string.IsNullOrEmpty(keyValue)) | ||||
@@ -198,6 +199,16 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
entity.AOCreateTime = DateTime.Now; | entity.AOCreateTime = DateTime.Now; | ||||
} | } | ||||
List<Ass_AssetsOutItemApplyEntity> ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject<List<Ass_AssetsOutItemApplyEntity>>(); | List<Ass_AssetsOutItemApplyEntity> ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject<List<Ass_AssetsOutItemApplyEntity>>(); | ||||
if (ispl) | |||||
{ | |||||
foreach (var item in ass_AssetsOutItemApplyList) | |||||
{ | |||||
item.AOINewUsePeople = entity.AOINewUsePeople; | |||||
item.AOINewRoomId = entity.AOINewRoomId; | |||||
item.AOINewDepartment = entity.AOINewDepartment; | |||||
item.AOINewStorageId = entity.AOINewStorageId; | |||||
} | |||||
} | |||||
ass_AssetsOutApplyIBLL.SaveEntity(keyValue, entity, ass_AssetsOutItemApplyList); | ass_AssetsOutApplyIBLL.SaveEntity(keyValue, entity, ass_AssetsOutItemApplyList); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -111,11 +111,17 @@ var bootstrap = function ($, learun) { | |||||
// label: '资产型号', name: 'AAIModel', width: 100, 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) { | 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); | |||||
} | |||||
}); | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -52,7 +52,7 @@ | |||||
<div id="AOINewRoomId" isvalid="yes" checkexpession="NotNull"></div> | <div id="AOINewRoomId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | ||||
<div class="lr-form-item-title">项目名称</div> | |||||
<div class="lr-form-item-title">调拨名称</div> | |||||
<input id="AOProjectName" type="text" class="form-control" /> | <input id="AOProjectName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
@@ -340,6 +340,7 @@ var bootstrap = function ($, learun) { | |||||
formData.AOReasonType = 3; | formData.AOReasonType = 3; | ||||
postData.strEntity = JSON.stringify(formData); | postData.strEntity = JSON.stringify(formData); | ||||
postData.strass_AssetsOutItemApplyList = JSON.stringify($('#Ass_AssetsOutItemApply').jfGridGet('rowdatas')); | postData.strass_AssetsOutItemApplyList = JSON.stringify($('#Ass_AssetsOutItemApply').jfGridGet('rowdatas')); | ||||
postData.ispl = true; | |||||
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/SaveForm?keyValue=' + keyValue, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/SaveForm?keyValue=' + keyValue, postData, function (res) { | ||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
@@ -52,7 +52,7 @@ | |||||
<div id="AOINewRoomId" isvalid="yes" checkexpession="NotNull"></div> | <div id="AOINewRoomId" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | ||||
<div class="lr-form-item-title">项目名称</div> | |||||
<div class="lr-form-item-title">调拨名称</div> | |||||
<input id="AOProjectName" type="text" class="form-control" /> | <input id="AOProjectName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
@@ -196,7 +196,7 @@ var bootstrap = function ($, learun) { | |||||
// }); | // }); | ||||
// } | // } | ||||
//}, | //}, | ||||
{ label: "项目名称", name: "AOProjectName", width: 150, align: "left" }, | |||||
{ label: "调拨名称", name: "AOProjectName", width: 150, align: "left" }, | |||||
{ label: "申请时间", name: "AOCreateTime", width: 150, align: "left" }, | { label: "申请时间", name: "AOCreateTime", width: 150, align: "left" }, | ||||
{ | { | ||||
label: "申请人", name: "AOCreateUserId", width: 100, align: "left", | label: "申请人", name: "AOCreateUserId", width: 100, align: "left", | ||||
@@ -36,7 +36,7 @@ | |||||
<input id="AOCreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | <input id="AOCreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | ||||
<div class="lr-form-item-title">项目名称</div> | |||||
<div class="lr-form-item-title">调拨名称</div> | |||||
<input id="AOProjectName" type="text" class="form-control" /> | <input id="AOProjectName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
@@ -28,7 +28,7 @@ | |||||
<input id="AOCreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | <input id="AOCreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | <div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | ||||
<div class="lr-form-item-title">项目名称</div> | |||||
<div class="lr-form-item-title">调拨名称</div> | |||||
<input id="AOProjectName" type="text" class="form-control" /> | <input id="AOProjectName" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
@@ -196,7 +196,7 @@ var bootstrap = function ($, learun) { | |||||
// }); | // }); | ||||
// } | // } | ||||
//}, | //}, | ||||
{ label: "项目名称", name: "AOProjectName", width: 150, align: "left" }, | |||||
{ label: "调拨名称", name: "AOProjectName", width: 150, align: "left" }, | |||||
{ label: "申请时间", name: "AOCreateTime", width: 150, align: "left" }, | { label: "申请时间", name: "AOCreateTime", width: 150, align: "left" }, | ||||
{ | { | ||||
label: "申请人", name: "AOCreateUserId", width: 100, align: "left", | label: "申请人", name: "AOCreateUserId", width: 100, align: "left", | ||||
@@ -7397,6 +7397,7 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\FormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\FormView.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ProjectManage\Index1.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\ProjectManage\Index1.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\IndexData1.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\IndexData1.cshtml" /> | ||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | ||||
@@ -209,14 +209,13 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
foreach (Ass_AssetsOutItemApplyEntity item in ass_AssetsOutItemApplyList) | foreach (Ass_AssetsOutItemApplyEntity item in ass_AssetsOutItemApplyList) | ||||
{ | { | ||||
allPrice += item.AOIPrice.ToDecimal(); | allPrice += item.AOIPrice.ToDecimal(); | ||||
item.Create(); | item.Create(); | ||||
item.AOId = ass_AssetsOutApplyEntityTmp.AOId; | item.AOId = ass_AssetsOutApplyEntityTmp.AOId; | ||||
item.AOINewUsePeople = entity.AOINewUsePeople; | |||||
item.AOINewRoomId = entity.AOINewRoomId; | |||||
item.AOINewDepartment = entity.AOINewDepartment; | |||||
item.AOINewStorageId = entity.AOINewStorageId; | |||||
//item.AOINewUsePeople = entity.AOINewUsePeople; | |||||
//item.AOINewRoomId = entity.AOINewRoomId; | |||||
//item.AOINewDepartment = entity.AOINewDepartment; | |||||
//item.AOINewStorageId = entity.AOINewStorageId; | |||||
db.Insert(item); | db.Insert(item); | ||||
} | } | ||||
entity.AOPrice = allPrice; | entity.AOPrice = allPrice; | ||||
@@ -230,10 +229,10 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
item.Create(); | item.Create(); | ||||
allPrice += item.AOIPrice.ToDecimal(); | allPrice += item.AOIPrice.ToDecimal(); | ||||
item.AOId = entity.AOId; | item.AOId = entity.AOId; | ||||
item.AOINewUsePeople = entity.AOINewUsePeople; | |||||
item.AOINewRoomId = entity.AOINewRoomId; | |||||
item.AOINewDepartment = entity.AOINewDepartment; | |||||
item.AOINewStorageId = entity.AOINewStorageId; | |||||
//item.AOINewUsePeople = entity.AOINewUsePeople; | |||||
//item.AOINewRoomId = entity.AOINewRoomId; | |||||
//item.AOINewDepartment = entity.AOINewDepartment; | |||||
//item.AOINewStorageId = entity.AOINewStorageId; | |||||
db.Insert(item); | db.Insert(item); | ||||
} | } | ||||
entity.AOPrice = allPrice; | entity.AOPrice = allPrice; | ||||