Commit 97e6f9b1 authored by lijingjing's avatar lijingjing

Merge branch 'contract_change_quotation' into develop

<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2014-2-28 下午03:32:03
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
con_contract_workflow_pkg.check_con_record(
p_contract_id =>${@contract_id},
p_contract_status =>${@contract_status}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="contract_status" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@contract_status"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -36,6 +36,8 @@
<a:link id="hls_fin_calc_import_line_link_id" url="${/request/@context_path}/modules/hls/HLS500/hls_fin_calc_import_line.lview"/>
<a:link id="hls_fin_calc_show_display_line_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_show_display_line_n.lview"/>
<a:link id="prj_check_prj_record_link_id" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<a:link id="con_check_con_record_link_id" model="hls.HLS500N.check_con_record" modelaction="execute"/>
<a:link id="hls_fin_calc_single_variable_calc_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="update"/>
<a:link id="hls_fin_calc_single_variable_manual_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="execute"/>
<style><![CDATA[
......@@ -90,7 +92,7 @@
var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list;
if(price_list=='DS_PRICE_10' && secondary_lease=='NO'){
if((price_list=='HL_PRICR_E'||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN') && secondary_lease=='NO'){
var count=0;
var denominator=0;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
......@@ -108,7 +110,7 @@
return;
}
}
if(price_list=='DS_PRICE_10'){
if(price_list=='HL_PRICR_E' ||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN'){
if(payment_deduction!='TRADE_IN'){
var record = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
......@@ -202,6 +204,7 @@
}
function hls_hls500_re_calc() {
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'RE_CALC');
}
......@@ -787,12 +790,18 @@
}
function onEditorHdload(ds) {
var headRecords = ds.getAll();
if('${/parameter/@document_category}'=='CONTRACT'&&'${/parameter/@contract_status}'=='SIGN'){
if('${/parameter/@document_category}'=='CONTRACT'){
Leaf.request({
url: $('con_check_con_record_link_id').getUrl(),
para: {
'contract_id': '${/parameter/@document_id}'
},
success: function(res) {
var contract_status = res.result.contract_status;
if(contract_status=='SIGN'){
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name !="lease_start_date"&&column_name !="contract_inception_date"){
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
......@@ -800,9 +809,8 @@
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
}else if('${/parameter/@document_category}'=='CONTRACT'&&'${/parameter/@contract_status}'!='SIGN'){
}else{
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
......@@ -810,6 +818,21 @@
}
}
},
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') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code');
......
......@@ -107,7 +107,7 @@
id: 'hls_fin_calc_quotation_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
......@@ -147,7 +147,7 @@
id: 'hls_fin_calc_quotation_update_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
......@@ -192,7 +192,7 @@
id: 'hls_fin_calc_quotation_link_winid',
params: {
document_id: parent_pk_value,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
......
......@@ -174,7 +174,7 @@
price_list: price_list,
secondary_lease:secondary_lease,
payment_deduction:payment_deduction,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
......@@ -218,7 +218,7 @@
price_list: price_list,
secondary_lease:secondary_lease,
payment_deduction:payment_deduction,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: record.get('calc_session_id'),
quotation_id: record.get('quotation_id'),
......@@ -268,7 +268,7 @@
price_list: price_list,
secondary_lease:secondary_lease,
payment_deduction:payment_deduction,
document_category: 'PORJECT',
document_category: 'PROJECT',
maintain_type: 'MODIFY',
calc_session_id: res.result.record.calc_session_id,
quotation_id: quotation_id,
......
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