@@ -60,6 +60,17 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
ViewBag.AOCode = "CKSQ_" + CommonHelper.CreateNo(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 资产调拨多选页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AssetsFormView() | |||
{ | |||
ViewBag.AOCode = "CKSQ_" + CommonHelper.CreateNo(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 资产调拨多选页面 | |||
/// <summary> | |||
@@ -133,29 +133,23 @@ var bootstrap = function ($, learun) { | |||
$('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#Ass_Acceptance').jfGrid({ | |||
headData: [ | |||
//{ | |||
// label: '资产编号', name: 'AAICode', width: 150, align: 'left' | |||
//}, | |||
{ | |||
label: '资产编号', name: 'AAICode', width: 150, align: 'left' | |||
label: '设备名称', name: 'AAIName', width: 150, align: 'left' | |||
}, | |||
//{ | |||
// label: '资产型号', name: 'AAIModel', width: 100, align: 'left' | |||
//}, | |||
{ | |||
label: '资产名称', name: 'AAIName', width: 150, align: 'left' | |||
label: '规格型号', name: 'AAISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产类别', name: 'AAITId', 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: 'AAISource', width: 100, 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: 'zcly', | |||
code: 'sldw', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
@@ -163,79 +157,123 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: '单价', name: 'AAIPrice', width: 100, align: 'left' | |||
label: '数量', name: 'AAIStock', width: 80, align: 'left' | |||
}, | |||
{ | |||
label: '数量', name: 'AAIStock', width: 80, align: 'left' | |||
label: '单价(元)', name: 'AAIPrice', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '单位', name: 'AAIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
label: '总价(元)', name: 'AAITId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
callback(row.AAIPrice * row.AAIStock); | |||
} | |||
}, { | |||
label: '使用部门', name: 'AAIUseDeptId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
code: 'sldw', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '生成资产明细', name: 'AAIHasDetail', width: 80, align: 'left', formatter: function (cellvalue) { | |||
return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
{ | |||
label: '库房', name: 'AAIStorageId', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
}, { | |||
label: '放置地点', name: 'AAIStorageId', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
content += _data['sname']; | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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, | |||
key: row.AAIStoragePosition, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
callback(_data['rname']); | |||
content += _data['rname']; | |||
} | |||
}); | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: '英文名称', name: 'AAIEName', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产型号', name: 'AAIModel', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '生产厂家', name: 'AAIManufacturer', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产规格', name: 'AAISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '用途', name: 'AAIUse', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '供应商', name: 'AAISupplierId', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
label: '使用人', name: 'AAIUseUserId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'sid', | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
} | |||
}, { | |||
label: '备注', name: 'ARemark', width: 180, align: 'left' | |||
}, | |||
//{ | |||
// label: '资产类别', name: 'AAITId', 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: 'AAISource', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'zcly', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
//{ | |||
// label: '生成资产明细', name: 'AAIHasDetail', width: 80, align: 'left', formatter: function (cellvalue) { | |||
// return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
// } | |||
//}, | |||
//{ | |||
// label: '英文名称', name: 'AAIEName', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '资产型号', name: 'AAIModel', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '生产厂家', name: 'AAIManufacturer', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '资产规格', name: 'AAISpecification', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '用途', name: 'AAIUse', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '供应商', name: 'AAISupplierId', 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']); | |||
// } | |||
// }); | |||
// } | |||
//} | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
@@ -303,7 +341,7 @@ var bootstrap = function ($, learun) { | |||
// }); | |||
//var ifnewrow = true; | |||
$.each(tempdatra, function (key, val) { | |||
if (tempdatra[key].AAICode === temprow.AAICode) { | |||
tempdatra[key] = temprow; | |||
@@ -5,11 +5,11 @@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_Acceptance"> | |||
<div class="lr-form-item-title">资产编号</div> | |||
<input id="AAICode" type="text" class="form-control"/> | |||
<input id="AAICode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_Acceptance"> | |||
<div class="lr-form-item-title">资产名称<font face="宋体">*</font></div> | |||
<input id="AAIName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||
<input id="AAIName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_Acceptance"> | |||
<div class="lr-form-item-title">资产类别<font face="宋体">*</font></div> | |||
@@ -37,12 +37,20 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_Acceptance"> | |||
<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 class="col-xs-6 lr-form-item" data-table="Ass_Acceptance"> | |||
<div class="lr-form-item-title">库位</div> | |||
<div id="AAIStoragePosition"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">使用部门<font face="宋体">*</font></div> | |||
<div id="AAIUseDeptId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">使用人<font face="宋体">*</font></div> | |||
<div id="AAIUseUserId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_Acceptance"> | |||
<div class="lr-form-item-title">英文名称</div> | |||
<input id="AAIEName" type="text" class="form-control" /> | |||
@@ -67,5 +75,9 @@ | |||
<div class="lr-form-item-title">供应商</div> | |||
<div id="AAISupplierId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="ARemark" class="form-control" rows="3"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.js") |
@@ -66,7 +66,25 @@ var bootstrap = function ($, learun) { | |||
// $('#TotalPrice').val(stock * price); | |||
//}) | |||
$('#AAIUseUserId').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true, | |||
}); | |||
$('#AAIUseDeptId').lrDepartmentSelect({ | |||
maxHeight: 150 | |||
}).on('change', function () { | |||
var value = $(this).lrselectGet(); | |||
$('#AAIUseUserId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: value } | |||
}); | |||
}); | |||
}, | |||
initData: function () { | |||
@@ -110,28 +110,16 @@ var bootstrap = function ($, learun) { | |||
$('#Ass_Acceptance').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '资产编号', name: 'AAICode', width: 150, align: 'left' | |||
label: '设备名称', name: 'AAIName', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '资产名称', name: 'AAIName', width: 150, align: 'left' | |||
label: '规格型号', name: 'AAISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产类别', name: 'AAITId', 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: 'AAISource', width: 100, 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: 'zcly', | |||
code: 'sldw', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
@@ -139,84 +127,181 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: '单价', name: 'AAIPrice', width: 100, align: 'left' | |||
label: '数量', name: 'AAIStock', width: 80, align: 'left' | |||
}, | |||
{ | |||
label: '数量', name: 'AAIStock', width: 80, align: 'left' | |||
label: '单价(元)', name: 'AAIPrice', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '单位', name: 'AAIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
label: '总价(元)', name: 'AAITId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
callback(row.AAIPrice * row.AAIStock); | |||
} | |||
}, { | |||
label: '使用部门', name: 'AAIUseDeptId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
code: 'sldw', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '生成资产明细', name: 'AAIHasDetail', width: 80, align: 'left', formatter: function (cellvalue) { | |||
return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
{ | |||
label: '库房', name: 'AAIStorageId', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
}, { | |||
label: '放置地点', name: 'AAIStorageId', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
content += _data['sname']; | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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, | |||
key: row.AAIStoragePosition, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
callback(_data['rname']); | |||
content += _data['rname']; | |||
} | |||
}); | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: '英文名称', name: 'AAIEName', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产型号', name: 'AAIModel', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '生产厂家', name: 'AAIManufacturer', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产规格', name: 'AAISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '用途', name: 'AAIUse', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '供应商', name: 'AAISupplierId', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
label: '使用人', name: 'AAIUseUserId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'sid', | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, { | |||
label: '备注', name: 'ARemark', width: 180, align: 'left' | |||
} | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
reloadSelected: false | |||
}); | |||
//$('#Ass_Acceptance').jfGrid({ | |||
// headData: [ | |||
// { | |||
// label: '资产编号', name: 'AAICode', width: 150, align: 'left' | |||
// }, | |||
// { | |||
// label: '资产名称', name: 'AAIName', width: 150, align: 'left' | |||
// }, | |||
// { | |||
// label: '资产类别', name: 'AAITId', 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: 'AAISource', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'zcly', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
// } | |||
// }, | |||
// { | |||
// label: '单价', name: 'AAIPrice', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '数量', name: 'AAIStock', width: 80, 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); | |||
// } | |||
// }); | |||
// } | |||
// }, | |||
// { | |||
// label: '生成资产明细', name: 'AAIHasDetail', width: 80, align: 'left', formatter: function (cellvalue) { | |||
// return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
// } | |||
// }, | |||
// { | |||
// label: '库房', name: 'AAIStorageId', 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: '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' | |||
// }, | |||
// { | |||
// label: '资产型号', name: 'AAIModel', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '生产厂家', name: 'AAIManufacturer', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '资产规格', name: 'AAISpecification', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '用途', name: 'AAIUse', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '供应商', name: 'AAISupplierId', 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']); | |||
// } | |||
// }); | |||
// } | |||
// } | |||
// ], | |||
// height: 400, | |||
// mainId: 'AAIId', | |||
// reloadSelected: false | |||
//}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -241,11 +326,11 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function(processId, param, callback) { | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm( | |||
top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetFormDataByProcessId?processId=' + processId, | |||
function(data) { | |||
function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
@@ -274,7 +359,7 @@ var bootstrap = function ($, learun) { | |||
//总价计算 | |||
pricecount = 0; | |||
for (var i = 0; i < tempdatra.length; i++) { | |||
pricecount = parseFloat(pricecount) +parseFloat(tempdatra[i].TotalPrice); | |||
pricecount = parseFloat(pricecount) + parseFloat(tempdatra[i].TotalPrice); | |||
} | |||
$("#TotalPrice").val(pricecount); | |||
$('#Ass_Acceptance').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); | |||
@@ -307,7 +392,7 @@ var bootstrap = function ($, learun) { | |||
//if (!!processId) { | |||
// formData.ProcessId = processId; | |||
//} | |||
//postData.strEntity = JSON.stringify(formData); | |||
//postData.strass_Ass_AcceptanceList = JSON.stringify($('#Ass_Acceptance').jfGridGet('rowdatas')); | |||
//$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
@@ -170,6 +170,32 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '使用部门', name: 'AAIUseDeptId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '使用人', name: 'AAIUseUserId', 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: 'AAIEName', width: 100, align: 'left' | |||
}, | |||
@@ -169,6 +169,31 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
}, { | |||
label: '使用部门', name: 'AAIUseDeptId', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '使用人', name: 'AAIUseUserId', 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: 'AAIEName', width: 100, align: 'left' | |||
@@ -6,9 +6,9 @@ | |||
@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js") | |||
<div class="lr-form-wrap" id="form"> | |||
@*<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">选择已登记资产</div> | |||
<div id="AAOldCode"></div> | |||
</div>*@ | |||
<div class="lr-form-item-title">选择已登记资产</div> | |||
<div id="AAOldCode"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">资产类别<font face="宋体">*</font></div> | |||
<div id="AAITId" isvalid="yes" checkexpession="NotNull"></div> | |||
@@ -71,7 +71,15 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">房间号</div> | |||
<div id="AAIStoragePosition" checkexpession="NotNull"></div> | |||
<div id="AAIStoragePosition"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">使用部门<font face="宋体">*</font></div> | |||
<div id="AAIUseDeptId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">使用人<font face="宋体">*</font></div> | |||
<div id="AAIUseUserId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | |||
@@ -132,6 +132,26 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
$('#AAIHasDetail').lrselectSet('true'); | |||
$('#AAIUseUserId').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true, | |||
}); | |||
$('#AAIUseDeptId').lrDepartmentSelect({ | |||
maxHeight: 150 | |||
}).on('change', function () { | |||
var value = $(this).lrselectGet(); | |||
$('#AAIUseUserId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: value } | |||
}); | |||
}); | |||
$('#AAIPhoto').lrUploader(); | |||
}, | |||
initData: function () { | |||
@@ -6,16 +6,16 @@ | |||
@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js") | |||
<div class="lr-form-wrap" id="form"> | |||
@*<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">选择已登记耗材<font face="宋体">*</font></div> | |||
<div id="AAOldCode"></div> | |||
</div>*@ | |||
<div class="lr-form-item-title">选择已登记耗材<font face="宋体">*</font></div> | |||
<div id="AAOldCode"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">耗材类别<font face="宋体">*</font></div> | |||
<div id="AAITId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply" style="display: none"> | |||
<div class="lr-form-item-title">耗材编号</div> | |||
<input id="AAICode" type="text" class="form-control" value="@ViewBag.AAICode"/> | |||
<input id="AAICode" type="text" class="form-control" value="@ViewBag.AAICode" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">耗材名称<font face="宋体">*</font></div> | |||
@@ -29,7 +29,7 @@ | |||
<div class="lr-form-item-title">耗材型号</div> | |||
<input id="AAIModel" type="text" class="form-control" /> | |||
</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="AAIManufacturer" type="text" class="form-control" /> | |||
</div> | |||
@@ -59,7 +59,7 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">数量单位</div> | |||
<div id="AAIUnit" ></div> | |||
<div id="AAIUnit"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">排序<font face="宋体">*</font></div> | |||
@@ -73,6 +73,14 @@ | |||
<div class="lr-form-item-title">房间号</div> | |||
<div id="AAIStoragePosition" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">使用部门<font face="宋体">*</font></div> | |||
<div id="AAIUseDeptId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">使用人<font face="宋体">*</font></div> | |||
<div id="AAIUseUserId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsInfoItemApply"> | |||
<div class="lr-form-item-title">生成明细<font face="宋体">*</font></div> | |||
<div id="AAIHasDetail" isvalid="yes" checkexpession="NotNull"></div> | |||
@@ -132,6 +132,25 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
$('#AAIHasDetail').lrselectSet('true'); | |||
$('#AAIUseUserId').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true, | |||
}); | |||
$('#AAIUseDeptId').lrDepartmentSelect({ | |||
maxHeight: 150 | |||
}).on('change', function () { | |||
var value = $(this).lrselectGet(); | |||
$('#AAIUseUserId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: value } | |||
}); | |||
}); | |||
$('#AAIPhoto').lrUploader(); | |||
}, | |||
initData: function () { | |||
@@ -5,7 +5,7 @@ | |||
<script> | |||
var NewAOCode = "@ViewBag.AOCode"; | |||
</script> | |||
<div class="lr-form-wrap"> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">调拨单流水号</div> | |||
<input id="AOCode" type="text" class="form-control" /> | |||
@@ -115,62 +115,116 @@ var bootstrap = function ($, learun) { | |||
$('#Ass_AssetsOutItemApply').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '资产编号', name: 'AOICode', width: 200, align: 'left' | |||
label: '资产编码', name: 'AOICode', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '资产名称', name: 'AOIName', 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: 'AOISpecification', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '单价', name: 'AOIPrice', width: 100, align: 'left' | |||
label: '数量', name: 'AOIStock', width: 80, align: 'left' | |||
}, | |||
//{ | |||
// label: '数量', name: 'AOIStock', width: 80, align: 'left' | |||
//}, | |||
{ | |||
label: '单位', name: 'AOIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
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', | |||
key: value, | |||
code: 'sldw', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "使用人", name: "AOIUserPeople", width: 100, align: "left", | |||
label: "调出存放地点", name: "AOIStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_userid', | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: row.AOIStorageId, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
if (_data['sname'] && _data['sname'] != 'undefined') { | |||
content += _data['sname'] + ' '; | |||
} | |||
} | |||
}); | |||
if (content && content != 'undefined') { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||
key: row.AOIRoomId, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
if (_data['rcode'] && _data['rcode'] != 'undefined') { | |||
content += _data['rcode']; | |||
} | |||
} | |||
}); | |||
} | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: '资产型号', name: 'AOIModel', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
}, | |||
//{ | |||
// label: '资产编号', name: 'AOICode', width: 200, align: 'left' | |||
//}, | |||
//{ | |||
// label: '资产名称', name: 'AOIName', 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: 'AOIStock', width: 80, 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: 'AOIModel', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '用途', name: 'AOIUse', width: 100, align: 'left' | |||
//}, | |||
@@ -213,7 +267,9 @@ var bootstrap = function ($, learun) { | |||
AOISpecification: item.AISpecification, | |||
AOITId: item.AIASSClass, | |||
AOIUserPeople: item.AIUsePeople, | |||
AOIStorageId: item.AIIStorageId, | |||
AOIRoomId: item.AIIStoragePosition, | |||
AOIOldDepartment: item.AIDepartment, | |||
AOIPrice: item.AIAssValue, | |||
AOIUnit: item.AIUnits, | |||
AOIEName: '', | |||
@@ -279,6 +335,7 @@ var bootstrap = function ($, learun) { | |||
if (!!processId) { | |||
formData.AOProcessId = processId; | |||
} | |||
//出库类型改为调拨(金隅) | |||
formData.AOReasonType = 3; | |||
postData.strEntity = JSON.stringify(formData); | |||
@@ -0,0 +1,63 @@ | |||
@{ | |||
ViewBag.Title = "调拨申请"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<script> | |||
var NewAOCode = "@ViewBag.AOCode"; | |||
</script> | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">调拨单流水号</div> | |||
<input id="AOCode" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">出库总价</div> | |||
<input id="AOPrice" type="text" class="form-control" /> | |||
</div>*@ | |||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">调拨原因</div> | |||
<div id="AOReasonType"></div> | |||
</div>*@ | |||
@*<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">部门</div> | |||
<div id="AODepartment"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">库房</div> | |||
<div id="AOStorageId"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">申请时间</div> | |||
<input id="AOCreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">申请人</div> | |||
<input id="AOCreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">新使用部门<font face="宋体">*</font></div> | |||
<div id="AOINewDepartment" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">新使用人员<font face="宋体">*</font></div> | |||
<div id="AOINewUsePeople" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">新楼宇名称<font face="宋体">*</font></div> | |||
<div id="AOINewStorageId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">新房间号<font face="宋体">*</font></div> | |||
<div id="AOINewRoomId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Ass_AssetsOutApply"> | |||
<div class="lr-form-item-title">项目名称</div> | |||
<input id="AOProjectName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Ass_AssetsOutItemApply"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js") |
@@ -0,0 +1,348 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-03-29 11:49 | |||
* 描 述:出库申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var refreshGirdData; | |||
var selectedRow; | |||
var tempdatra = new Array(); | |||
//总价计算 | |||
var pricecount = 0; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
$("#detailadd").on('click', function () { | |||
selectedRow = null; | |||
learun.layerFormForPercent({ | |||
id: 'formitem', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/IndexTwo', | |||
width: "60%", | |||
height: "70%", | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Ass_AssetsOutItemApply').jfGridValue('AOICode'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$.each(tempdatra, function (key, val) { | |||
if (tempdatra[key].AOICode === keyValue) { | |||
//pricecount -= tempdatra[key].AOIPrice * tempdatra[key].AOIStock; | |||
tempdatra.splice(key, 1); | |||
} | |||
}); | |||
$('#Ass_AssetsOutItemApply').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); | |||
top.layer.close(index); | |||
} | |||
}); | |||
} | |||
}); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//新楼宇 | |||
$('#AOINewStorageId').lrselect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetTree', | |||
param: {}, | |||
select: function (val) { | |||
var storageId = ""; | |||
if (val) { | |||
storageId = val.value; | |||
} | |||
$('#AOINewRoomId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/AssetManagementSystem/AssStorageRoom/GetListForStorageId?storageId=' + storageId, | |||
text: "RCode", | |||
value: "RId", allowSearch: true | |||
}); | |||
} | |||
}); | |||
//新房间 | |||
$('#AOINewRoomId').lrselect({ value: 'RId', text: 'RCode', allowSearch: true }); | |||
$('#AOINewDepartment').lrDepartmentSelect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {}, | |||
select: function (val) { | |||
var departmentId = ""; | |||
if (val) { | |||
departmentId = val.value; | |||
} | |||
$('#AOINewUsePeople').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + departmentId, | |||
text: "F_RealName", | |||
value: "F_UserId", | |||
}) | |||
} | |||
}); | |||
$('#AOINewUsePeople').lrselect({ value: 'F_UserId', text: 'F_RealName' }); | |||
$('#AOReasonType').lrDataItemSelect({ code: 'ReasonType' }); | |||
$('#AOCreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#AOCreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#AOCreateUserId').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#AODepartment').lrselect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {} | |||
}); | |||
$('#AOStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||
$('#Ass_AssetsOutItemApply').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '资产编码', name: 'AOICode', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '资产名称', name: 'AOIName', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '规格型号', name: 'AOISpecification', 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) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "调出存放地点", name: "AOIStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: row.AOIStorageId, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
if (_data['sname'] && _data['sname'] != 'undefined') { | |||
content += _data['sname'] + ' '; | |||
} | |||
} | |||
}); | |||
if (content && content != 'undefined') { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||
key: row.AOIRoomId, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
if (_data['rcode'] && _data['rcode'] != 'undefined') { | |||
content += _data['rcode']; | |||
} | |||
} | |||
}); | |||
} | |||
callback(content); | |||
} | |||
}, | |||
//{ | |||
// label: '资产编号', name: 'AOICode', width: 200, align: 'left' | |||
//}, | |||
//{ | |||
// label: '资产名称', name: 'AOIName', 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: 'AOIStock', width: 80, 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: 'AOIModel', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
//}, | |||
//{ | |||
// label: '用途', name: 'AOIUse', width: 100, align: 'left' | |||
//}, | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
reloadSelected: false | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
tempdatra = data[id]; | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
//if (data[id].AOPrice) { | |||
// pricecount = data[id].AOPrice; | |||
//} | |||
} | |||
} | |||
}); | |||
} else { | |||
$("#AOCode").val(NewAOCode); | |||
} | |||
} | |||
}; | |||
refreshGirdData = function (temprow) { | |||
var ifnewrow = true; | |||
var list = []; | |||
$.each(temprow, | |||
function (i, item) { | |||
var entity = { | |||
AOICode: item.AICodeNumJY, | |||
AOIName: item.AIASSName, | |||
AOISpecification: item.AISpecification, | |||
AOITId: item.AIASSClass, | |||
AOIUserPeople: item.AIUsePeople, | |||
AOIRoomId: item.AIIStoragePosition, | |||
AOIPrice: item.AIAssValue, | |||
AOIUnit: item.AIUnits, | |||
AOIEName: '', | |||
AOIManufacturer: item.AIManufacturer, | |||
AOIModel: item.AISpecificationtype, | |||
AOIId: learun.newGuid() | |||
} | |||
list.push(entity); | |||
}); | |||
$.each(list, | |||
function (j, item2) { | |||
$.each(tempdatra, | |||
function (key, val) { | |||
if (tempdatra[key].AOICode === item2.AOICode) { | |||
tempdatra[key] = item2; | |||
ifnewrow = false; | |||
} | |||
}); | |||
if (ifnewrow) { | |||
tempdatra.push(item2); | |||
} | |||
}); | |||
$('#Ass_AssetsOutItemApply').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); | |||
}; | |||
function sortNumber(a, b) { | |||
return a.AAIOrder - b.AAIOrder; | |||
} | |||
// 设置表单数据 | |||
setFormData = function (processId) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'Ass_AssetsOutApply') { | |||
//keyValue = data[id].AOId; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var datas = $('#Ass_AssetsOutItemApply').jfGridGet('rowdatas'); | |||
if (datas == null || datas.length == 0) { | |||
learun.alert.warning("申请未包含明细!请先新增明细!"); | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var postData = {}; | |||
var formData = $('[data-table="Ass_AssetsOutApply"]').lrGetFormData(); | |||
if (!!processId) { | |||
formData.AOProcessId = processId; | |||
} | |||
//出库类型改为调拨(金隅) | |||
formData.AOReasonType = 3; | |||
postData.strEntity = JSON.stringify(formData); | |||
postData.strass_AssetsOutItemApplyList = JSON.stringify($('#Ass_AssetsOutItemApply').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, formData, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -111,7 +111,7 @@ var bootstrap = function ($, learun) { | |||
learun.layerForm({ | |||
id: 'formAss_AssetsInfoApply', | |||
title: '查看调拨申请', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue, | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/AssetsFormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
@@ -93,55 +93,19 @@ var bootstrap = function ($, learun) { | |||
$('#Ass_AssetsOutItemApply').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '资产编号', name: 'AOICode', width: 150, align: 'left' | |||
label: '资产编码', name: 'AOICode', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '资产名称', name: 'AOIName', 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: 'AOISpecification', width: 150, align: 'left' | |||
}, | |||
//{ | |||
// label: '数量', name: 'AOIStock', width: 80, 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: '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,46 +118,36 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "原楼宇", name: "AOIStorageId", width: 100, align: "left", | |||
label: "调出存放地点", name: "AOIStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
key: row.AOIStorageId, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原房间", name: "AOIRoomId", 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: "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']); | |||
if (_data['sname'] && _data['sname'] != 'undefined') { | |||
content += _data['sname'] + ' '; | |||
} | |||
} | |||
}); | |||
if (content && content != 'undefined') { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||
key: row.AOIRoomId, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
if (_data['rcode'] && _data['rcode'] != 'undefined') { | |||
content += _data['rcode']; | |||
} | |||
} | |||
}); | |||
} | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: "新部门", name: "AOINewDepartment", width: 100, align: "left", | |||
label: "调入部门", name: "AOINewDepartment", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
@@ -206,43 +160,100 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "新楼宇", name: "AOINewStorageId", width: 100, align: "left", | |||
label: "调入存放地点", name: "AOINewStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新房间", name: "AOINewRoomId", 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']); | |||
if (_data['sname'] && _data['sname'] != 'undefined') { | |||
content += _data['sname']; | |||
} | |||
} | |||
}); | |||
if (content && content != 'undefined') { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||
key: row.AOINewRoomId, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
if (_data['rcode'] && _data['rcode'] != 'undefined') { | |||
content += _data['rcode']; | |||
} | |||
} | |||
}); | |||
} | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: '资产型号', name: 'AOIModel', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '用途', name: 'AOIUse', width: 100, align: 'left' | |||
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', | |||
@@ -44,55 +44,19 @@ var bootstrap = function ($, learun) { | |||
$('#Ass_AssetsOutItemApply').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '资产编号', name: 'AOICode', width: 150, align: 'left' | |||
label: '资产编码', name: 'AOICode', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '资产名称', name: 'AOIName', 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: 'AOISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '数量', name: 'AOIStock', width: 80, 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: "AOIOldDepartment", width: 100, align: "left", | |||
label: "调出部门", name: "AOIOldDepartment", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
@@ -105,46 +69,36 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "原楼宇", name: "AOIStorageId", width: 100, align: "left", | |||
label: "调出存放地点", name: "AOIStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
key: row.AOIStorageId, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原房间", name: "AOIRoomId", 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: "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']); | |||
if (_data['sname'] && _data['sname'] != 'undefined') { | |||
content += _data['sname'] + ' '; | |||
} | |||
} | |||
}); | |||
if (content && content != 'undefined') { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||
key: row.AOIRoomId, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
if (_data['rcode'] && _data['rcode'] != 'undefined') { | |||
content += _data['rcode']; | |||
} | |||
} | |||
}); | |||
} | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: "新部门", name: "AOINewDepartment", width: 100, align: "left", | |||
label: "调入部门", name: "AOINewDepartment", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
@@ -157,51 +111,203 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "新楼宇", name: "AOINewStorageId", width: 100, align: "left", | |||
label: "调入存放地点", name: "AOINewStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
var content = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新房间", name: "AOINewRoomId", 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']); | |||
if (_data['sname'] && _data['sname'] != 'undefined') { | |||
content += _data['sname']; | |||
} | |||
} | |||
}); | |||
if (content && content != 'undefined') { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_Storage_Room', | |||
key: row.AOINewRoomId, | |||
keyId: 'rid', | |||
callback: function (_data) { | |||
if (_data['rcode'] && _data['rcode'] != 'undefined') { | |||
content += _data['rcode']; | |||
} | |||
} | |||
}); | |||
} | |||
callback(content); | |||
} | |||
}, | |||
{ | |||
label: '英文名称', name: 'AOIEName', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产型号', name: 'AOIModel', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
}, | |||
{ | |||
label: '用途', name: 'AOIUse', width: 100, align: 'left' | |||
}, | |||
label: '备注', name: 'AOIContent', width: 150, align: 'left' | |||
} | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
reloadSelected: false, | |||
mainId: 'AOIId', | |||
reloadSelected: false | |||
}); | |||
//$('#Ass_AssetsOutItemApply').jfGrid({ | |||
// headData: [ | |||
// { | |||
// label: '资产编号', name: 'AOICode', width: 150, align: 'left' | |||
// }, | |||
// { | |||
// label: '资产名称', name: 'AOIName', 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: 'AOIStock', width: 80, 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: "AOIOldDepartment", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
// key: value, | |||
// keyId: 'id', | |||
// callback: function (_data) { | |||
// callback(_data['name']); | |||
// } | |||
// }); | |||
// } | |||
// }, | |||
// { | |||
// label: "原楼宇", name: "AOIStorageId", 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: "AOIRoomId", 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: "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: "AOINewDepartment", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
// key: value, | |||
// keyId: 'id', | |||
// callback: function (_data) { | |||
// callback(_data['name']); | |||
// } | |||
// }); | |||
// } | |||
// }, | |||
// { | |||
// label: "新楼宇", name: "AOINewStorageId", 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: "AOINewRoomId", 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: 'AOIEName', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '资产型号', name: 'AOIModel', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '生产厂家', name: 'AOIManufacturer', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '资产规格', name: 'AOISpecification', width: 100, align: 'left' | |||
// }, | |||
// { | |||
// label: '用途', name: 'AOIUse', width: 100, align: 'left' | |||
// }, | |||
// ], | |||
// height: 400, | |||
// mainId: 'AAIId', | |||
// reloadSelected: false, | |||
//}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -878,6 +878,7 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\FormPurchase.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItemApply\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsFormView.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsForm.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItem\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsInfoItem\FormView.js" /> | |||
@@ -7358,6 +7359,7 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsIndex.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsForm.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\IndexTwo.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsOutApply\AssetsFormView.cshtml" /> | |||
<None Include="Areas\EducationalAdministration\Views\SchoolNews\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StuTuition.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IsHelpForm.cshtml" /> | |||
@@ -144,6 +144,16 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
/// </summary> | |||
[Column("AAIUSE")] | |||
public string AAIUse { get; set; } | |||
/// <summary> | |||
/// 使用部门 | |||
/// </summary> | |||
[Column("AAIUSEDEPTID")] | |||
public string AAIUseDeptId { get; set; } | |||
/// <summary> | |||
/// 使用人 | |||
/// </summary> | |||
[Column("AAIUSEUSERID")] | |||
public string AAIUseUserId { get; set; } | |||
#endregion | |||
@@ -324,6 +324,8 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
acc.AAISpecification = assitem.AAISpecification; | |||
acc.AAIUse = assitem.AAIUse; | |||
acc.AAIHasDetail = assitem.AAIHasDetail; | |||
acc.AAIUseDeptId = assitem.AAIUseDeptId; | |||
acc.AAIUseUserId = assitem.AAIUseUserId; | |||
db.Insert(acc); | |||
} | |||
@@ -130,6 +130,17 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
/// </summary> | |||
[Column("AAIASSTYPE")] | |||
public int? AAIAssType { get; set; } | |||
/// <summary> | |||
///使用部门 | |||
/// </summary> | |||
[Column("AAIUSEDEPTID")] | |||
public string AAIUseDeptId { get; set; } | |||
/// <summary> | |||
///使用人 | |||
/// </summary> | |||
[Column("AAIUSEUSERID")] | |||
public string AAIUseUserId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -213,10 +213,10 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
allPrice += item.AOIPrice.ToDecimal(); | |||
item.Create(); | |||
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); | |||
} | |||
entity.AOPrice = allPrice; | |||