Commit 0896279c authored by 18083's avatar 18083

非全电签约调整

parent 3225dfec
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-07_26 上午11:00:06
$Revision: 3.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.contract_sign_check(
p_sign_type => ${@sign_type},
p_contract_id =>${@contract_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -4,6 +4,8 @@
<bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="HLS.DIVISION_CODE"/>
<bm:field name="description" databaseType="VARCHAR" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.DIVISION_NAME"/>
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS.ENABLED_FLAG"/>
<bm:field name="full_elec_sign" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="full_elec_sign_desc" expression="(select sv.code_value_name from sys_code_values_v sv where sv.code = 'YES_OR_NO' and sv.code_value = t1.full_elec_sign)" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<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_lease_start_date(
p_contract_id =>${@contract_id},
p_lease_start_date =>to_date(${@lease_start_date},'yyyy/mm/dd'),
p_error_count =>${@error_count},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="error_count" dataType="java.lang.Long" input="false" output="true"/>
</bm:parameters>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
cc.sign_type sign_type,
hd.full_elec_sign full_elec_sign
from con_contract cc, hls_division hd
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -12,6 +12,7 @@
<a:model-query model="csh.CSH531F.csh_transaction_recoi_check_wfl" rootPath="wfl_status"/>
<a:model-query model="cont.CON3200.get_user_employee_type" rootPath="employee_info"/>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/>
<!--<a:model-query model="cont.CON3200.receipt_detail_insert_atm" rootPath="get_contract_ccr"/>-->
<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'];
......@@ -844,6 +845,9 @@
if("${/model/employee_info/record/@employee_type_code}" != 'STAFF'){
document.getElementById('${/parameter/@layout_code}_C_ATTCH_2_con_contract_grid_id_wrap').style.display = 'none';
}
//if('${/parameter/@paper_sign_ccr}' == 'Y' && "${/model/get_contract_ccr/record/@crr_count}" == 'Y'){
// Leaf.showInfoMessage('${l:PROMPT}','此合同进行过签约前变更,请注意租赁开始日和对应的租金还款计划',null,250,100);
//}
}
]]></script>
</a:view>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,6 +4,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.change_req_id = ${/parameter/@change_req_id}"
model="cus_deposit.CUS_DEPOSIT106.get_contract_wfl_status" rootPath="default_value_path"/>
<a:model-query defaultWhereClause="cc.division = hd.division and cc.contract_id=${/parameter/@change_req_id}" model="hls.HLS500N.check_con_record_date" rootPath="full_elec_sign"/>
</a:init-procedure>
<a:view>
......@@ -230,6 +231,71 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
if(ds.id == lease_item_ds_id&&lease_item_ds_id){
//加载时根据是否全电签约及电子合同判断,非全电签约及电子合同租赁物信息只读
if('${/model/full_elec_sign/record/@full_elec_sign}'!='Y' && '${/model/full_elec_sign/record/@sign_type}'=='ELE_SIGN'){
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70'|| record.data.division=='92'){
$(gridId).hideColumn('full_name');
$(gridId).hideColumn('full_name_n');
$(gridId).hideColumn('division_n');
$(gridId).hideColumn('equipments');
$(gridId).hideColumn('machine_model_class_n');
$(gridId).hideColumn('item_type_n');
$(gridId).hideColumn('equipment_type_n');
$(gridId).hideColumn('machine_number');
//取消设置必填
//record.getField('machine_number').setRequired(false);
}else {
$(gridId).hideColumn('machine_number_70');
$(gridId).hideColumn('lease_name_n');
$(gridId).hideColumn('brand_value');
$(gridId).hideColumn('type_name');
$(gridId).hideColumn('produce_date');
$(gridId).hideColumn('using_hour');
$(gridId).hideColumn('detention_amount');
$(gridId).hideColumn('residual_value_amount');
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
if(record.data.division=='30'||record.data.division=='50'||record.data.division=='80'){
//record.getField('set_number').setRequired(true);
record.getField('set_number').setReadOnly(true);
}else{
record.getField('set_number').setReadOnly(true);
if(Ext.isEmpty(record.get('set_number'))){
record.set('set_number',1);
}
}
//非全电签约电子合同取消设置必填
/*if (record.data.division == '70' || record.data.division=='92') {
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
record.getField('modelcd').setReadOnly(false);
record.getField('modelcd').setRequired(true);
record.getField('machine_number_70').setRequired(true);
}*/
//设置为非必填
record.getField('machine_number').setRequired(false);
//新增逻辑,将布局中未设置为只读的字段设置为只读
record.getField('lease_item_seq').setReadOnly(true);
record.getField('lease_name').setReadOnly(true);
record.getField('lease_name_n').setReadOnly(true);
record.getField('brand_value').setReadOnly(true);
record.getField('modelcd').setReadOnly(true);
record.getField('pattern').setReadOnly(true);
//机号
record.getField('machine_number').setReadOnly(true);
record.getField('machine_number_70').setReadOnly(true);
record.getField('produce_date').setReadOnly(true);
record.getField('using_hour').setReadOnly(true);
record.getField('residual_value_amount').setReadOnly(true);
record.getField('ownership_flag').setReadOnly(true);
record.getField('ownership_flag_n').setReadOnly(true);
record.getField('full_name').setReadOnly(true);
record.getField('full_name_n').setReadOnly(true);
}else{
var gridId= ds.bindname+'_layout_grid_id';
if(record.data.division=='70'|| record.data.division=='92'){
$(gridId).hideColumn('full_name');
......@@ -272,7 +338,7 @@
record.getField('machine_number_70').setRequired(true);
}
}
}
var lease_old_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_OLD_CAR', 'con_contract_lease_item');
if(ds.id == lease_old_ds_id&&lease_old_ds_id){
......
......@@ -10,6 +10,8 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.role_id=${/session/@role_id}" fetchAll="true"
model="cont.CON733.query_roles_info" rootPath="role_code"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true"
model="cont.CON733.query_user_info" rootPath="user_info"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
......@@ -27,8 +29,10 @@
//合同变更创建:营业内勤只能选到回款账户变更,
// 债权担当只能选到承租人变更,
// 代理店下级只能选到租金计划变更;
//代理店下级茂甲,铁甲,卡家放开合同签约前变更
Leaf.onReady(function () {
var role_code = '${/model/role_code/record/@role_code}';
var user_name = '${/model/user_info/record/@user_name}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var ds_id_n = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var head_record = $(ds_id).getAt(0);
......@@ -40,14 +44,16 @@
head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', '');
$(ds_id_n).query();*/
} else if (role_code == '0019') {
head_record.set('ccr_document_type', 'LEASE_CHAG');
head_record.set('ccr_document_type_n', '承租人变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT');
$(ds_id_n).query();*/
} else if (role_code == '0008') {
}
// else if (role_code == '0019' && (user_name != 'MJ002' && user_name != 'BJK002' && user_name != 'TJ002')) {
// head_record.set('ccr_document_type', 'LEASE_CHAG');
// head_record.set('ccr_document_type_n', '承租人变更');
// head_record.getField('ccr_document_type').setReadOnly(true);
// head_record.getField('ccr_document_type_n').setReadOnly(true);
// /*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT');
// $(ds_id_n).query();*/
// }
else if (role_code == '0008') {
head_record.set('ccr_document_type', 'CUT_CHAG');
head_record.set('ccr_document_type_n', '租金计划变更');
head_record.getField('ccr_document_type').setReadOnly(true);
......@@ -118,10 +124,10 @@
Leaf.showErrorMessage('${l:PROMPT}', '二手机业务无法操作此项变更!');
return;
}
if((record.get('division') != '70' && record.get('division') != '92') && ccr_document_type == 'CCR_BEFORE_SIGN'){
Leaf.showErrorMessage('${l:PROMPT}', '当前合同暂不能进行此项变更!');
return;
}
//if((record.get('division') != '70' && record.get('division') != '92') && ccr_document_type == 'CCR_BEFORE_SIGN'){
// Leaf.showErrorMessage('${l:PROMPT}', '当前合同暂不能进行此项变更!');
// return;
//}
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</span>', function () {
var contract = record.get('contract_id');
......@@ -195,7 +201,8 @@
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON733"/>
<a:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON733"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -54,11 +54,15 @@
}
]]></script>
<a:dataSets>
<a:dataSet id="full_elec_sign_ds" lookupCode="YES_OR_NO"/>
<a:dataSet id="hls_division_result_ds" autoQuery="true" fetchAll="false" model="hls.HLS103.hls_division" selectable="true">
<a:fields>
<a:field name="division" required="true"/>
<a:field name="description" required="true"/>
<a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
<a:field name="full_elec_sign" required="true"/>
<a:field name="full_elec_sign_desc" required="true" displayField="code_value_name" options="full_elec_sign_ds" returnField="full_elec_sign" valueField="code_value"/>
</a:fields>
</a:dataSet>
</a:dataSets>
......@@ -77,12 +81,14 @@
<a:columns>
<a:column name="division" align="left" editorFunction="hls103divisionCodeFunction" sortable="true" width="250"/>
<a:column name="description" align="left" editor="hls103_division_description_tf" width="300"/>
<a:column name="full_elec_sign_desc" prompt="是否为全电子签约" align="center" editor="grid_id_comboBox_id" width="100"/>
<a:column name="enabled_flag" align="center" editor="hls103_division_result_grid_cb" width="100"/>
</a:columns>
<a:editors>
<a:textField id="hls103_division_code_tf" maxLength="2"/>
<a:textField id="hls103_division_description_tf"/>
<a:checkBox id="hls103_division_result_grid_cb"/>
<a:comboBox id="grid_id_comboBox_id"/>
</a:editors>
</a:grid>
</a:screenBody>
......
......@@ -25,6 +25,7 @@
<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"/> -->
......@@ -42,7 +43,7 @@
<a:link id="hls_fin_calc_single_variable_manual_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="execute"/>
<a:link id="test_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_save_n.lsc"/>
<a:link id="hls_fin_calculator_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<a:link id="check_con_lease_start_date_link_id" model="hls.HLS500N.check_con_record_date" modelaction="execute"/>
<style><![CDATA[
.finGrid td[dataindex=percent]{
border-right-color:#FFF;
......@@ -101,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() {
......@@ -113,7 +114,6 @@
}
function hls_hls500_save(nextStep, source_procedure) {
debugger;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
var is_constru_unit = '${/parameter/@is_constru_unit}' || 'N';
var H1,H54;
......@@ -148,7 +148,6 @@
'project_id': '${/parameter/@document_id}'
},
success: function(res) {
debugger;
var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list;
......@@ -332,7 +331,6 @@
function hls_hls500_calc() {
debugger;
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save(calc_execute, 'CALC');
......@@ -341,10 +339,14 @@
}
function hls_hls500_re_calc() {
if('${/parameter/@layout_code}'=='CCR_BEFORE_SIGN'){
Leaf.showMessage('${l:PROMPT}', '签约前变更暂时不支持试算');
return;
}else{
lock_calc_current_window('${l:HLS.CALCULATING}');
hls_hls500_save_new(calc_execute, 'RE_CALC');
}
}
function open_after_save_execute() {
if ('${/parameter/@global_flag}' == 'Y') {
......@@ -668,6 +670,11 @@
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 (editor_record.get('validation_type') == 'NUMBERFIELD') {
if (editor_record.get('allow_decimal') == 'TRUE') {
field.setPropertity('allowdecimals', true);
......@@ -767,7 +774,6 @@
}
function do_hls500_line_update(ds, record, name, value, old_value) {
debugger;
if (quotation_update_flag == 'N') {
quotation_update_flag = 'Y';
}
......@@ -794,6 +800,8 @@
onLineupdate_setEmpty(ds, record, name, value, old_value);
}
var count=0;
var error_count=0;
function do_hls500_head_update(ds, record, name, value, old_value) {
// if (record.get('column_code') == 'H54' ) {
......@@ -846,6 +854,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;
}
}
}
}
}
onEditorupdate(ds, record, name, value, old_value);
}
......@@ -949,7 +997,6 @@
}
function onEditorHdload(ds) {
debugger;
var headRecords = ds.getAll();
if ('${/parameter/@document_category}' == 'CONTRACT') {
Leaf.request({
......@@ -1490,7 +1537,6 @@
//不均等
function hls_hls500_NJD() {
debugger;
var temp_head_records = $('hls_fin_calculator_ln_ds').getAll();
//一、报价器加校验:1.如果用户把所有租金都手填,则报校验“禁止手填所有期数租金!”;
// 2.如果用户手动修改租金以后,只有最后一期租金大于零,则报校验“目前不支持只有一期租金的报价!”
......@@ -1559,7 +1605,6 @@
}
function hls_hls500_save_new(nextStep, source_procedure) {
debugger;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
var H1, H54, H159, H16, H12,H99,H102,H15,H44;
var is_constru_unit = '${/parameter/@is_constru_unit}' || 'N';
......@@ -1869,7 +1914,6 @@
}
function calc_execute_JD_new(source_procedure) {
var final_recreate_H_formula, final_recreate_L_formula;
if (source_procedure == 'RE_CALC') {
final_recreate_H_formula = 'Y';
......@@ -1909,15 +1953,18 @@
}
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';
final_recreate_L_formula = 'Y';
} else {
final_recreate_H_formula = recreate_H_formula;
if('${/parameter/@layout_code}'=='CCR_BEFORE_SIGN'){
final_recreate_L_formula = 'N';
}else{
final_recreate_L_formula = recreate_L_formula;
}
}
Leaf.request({
url: '${/request/@context_path}/autocrud/hls.HLS500.hls_fin_calculator_calc/update',
para: {
......
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