Commit 81460466 authored by lijingjing's avatar lijingjing

商机维护修改-ljj

parent 6497b2c6
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LIJINGJING
$Date: 2019-09-10 下午4:38:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select tt.* from ( SELECT t1.project_number,
t1.contract_number,
t1.bp_code,
t1.bp_name,
t1.overdue_max_days,
t1.overdue_max_amount,
t1.bp_type,
t1.bp_class,
t1.bp_id,
t1.description,
t1.project_id,
t1.contract_id
FROM prj_project_history_lv t1
WHERE t1.bp_id = ${@bp_id}
and t1.project_id <> ${@project_id}) tt
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -64,8 +64,8 @@ var override_queryfields = [ ...@@ -64,8 +64,8 @@ var override_queryfields = [
// queryoperator : "=" // queryoperator : "="
//}, //},
{ {
name:'status_not_in', name:'project_status',
queryexpression : "((t1.project_status in('NEW','PRE_APPROVING','APPROVED_RETURN')) Or (t1.project_status in('PRE_APPROVED','APPROVED_RETURN') and t1.pjd_instance_status in ('PRE_APPROVING','APPROVED'))) and t1.document_type='CARLS'" queryexpression : "(t1.project_status in ('NEW','PRE_APPROVING','APPROVED_RETURN')"
} }
......
...@@ -269,6 +269,7 @@ ...@@ -269,6 +269,7 @@
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item'); var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
var project_record = $(project_ds_id).getCurrentRecord(); var project_record = $(project_ds_id).getCurrentRecord();
if (prj_record.get('project_number')) { if (prj_record.get('project_number')) {
return true; return true;
} }
...@@ -285,6 +286,7 @@ ...@@ -285,6 +286,7 @@
ka_prj_id: prj_record.get('ka_prj_id') ka_prj_id: prj_record.get('ka_prj_id')
}, },
success: function (res) { success: function (res) {
debugger;
var document_number = res.result.document_number; var document_number = res.result.document_number;
prj_record.set('project_number', document_number); prj_record.set('project_number', document_number);
check_flag = true; check_flag = true;
...@@ -350,14 +352,17 @@ ...@@ -350,14 +352,17 @@
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_TENANT_INFO', 'prj_project_bp'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref'); var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds'; var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id==ds.id || virtual_ds_id==ds.id) { if (ds_id==ds.id || virtual_ds_id==ds.id) {
$(cdd_item_ds_id).query(); $(cdd_item_ds_id).query();
$(tenant_ds_id).query();
$(bp_ds_id).query(); $(bp_ds_id).query();
$(tenant_ds_id).query();
} }
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...@@ -422,8 +427,8 @@ ...@@ -422,8 +427,8 @@
//加载时调用(grid,table,gridBox) //加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
debugger;
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
if (bp_ds_id == ds.id && bp_ds_id) { if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') { if (record.get('bp_category') == 'TENANT') {
record.getField('bp_category_n').setReadOnly(true); record.getField('bp_category_n').setReadOnly(true);
...@@ -435,7 +440,12 @@ ...@@ -435,7 +440,12 @@
} }
} }
}; };
/* Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
})*/
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view> </a:view>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: gaoyang $Author: gaoyang
$Date: 2013-6-24 下午03:23:39 $Date: 2013-6-24 下午03:23:39
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<a:screen xmlns:c="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true"> <a:screen xmlns:c="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
contentWindow = document.getElementById('mainFrame2_id').contentWindow, contentWindow = document.getElementById('mainFrame2_id').contentWindow,
tree_loading_flag = false, tree_loading_flag = false,
first_loading_flag = true; first_loading_flag = true;
// 获取项目编号 // 获取项目编号
function get_project_number() { function get_project_number() {
var ds_id; var ds_id;
var base_table_temp = 'prj_project_ds'; var base_table_temp = 'prj_project_ds';
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
ds_id = dsId; ds_id = dsId;
} }
} }
lock_tree_window(); lock_tree_window();
var root_ds = contentWindow.$(ds_id); var root_ds = contentWindow.$(ds_id);
var record = root_ds.getCurrentRecord(); var record = root_ds.getCurrentRecord();
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
scope: this scope: this
}); });
} }
function prj500_project_save(nextStep) { function prj500_project_save(nextStep) {
var root_ds = contentWindow.$('${/parameter/@layout_code}_virtual_ds'); var root_ds = contentWindow.$('${/parameter/@layout_code}_virtual_ds');
if (root_ds.validate()) { if (root_ds.validate()) {
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
} }
}); });
} }
function prj501_get_windows_parameter(param_name) { function prj501_get_windows_parameter(param_name) {
var value; var value;
if (param_name == 'prj_report_read_flag') { if (param_name == 'prj_report_read_flag') {
...@@ -121,24 +121,24 @@ ...@@ -121,24 +121,24 @@
} }
return value; return value;
} }
function prj500_project_exit() { function prj500_project_exit() {
$('${/parameter/@winid}').close(); $('${/parameter/@winid}').close();
} }
function prj500_project_save_exit() { function prj500_project_save_exit() {
prj500_project_save(prj500_project_exit); prj500_project_save(prj500_project_exit);
} }
function lock_tree_window() { function lock_tree_window() {
Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}'); Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
} }
function unlock_tree_window() { function unlock_tree_window() {
Leaf.Masker.unmask($('${/parameter/@winid}').wrap); Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
} }
var ajax_flag = 'N'; var ajax_flag = 'N';
function prj500n_project_submit_step() { function prj500n_project_submit_step() {
var ds_id = get_dsid_by_basetable(contentWindow.window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(contentWindow.window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = contentWindow.$(ds_id).getCurrentRecord(); var record = contentWindow.$(ds_id).getCurrentRecord();
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
unlock_tree_window(); unlock_tree_window();
}); });
} }
function prj500_project_submit() { function prj500_project_submit() {
lock_tree_window(); lock_tree_window();
var ds_id = get_dsid_by_basetable(contentWindow.window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(contentWindow.window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
}, },
scope: this scope: this
}); });
}); });
confirm_win.on('close', function() { confirm_win.on('close', function() {
if (ajax_flag == 'N') { if (ajax_flag == 'N') {
...@@ -233,10 +233,10 @@ ...@@ -233,10 +233,10 @@
} }
}); });
} }
/* /*
function prj500_project_user_button_2() { function prj500_project_user_button_2() {
var url = $('downloadFile_id').getUrl() + '?table_name=PRJ_PROJECT_LEASE_ITEM&header_id=1'; var url = $('downloadFile_id').getUrl() + '?table_name=PRJ_PROJECT_LEASE_ITEM&header_id=1';
new Leaf.Window({ new Leaf.Window({
...@@ -246,17 +246,17 @@ ...@@ -246,17 +246,17 @@
width: 850, width: 850,
height: 400 height: 400
}); });
} }
*/ */
function prj500_define_button(btn) { function prj500_define_button(btn) {
var root_ds = contentWindow.$('${/parameter/@layout_code}_virtual_ds'); var root_ds = contentWindow.$('${/parameter/@layout_code}_virtual_ds');
contentWindow.prj_define_button(btn, root_ds); contentWindow.prj_define_button(btn, root_ds);
} }
function bind(para) { function bind(para) {
var params = para.split('?'); var params = para.split('?');
var data = []; var data = [];
...@@ -267,11 +267,11 @@ ...@@ -267,11 +267,11 @@
} }
return data.join(''); return data.join('');
} }
function linkrenderer(text, record, node) { function linkrenderer(text, record, node) {
return bind("<span style='cursor:pointer'>?</span>", text); return bind("<span style='cursor:pointer'>?</span>", text);
} }
function on_tree_click(tree, record) { function on_tree_click(tree, record) {
if (first_loading_flag) { if (first_loading_flag) {
tree_loading_flag = false; tree_loading_flag = false;
...@@ -286,11 +286,11 @@ ...@@ -286,11 +286,11 @@
jump2(code); jump2(code);
} }
} }
function jump2(id, parentId) { function jump2(id, parentId) {
mainIFrame2.open_tree_code_child(id, parentId); mainIFrame2.open_tree_code_child(id, parentId);
} }
function jump(id, acc, index) { function jump(id, acc, index) {
if (mainIFrame2.open_tree_code) { if (mainIFrame2.open_tree_code) {
mainIFrame2.open_tree_code(id, acc, index); mainIFrame2.open_tree_code(id, acc, index);
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
}); });
} }
} }
function on_accordion_beforeselect(acc, index) { function on_accordion_beforeselect(acc, index) {
var code = acc.bodys.item(index).child('div[_data]').getAttribute('_data'); var code = acc.bodys.item(index).child('div[_data]').getAttribute('_data');
if (isLoaded) { if (isLoaded) {
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
} }
} }
function open_render_window(id, params, url, url_title) { function open_render_window(id, params, url, url_title) {
new Leaf.Window({ new Leaf.Window({
id: id, id: id,
...@@ -426,12 +426,12 @@ ...@@ -426,12 +426,12 @@
record.set('cdd_list_id','${/parameter/@cdd_list_id}'); record.set('cdd_list_id','${/parameter/@cdd_list_id}');
record.set('maintain_type','${/parameter/@maintain_type}'); record.set('maintain_type','${/parameter/@maintain_type}');
record.set('default_value_dsid','${/parameter/@default_value_dsid}'); record.set('default_value_dsid','${/parameter/@default_value_dsid}');
if('${/parameter/@bp_id}'){ if('${/parameter/@bp_id}'){
record.set('bp_id_tenant','${/parameter/@bp_id}'); record.set('bp_id_tenant','${/parameter/@bp_id}');
record.set('bp_id_tenant_n','${/parameter/@bp_id_n}'); record.set('bp_id_tenant_n','${/parameter/@bp_id_n}');
} }
record.set('declare_flag','Y'); record.set('declare_flag','Y');
record.set('_vh',vh); record.set('_vh',vh);
record.set('_vw',vw); record.set('_vw',vw);
......
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link" <a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/> url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id" <a:link id="${/parameter/@layout_code}_hls_fin_calc_get_base_rate_link_id"
model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/> model="hls.HLS500.hls_fin_calc_get_base_rate" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="${/parameter/@layout_code}_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
...@@ -50,7 +51,6 @@ ...@@ -50,7 +51,6 @@
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>--> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
Leaf.showConfirm('提示', '是否确认生成合同?', function () { Leaf.showConfirm('提示', '是否确认生成合同?', function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
...@@ -312,7 +312,30 @@ ...@@ -312,7 +312,30 @@
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}'); hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
} }
function prj501n_project_number_renderer(id, name, query_only){
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['bp_id'] = record.get('project_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'PRJ501D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['prj_bp_id'] = record.get('prj_bp_id');
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}project_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_contract_number_renderer(id, name, query_only){
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}contract_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
//超链接渲染 //超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
...@@ -345,7 +368,7 @@ ...@@ -345,7 +368,7 @@
return url; return url;
}*/ }*/
if (value != null) { if (value != null ) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id='; var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;'); var str = value.split(';;');
var url = ''; var url = '';
...@@ -369,10 +392,17 @@ ...@@ -369,10 +392,17 @@
return url; return url;
} }
} else if (name = 'bp_link') { } else if (name == 'bp_link' && !record.isNew) {
link_function = 'prj501n_bp_code_renderer'; link_function = 'prj501n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
}else if(name=='project_number'){
link_function = 'prj501n_project_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value+ '</a>';
}else if(name =='contract_number'){
link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value+ '</a>';
} }
}; };
...@@ -380,14 +410,17 @@ ...@@ -380,14 +410,17 @@
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BP','prj_project_bp');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_TENANT_INFO', 'prj_project_bp'); var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref'); var cdd_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds'; var virtual_ds_id = '${/parameter/@layout_code}_virtual_ds';
if (ds_id==ds.id || virtual_ds_id==ds.id) { if (ds_id==ds.id || virtual_ds_id==ds.id) {
$(cdd_item_ds_id).query(); $(cdd_item_ds_id).query();
$(tenant_ds_id).query();
$(bp_ds_id).query(); $(bp_ds_id).query();
$(tenant_ds_id).query();
} }
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
...@@ -419,7 +452,9 @@ ...@@ -419,7 +452,9 @@
//加载时调用(grid,table,gridBox) //加载时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_BP', 'prj_project_bp');
/* var bp_ds_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_HISTORY_INFO_1', 'prj_project_bp');
$(bp_ds_ids).setQueryParameter('bp_id','${/parameter/@bp_id_tenant}');
$(bp_ds_ids).query();*/
if (bp_ds_id == ds.id && bp_ds_id) { if (bp_ds_id == ds.id && bp_ds_id) {
if (record.get('bp_category') == 'TENANT') { if (record.get('bp_category') == 'TENANT') {
record.getField('bp_category_n').setReadOnly(true); record.getField('bp_category_n').setReadOnly(true);
...@@ -430,6 +465,8 @@ ...@@ -430,6 +465,8 @@
record.getField('bp_id_n').setReadOnly(true); record.getField('bp_id_n').setReadOnly(true);
} }
} }
}; };
//pdf预览 add by zhuxianfei //pdf预览 add by zhuxianfei
...@@ -450,6 +487,41 @@ ...@@ -450,6 +487,41 @@
}); });
} }
Leaf.onReady(function(){
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master');
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
})
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
//租赁物序号
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
if (ds_id == ds.id && ds_id) {
//设置序号
var measure_records = ds.getAll(),
seq_num = 0;
if (measure_records.length) {
for (var j = 0;j < measure_records.length;j++) {
var measure_record = measure_records[j],
rk = measure_record.get('lease_item_seq');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('lease_item_seq', rk_value);
}
};
//客户评分
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function() {
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view> </a:view>
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
function open_project_modify_win(record_id, ds_id) { function open_project_modify_win(record_id, ds_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var project_status = record.get('project_status'); var project_status = record.get('project_status');
//项目类layout_code //项目类layout_code
if (record.get('document_type') == 'PRJ') { if (record.get('document_type') == 'PRJ') {
...@@ -42,12 +41,9 @@ ...@@ -42,12 +41,9 @@
param['maintain_type'] = maintain_type; param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
param['layout_debugger_flag'] = 'Y'; param['layout_debugger_flag'] = 'Y';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_modify_link', ds_id); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_modify_link', ds_id);
} else if (record.get('document_type') == 'CARLS') { } else if (record.get('document_type') == 'CARLS') {
if (record.get('project_status') != 'PRE_APPROVING') { if (record.get('project_status') != 'PRE_APPROVING') {
maintain_type = 'UPDATE'; maintain_type = 'UPDATE';
param = record.data; param = record.data;
param['document_id'] = record.get('project_id'); param['document_id'] = record.get('project_id');
...@@ -55,15 +51,15 @@ ...@@ -55,15 +51,15 @@
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['bp_class'] = 'NP'; param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type; param['maintain_type'] = maintain_type;
param['bp_id'] = record.get('bp_id');
param['prj_bp_id'] = record.get('prj_bp_id'); param['prj_bp_id'] = record.get('prj_bp_id');
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
} else { } else {
maintain_type = 'READONLY'; maintain_type = 'READONLY';
param = record.data; param = record.data;
param['bp_id_tenant'] = record.get('bp_id_tenant');
param['document_id'] = record.get('project_id'); param['document_id'] = record.get('project_id');
param['function_code'] = 'PRJ501D'; param['function_code'] = 'PRJ501D';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
...@@ -72,14 +68,11 @@ ...@@ -72,14 +68,11 @@
param['prj_bp_id'] = record.get('prj_bp_id'); param['prj_bp_id'] = record.get('prj_bp_id');
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id); hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
} }
} }
} }
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
if (name == 'project_number' && value) { if (name == 'project_number' && value) {
return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment