Commit 5df07dc1 authored by stone's avatar stone

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents 1cde1ee2 cb6e934e
...@@ -17,5 +17,15 @@ ...@@ -17,5 +17,15 @@
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
con_contract_workflow_pkg.contract_incept_submit(
p_contract_id =>${@contract_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
var add_datafilters = [
{
name:'contract_status',
expression:"t1.contract_status not in ('NEW','SIGN_RETURN')"
},
{
name : 'authority',
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name: 'document_type',
expression: "t1.document_type = 'CARCON'"
},
{
name : 'authority',
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))"
}
];
add_datafilter();
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
function open_contract_win(ds_id, record_id) { function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
if(record.get('contract_status')=='NEW' || record.get('contract_status')=='REJECT'){ if(record.get('contract_status')=='NEW' || record.get('contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM'; param['function_code'] = 'CON301MM';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zlf
$Date: 2014-11-10 下午5:42:24
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
<s:server-script import="con_print_path.js"><![CDATA[
set_parameter_file_path();
]]>
</s:server-script>
</a:init-procedure>
<a:view>
<a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>
<a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/>
<a:link id="contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/>
<a:link id="contract_history_window_link" url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/>
<a:link id="con505_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<!--打印使用-->
<a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id" model="cont.CON505.con505_contract_content" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id" url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/>
<a:link id="${/parameter/@layout_code}_con_batch_dl_link_id" url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/>
<a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link" url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/>
<a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="execute"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true);
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var contract_id = $(ds_id).getCurrentRecord().get('contract_id');
new Leaf.Window({
id: 'contract_history_window',
url: $('contract_history_window_link').getUrl(),
params: {
contract_id: contract_id
},
fullScreen: true
});
};
// window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
// if (name == 'car_detail') {
// return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + config_record.get('prompt') + '</a>';
// }
// return value;
// };
window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) {
var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl();
var record = $(ds_id).findById(id);
if (record) {
var win = new Leaf.Window({
id: 'con_cashflow_wirte_off_detail_window',
url: url,
params: {
cashflow_id: record.get('cashflow_id'),
winid: 'con_cashflow_wirte_off_detail_window'
},
draggable: true,
fullScreen: true
});
}
};
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'project_number') {
return '<a href="javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
} else if (name == 'gps_attch') {
link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload';
if (record.get('atm_num3') > 0) {
return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else {
return '<a style="font-weight:bolder;font-size:1.2em" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
}
} else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '<font color="RED">' + value + '</font>';
}
return value;
} else if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'car_detail' && record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attachment') {
link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name' || name == 'attach_file_name_print' ) {
var content_type = record.get('content_type');
var content_id = record.get('content_id');
//电子合同
// if(content_type == '01'){
// var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN&content_id=' + content_id;
// var url = '';
// url = url + '<a href=' + link + '>' + '下载' + '</a>' + ',';
// return url;
// }else {
if (value != null) {
var link = '${/request/@context_path}/atm_download.lsc?attachment_id=';
var str = value.split(';;');
var url = '';
for (var i = 0; i < str.length; i++) {
var temp = str[i].split('--');
if (!Leaf.isEmpty(temp[0])) {
var file_name = temp[0].toUpperCase();
var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_name.indexOf('.PDF') >= 0) {
url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ',';
} else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
//}
} else if (name == 'received_amount') {
link_function = '${/parameter/@layout_code}_received_amount_detail';
if (value) {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + Leaf.formatMoney(value) + '</a>';
}
return '';
}
};
function wfl_prj501_grid_update(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = {};
param['bp_class'] = record.get('bp_class');
param['project_id'] = record.get('project_id');
param['function_code'] = 'PRJ502D';
param['function_usage'] = 'QUERY';
param['url_title'] = '租赁申请查询';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
// if (record.get('con_contract_id')) {
var url;
if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id');
}
var win = new Leaf.Window({
url: url,
title: 'gps附件上传',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id',
width: 850,
height: 400
});
// win.on('close', function(){
// $(ds_id).query();
// });
// } else {
// Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
// }
};
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_query_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};//record.data;
param['bp_id'] = record.get('bp_id');
param['cdd_list_id'] = record.get('cdd_list_id');
param['company_id'] = '${/session/company_id}';
param['document_id'] = record.get('bp_id');
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
param['bp_type'] = record.get('bp_type');
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
};
// function open_contract_window(record_id, ds_id) {
// var record = $(ds_id).findById(record_id);
// var param = record.data;
// var contract_lease_item_id = record.get('contract_lease_item_id');
// new Leaf.Window({
// id: 'contract_lease_item_maintain_window',
// url: $('contract_lease_item_maintain_link').getUrl(),
// params: {
// contract_lease_item_id: contract_lease_item_id
// },
// fullScreen: true
// });
// // param['function_code'] = 'CON501D';
// // param['function_usage'] = 'MODIFY';
// // param['maintain_type'] = 'UPDATE';
// // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
// // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id);
// }
window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('check_id')) {
var url;
if (query_only == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
};
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
//
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var content_id;
//alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl);
Leaf.request({
url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(),
para: {
content_id: content_id,
contract_id: record.get('contract_id'),
contract_bp_id: record.get('content_bp_pk'),
clause_usage: 'GH_WITHHOLD_AGREE'
},
success: function (rsc) {
//
//alert(rsc.result.content_id);
Leaf.request({
url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(),
para: {
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}'
},
success: function () {
Leaf.request({
url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(),
para: {
contract_id: record.get('contract_id'),
content_id: rsc.result.content_id,
file_path: '${/parameter/@file_path}',
batch_flag: 'Y'
},
success: function () {
var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '&content_id=' + rsc.result.content_id;
window.open(url, '_self');
unlock_current_window();
}
});
unlock_current_window();
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
},
error: function () {
unlock_current_window();
},
failure: function () {
unlock_current_window();
},
scope: this
});
};
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
if (!Ext.isEmpty(record.get('contract_number'))) {
new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
action: 'VIEW',
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id'
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同查看',
width: 1300,
height: 550
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
var change_flag = 'N';
//工作流中合同文本生成按钮
//基本信息tab页 新增必输字段的校验 add by liukang 20160328
window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item');
var record = $(ds_id).getCurrentRecord();
var con_lease_record = $(con_lease_item_id).getCurrentRecord();
var direct_debit_bank_id = record.get('direct_debit_bank_id');
var dd_bank_account_name = record.get('dd_bank_account_name');
var dd_bank_account_num = record.get('dd_bank_account_num');
var color_of_apprearance = con_lease_record.get('color_of_apprearance');
var item_frame_number = con_lease_record.get('item_frame_number');
var item_engine_number = con_lease_record.get('item_engine_number');
var license_number = con_lease_record.get('license_number');
/* if (Ext.isEmpty(direct_debit_bank_id)) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!');
} else */
if (!Ext.isEmpty(record.get('contract_number'))) {
var win = new Leaf.Window({
id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
params: {
contract_id: record.get('contract_id'),
company_id: record.get('company_id'),
document_category: record.get('document_category'),
business_type: record.get('business_type'),
winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id',
change_flag: change_flag,
contract_name: record.get('contract_name'),
contract_number: record.get('contract_number')
},
url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(),
title: '合同文本生成',
width: 1300,
height: 550
});
//在关闭页面之后,刷新一下ds
win.on('close', function () {
if (ds_id) {
$(ds_id).query();
}
});
} else {
Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!');
}
};
//add by zhuxianfei 20180207
function view_pdf(attachment_id) {
Leaf.request({
url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query',
para: {
attachment_id: attachment_id
},
success: function (res) {
var path = res.result.record.file_path;
path = path.substr(path.indexOf('hls_attachment'));
var tomcat_source = '${/parameter/@tomcat_source}';
var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path+'?type=pdf';
var oWin = window.open(source_path);
},
scope: this
});
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score');
// if (ds == $(ds_id)) {
// qpara.contract_id = '${/parameter/@contract_id}';
//$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
// }
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var record = $(ds_id).getCurrentRecord();
var contract_id=record.get('contract_id');
if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if($(ds_id).validate()){
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_approval_link_id').getUrl(),
para: {
contract_id:contract_id
},
scope: this,
success: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: xuls
$Date: 2017-4-21 下午01:54:29
$Revision: 1.0
$Purpose: 合同维护入口界面
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<a:link id="con311_create_entrusts_link" model="cont.CON311.create_entrusts" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"/>
<script type="text/javascript"><![CDATA[
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('contract_status')=='SIGNING' || record.get('contract_status')=='INCEPT_RETURN'||record.get('contract_status')=='SIGN'){
param['function_code'] = 'CON3200N';
param['function_usage'] = 'MODIFY';
}
else{
param['function_code'] = 'CON3200Q';
param['function_usage'] = 'QUERY';
}
param['winid'] = 'con_contract_modify_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
function open_project_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['company_id'] = record.get('company_id');
param['project_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['function_code'] = 'PRJ501_WFL';
param['bp_class'] = record.get('bp_class');
param['maintain_type'] = 'QUERY';
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_special_link', ds_id, '${/parameter/@layout_code}');
}
function open_bs_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'CON301BS';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
param['contract_id'] = record.get('contract_id');
param['url_title'] = 'BS明细';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}
if (name == 'project_id_c' && value) {
return '<a href="javascript:open_project_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if (name == 'bs_link') {
return '<a href="javascript:open_bs_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">明细</a>';
}
return value;
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
}
};
//单据跟踪
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
// var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
// var records = $('prj_project_ds_id').getSelected();
var ds = $('CONTRACT_QUERY_ENTRANCE_G_CONTRACT_RESULT_con_contract_ds');
var records = ds.getSelected();
if (records.length != 1) {
Leaf.showMessage('提示', '请选择一条数据!');
return;
}
var instance_id = records[0].get('wfl_instance_id');
var win = new Leaf.Window({
id: 'history_check',
url: $('${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check').getUrl(),
params: {
instance_id: instance_id
},
title: '单据历史查看',
height: 500,
width: 860,
fullScreen: true
});
};
//合同文本打印
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getSelected();
for (var i = 0;i < records.length;i++) {
var param = records[i].data;
param['function_code'] = 'CON311D';
if(records[i].data.contract_status=='NEW'){
param['maintain_type'] = 'UPDATE';
param['function_usage'] = 'UPDATE';
param['query_only'] = 'N';
}
else{
param['maintain_type'] = 'QUERY';
param['function_usage'] = 'QUERY';
param['query_only'] = 'Y';
}
param['winid'] = 'con_contract_modify_link_winid';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON501"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
...@@ -78,13 +78,13 @@ ...@@ -78,13 +78,13 @@
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}'); Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_save(nextStep, source_procedure) { function hls_hls500_save(nextStep, source_procedure) {
Leaf.request({ Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(), url: $('prj_check_prj_record_link_id').getUrl(),
para: { para: {
'project_id': '${/parameter/@document_id}' 'project_id': '${/parameter/@document_id}'
}, },
success: function(res) { success: function(res) {
var secondary_lease = res.result.secondary_lease; var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction; var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list; var price_list = res.result.price_list;
...@@ -106,14 +106,17 @@ ...@@ -106,14 +106,17 @@
return; return;
} }
} }
if(price_list=='DS_PRICE_10'){ if(price_list=='DS_PRICE_10'){
if(payment_deduction!='TRADE_IN'){ if(payment_deduction!='TRADE_IN'){
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll(); var record = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) { for (var i = 0;i < temp_head_records.length;i++) {
if(temp_head_records[i].get('column_code')=='H109') { if(record[i].get('column_code')=='H109') {
temp_head_records[i].set('column_value',0); record[i].set('column_value',0);
// temp_head_records[i].set('column_value_c',0); record[i].set('column_value_c',0);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);
console.log(a);
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0;
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=0;
} }
} }
}else{ }else{
...@@ -133,6 +136,7 @@ ...@@ -133,6 +136,7 @@
} }
} }
lock_calc_current_window('${l:HLS.SAVING}'); lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) { if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window(); unlock_calc_current_window();
...@@ -230,6 +234,7 @@ ...@@ -230,6 +234,7 @@
} }
function calc_execute(source_procedure) { function calc_execute(source_procedure) {
var final_recreate_H_formula, final_recreate_L_formula; var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') { if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y'; final_recreate_H_formula = 'Y';
...@@ -629,7 +634,6 @@ ...@@ -629,7 +634,6 @@
} }
function do_hls500_head_update(ds, record, name, value, old_value) { function do_hls500_head_update(ds, record, name, value, old_value) {
if (record.get('column_code') == 'H54' ) { if (record.get('column_code') == 'H54' ) {
var sum=record.get('column_value')-4.75 var sum=record.get('column_value')-4.75
if(sum<0){ if(sum<0){
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/> <a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/> <a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
alert('${/parameter/@division}') // alert('${/parameter/@division}')
//add by zhuxianfei //add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
...@@ -361,8 +361,8 @@ ...@@ -361,8 +361,8 @@
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_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 prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'T_HISTORY_INGO', 'hls_bp_master'); 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';
...@@ -370,6 +370,7 @@ ...@@ -370,6 +370,7 @@
$(cdd_item_ds_id).query(); $(cdd_item_ds_id).query();
$(bp_ds_id).query(); $(bp_ds_id).query();
$(tenant_ds_id).query(); $(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query();
} }
......
...@@ -189,6 +189,7 @@ ...@@ -189,6 +189,7 @@
fullScreen: true, fullScreen: true,
draggable: true draggable: true
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query(); $(history_ds_id).query();
...@@ -233,6 +234,7 @@ ...@@ -233,6 +234,7 @@
draggable: true draggable: true
}); });
win.on('close', function () { win.on('close', function () {
debugger;
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query(); $(history_ds_id).query();
}); });
...@@ -283,6 +285,7 @@ ...@@ -283,6 +285,7 @@
draggable: true draggable: true
}); });
win.on('close', function () { win.on('close', function () {
$(quotation_ds_id).query(); $(quotation_ds_id).query();
$(history_ds_id).query(); $(history_ds_id).query();
...@@ -439,7 +442,7 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -439,7 +442,7 @@ function prj501n_contract_number_renderer(id, name, query_only){
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_ids = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1','prj_project');
var prj_project_lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR','prj_project_lease_item');
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'],'T_HISTORY_INGO', 'hls_bp_master'); 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');
...@@ -448,6 +451,7 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -448,6 +451,7 @@ function prj501n_contract_number_renderer(id, name, query_only){
$(cdd_item_ds_id).query(); $(cdd_item_ds_id).query();
$(bp_ds_id).query(); $(bp_ds_id).query();
$(tenant_ds_id).query(); $(tenant_ds_id).query();
$(prj_project_lease_item_ds_id).query();
} }
......
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