Commit ecc4c85d authored by 陆正友's avatar 陆正友

博雷顿

parent 9688746a
......@@ -37,14 +37,14 @@
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
and PARENT_UNIT_ID <> 1544
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60'))
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60','95','93'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'DIVISION'
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60')
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60','95','93')
AND NOT EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
......
......@@ -118,6 +118,7 @@
function invoiceHd_confirm() {
debugger;
Leaf.Masker.mask(Ext.getBody());
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag');
......@@ -269,6 +270,7 @@
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
<a:record code_value="LEASEBACK" code_value_name="售后回租"/>
<a:record code_value="LEASEOPERAT" code_value_name="经营性租赁"/>
</a:datas>
</a:dataSet>
<a:dataSet id="write_off_flag_ds">
......@@ -287,10 +289,10 @@
<a:record code_value="REPUR" code_value_name="解约回购"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr510n_invoice_type_ds">
<a:dataSet id="acr510n_invoice_type_ds">
<a:datas>
<a:record code_value="ECT" code_value_name="电子发票"/>
<a:record code_value="PAPER" code_value_name="纸质发票"/>
<a:record code_value="PAPER" code_value_name="数电纸质发票"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr510n_division_ds">
......@@ -300,15 +302,14 @@
<a:record code_value="30" code_value_name="高空作业车"/>
<a:record code_value="40" code_value_name="其它"/>
<a:record code_value="50" code_value_name="星邦高空作业车"/>
<!--<a:record code_value="90" code_value_name="租赁二手机"/>-->
<a:record code_value="90" code_value_name="租赁二手机(日立)"/>
<a:record code_value="91" code_value_name="神钢建机"/>
<a:record code_value="92" code_value_name="北京心诚"/>
<a:record code_value="99" code_value_name="工程机械"/>
<a:record code_value="80" code_value_name="叉车"/>
<!--<a:record code_value="70" code_value_name="铁甲业务"/>-->
<a:record code_value="70" code_value_name="二手机业务"/>
<a:record code_value="92" code_value_name="北京卡家"/>
<a:record code_value="95" code_value_name="经租设备"/>
<a:record code_value="93" code_value_name="新业务-厂商担保"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr510n_invoice_method_ds">
......@@ -319,7 +320,7 @@
</a:dataSet>
<a:dataSet id="allConditionDs" autoCreate="true">
<a:fields>
<a:field name="invoice_method"/>
<a:field name="invoice_method"/>
<a:field displayField="code_value_name" name="invoice_method_n" options="acr510n_invoice_method_ds"
returnField="invoice_method" valueField="code_value"/>
<a:field name="division"/>
......@@ -460,9 +461,9 @@
<a:field name="billing_status"/>
<a:field name="billing_status_n" displayField="code_value_name" options="billing_status_ds"
returnField="billing_status" valueField="code_value"/>
<a:field name="full_elec_invoice_flag"/>
<a:field name="full_elec_invoice_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="full_elec_invoice_flag" valueField="code_value"/>
<a:field name="full_elec_invoice_flag"/>
<a:field name="full_elec_invoice_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="full_elec_invoice_flag" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="queryUpdateFunction"/>
......@@ -538,7 +539,8 @@
</a:hBox>
<a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/>
<a:comboBox bindTarget="allConditionDs" name="full_elec_invoice_flag_n" prompt="是否全电发票"/>
<a:comboBox bindTarget="allConditionDs" name="full_elec_invoice_flag_n" prompt="是否全电发票"/>
</a:hBox>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
......@@ -603,13 +605,13 @@
<a:column name="exchange_rate" align="right" width="80"/>
<a:column name="exchange_rate_type_desc" width="100"/> -->
<a:column name="bill_object_bp_class_desc" width="100" align="center" prompt="商业伙伴分类" />
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="division_n" prompt="租赁物" width="100"/>
<a:column name="write_off_flag_desc" width="100" align="center" prompt="核销标记" />
<a:column name="rl_flag_n" width="100" align="center" prompt="是否日立返还金" />
<a:column name="rl_flag_n" width="100" align="center" prompt="是否日立为优质客户付租金" />
<a:column name="billing_status_n" width="100" align="center" prompt="开票状态" />
<a:column name="full_elec_invoice_flag_n" width="100" align="center" prompt="是否全电发票" />
</a:columns>
<a:column name="full_elec_invoice_flag_n" width="100" align="center" prompt="是否全电发票" />
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="抬头信息" width="150">
......@@ -620,7 +622,8 @@
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="contract_status_desc" prompt="合同状态" align="center" width="80"/>
<a:column name="billing_method_desc" prompt="开票规则" width="155"/>
<a:column name="billing_method_desc" prompt="开票规则"
width="155"/>
<a:column name="billing_object_name" autoAdjust="false"
editor="contractDs_grid_editor_lov" prompt="开票对象名称"
renderer="render_contractDs_grid" showTitle="true" width="200"/>
......@@ -628,7 +631,7 @@
width="200"/>
<a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150"/>
<a:column name="object_taxpayer_type_desc" prompt="纳税人类型" align="center" width="150"/>
<a:column name="invoice_type_n" prompt="开票类型" width="150"/>
<a:column name="invoice_type_n" prompt="开票类型" width="150"/>
<a:column name="invoice_bp_address_phone_num" autoAdjust="false" prompt="开票地址电话"
showTitle="true" width="200"/>
<a:column name="invoice_bp_bank_account" autoAdjust="false" prompt="开户行及账号"
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-17 上午09:26:12
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-4-17 上午09:26:12
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
<a:init-procedure participants="leaf.service.exception.ExceptionHandler">
......@@ -19,13 +19,13 @@
<p:set field="/parameter/@dynamic_base_table" value="null"/>
<a:model-query defaultwhereclause="(d.layout_area_seq = &apos;H&apos;)" fetchAll="true" model="hls.HLS500N.hls_parameter_value_lov_load_n" rootPath="hd_parameter_sql_value"/>
<a:model-query defaultwhereclause="(d.layout_area_seq = &apos;L&apos;)" fetchAll="true" model="hls.HLS500N.hls_parameter_value_lov_load_n" rootPath="ln_parameter_sql_value"/>
<a:model-query defaultWhereClause="cc.division = hd.division and cc.contract_id=${/parameter/@document_id}" model="hls.HLS500N.check_con_record_date" rootPath="full_elec_sign"/>
<p:exception-handles>
<p:catch Exception="*">
<p:action name="HandleException"/>
<p:action name="CreateErrorResponse"/>
</p:catch>
</p:exception-handles>
<a:model-query defaultWhereClause="cc.division = hd.division and cc.contract_id=${/parameter/@document_id}" model="hls.HLS500N.check_con_record_date" rootPath="full_elec_sign"/>
</a:init-procedure>
<a:view>
<!-- <a:link id="hls_parameter_value_lov_link" url="${/request/@context_path}/modules/hls/HLS500/hls_parameter_value_lov.lview"/> -->
......@@ -58,19 +58,19 @@
margin-left:3px;
}
.item-slideBar{
top:10px;
width:600px;
height:30px;
border:1px solid #009900;
background-color:#CCFBD5;
color:#009900;
font-weight:bold;
font-size:12px;
text-align:center;
line-height:20px;
white-space :nowrap;
position:absolute;
}
top:10px;
width:600px;
height:30px;
border:1px solid #009900;
background-color:#CCFBD5;
color:#009900;
font-weight:bold;
font-size:12px;
text-align:center;
line-height:20px;
white-space :nowrap;
position:absolute;
}
.item-slideBar .inner{
width: 600px;
max-width: 500px;
......@@ -102,7 +102,7 @@
hd_calc_orign_value = [],
ln_calc_formula_orign_value = [],
ln_calc_orign_value = [];
var is_constru_unit = '${/parameter/@is_constru_unit}' || 'N';
Leaf.Masker.mask(document.documentElement, '${l:HLS.LOADING}');
function hls_hls500_3JD() {
......@@ -172,12 +172,12 @@
var cc = div((H16 + H97), (H99 + H102 - H16));
// alert(div((H16+H97), (H99+H102-H16)).toFixed(2) * 1);
var show = down_payment_rate_new * 100;
// if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
// if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
// unlock_calc_current_window();
// Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
// return false;
//}
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new && is_constru_unit != 'Y') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new && is_constru_unit != 'Y') {
if ('${/parameter/@division}'==91){
Leaf.SideBar.show({
......@@ -340,11 +340,11 @@
function hls_hls500_re_calc() {
if('${/parameter/@layout_code}'=='CCR_BEFORE_SIGN'){
Leaf.showMessage('${l:PROMPT}', '签约前变更暂时不支持试算');
return;
Leaf.showMessage('${l:PROMPT}', '签约前变更暂时不支持试算');
return;
}else{
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save_new(calc_execute, 'RE_CALC');
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save_new(calc_execute, 'RE_CALC');
}
}
......@@ -395,7 +395,7 @@
final_recreate_H_formula = recreate_H_formula;
final_recreate_L_formula = recreate_L_formula;
}
Leaf.request({
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
para: {
layout_code: '${/parameter/@layout_code}',
......@@ -553,10 +553,11 @@
function parameter_function(record, name) {
var field = record.getField(name),
ds = $('hls_fin_calculator_hd_ds'),
input_mode = record.get('input_mode');
set_field_input_mode(record, field, name, input_mode);
special_editor_function(ds, record, name);
if (record.get('alignment')) {
if (record.get('alignment')) {
Ext.each($('hls_fin_calculator_hd_grid_id').columns, function (c) {
if (c.name == name) {
c.align = record.get('alignment');
......@@ -672,15 +673,16 @@
}
function do_hls500_column_name(record, name) {
var editor_record = $('line_attribute_ds').find('column_name', name),
var editor_record = $('line_attribute_ds').find('column_name', name),
field = record.getField(name),
input_mode = editor_record.get('input_mode');
set_field_input_mode(record, field, name, input_mode);
if('${/parameter/@layout_code}'=='CCR_BEFORE_SIGN'){
if(name='principal_eq_pymt_adj'){
set_field_input_mode(record, field, name, 'READONLY');
}
}
if(name='principal_eq_pymt_adj'){
set_field_input_mode(record, field, name, 'READONLY');
}
}
if (editor_record.get('validation_type') == 'NUMBERFIELD') {
if (editor_record.get('allow_decimal') == 'TRUE') {
field.setPropertity('allowdecimals', true);
......@@ -762,7 +764,7 @@
}
function do_hls500_line_load(ds) {
var lineRecords = ds.getAll();
var lineRecords = ds.getAll();
var attribute_records = $('line_attribute_ds').getAll();
if (!lineRecords) {
return;
......@@ -808,7 +810,7 @@
var count=0;
var error_count=0;
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' ) {
// var sum=record.get('column_value')-4.75
......@@ -860,46 +862,46 @@
recreate_L_formula = 'N';
}
}
//非全电签约电子合同起租日校验 18083
//非全电签约电子合同起租日校验
if('${/parameter/@layout_code}'=='CCR_BEFORE_SIGN'){
if('${/model/full_elec_sign/record/@full_elec_sign}'!='Y' && '${/model/full_elec_sign/record/@sign_type}'=='ELE_SIGN'){
if (record.get('column_code') == 'H2'){
if(!Ext.isEmpty(record.get('column_value'))){
Leaf.request({
url: $('check_con_lease_start_date_link_id').getUrl(),
para: {
'contract_id': '${/parameter/@document_id}',
'lease_start_date':record.get('column_value')
},
success: function(res) {
error_count = res.result.error_count;
},
failure: function () {
return;
},
error: function () {
return;
},
scope: this,
sync: true
});
//判断起租日
debugger;
if (error_count > 0 && count == 0 ) {
count = count + 1;
$L.showErrorMessage('提示', '变更后起租日期不符合要求,请修改!');
record.set('column_value','');
return false;
}else if (error_count > 0 && count != 0) {
count = 0;
record.set('column_value','');
return false;
}
}
if('${/model/full_elec_sign/record/@full_elec_sign}'!='Y' && '${/model/full_elec_sign/record/@sign_type}'=='ELE_SIGN'){
if (record.get('column_code') == 'H2'){
if(!Ext.isEmpty(record.get('column_value'))){
Leaf.request({
url: $('check_con_lease_start_date_link_id').getUrl(),
para: {
'contract_id': '${/parameter/@document_id}',
'lease_start_date':record.get('column_value')
},
success: function(res) {
error_count = res.result.error_count;
},
failure: function () {
return false;
},
error: function () {
return false;
},
scope: this,
sync: true
});
//判断起租日
if (error_count > 0 && count == 0) {
count = count + 1;
$L.showErrorMessage('提示', '变更后起租日期不符合要求,请修改!');
record.set('column_value','');
return false;
}else if (error_count > 0 && count != 0) {
count = 0;
record.set('column_value','');
return false;
}
}
}
}
}
}
onEditorupdate(ds, record, name, value, old_value);
}
......@@ -1003,7 +1005,7 @@
}
function onEditorHdload(ds) {
var headRecords = ds.getAll();
var headRecords = ds.getAll();
if ('${/parameter/@document_category}' == 'CONTRACT') {
Leaf.request({
url: $('con_check_con_record_link_id').getUrl(),
......@@ -1016,27 +1018,27 @@
if (sign_contract_status == 'SIGN' || sign_contract_status == 'SIGNING' || contract_status == 'NEW' || contract_status == 'INCEPT_RETURN') {
//签约前合同变更才放开部分字段,其他维持原合同起租时租赁日调整逻辑
/*if('${/parameter/@layout_code}'!='CCR_BEFORE_SIGN'){*/
for (var i = 0; i < headRecords.length; i++) {
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');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
/* }else{
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") {
if (column_name != "lease_start_date" && column_name != "contract_inception_date"&&column_name != "other_fee"&&column_name != "lease_times"&&column_name != "int_rate_display"
&&column_name != "down_payment"&&column_name != "third_party_deposit"&&column_name != "balloon_ratio") {
headRecords[i].set('input_mode', 'READONLY');
headRecords[i].set('readonly_input_mode', 'TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
/* }else{
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"&&column_name != "other_fee"&&column_name != "lease_times"&&column_name != "int_rate_display"
&&column_name != "down_payment"&&column_name != "third_party_deposit"&&column_name != "balloon_ratio") {
headRecords[i].set('input_mode', 'READONLY');
headRecords[i].set('readonly_input_mode', 'TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
}*/
}*/
......@@ -1659,7 +1661,22 @@
// unlock_calc_current_window();
// return false;
//}
if (H54 < 0&&'${/parameter/@division}'!=91) {
if ('${/parameter/@division}'==93) {
var dowm_money = mul(div(H16,H99),100)
if(dowm_money<15){
Leaf.SideBar.show({
msg:'当前首付款比例低于15%!',
duration: 10000
})
}
if(H1 > 36){
Leaf.SideBar.show({
msg:'租赁期限超过36期!',
duration: 10000
})
}
}
if (H54 < 0) {
Leaf.showMessage('${l:PROMPT}', '利率最低值不能低于4.75');
unlock_calc_current_window();
return false;
......@@ -1683,19 +1700,19 @@
unlock_calc_current_window();
return false;
}
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}'=='LEASEBACK' && is_constru_unit != 'Y') {
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}'=='LEASEBACK' && is_constru_unit != 'Y') {
var dowm_payment = div(H16, plus(H99,H102)).toFixed(2) * 100;
if (dowm_payment < 15) {
if ('${/parameter/@division}'!=91) {
Leaf.showMessage('${l:PROMPT}', '回租首付款比例不低于15%');
unlock_calc_current_window();
return false;
Leaf.showMessage('${l:PROMPT}', '回租首付款比例不低于15%');
unlock_calc_current_window();
return false;
}else{
Leaf.SideBar.show({
//msg: "回租首付款比例不低于15%</br>租赁期为一年及以内的,利率为6.75%,大于一年的7.3%</br>利率最低值不能低于4.75%",
msg: "回租首付款比例不低于15%",
duration: 5000
});
Leaf.SideBar.show({
//msg: "回租首付款比例不低于15%</br>租赁期为一年及以内的,利率为6.75%,大于一年的7.3%</br>利率最低值不能低于4.75%",
msg: "回租首付款比例不低于15%",
duration: 5000
});
}
}
}
......@@ -1717,43 +1734,43 @@
var price_list = res.result.price_list;
var down_payment_rate_new = res.result.down_payment_rate_new;
if ('${/parameter/@document_category}' == 'PROJECT' && '${/parameter/@business_type}' == 'LEASE') {
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
//比例=(H16+H97)/(H99+H102-H16)
var H16, H97, H99, H102;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value') || 0
} else if (temp_head_records[i].get('column_code') == 'H97') {
H97 = temp_head_records[i].get('column_value') || 0
} else if (temp_head_records[i].get('column_code') == 'H99') {
H99 = temp_head_records[i].get('column_value') || 0
} else if (temp_head_records[i].get('column_code') == 'H102') {
H102 = temp_head_records[i].get('column_value') || 0
if ((price_list == 'HL_PRICR_E' || price_list == 'HL_PRICR_TEST' || price_list == 'HL_PRICR_NTEST' || price_list == 'HL_PRICR_EN') && secondary_lease == 'NO') {
//比例=(H16+H97)/(H99+H102-H16)
var H16, H97, H99, H102;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
if (temp_head_records[i].get('column_code') == 'H16') {
H16 = temp_head_records[i].get('column_value') || 0
} else if (temp_head_records[i].get('column_code') == 'H97') {
H97 = temp_head_records[i].get('column_value') || 0
} else if (temp_head_records[i].get('column_code') == 'H99') {
H99 = temp_head_records[i].get('column_value') || 0
} else if (temp_head_records[i].get('column_code') == 'H102') {
H102 = temp_head_records[i].get('column_value') || 0
}
}
}
var aa = H16 + H97;
var bb = H99 + H102 - H16;
var cc = div((H16 + H97), (H99 + H102 - H16));
// alert(div((H16+H97), (H99+H102-H16)).toFixed(2) * 1);
var show = down_payment_rate_new * 100;
//if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
// unlock_calc_current_window();
// Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
// return false;
//}
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new && is_constru_unit != 'Y') {
var aa = H16 + H97;
var bb = H99 + H102 - H16;
var cc = div((H16 + H97), (H99 + H102 - H16));
// alert(div((H16+H97), (H99+H102-H16)).toFixed(2) * 1);
var show = down_payment_rate_new * 100;
//if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
// unlock_calc_current_window();
// Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
// return false;
//}
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new && is_constru_unit != 'Y') {
if ('${/parameter/@division}'==91) {
Leaf.SideBar.show({
// msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%</br>租赁期为一年及以内的,利率为6.75%,大于一年的7.3%</br>利率最低值不能低于4.75%',
msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%',
duration: 10000
});
Leaf.SideBar.show({
// msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%</br>租赁期为一年及以内的,利率为6.75%,大于一年的7.3%</br>利率最低值不能低于4.75%',
msg:'首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%',
duration: 10000
});
}
}
}
}
}
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0; i < temp_head_records.length; i++) {
......@@ -1786,7 +1803,7 @@
// temp_head_records[i].set('column_value_c',0);
}
}
}else if( '${/parameter/@business_type}' == 'LEASEBACK'){
}else if( '${/parameter/@business_type}' == 'LEASEBACK'){
if (payment_deduction != 'DOWN_PAYMENT_DEDUCTION') {
if (temp_head_records[i].get('column_code') == 'H109') {
temp_head_records[i].set('column_value', 0);
......@@ -1881,52 +1898,53 @@
});
} 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);
} 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();
}
}
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;
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
}
}
function calc_execute_JD_new(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') {
final_recreate_H_formula = 'Y';
final_recreate_L_formula = 'Y';
......@@ -1934,7 +1952,7 @@
final_recreate_H_formula = recreate_H_formula;
final_recreate_L_formula = recreate_L_formula;
}
Leaf.request({
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
......@@ -1965,6 +1983,7 @@
}
function calc_execute_NJD_new(source_procedure) {
var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y';
......@@ -1972,12 +1991,13 @@
} else {
final_recreate_H_formula = recreate_H_formula;
if('${/parameter/@layout_code}'=='CCR_BEFORE_SIGN'){
final_recreate_L_formula = 'N';
final_recreate_L_formula = 'N';
}else{
final_recreate_L_formula = recreate_L_formula;
final_recreate_L_formula = recreate_L_formula;
}
}
Leaf.request({
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
para: {
calc_session_id: '${/parameter/@calc_session_id}',
......
......@@ -13,12 +13,12 @@
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="zjwfl.ZJWFL1060.zi_wfl_approve_get_submitted" rootPath="approve_history_rp"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_asset_fee_flag" rootPath="asset_fee_path" ></a:model-query>
<s:server-script import="contract_print_path.js"><![CDATA[
<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'];
$ctx.parameter.asset_fee_flag = $ctx.get('/model/asset_fee_path/record/@asset_fee_flag');
]]>
</s:server-script>
$ctx.parameter.asset_fee_flag = $ctx.get('/model/asset_fee_path/record/@asset_fee_flag');
]]></s:server-script>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}lease_number_query_link"
......@@ -116,7 +116,7 @@
});
};
function check_empty(value){
function check_empty(value){
if(Ext.isEmpty(value)||typeof(value)=='undefined'||value==''||value==null){
return true;
}else{
......@@ -125,7 +125,6 @@
}
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
......@@ -229,7 +228,7 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var cal_hd_price_list = record.get('cal_hd_price_list');
var price_list = record.get('price_list');
//追加二手机报价重算条件,选择了适用或者调整了利率组合则需要重算报价
//追加二手机报价重算条件,选择了适用或者调整了利率组合则需要重算报价
var cal_hd_user_col_v06 = record.get('cal_hd_user_col_v06');
var hd_user_col_v06 = record.get('hd_user_col_v06');
var cal_btb_int_rate = record.get('cal_btb_int_rate');
......@@ -420,7 +419,7 @@
var machine_number_num = 0;
var secondary_lease = project_record.get('secondary_lease');
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') {
if (division == '92' && !Leaf.isEmpty(machine_number)) {
if ((division == '92' || division == '70') && !Leaf.isEmpty(machine_number)) {
Leaf.request({
url: $('check_machine_number_id').getUrl(),
para: {
......@@ -448,6 +447,18 @@
return false;
}
}
//神钢建机,新报单的机号与关联的合同机号必须相同
if(division == '91'){
debugger;
var machine_number1 = lease_item_record.get('machine_number');
var machine_number2 = project_record.get('machine_number');
if(typeof(machine_number1) != 'undefined' && typeof(machine_number2) != 'undefined'){
if( machine_number1 != machine_number2){
$L.showErrorMessage('提示', '新报单的机号与关联的合同机号必须相同!');
return false;
}
}
}
if(!bp_rate_flag){
return false;
}
......@@ -670,12 +681,12 @@
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
//控制资管费现金流隐藏
var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if((division=='70'||division=='92')&&division!=''){
if((division=='70'||division=='92')&&division!=''){
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
......@@ -734,9 +745,9 @@
record.getField('bp_id_n').setReadOnly(true);
}
}
//现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id &&cashflow_ds_id){
var hd_user_col_v06 = $(cashflow_ds_id).getAt(0).get('hd_user_col_v06');
//现金流列表加载时隐藏资管费 18083
if(cashflow_ds_id == ds.id &&cashflow_ds_id){
//var hd_user_col_v06 = $(cashflow_ds_id).getAt(0).get('hd_user_col_v06');
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
......@@ -744,23 +755,36 @@
}
}else{
if (check_empty(hd_user_col_v06)||hd_user_col_v06=='N' ) {
if(Ext.isEmpty($(cashflow_ds_id).getAt(0))){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if (Ext.isEmpty($(cashflow_ds_id).getAt(0).get('hd_user_col_v06'))) {
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($(cashflow_ds_id).getAt(0).get('hd_user_col_v06')=='N'){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
}else{
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
}
}
}
}
}
};
function jsGetAge(strBirthday) {
......@@ -831,7 +855,8 @@
var billing_url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_bp/query?project_id=${/parameter/@project_id}';
$(billing_ds_id).setQueryUrl(billing_url);
$(billing_ds_id).query();
//不为租赁二手机业务时隐藏资管费相关字段及费率 18083 2023/1/15
//不为租赁二手机业务时隐藏资管费相关字段及费率 18083 2023/1/15
if('${/parameter/@asset_fee_flag}'=='N'){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_HD_USER_COL_V06').style.display = 'none';
......@@ -841,14 +866,15 @@
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
//if($('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
//$('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
//$('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
//}
}
})
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function (ds, record, config_records, bp_seq) {
......@@ -1023,37 +1049,104 @@
record.getField('deduction_limit').setRequired(false);
}
if('${/parameter/@function_usage}'!='QUERY') {
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
if(division!='91') {
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
//“新机二次租赁”字段仅展示在神钢产品线的页面中,其余产品线不展示
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'none';
}
}else {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'block';
}
// 神钢建机时,当“旧机二次租赁”、 “新机二次租赁”中任意一个为“是”,则校验结清合同号必填
if (record.get('secondary_lease') == 'YES' || record.get('secondary_lease_new') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (record.get('secondary_lease') == 'NO' && record.get('secondary_lease_new') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
} else {
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
if(division!='91') {
if (record.get('secondary_lease') == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
} else if (record.get('secondary_lease') == 'NO') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
} else if (record.get('secondary_lease') == 'NO') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
//“新机二次租赁”字段仅展示在神钢产品线的页面中,其余产品线不展示
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'none';
}
}else {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_SECONDARY_LEASE_NEW').style.display = 'block';
}
// 神钢建机时,当“旧机二次租赁”、 “新机二次租赁”中任意一个为“是”,则校验结清合同号必填
if (record.get('secondary_lease') == 'YES' || record.get('secondary_lease_new') == 'YES') {
if( document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
} else if (record.get('secondary_lease') == 'NO' && record.get('secondary_lease_new') == 'NO') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
}
......@@ -1098,7 +1191,6 @@
var create_bp_code = '${/model/approve_history_rp/record/@bp_code}';
var credit_record = $(ds_id).getCurrentRecord();
if(!Ext.isEmpty(create_bp_code)){
debugger;
if(create_bp_code == 'D00000029' || create_bp_code == 'D00000026' || create_bp_code == 'D00000030' || create_bp_code == 'D00000031'){
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
credit_record.getField('credit_line').setReadOnly(false);
......@@ -1126,6 +1218,7 @@
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
}
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
......@@ -1134,20 +1227,20 @@
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_CREDIT_LINE').style.display = 'none';
}
}
}
}
if (prj_quotation_ds_id == ds.id && prj_quotation_ds_id){
//产品线维护了组合利率的调整加载事件显示
//产品线维护了组合利率的调整加载事件显示
if('${/parameter/@asset_fee_flag}'=='N'||'${/parameter/@asset_fee_flag}'==''){
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
record.getField('hd_user_col_v06').setRequired(false);
record.getField('hd_user_col_v06_n').setRequired(false);
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
}else{
if (check_empty(record.get('hd_user_col_v06'))||record.get('hd_user_col_v06')=='N' ) {
......@@ -1157,16 +1250,15 @@
//record.set('int_rate_display', '');
record.getField('asset_id').setRequired(false);
record.getField('asset_id_n').setRequired(false);
//隐藏组件
//隐藏组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
}else{
record.getField('asset_id').setRequired(true);
record.getField('asset_id_n').setRequired(true);
//显示组件
//显示组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
......@@ -1174,7 +1266,10 @@
}
}
if(division !='93'){
record.getField('customer_margin').setReadOnly(true);
record.getField('customer_margin_n').setReadOnly(true);
}
if(division!='70'&&division!='92'&&division!=''){
if(document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN')){
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_CUSTOMER_MARGIN_prompt').style.display = 'none';
......@@ -1291,6 +1386,7 @@
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
};
if('${/parameter/@editable_flag}' == 'Y' || '${/parameter/@editable_flag}' == 'YE'){
......@@ -1315,7 +1411,6 @@
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_INFO_1', 'prj_project');
var prj_quotation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
if(tenant_ds_id == ds.id&&tenant_ds_id){
if(name == 'send_message_n'){
......@@ -1327,7 +1422,7 @@
}
}
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
//二手车资管费为否,隐藏组合利率组件及将字段设置为空
if (prj_quotation_ds_id == ds.id) {
if (name == 'hd_user_col_v06') {
if('${/parameter/@asset_fee_flag}'=='Y'){
......@@ -1342,28 +1437,35 @@
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'none';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
}
//if($('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
//$('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_interest');
// $('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id').hideColumn('btb_fee');
//}
} else {
} else {
//显示组件
if(document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id')){
document.getElementById('${/parameter/@layout_code}_F_RATE_N_component_id').style.display = 'block';
}
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
if($('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
$('${/parameter/@layout_code}_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
}
//if($('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id')){
//$('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_interest');
//$('PROJECT_WFL_RE_G_CASHFLOW_NS_prj_quotation_layout_grid_id').showColumn('btb_fee');
// }
}
}
}
}
//选择承租人带出开票信息
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
......@@ -1373,6 +1475,7 @@
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if (lease_item_ds_id == ds.id && lease_item_ds_id) {
if(division=='70'||division=='92'){
debugger;
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('produce_date').setReadOnly(false);
......@@ -1535,26 +1638,96 @@
}
//add by niminmin
//当“二次租赁”字段选择‘是’时,“回购合同编号”字段为必填。当选择‘否’时,“回购合同编号”字段为只读。
if (name == 'secondary_lease') {
if (value == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
if(record.get('division') !='91') {
if (name == 'secondary_lease') {
if (value == 'YES') {
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (value == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
}else {
//当“旧机二次租赁”、“新机二次租赁”中任意一个为“是”,则系统提示只能任选其一(两个都选择是,则提示)
//当“旧机二次租赁”、 “新机二次租赁”中任意一个为“是”,则校验结清合同号必填
if (name == 'secondary_lease_new'){
if (value == 'YES') {
if (record.get('secondary_lease') == 'YES') {
record.set('secondary_lease_new','NO');
record.set('secondary_lease_new_n','否');
Leaf.showMessage('${l:HLS.PROMPT}', '旧机二次租赁、新机二次租赁只能任选其一!');
return false;
}
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
}else if (value == 'NO') {
if (record.get('secondary_lease') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
} else if (value == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
if (name == 'secondary_lease'){
if (value == 'YES') {
if (record.get('secondary_lease_new') == 'YES') {
record.set('secondary_lease','NO');
record.set('secondary_lease_n','否');
Leaf.showMessage('${l:HLS.PROMPT}', '旧机二次租赁、新机二次租赁只能任选其一!');
return false;
}
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'block';
}
record.getField('repur_contract_id').setRequired(true);
record.getField('repur_contract_id_n').setRequired(true);
record.getField('repur_contract_id').setReadOnly(false);
record.getField('repur_contract_id_n').setReadOnly(false);
}else if (value == 'NO') {
if (record.get('secondary_lease_new') == 'NO') {
record.getField('repur_contract_id').setRequired(false);
record.getField('repur_contract_id_n').setRequired(false);
record.getField('repur_contract_id').setReadOnly(true);
record.getField('repur_contract_id_n').setReadOnly(true);
record.set('repur_contract_id', null);
record.set('repur_contract_id_n', null);
if(document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID')){
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_INFO_1_PRJ_PROJECT_REPUR_CONTRACT_ID').style.display = 'none';
}
}
}
}
}
......@@ -1644,7 +1817,6 @@
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_QUOTATION_N_PRJ_QUOTATION_LARGE_BALANCE').style.display = 'none';
}
};
//附件打包下载
window['${/parameter/@layout_code}_ACY_USER_BUTTON1_layout_dynamic_tab_click'] = function () {
......
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