Commit 8d8551e7 authored by lijingjing's avatar lijingjing

Merge branch 'refs/heads/baojiayouhua' into develop

parents 1f3fb65b 285c8311
...@@ -14,13 +14,15 @@ ...@@ -14,13 +14,15 @@
p_project_id =>${@project_id}, p_project_id =>${@project_id},
p_payment_deduction =>${@payment_deduction}, p_payment_deduction =>${@payment_deduction},
p_secondary_lease =>${@secondary_lease}, p_secondary_lease =>${@secondary_lease},
p_price_list =>${@price_list} p_price_list =>${@price_list},
p_detention => ${@detention}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
<bm:parameter name="payment_deduction" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@payment_deduction"/> <bm:parameter name="payment_deduction" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@payment_deduction"/>
<bm:parameter name="secondary_lease" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@secondary_lease"/> <bm:parameter name="secondary_lease" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@secondary_lease"/>
<bm:parameter name="detention" dataType="java.lang.Double" input="false" output="true" outputPath="/parameter/@detention"/>
<bm:parameter name="price_list" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@price_list"/> <bm:parameter name="price_list" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@price_list"/>
</bm:parameters> </bm:parameters>
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/> <a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="set_sum_unreceived_principal_cancel_link" model="cont.CON731.con_change_calc" modelaction="update"/> <a:link id="set_sum_unreceived_principal_cancel_link" model="cont.CON731.con_change_calc" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Ext.ux.Lightbox.register('a[ref=img]', true); Ext.ux.Lightbox.register('a[ref=img]', true);
Leaf.onReady(function() { Leaf.onReady(function() {
...@@ -199,6 +203,12 @@ ...@@ -199,6 +203,12 @@
var document_type = '${/parameter/@document_type}'; var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id'); var calc_session_id = req_record.get('calc_session_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if (req_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
$('${/parameter/@layout_code}_submit_approval').enable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable()) && $(req_ds_id2).validate($('${/parameter/@layout_code}_submit_approval').enable())) { if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable()) && $(req_ds_id2).validate($('${/parameter/@layout_code}_submit_approval').enable())) {
// if (req_record.dirty) { // if (req_record.dirty) {
// Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); // Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
...@@ -208,10 +218,11 @@ ...@@ -208,10 +218,11 @@
// 回款賬戶變更 // 回款賬戶變更
if('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY'){ if('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY'){
var bank_account_num_s =req_record.get('bank_account_num_s'); var bank_account_num_s =req_record.get('bank_account_num_s');
var bank_account_num_c =req_record.get('bank_account_num_c'); var bank_account_num_c =req_record.get('bank_account_name');
if(bank_account_num_s == bank_account_num_c){ if(bank_account_num_s == bank_account_num_c){
Leaf.showMessage('警告', '现扣款账号和原扣款账号不能重复!'); Leaf.showMessage('警告', '现扣款账号和原扣款账号不能重复!');
return; window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else{ }else{
$('${/parameter/@layout_code}_submit_approval').disable(); $('${/parameter/@layout_code}_submit_approval').disable();
$('${/parameter/@layout_code}_save').disable(); $('${/parameter/@layout_code}_save').disable();
...@@ -338,391 +349,63 @@ ...@@ -338,391 +349,63 @@
}; };
//附件上传 //附件上传
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 == 'leasse_attachment') {
link_function = '${/parameter/@layout_code}_leasse_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 == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}else if (name == 'leasse_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'e_attachment') {
link_function = '${/parameter/@layout_code}_e_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 == 'e_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase(); function con_repo001_upload_file(id, name, query_only) {
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; if (record.get('check_id')) {
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'pay_attachment') {
link_function = '${/parameter/@layout_code}_pay_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 == 'pay_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'leasehold_attachment') {
link_function = '${/parameter/@layout_code}_leasehold_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 == 'leasehold_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'dept_attachment') {
link_function = '${/parameter/@layout_code}_dept_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 == 'dept_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'part_attachment') {
link_function = '${/parameter/@layout_code}_part_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 == 'part_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
} else if (name == 'paydate_attachment') {
link_function = '${/parameter/@layout_code}_paydate_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 == 'paydate_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
}
else if (name == 'cut_attachment') {
link_function = '${/parameter/@layout_code}_cut_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 == 'cut_attach_file_name') {
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_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase();
if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') {
url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} else {
url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
}
}
}
return url;
}
}else if (name == 'description') {
if (record.get('important_flag') == 'Y') {
return '<span style="color: RED; ">' + value + '</span>';
}
return value;
}
};
window['${/parameter/@layout_code}_leasse_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_LEASSE_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_LEASSE_ATTH&header_id=' + record.get('contract_attch_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}_e_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_E_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_E_ATTH&header_id=' + record.get('contract_attch_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}_pay_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_PAY_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_PAY_ATTH&header_id=' + record.get('contract_attch_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}_leasehold_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_LH_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_LH_ATTH&header_id=' + record.get('contract_attch_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}_dept_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url; var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') { if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_DEPT_ATTH&header_id=' + record.get('contract_attch_id'); url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else { } else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_DEPT_ATTH&header_id=' + record.get('contract_attch_id'); url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} }
var win = new Leaf.Window({ var win = new Leaf.Window({
url: url, url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}', title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', id: 'prj500_cdd_uploadFile_screen_id',
width: 850, width: 850,
height: 400 height: 400
}); });
win.on('close', function() { win.on('close', function () {
record.ds.query(); record.ds.query();
}); });
} else { } else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
} }
};
window['${/parameter/@layout_code}_part_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_PART_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_PART_ATTH&header_id=' + record.get('contract_attch_id');
} }
var win = new Leaf.Window({ window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
url: url, var link_function = '';
title: '${l:HLS.SUPPORTING_DOCUMENT}', window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', if (name == 'attachment') {
width: 850, link_function = 'con_repo001_upload_file';
height: 400 return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
}); } else if (name == 'attach_file_name') {
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])) {
win.on('close', function() { var file_name = temp[0].toUpperCase();
record.ds.query(); 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') {
else if (file_name.indexOf('.BMP') >= 0 || file_name.indexOf('.JPG') >= 0 || file_name.indexOf('.JPEG') >= 0 || file_name.indexOf('.PNG') >= 0 || file_name.indexOf('.GIF') >= 0) {
url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ',';
} else { } else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ',';
} }
};
window['${/parameter/@layout_code}_paydate_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_PAYDATE_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_PAYDATE_ATTH&header_id=' + record.get('contract_attch_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}', '请先保存!');
} }
}; return url;
window['${/parameter/@layout_code}_cut_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) {
var record = $(ds_id).findById(id);
if (record.get('contract_attch_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@query_flag}' == 'Y') {
url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_CUT_ATTH&header_id=' + record.get('contract_attch_id');
} else {
url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CCR_UNIVERSAL_CUT_ATTH&header_id=' + record.get('contract_attch_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/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_pic_renderer'] = function(record, name, bp_seq) {
var result = name.match(/(.*)_pic$/); var result = name.match(/(.*)_pic$/);
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
url="${/request/@context_path}/modules/cont/CON_REPO001/hls_fin_calculator_update_n.lview"/> url="${/request/@context_path}/modules/cont/CON_REPO001/hls_fin_calculator_update_n.lview"/>
<a:link id="con_update_record_link_id" model="cont.CON_REPO001.save_calc_from_con" modelaction="execute"/> <a:link id="con_update_record_link_id" model="cont.CON_REPO001.save_calc_from_con" modelaction="execute"/>
<a:link id="con_update_record_link1_id" model="cont.CON_REPO001.con_change_calc_from_con" modelaction="execute"/> <a:link id="con_update_record_link1_id" model="cont.CON_REPO001.con_change_calc_from_con" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var calc_flag = false; var calc_flag = false;
...@@ -44,8 +48,8 @@ ...@@ -44,8 +48,8 @@
/* record.getField('payment_frequency_n').setReadOnly(true);*/ /* record.getField('payment_frequency_n').setReadOnly(true);*/
record.getField('payment_period').setReadOnly(true); record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1); record.set('payment_period', 1);
/* record.set('payment_frequency', null); record.set('payment_frequency', 'MONTH');
record.set('payment_frequency_n', null);*/ record.set('payment_frequency_n', 'MONTH');
} }
}; };
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'] = function () { // window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'] = function () {
...@@ -82,8 +86,7 @@ ...@@ -82,8 +86,7 @@
record.getField('payment_frequency_n').setReadOnly(true); record.getField('payment_frequency_n').setReadOnly(true);
record.getField('payment_period').setReadOnly(true); record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1); record.set('payment_period', 1);
record.set('payment_frequency', null); record.set('payment_frequency', 'MONTH');
record.set('payment_frequency_n', null);
if (name == 'ccr_due_amount') { if (name == 'ccr_due_amount') {
var due_amount = record.get('due_amount') || 0; var due_amount = record.get('due_amount') || 0;
if (due_amount < value) { if (due_amount < value) {
...@@ -201,14 +204,19 @@ ...@@ -201,14 +204,19 @@
}; };
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
$('${/parameter/@layout_code}_submit_approval').disable(); $('${/parameter/@layout_code}_submit_approval').disable();
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract'); var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract');
var req_record = $(req_ds_id).getAt(0); var req_record = $(req_ds_id).getAt(0);
var case_type = ''; var case_type = '';
var document_type = '${/parameter/@document_type}'; var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id'); var calc_session_id = req_record.get('calc_session_id');
if (req_record.dirty == true) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
$('${/parameter/@layout_code}_submit_approval').enable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable())) { if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable())) {
// if (req_record.dirty) { // if (req_record.dirty) {
// Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); // Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
...@@ -274,7 +282,7 @@ ...@@ -274,7 +282,7 @@
if (record.dirty == true) { if (record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return; return false;
} }
if($(ds_id_head).validate()){ if($(ds_id_head).validate()){
if(record.get('repurchase_types') == 'ONE_TIME_REPURCHASE'){ if(record.get('repurchase_types') == 'ONE_TIME_REPURCHASE'){
...@@ -424,6 +432,64 @@ ...@@ -424,6 +432,64 @@
ds.query(); ds.query();
} }
};*/ };*/
//add by lijingjing
function con_repo001_upload_file(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}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: '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}_dynamic_link_renderer'] = function (value, record, name, config_record) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'con_repo001_upload_file';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
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') {
else if (file_name.indexOf('.BMP') >= 0 || file_name.indexOf('.JPG') >= 0 || file_name.indexOf('.JPEG') >= 0 || file_name.indexOf('.PNG') >= 0 || file_name.indexOf('.GIF') >= 0) {
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;
}
}
};
]]></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>
......
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
var param = record.data; var param = record.data;
param['function_code'] = 'CON301'; param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
param['contract_id'] = record.get('normal_contract_id');
param['download'] = 'Y'; param['download'] = 'Y';
param['maintain_type'] = 'UPDATE'; /* param['maintain_type'] = 'UPDATE';*/
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_repo_modify_link', ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_repo_modify_link', ds_id);
} }
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
'project_id': '${/parameter/@document_id}' 'project_id': '${/parameter/@document_id}'
}, },
success: function(res) { success: function(res) {
debugger;
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;
...@@ -107,7 +108,7 @@ ...@@ -107,7 +108,7 @@
if((count/denominator)<0.15){ if((count/denominator)<0.15){
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于15%'); Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于15%');
unlock_calc_current_window('${l:HLS.CALCULATING}'); unlock_calc_current_window('${l:HLS.CALCULATING}');
return; return false;
} }
} }
if(price_list=='HL_PRICR_E' ||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN'){ if(price_list=='HL_PRICR_E' ||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN'){
...@@ -647,7 +648,7 @@ ...@@ -647,7 +648,7 @@
var sum=record.get('column_value')-4.75 var sum=record.get('column_value')-4.75
if(sum<0){ if(sum<0){
Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75'); Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75');
return; return false;
} }
} }
if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) { if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV')) {
...@@ -832,7 +833,37 @@ ...@@ -832,7 +833,37 @@
} }
if('${/parameter/@document_category}'=='PROJECT'){
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
'project_id': '${/parameter/@document_id}'
},
success: function(res) {
var detention = res.result.detention;
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name =="residual_value"){
headRecords[i].set('column_value',detention);
headRecords[i].set('column_value_c',detention);
}
}
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}
if (headRecords[0].get('show_column_code') == 'N') { if (headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code'); $('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code'); $('hls_fin_calculator_export_grid_id').hideColumn('column_code');
......
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