@@ -114,10 +114,10 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetList', | url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetList', | ||||
headData: [ | headData: [ | ||||
{ label: "资产类别编号", name: "ATCode", width: 200, align: "left" }, | |||||
{ label: "资产类别名称", name: "AName", width: 200, align: "left" }, | |||||
{ label: "资产分类编号", name: "ATCode", width: 200, align: "left" }, | |||||
{ label: "资产分类名称", name: "AName", width: 200, align: "left" }, | |||||
{ | { | ||||
label: "上级资产类别", name: "ATPTId", width: 200, align: "left", | |||||
label: "上级资产分类", name: "ATPTId", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', | ||||
@@ -64,13 +64,23 @@ var bootstrap = function ($, learun) { | |||||
$('#ValueType').lrDataItemSelect({ code: 'ValueType' }); | $('#ValueType').lrDataItemSelect({ code: 'ValueType' }); | ||||
$('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | $('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | ||||
$('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | $('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | ||||
$('#UseDepartment').lrDepartmentSelect(); | |||||
$('#UseDepartment').lrDepartmentSelect({ | |||||
select: function (item) { | |||||
$('#UsePeople').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||||
param: { departmentId: item.value } | |||||
}); | |||||
} | |||||
}); | |||||
$('#ManageDepartment').lrDepartmentSelect(); | $('#ManageDepartment').lrDepartmentSelect(); | ||||
$('#UsePeople').lrformselect({ | |||||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||||
layerUrlW: 400, | |||||
layerUrlH: 300, | |||||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||||
$('#UsePeople').lrselect({ | |||||
value: 'F_UserId', | |||||
text: 'F_RealName', | |||||
title: 'F_RealName', | |||||
// 展开最大高度 | |||||
maxHeight: 110, | |||||
// 是否允许搜索 | |||||
allowSearch: true | |||||
}); | }); | ||||
$('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | $('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | ||||
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | $('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | ||||
@@ -160,7 +170,7 @@ var bootstrap = function ($, learun) { | |||||
$('#NetValue').val(netValue); | $('#NetValue').val(netValue); | ||||
netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); | netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); | ||||
}); | }); | ||||
//计算:价值数据=财政拨款 + 非财政拨款 | //计算:价值数据=财政拨款 + 非财政拨款 | ||||
let calcValue = function (a, b) { | let calcValue = function (a, b) { | ||||
return Number(a) + Number(b); | return Number(a) + Number(b); | ||||
@@ -177,7 +187,7 @@ var bootstrap = function ($, learun) { | |||||
let calcNetValue = function (a, b) { | let calcNetValue = function (a, b) { | ||||
return (Number(a) - Number(b)) > 0 ? (Number(a) - Number(b)) : 0; | return (Number(a) - Number(b)) > 0 ? (Number(a) - Number(b)) : 0; | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
@@ -64,13 +64,23 @@ var bootstrap = function ($, learun) { | |||||
$('#ValueType').lrDataItemSelect({ code: 'ValueType' }); | $('#ValueType').lrDataItemSelect({ code: 'ValueType' }); | ||||
$('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | $('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | ||||
$('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | $('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | ||||
$('#UseDepartment').lrDepartmentSelect(); | |||||
$('#UseDepartment').lrDepartmentSelect({ | |||||
select: function (item) { | |||||
$('#UsePeople').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||||
param: { departmentId: item.value } | |||||
}); | |||||
} | |||||
}); | |||||
$('#ManageDepartment').lrDepartmentSelect(); | $('#ManageDepartment').lrDepartmentSelect(); | ||||
$('#UsePeople').lrformselect({ | |||||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||||
layerUrlW: 400, | |||||
layerUrlH: 300, | |||||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||||
$('#UsePeople').lrselect({ | |||||
value: 'F_UserId', | |||||
text: 'F_RealName', | |||||
title: 'F_RealName', | |||||
// 展开最大高度 | |||||
maxHeight: 110, | |||||
// 是否允许搜索 | |||||
allowSearch: true | |||||
}); | }); | ||||
$('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | $('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | ||||
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | $('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | ||||
@@ -182,7 +192,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId, param, callback) { | setFormData = function (processId, param, callback) { | ||||
console.log('formview@'+processId); | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
@@ -392,7 +392,8 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
mainId: 'FAId', | mainId: 'FAId', | ||||
isPage: true, | isPage: true, | ||||
sidx: 'CreateTime desc' | |||||
sidx: 'FACode,FAName', | |||||
sord:'asc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -285,7 +285,8 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
mainId: 'FAId', | mainId: 'FAId', | ||||
isPage: true, | isPage: true, | ||||
sidx: 'CreateTime desc' | |||||
sidx: 'FACode,FAName', | |||||
sord: 'asc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||