|
|
@@ -5,6 +5,7 @@ |
|
|
|
* 描 述:出库申请明细 |
|
|
|
*/ |
|
|
|
var acceptClick; |
|
|
|
var refreshGirdData; |
|
|
|
var keyValue = request('keyValue'); |
|
|
|
var selectedRow; |
|
|
|
var maxstock = 0; |
|
|
@@ -93,89 +94,105 @@ var bootstrap = function ($, learun) { |
|
|
|
} |
|
|
|
}); |
|
|
|
$('#AOINewUsePeople').lrselect({ value: 'F_UserId', text: 'F_RealName' }); |
|
|
|
$("#AAOldCode").lrlayerselect({ |
|
|
|
treeUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree', |
|
|
|
treeParentId: '', |
|
|
|
treeValueId: '', |
|
|
|
treeTextId: '', |
|
|
|
dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetList', |
|
|
|
dataTreeId: 'AIASSClass', |
|
|
|
dataValueId: 'aiid', |
|
|
|
dataTextId: 'aiassname', |
|
|
|
|
|
|
|
grid: [ |
|
|
|
{ label: '资产编号', name: 'aicodenumjy', width: 150, align: 'left' }, |
|
|
|
{ label: '资产名称', name: 'aiassname', width: 150, align: 'left' }, |
|
|
|
{ |
|
|
|
label: '使用部门', name: 'aidepartment', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('department', { |
|
|
|
key: value, |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.name); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '使用人员', name: 'aiusepeople', width: 150, align: 'left', |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('user', { |
|
|
|
key: value, |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.name); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '楼宇名称', name: 'aiistorageid', 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: "amodel", width: 150, align: "left" }, |
|
|
|
{ label: "生产厂家", name: "amanufacturer", width: 150, 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']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
$("#AAOldCode").on('click', function () { |
|
|
|
learun.layerFormForPercent({ |
|
|
|
id: 'formitem_AAOldCode', |
|
|
|
title: '选择资产', |
|
|
|
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/IndexTwo', |
|
|
|
width: "80%", |
|
|
|
height: "80%", |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
} |
|
|
|
], |
|
|
|
select: function (values, texts) { |
|
|
|
if (values && values.length > 0) { |
|
|
|
//绑定 |
|
|
|
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetFormData?keyValue=' + values[0], function (data) { |
|
|
|
data = data.Ass_AssetsInfoItem; |
|
|
|
$('#AOITId').lrselectSet(data.AIASSClass); |
|
|
|
$('#AOICode').val(data.AICodeNumJY); |
|
|
|
$('#AOIName').val(data.AIASSName); |
|
|
|
$('#AOIUnit').lrselectSet(data.AIUnits); |
|
|
|
$('#AOIModel').val(data.AISpecificationtype); |
|
|
|
$('#AOIManufacturer').val(data.AIManufacturer); |
|
|
|
$('#AOIPrice').val(data.AIAssValue); |
|
|
|
$('#AOISpecification').val(data.AISpecification); |
|
|
|
$('#AOIUse').val(data.AIUse); |
|
|
|
$('#AOIOldDepartment').lrselectSet(data.AIDepartment); |
|
|
|
$('#AOIUsePeople').lrselectSet(data.AIUsePeople); |
|
|
|
$('#AOIStorageId').lrselectSet(data.AIIStorageId); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
isMultiple: false |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//$("#AAOldCode").lrlayerselect({ |
|
|
|
// treeUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree', |
|
|
|
// treeParentId: '', |
|
|
|
// treeValueId: '', |
|
|
|
// treeTextId: '', |
|
|
|
// dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetList', |
|
|
|
// dataTreeId: 'AIASSClass', |
|
|
|
// dataValueId: 'aiid', |
|
|
|
// dataTextId: 'aiassname', |
|
|
|
|
|
|
|
// grid: [ |
|
|
|
// { label: '资产编号', name: 'aicodenumjy', width: 150, align: 'left' }, |
|
|
|
// { label: '资产名称', name: 'aiassname', width: 150, align: 'left' }, |
|
|
|
// { |
|
|
|
// label: '使用部门', name: 'aidepartment', width: 150, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
// learun.clientdata.getAsync('department', { |
|
|
|
// key: value, |
|
|
|
// callback: function (_data) { |
|
|
|
// callback(_data.name); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// label: '使用人员', name: 'aiusepeople', width: 150, align: 'left', |
|
|
|
// formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
// learun.clientdata.getAsync('user', { |
|
|
|
// key: value, |
|
|
|
// callback: function (_data) { |
|
|
|
// callback(_data.name); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// label: '楼宇名称', name: 'aiistorageid', 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: "amodel", width: 150, align: "left" }, |
|
|
|
// { label: "生产厂家", name: "amanufacturer", width: 150, 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) { |
|
|
|
// //绑定 |
|
|
|
// $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/GetFormData?keyValue=' + values[0], function (data) { |
|
|
|
// data = data.Ass_AssetsInfoItem; |
|
|
|
// $('#AOITId').lrselectSet(data.AIASSClass); |
|
|
|
// $('#AOICode').val(data.AICodeNumJY); |
|
|
|
// $('#AOIName').val(data.AIASSName); |
|
|
|
// $('#AOIUnit').lrselectSet(data.AIUnits); |
|
|
|
// $('#AOIModel').val(data.AISpecificationtype); |
|
|
|
// $('#AOIManufacturer').val(data.AIManufacturer); |
|
|
|
// $('#AOIPrice').val(data.AIAssValue); |
|
|
|
// $('#AOISpecification').val(data.AISpecification); |
|
|
|
// $('#AOIUse').val(data.AIUse); |
|
|
|
// $('#AOIOldDepartment').lrselectSet(data.AIDepartment); |
|
|
|
// $('#AOIUsePeople').lrselectSet(data.AIUsePeople); |
|
|
|
// $('#AOIStorageId').lrselectSet(data.AIIStorageId); |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// isMultiple: false |
|
|
|
//}); |
|
|
|
$('#AOIUnit').lrDataItemSelect({ code: 'sldw' }); |
|
|
|
$('#AOIPhoto').lrUploader(); |
|
|
|
|
|
|
@@ -197,11 +214,29 @@ var bootstrap = function ($, learun) { |
|
|
|
} |
|
|
|
}); |
|
|
|
$('#form').lrSetFormData(selectedRow); |
|
|
|
$('#AAOldCode').find('span').text(selectedRow.AOIName); |
|
|
|
// $('#AAOldCode').find('span').text(selectedRow.AOIName); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
refreshGirdData = function (temprow) { |
|
|
|
learun.layerClose('formitem_AAOldCode',''); |
|
|
|
var data = temprow[0]; |
|
|
|
$('#AOITId').lrselectSet(data.AIASSClass); |
|
|
|
$('#AOICode').val(data.AICodeNumJY); |
|
|
|
$('#AOIName').val(data.AIASSName); |
|
|
|
$('#AOIUnit').lrselectSet(data.AIUnits); |
|
|
|
$('#AOIModel').val(data.AISpecificationtype); |
|
|
|
$('#AOIManufacturer').val(data.AIManufacturer); |
|
|
|
$('#AOIPrice').val(data.AIAssValue); |
|
|
|
$('#AOISpecification').val(data.AISpecification); |
|
|
|
$('#AOIUse').val(data.AIUse); |
|
|
|
$('#AOIOldDepartment').lrselectSet(data.AIDepartment); |
|
|
|
$('#AOIUsePeople').lrselectSet(data.AIUsePeople); |
|
|
|
$('#AOIStorageId').lrselectSet(data.AIIStorageId); |
|
|
|
|
|
|
|
//$('#Ass_ReceiveItem').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); |
|
|
|
}; |
|
|
|
// 保存数据 |
|
|
|
acceptClick = function (callBack) { |
|
|
|
if (!$('body').lrValidform()) { |
|
|
|