Commit d502661e authored by congzhao's avatar congzhao

[建机]电子合同开发 提前结清签约人及电子签约查询

parent e3cb08b4
......@@ -194,6 +194,6 @@
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t.contract_id=${@contract_id} and exists (select 1 from con_clause_templet ct where ct.templet_id = t.templet_id and ct.ele_content_flag != 'Y')"/>
<bm:data-filter enforceOperations="query" expression="t.contract_id=${@contract_id} and exists (select 1 from con_clause_templet ct where ct.templet_id = t.templet_id and (ct.ele_content_flag = 'N' or ct.ele_content_flag is null))"/>
</bm:data-filters>
</bm:model>
......@@ -27,15 +27,10 @@ select *
(select hm.id_card_no_leg
from hls_bp_master hm
where hm.bp_id = t1.bp_id_agent_level1) id_card_no_agent,
decode((SELECT cs.esign_type
from con_contract_ele_signer cs
where cs.contract_id = t1.contract_id
and cs.id_no = ${@id_no}
and cs.id_type = ${@id_type}
and rownum = 1),
'CE',
decode(t1.data_class,
'NORMAL',
'合同签约',
'ET',
'CHANGE_REQ',
'提前结清') contract_status_n,
(select ci.brand_id
from con_contract_lease_item ci
......@@ -58,6 +53,7 @@ select *
WHERE i.contract_id = t1.contract_id
AND i.equipment_type = 'MAIN') machine_number, --机号
t1.lease_times, --期数
t1.lease_start_date, --起租日
(NVL(t1.down_payment, 0) + NVL(t1.residual_value, 0) +
NVL(t1.total_rental, 0)) total_sign,
(SELECT cs.sign_url
......@@ -100,7 +96,19 @@ select *
(select 1
from hls_bp_master_signer hs
where hs.hls_bp_signer_id = t1.signer
and hs.id_card = ${@id_no})) or
and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)) or
(${@account_type} = 'AG' and exists
(select 1
from hls_bp_master_signer hs,con_contract_change_req cr
where hs.hls_bp_signer_id = cr.signer
and cr.change_req_id = t1.contract_id
and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)) or
(${@account_type} = 'AG' and exists
(select 1
from con_contract_bp cb
......@@ -131,6 +139,7 @@ select *
<bm:field name="modelcd"/>
<bm:field name="machine_number"/>
<bm:field name="lease_times"/>
<bm:field name="lease_start_date"/>
<bm:field name="total_sign"/>
<bm:field name="sign_url"/>
<bm:field name="userSignStatus"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:operation name="delete">
<bm:update-sql><![CDATA[
BEGIN
UPDATE con_contract_change_req c
SET c.ele_flow_id = ${@flow_id},
c.ec_sign_type = 'INITIATE',
c.sign_type = 'ELE_SIGN',
c.last_updated_by = nvl(${/session/@user_id},1),
c.last_update_date = sysdate
WHERE c.contract_id = ${@contract_id};
DELETE FROM con_contract_ele_flow cf
WHERE cf.contract_id = ${@contract_id}
AND cf.ele_flow_type = 'ET';
END;
]]></bm:update-sql>
</bm:operation>
......
......@@ -304,11 +304,24 @@
var req_status = req_record.get('req_status');
var contract_id = req_record.get('contract_id');
var change_req_id = req_record.get('change_req_id');
var signer = req_record.get('signer');
var bp_tenant_class = req_record.get('bp_class');
/* if (req_status != 'NEW') {
Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约');
return;
}*/
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认发起电子签约?', function () {
if (req_record.dirty == true) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
if (signer == null && bp_tenant_class == 'ORG') {
Leaf.showMessage('${l:PROMPT}', '发起电子签约时,签约人不能为空!');
return;
}else if(bp_tenant_class == 'NP'){
req_record.getField('signer_n').setReadOnly(true);
}
$('${/parameter/@layout_code}_user_button3').disable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
......@@ -321,6 +334,7 @@
success: function (res) {
if(res.result.check_flag == 'Y'){
Leaf.showConfirm('${HLS.PROMPT}', '该企业下已存在其他经办人,如果发起签约,原账户将失效,请确认是否继续!', function () {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_terminate_create_link_id').getUrl(),
para: {
......@@ -341,6 +355,7 @@
});
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}else{
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_terminate_create_link_id').getUrl(),
para: {
......
......@@ -55,6 +55,7 @@
"brand": contract_list_detail.brand_id_n,
"modelNo": contract_list_detail.modelcd,
"totalTimes": contract_list_detail.lease_times,
"leaseStartDate":contract_list_detail.lease_start_date,
"signAmt": contract_list_detail.total_sign,
"signUrl":contract_list_detail.sign_url,
"userSignStatus":contract_list_detail.userSignStatus,
......
......@@ -285,6 +285,10 @@
}else if(result_ob.code == 0){
var flow_id = result_ob.flowId;
var flow_update_bm = $bm('wx.WX100.con_ele_flow_update');
var flow_del_bm = $bm('wx.WX100.con_et_flow_update');
flow_del_bm.delete({
contract_id: $ctx.parameter.contract_id
})
flow_update_bm.update({
contract_id: $ctx.parameter.contract_id,
flow_id: flow_id,
......
......@@ -55,7 +55,6 @@
signer_category:'TENANT_ORG_SIGN'
});
var ele_org_signer_data = ele_org_signer_map.getChildren();
var agentName = ele_org_signer_data[0].bp_name;
var agentIdNo = ele_org_signer_data[0].id_no;
var mobile = ele_org_signer_data[0].mobile;
userInfoList.push({
......@@ -68,7 +67,6 @@
signer_category:'GUARANTOR_ORG_SIGN'
});
var ele_org_signer_data = ele_org_signer_map.getChildren();
var agentName = ele_org_signer_data[0].bp_name;
var agentIdNo = ele_org_signer_data[0].id_no;
var mobile = ele_org_signer_data[0].mobile;
userInfoList.push({
......@@ -81,7 +79,6 @@
signer_category:'AGENCY_STORE_SIGN'
});
var ele_org_signer_data = ele_org_signer_map.getChildren();
var agentName = ele_org_signer_data[0].bp_name;
var agentIdNo = ele_org_signer_data[0].id_no;
var mobile = ele_org_signer_data[0].mobile;
userInfoList.push({
......
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