Commit 21e37b0a authored by 李贺贺's avatar 李贺贺

租金计算器保存与计算按钮校验修改

parent e4b91448
......@@ -94,11 +94,11 @@
// Leaf.Masker.unmask(body);
// return false;
// }
if(H1>51){
/*if(H1>51){
Leaf.showMessage('${l:PROMPT}', '还款期数应小于51期');
Leaf.Masker.unmask(body);
return false;
}
}*/
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
......
......@@ -1524,11 +1524,11 @@
// Leaf.showMessage('${l:PROMPT}', '系统暂时不支持还款期数小于2期的租金计划');
// return false;
// }
if (H1 > 51) {
Leaf.showMessage('${l:PROMPT}', '还款期数应小于51期');
unlock_calc_current_window();
return false;
}
// if (H1 > 51) {
// Leaf.showMessage('${l:PROMPT}', '还款期数应小于51期');
// unlock_calc_current_window();
// return false;
// }
if (H54 < 0) {
Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75');
unlock_calc_current_window();
......@@ -1553,7 +1553,7 @@
unlock_calc_current_window();
return;
}
//if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}' == 'LEASE') {
if ('${/parameter/@document_category}' == 'PROJECT'||'${/parameter/@document_category}' == 'CONTRACT') {
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
......@@ -1719,47 +1719,47 @@
});
// } else {
// var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
// for (var i = 0; i < temp_head_records.length; i++) {
// if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
// $('temp_hd_attribute_ds').create(temp_head_records[i].data);
// }
// var H16;
// if (temp_head_records[i].get('column_code') == 'H16') {
// H16 = temp_head_records[i].get('column_value');
// }
// if (temp_head_records[i].get('column_code') == 'H109') {
// temp_head_records[i].set('column_value', H16);
// // temp_head_records[i].set('column_value_c',0);
// }
// }
// var all_records = $('temp_hd_attribute_ds').getAll();
// var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
// headRecord.isNew = false;
// headRecord.dirty = true;
// create_record_column(all_records, headRecord);
//
// function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
// if (typeof (nextStep) == 'function') {
// nextStep(source_procedure);
// } else {
// function on_ln_formula_load(ds) {
// Leaf.SideBar.enable = true;
// success_sidebar_show();
// unlock_calc_current_window();
// $('ln_formula_ds').un('load', on_ln_formula_load);
// }
//
// $('ln_formula_ds').on('load', on_ln_formula_load);
// $('ln_formula_ds').query();
// }
// }
//
// $('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess_new);
// Leaf.SideBar.enable = false;
// $('hls_fin_cal_save_hd_ds').submit();
// }
} else {
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
var H16;
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value');
}
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', H16);
// temp_head_records[i].set('column_value_c',0);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess_new(ds, res) {
if (typeof (nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess_new);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
}
......
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