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>
......
...@@ -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