Commit b7878614 authored by stone's avatar stone

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into develop

parents 1aa923aa 11d29ed7
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
select * select *
from (select c.contract_id, c.contract_number, c.contract_name from (select c.contract_id, c.contract_number, c.contract_name
from con_contract c from con_contract c
where c.data_class = 'NORMAL') V where c.data_class = 'NORMAL'
and not exists (select 1 from acp_invoice_ln an where an.contract_id=c.contract_id and an.confirmation_status='APPROVING')
) V
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -20,5 +20,15 @@ ...@@ -20,5 +20,15 @@
]]> ]]>
</bm:update-sql> </bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
acp_invoice_import_pkg.submit_wfl( p_contract_id => ${@contract_id},
p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
<bm:field name="document_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE_DESC"/> <bm:field name="document_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE_DESC"/>
<bm:field name="print_date" databaseType="DATE" datatype="java.util.Date" physicalName="PRINT_DATE"/> <bm:field name="print_date" databaseType="DATE" datatype="java.util.Date" physicalName="PRINT_DATE"/>
<bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS"/> <bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS"/>
<bm:field name="sign_contract_status"/>
<bm:field name="sign_contract_status_n"/>
<bm:field name="bp_id_tenant_n"/>
<bm:field name="bp_id_agent_level1_n"/>
</bm:fields> </bm:fields>
<bm:primary-key> <bm:primary-key>
<bm:pk-field name="contract_id"/> <bm:pk-field name="contract_id"/>
...@@ -64,17 +68,13 @@ ...@@ -64,17 +68,13 @@
<bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/> <bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/>
<bm:query-field field="project_number" queryExpression="project_number like upper(&apos;%&apos;||${@project_number}||&apos;%&apos;)"/> <bm:query-field field="project_number" queryExpression="project_number like upper(&apos;%&apos;||${@project_number}||&apos;%&apos;)"/>
<bm:query-field field="bp_id_tenant" queryOperator="="/> <bm:query-field field="bp_id_tenant" queryOperator="="/>
<bm:query-field field="bp_id_agent_level1" queryOperator="="/>
<bm:query-field name="lease_item_amount_from" queryExpression="lease_item_amount &gt;= ${@lease_item_amount_from}"/> <bm:query-field name="lease_item_amount_from" queryExpression="lease_item_amount &gt;= ${@lease_item_amount_from}"/>
<bm:query-field name="lease_item_amount_to" queryExpression="lease_item_amount &lt;= ${@lease_item_amount_to}"/> <bm:query-field name="lease_item_amount_to" queryExpression="lease_item_amount &lt;= ${@lease_item_amount_to}"/>
<bm:query-field field="lease_channel" queryOperator="="/> <bm:query-field field="sign_contract_status" queryOperator="="/>
<bm:query-field field="business_type" queryOperator="="/> <bm:query-field field="contract_status" queryOperator="="/>
<bm:query-field field="lease_organization" queryOperator="="/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="t1.contract_status in (&apos;NEW&apos;,&apos;SIGN&apos;)"/> <bm:data-filter name="query" expression="((t1.sign_contract_status='NEW' and t1.contract_status='NEW') or (t1.sign_contract_status='SIGN_RETURN' and t1.contract_status='NEW') or (t1.sign_contract_status='SIGN_RETURN' and t1.contract_status='INCEPT_RETURN'))"/>
<!-- <bm:data-filter name="query" expression="not EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;FULL&apos;) OR received_amount IS NOT NULL OR received_principal IS NOT NULL OR received_interest IS NOT NULL))"/> -->
<!--<bm:data-filter enforceOperations="query" expression="t1.user_status_1 IN (&apos;APPROVED&apos;)" field="user_status_1"/>-->
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND times &gt;= 0 AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;FULL&apos;) OR received_amount IS NOT NULL OR received_principal IS NOT NULL OR received_interest IS NOT NULL))"/>-->
<!--<bm:data-filter enforceOperations="query" expression="exists (select 1 from con_contract where contract_id = t1.contract_id and created_by = ${/session/@user_id})"/>-->
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -90,7 +90,20 @@ ...@@ -90,7 +90,20 @@
from con_contract_cashflow ccw from con_contract_cashflow ccw
where ccw.contract_id = cc.contract_id where ccw.contract_id = cc.contract_id
and ccw.overdue_status = 'Y' and ccw.overdue_status = 'Y'
and ccw.write_off_flag <> 'FULL')) t1 #WHERE_CLAUSE# and ccw.write_off_flag <> 'FULL')
AND ('Y' = 'Y' AND EXISTS
(SELECT
1
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
WHERE a1.trx_category = 'CONTRACT'
AND a1.trx_id = cc.contract_id
AND trunc(SYSDATE) BETWEEN a1.start_date AND
nvl(a1.end_date, trunc(SYSDATE))
AND a1.user_id = a2.owner_user_id
AND a1.trx_category = a2.trx_category
AND a2.authorized_user_id =${/session/@user_id}
AND trunc(SYSDATE) BETWEEN a2.start_date AND
nvl(a2.end_date, trunc(SYSDATE))))) t1 #WHERE_CLAUSE#
]]> ]]>
</bm:query-sql> </bm:query-sql>
......
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<bm:query-field field="receipt_type" queryOperator="="/> <bm:query-field field="receipt_type" queryOperator="="/>
<bm:query-field name="confirmed" queryExpression="((${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING')) or (${@confirmed} = 'N' and t1.confirmed_flag in ('NEW','CT_REJECTED','ACCAUDITING','ACCAUDITED')))"/> <bm:query-field name="confirmed" queryExpression="((${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING')) or (${@confirmed} = 'N' and t1.confirmed_flag in ('NEW','CT_REJECTED','ACCAUDITING','ACCAUDITED')))"/>
<bm:query-field field="opposite_band_na" queryOperator="="/> <bm:query-field field="opposite_band_na" queryOperator="="/>
<bm:query-field name="transaction_num" queryExpression="t1.transaction_num like ${@transaction_num}"/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/> <bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
<bm:query-field name="transaction_num_to" queryExpression="t1.transaction_num &lt;= ${@transaction_num_to}"/> <bm:query-field name="transaction_num_to" queryExpression="t1.transaction_num &lt;= ${@transaction_num_to}"/>
<bm:query-field name="bank_slip_num" queryExpression="t1.bank_slip_num like &apos;%&apos;||${@bank_slip_num}||&apos;%&apos;"/> <bm:query-field name="bank_slip_num" queryExpression="t1.bank_slip_num like &apos;%&apos;||${@bank_slip_num}||&apos;%&apos;"/>
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
t.bp_bank_account_num, t.bp_bank_account_num,
t.bp_bank_account_name, t.bp_bank_account_name,
t.bp_bank_name, t.bp_bank_name,
t.bp_category,
t.transaction_amount, t.transaction_amount,
t.collection_classes, t.collection_classes,
t.bp_id, t.bp_id,
......
...@@ -31,6 +31,6 @@ ...@@ -31,6 +31,6 @@
</bm:features> </bm:features>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.transaction_id=${@transaction_id} and t1.company_id=${/session/@company_id} and t1.write_off_type = ${@write_off_type})"/> <bm:data-filter name="query" expression="(t1.transaction_id=${@transaction_id} and t1.company_id=${/session/@company_id} and t1.write_off_type = ${@write_off_type})"/>
<bm:data-filter name="query" expression="(nvl(t1.create_wf_flag,'N') = 'N')" /> <bm:data-filter name="query" expression="(nvl(t1.create_wf_flag,'N') = DECODE((select write_off_flag from csh_transaction where transaction_id = t1.transaction_id),'FULL','Y','N'))" />
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
\ No newline at end of file
...@@ -173,6 +173,6 @@ ...@@ -173,6 +173,6 @@
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>--> <!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/> <bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />--> <!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filter name="position_code" expression="((${@cw_flag} = 'Y') or (${@position_code} = '009' and (t1.paid_byother_flag = 'F' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and ((t1.paid_byother_flag != 'F') and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)))"/> <bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: chenlingfeng7543
$Date: 2018/8/13 11:13
$Revision: 1.0
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select hls_bp_master_credit_pkg.get_advanced_amount_byId(p_bp_id=>${@bp_id}) advanced_amount
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
to_char(rd.credit_date_to,'yyyy-mm-dd')credit_date_to, to_char(rd.credit_date_to,'yyyy-mm-dd')credit_date_to,
rd.enable_flag, rd.enable_flag,
to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date, to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date,
(select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc (select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc,
(select description from sys_user s where s.user_id= rd.temp_user)temp_user_desc
from HLS_BP_MASTER_CREDIT_HD hd, from HLS_BP_MASTER_CREDIT_HD hd,
hls_bp_master hbm, hls_bp_master hbm,
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
p_credit_total_amount =>${@credit_total_amount}, p_credit_total_amount =>${@credit_total_amount},
p_credit_date_from =>to_date(${@credit_date_from},'yyyy-mm-dd'), p_credit_date_from =>to_date(${@credit_date_from},'yyyy-mm-dd'),
p_credit_date_to =>to_date(${@credit_date_to},'yyyy-mm-dd'), p_credit_date_to =>to_date(${@credit_date_to},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id} p_user_id =>${/session/@user_id},
p_used_amount=>${@used_amount},
p_bp_id=>${@bp_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
p_payment_deduction =>${@payment_deduction}, p_payment_deduction =>${@payment_deduction},
p_secondary_lease =>${@secondary_lease}, p_secondary_lease =>${@secondary_lease},
p_price_list =>${@price_list}, p_price_list =>${@price_list},
p_detention => ${@detention} p_detention => ${@detention},
p_down_payment_rate_new=>${@down_payment_rate_new}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
<bm:parameter name="payment_deduction" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@payment_deduction"/> <bm:parameter name="payment_deduction" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@payment_deduction"/>
<bm:parameter name="secondary_lease" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@secondary_lease"/> <bm:parameter name="secondary_lease" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@secondary_lease"/>
<bm:parameter name="detention" dataType="java.lang.Double" input="false" output="true" outputPath="/parameter/@detention"/> <bm:parameter name="detention" dataType="java.lang.Double" input="false" output="true" outputPath="/parameter/@detention"/>
<bm:parameter name="down_payment_rate_new" dataType="java.lang.Double" input="false" output="true" outputPath="/parameter/@down_payment_rate_new"/>
<bm:parameter name="price_list" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@price_list"/> <bm:parameter name="price_list" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@price_list"/>
</bm:parameters> </bm:parameters>
</bm:operation> </bm:operation>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<!--<meta name="_csrf_header" content="X-CSRF-TOKEN" />--> <!--<meta name="_csrf_header" content="X-CSRF-TOKEN" />-->
<a:link id="widget_leaf_wfl_pageLink_node_approve_history" <a:link id="widget_leaf_wfl_pageLink_node_approve_history"
url="${/request/@context_path}/modules/zjwfl/ZJWFL3040/zj_wfl_my_approved_application_history.lview"/> url="${/request/@context_path}/modules/zjwfl/ZJWFL3040/zj_wfl_my_approved_application_history.lview"/>
<a:link id="main_link"
url="${/request/@context_path}/modules/zjwfl/ZJWFL5110/zj_wfl_to_do_list.lview"/>
<style> <style>
html, body { html, body {
width: 1170px; width: 1170px;
...@@ -577,7 +579,10 @@ ...@@ -577,7 +579,10 @@
}); });
win.on('close', function () { win.on('close', function () {
//query_zjwfl5110_toDoDs(); //query_zjwfl5110_toDoDs();
location.reload(); // location.reload();
// location.replace();
window.parent.location.reload();
}); });
} }
...@@ -602,7 +607,8 @@ ...@@ -602,7 +607,8 @@
}); });
win.on('close', function () { win.on('close', function () {
//query_zjwfl5110_toDoDs(); //query_zjwfl5110_toDoDs();
location.reload(); window.parent.location.reload();
}); });
} }
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
modelaction="update"/> modelaction="update"/>
<a:link id="ap_invoice_import_detail_link" <a:link id="ap_invoice_import_detail_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail.lview"/> url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail.lview"/>
<a:link id="ap_invoice_import_detail_wfl_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail_wfl.lview"/>
<a:link id="ap_invoice_import_scanning_link" <a:link id="ap_invoice_import_scanning_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_scanning.lview"/> url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_scanning.lview"/>
<script><![CDATA[ <script><![CDATA[
...@@ -16,7 +18,7 @@ ...@@ -16,7 +18,7 @@
id: 'ap_invoice_import_scanning', id: 'ap_invoice_import_scanning',
url: url, url: url,
title:'发票导入', title:'发票导入',
width: 400, width: 300,
height:140 height:140
}).on('close', function() { }).on('close', function() {
$(ds_id).query(); $(ds_id).query();
...@@ -31,13 +33,19 @@ ...@@ -31,13 +33,19 @@
}; };
function ap_invoice_import_detail(record_id,ds_id){ function ap_invoice_import_detail(record_id,ds_id){
debugger;
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
if(record.get('confirmation_status')=='APPROVING'||record.get('confirmation_status')=='APPROVED'){
param['function_usage'] = 'QUERY';
param['function_code'] = 'ACP522WFL';
}else{
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['function_code'] = 'ACP522I'; param['function_code'] = 'ACP522I';
}
param['contract_id'] = record.get('contract_id'); param['contract_id'] = record.get('contract_id');
param['url_title'] = '进项发票详情'; param['url_title'] = '进项发票详情';
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link', ds_id); hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link', ds_id,'AP_INVOICE_IMPORT_DETAIL');
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true"> trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="basic.sys_session_info" rootPath="user_name_path"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="acp_invoice_inf_import_link" model="acp.ACP522.acp_invoice_inf_import" modelaction="update"/>
<a:link id="acp_invoice_inf_import_submit_link" model="acp.ACP522.acp_invoice_inf_import" modelaction="execute"/>
<script><![CDATA[ <script><![CDATA[
//移除前事件(grid,attach,gridbox,table)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_brfore_remove'] = function(ds, record, bp_seq) {
return true;
};
Leaf.onReady(function () { Leaf.onReady(function () {
//document.getElementById("ext-gen935").placeholder = "在这输入姓名..";
// document.getElementById("ext-gen124").style.backgroundColor = 'red';
// document.getElementById("ext-gen124").setAttribute('placeholder','注:扫描时请将鼠标光标放在此处。。。');
//document.getElementById("ext-gen124").style.color = 'red';
//document.getElementById("ext-gen124").style.backgroundColor = '#FF7744';
var first=document.getElementsByClassName("item-input-wrap");
var second=first[2].getElementsByClassName('item-textField');
var third=second[0];
third.setAttribute('placeholder','注:扫描时请将鼠标光标放在此处。。。');
third.style.backgroundColor = '#FF7744';
});
//新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
record.set("created_by_n",'${/model/user_name_path/record/@user_desc}');
record.set("created_by",'${/session/@user_id}');
record.set("update_date",new Date());
};
//提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
debugger;
var hd_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
var hd_record = $(hd_id).getAt(0);
var lease_item_amount=hd_record.get('lease_item_amount')*1;
if($(ds_id).getAll().dirty){
alert(111);
return;
}
if ($(ds_id).validate()) {
debugger;
var records = $(ds_id).getAll();
if(records.length<1){
Leaf.showMessage('提示', '未查询到发票信息,请添加发票信息!');
return;
}
var sum=0;
for (var i = 0;i < records.length;i++) {
if(records[i].dirty){
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return;
}
var tempa=records[i].get('total_amount')||0;
var tempb=records[i].get('net_amount')||0+records[i].get('tax_amount')||0;
if(tempa!=tempb){
Leaf.showMessage('提示', '发票明细行存在价税合计不等于不含税金额和税额之和!');
return;
}
var r = records[i];
var d = r.get(name);
var n = records[i].get('total_amount')||0;
if (!isNaN(n)) {
sum = plus(sum, n);
}
for (var j =i+1;j < records.length;j++) {
if(records[i].get('invoice_code')==records[j].get('invoice_code')||records[i].get('invoice_number')==records[j].get('invoice_number')){
Leaf.showMessage('提示', '发票代码和发票号码不能重复!');
return;
}
}
}
if(sum!=lease_item_amount){
Leaf.showMessage('提示', '本次发票明细含税总计不等于该合同设备价!');
return;
}
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('acp_invoice_inf_import_submit_link').getUrl(),
para: {
contract_id: hd_record.get('contract_id')
},
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
}
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln'); var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
if ('${/parameter/@contract_id}') { var record = $(ds_id).getAt(0);
if(name == 'invoice'&&value) {
var contract_id = record.get('contract_id');
var strs = value.split(',');
var invoice_type = strs[1];
var invoice_code = strs[2];
var invoice_number = strs[3];
var net_amount = strs[4];
var invoice_date = strs[5];
//检验设备价格需要大于不含税金额
if (strs.length ==9) {
Leaf.request({
url: $('acp_invoice_inf_import_link').getUrl(),
para: {
invoice_type: invoice_type,
invoice_code: invoice_code,
invoice_number: invoice_number,
net_amount: net_amount,
invoice_date: invoice_date,
contract_id: contract_id
},
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
}
);
setTimeout(function() {
record.set('invoice', '');
}, 50);
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); $(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(acp_ds_id).query(); $(acp_ds_id).query();
} },failure: function() {
setTimeout(function() {
record.set('invoice', '');
}, 50);
},
error: function() {
setTimeout(function() {
record.set('invoice', '');
}, 50);
},
scope: this
}); });
} else {
Leaf.showMessage('提示', '发票信息有错误,请重新扫描!');
setTimeout(function() {
record.set('invoice', '');
}, 50);
}
}
};
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<script><![CDATA[
Leaf.onReady(function () {
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
if ('${/parameter/@contract_id}') {
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(acp_ds_id).query();
$(con_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(con_ds_id).query();
}
});
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
\ No newline at end of file
...@@ -4,11 +4,14 @@ ...@@ -4,11 +4,14 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/> <a:init-procedure/>
<a:view> <a:view>
<a:link id="acp_invoice_inf_import_link" model="acp.ACP522.acp_invoice_inf_import" modelaction="update"/> <!--<a:link id="acp_invoice_inf_import_link" model="acp.ACP522.acp_invoice_inf_import" modelaction="update"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="ap_invoice_import_detail_link1"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail.lview"/>
<script><![CDATA[ <script><![CDATA[
function invoice_inf_process(dataset, record, name, value, oldvalue) { function invoice_inf_process(dataset, record, name, value, oldvalue) {
debugger debugger;
if(name == 'invoice') { if(name == 'invoice') {
record.getField('invoice').setReadOnly(true); record.getField('invoice').setReadOnly(true);
var contract_id = record.get('contract_id'); var contract_id = record.get('contract_id');
...@@ -57,15 +60,36 @@ ...@@ -57,15 +60,36 @@
} }
} }
} }
function acp522_save() {
if($('acp522_acp_invoice_import_detail_ds').validate()){
$('ap_invoice_import_scanning').close();
var record=$('acp522_acp_invoice_import_detail_ds').getCurrentRecord();
var record_id=record.id;
var ds_id=record.ds.id
// var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_usage'] = 'MODIFY';
param['function_code'] = 'ACP522I';
param['contract_id'] = record.get('contract_id');
param['url_title'] = '进项发票详情';
param['winId'] = 'aaaaa';
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link1', ds_id);
}
}
function acp522_back() {
$('ap_invoice_import_scanning').close();
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets> <a:dataSets>
<a:dataSet id="acp522_acp_invoice_import_ds"> <a:dataSet id="acp522_acp_invoice_import_detail_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="invoice" required="true" readOnly="true"/> <a:field name="contract_number" prompt="合同编号" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100"
<a:field name="contract_name" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100"
lovService="acp.ACP522.acp_import_contract_lov" lovWidth="520" lovService="acp.ACP522.acp_import_contract_lov" lovWidth="520"
title="SELECT_CONTRACT"> title="SELECT_CONTRACT" autoComplete="true">
<a:mapping> <a:mapping>
<a:map from="contract_number" to="contract_number"/> <a:map from="contract_number" to="contract_number"/>
<a:map from="contract_name" to="contract_name"/> <a:map from="contract_name" to="contract_name"/>
...@@ -74,16 +98,23 @@ ...@@ -74,16 +98,23 @@
</a:field> </a:field>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="invoice_inf_process"/> <!--<a:event name="update" handler="invoice_inf_process"/>-->
</a:events> </a:events>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:form title="请扫描发票二维码"> <!--<a:form title="请扫描发票二维码">-->
<a:lov name="contract_name" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/> <a:form title="请选择合同">
<a:lov name="contract_number" bindTarget="acp522_acp_invoice_import_detail_ds" width="180" prompt="SELECT_CONTRACT"/>
<!-- <a:textField name="contract_number" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/>--> <!-- <a:textField name="contract_number" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/>-->
<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds" prompt="扫描发票"/> <!--<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds" prompt="扫描发票"/>-->
<a:hBox cellPadding="10">
<a:button click="acp522_save" text="确定"/>
<a:button click="acp522_back" text="取消"/>
</a:hBox>
</a:form> </a:form>
</a:screenBody> </a:screenBody>
</a:view> </a:view>
</a:screen> </a:screen>
...@@ -28,12 +28,14 @@ ...@@ -28,12 +28,14 @@
url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create.lview"/> url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create.lview"/>
<a:link id="${/parameter/@layout_code}_contract_print_link_id" <a:link id="${/parameter/@layout_code}_contract_print_link_id"
url="${/request/@context_path}/modules/cont/CON301N/con_contract_print.lview"/> url="${/request/@context_path}/modules/cont/CON301N/con_contract_print.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract'); // stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
Leaf.onReady(function() { Leaf.onReady(function() {
debugger;
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") { if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = ""; document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = ""; document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = "";
...@@ -50,11 +52,14 @@ ...@@ -50,11 +52,14 @@
function open_contract_win(ds_id, record_id) { function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
param['function_code'] = 'CON301'; // param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q';
param['maintain_type'] = 'QUERY'; param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', null);
//hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', null);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
} }
function open_project_Window(record_id, ds_id) { function open_project_Window(record_id, ds_id) {
......
...@@ -76,9 +76,13 @@ ...@@ -76,9 +76,13 @@
}); });
} }
win.on('close', function () { win.on('close', function () {
debugger;
if(list_ds=='acp522_acp_invoice_import_detail_ds'){
location.reload();
}else{
if (list_ds) { if (list_ds) {
$(list_ds).query(); $(list_ds).query();
} }}
}); });
} }
}, },
......
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
<a:tabPanel marginHeight="420" marginWidth="30"> <a:tabPanel marginHeight="420" marginWidth="30">
<a:tabs> <a:tabs>
<a:tab prompt="未收金额" width="110"> <a:tab prompt="未收金额" width="110">
<a:grid bindTarget="unreceivedAmountDs" marginHeight="470" marginWidth="55" navBar="true"> <a:grid bindTarget="unreceivedAmountDs" marginHeight="325" marginWidth="55" navBar="true">
<a:columns> <a:columns>
<a:column name="times" prompt="期数"/> <a:column name="times" prompt="期数"/>
<a:column name="cf_type_dis" prompt="类型"/> <a:column name="cf_type_dis" prompt="类型"/>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</a:grid> </a:grid>
</a:tab> </a:tab>
<a:tab prompt="已收金额" width="110"> <a:tab prompt="已收金额" width="110">
<a:grid bindTarget="receivedAmountDs" marginHeight="450" marginWidth="55" navBar="true"> <a:grid bindTarget="receivedAmountDs" marginHeight="325" marginWidth="55" navBar="true">
<a:columns> <a:columns>
<a:column name="times" prompt="期数"/> <a:column name="times" prompt="期数"/>
<a:column name="cf_type_dis" prompt="类型"/> <a:column name="cf_type_dis" prompt="类型"/>
......
...@@ -235,16 +235,16 @@ ...@@ -235,16 +235,16 @@
<a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/> <a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
<a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/> <a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/> <a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
<a:numberField name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数从"/> <a:numberField name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数从" allowDecimals="false"/>
<a:numberField name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数到"/> <a:numberField name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数到" allowDecimals="false"/>
<a:numberField name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数从"/> <a:numberField name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数从" allowDecimals="false"/>
<a:numberField name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数到"/> <a:numberField name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数到" allowDecimals="false"/>
<a:numberField name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额从"/> <a:numberField name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额从"/>
<a:numberField name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额到"/> <a:numberField name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额到"/>
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数从"/> <a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数从" allowDecimals="false"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数到"/> <a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数到" allowDecimals="false"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数从"/> <a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数从" allowDecimals="false"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数到"/> <a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数到" allowDecimals="false"/>
<a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额从"/> <a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额从"/>
<a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额到"/> <a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额到"/>
</a:form> </a:form>
...@@ -259,20 +259,20 @@ ...@@ -259,20 +259,20 @@
align="center"/> align="center"/>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/> <a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/> <a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/> <a:column name="division_n" align="center" prompt="租赁物" width="60" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<a:column name="account_due_times" align="center" prompt="会计逾期总期数" <a:column name="account_due_times" align="center" prompt="会计逾期总期数"
width="100"/> width="100"/>
<a:column name="account_due_days" align="center" prompt="会计逾期总天数" <a:column name="account_due_days" align="center" prompt="会计逾期总天数"
width="100"/> width="100"/>
<a:column name="account_due_amount" align="right" prompt="会计逾期总金额" footerRenderer="summaryRenderer" <a:column name="account_due_amount" align="right" prompt="会计逾期总金额" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/> width="100"/>
<a:column name="business_due_times" align="center" prompt="营业逾期总期数" <a:column name="business_due_times" align="center" prompt="营业逾期总期数"
width="100"/> width="100"/>
<a:column name="business_due_days" align="center" prompt="营业逾期总天数" <a:column name="business_due_days" align="center" prompt="营业逾期总天数"
width="100"/> width="100"/>
<a:column name="business_due_amount" align="right" prompt="营业逾期总金额" footerRenderer="summaryRenderer" <a:column name="business_due_amount" align="right" prompt="营业逾期总金额" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/> width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金" footerRenderer="summaryRenderer" <a:column name="over_due_amount" align="right" prompt="违约金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/> width="100"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
......
...@@ -595,6 +595,7 @@ ...@@ -595,6 +595,7 @@
<a:field name="bp_id_to"/> <a:field name="bp_id_to"/>
<a:field name="transaction_num_from"/> <a:field name="transaction_num_from"/>
<a:field name="transaction_num_to"/> <a:field name="transaction_num_to"/>
<a:field name="transaction_num"/>
<a:field name="bank_slip_num_from"/> <a:field name="bank_slip_num_from"/>
<a:field name="bank_slip_num_to"/> <a:field name="bank_slip_num_to"/>
<a:field name="transaction_date_from" validator="dateValidator"/> <a:field name="transaction_date_from" validator="dateValidator"/>
...@@ -721,7 +722,8 @@ ...@@ -721,7 +722,8 @@
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/> <a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号--> <!--对方账户账号-->
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/> <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField style="display:none"/> <a:textField name="transaction_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="现金事务编号"/>
<!-- <a:textField style="display:none"/>-->
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/> <a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/> <a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="单据审批状态"/>
<!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>--> <!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>-->
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
param['transaction_id'] = '${/parameter/@transaction_id}'; param['transaction_id'] = '${/parameter/@transaction_id}';
param['bp_id'] = head_record.get('bp_id'); param['bp_id'] = head_record.get('bp_id');
param['bp_category'] = head_record.get('bp_category'); param['bp_category'] = head_record.get('bp_category');
if(deposit_records.length<1){
Leaf.showMessage('提示', '请先新增保证金入账明细!');
return;
}
for (var i = 0; i < deposit_records.length; i++) { for (var i = 0; i < deposit_records.length; i++) {
var deposit_record; var deposit_record;
deposit_record = deposit_records[i]; deposit_record = deposit_records[i];
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/> url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/>
<a:link id="hls_bp_ccx_icinfo_link" <a:link id="hls_bp_ccx_icinfo_link"
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/> url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/> <!-- <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master'); // stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
} }
//异步打印 //异步打印
ds.setQueryParameter('__async__', 'Y'); // ds.setQueryParameter('__async__', 'Y');
}; };
]]></script> ]]></script>
<a:screen-include <a:screen-include
......
...@@ -137,19 +137,6 @@ ...@@ -137,19 +137,6 @@
return false; return false;
} }
var social_code=head_record.get('social_code');
var id_card_no_leg=head_record.get('id_card_no_leg');
if(!checkCard(id_card_no_leg)){
$L.showErrorMessage("错误",'请输入合法的身份证号!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if (head_record.get('bp_code')) { if (head_record.get('bp_code')) {
return true; return true;
} }
...@@ -157,16 +144,18 @@ ...@@ -157,16 +144,18 @@
var social_code=head_record.get('social_code'); var social_code=head_record.get('social_code');
var id_card_no_leg=head_record.get('id_card_no_leg'); var id_card_no_leg=head_record.get('id_card_no_leg');
if(id_card_no_leg){
if(!checkCard(id_card_no_leg)){ if(!checkCard(id_card_no_leg)){
$L.showErrorMessage("错误",'请输入合法的身份证号!',null,null); $L.showErrorMessage("错误",'请输入合法的身份证号!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }}
if(social_code){
if(!CheckSocialCreditCode(social_code)){ if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null); $L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }}
Leaf.request({ Leaf.request({
......
...@@ -7,8 +7,45 @@ ...@@ -7,8 +7,45 @@
<a:link id="prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="hls303_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/> <a:link id="hls303_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>
<a:link id="hls303_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/> <a:link id="hls303_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>
<script src="${/request/@context_path}/modules/prj/PRJ500N/javascripts/input_validator.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var flag = 0; var flag = 0;
function CheckSocialCreditCode(Code) {
var patrn = /^[0-9A-Z]+$/;
//18位校验及大写校验
if ((Code.length != 18) || (patrn.test(Code) == false)) {
return false;
} else {
var Ancode;//统一社会信用代码的每一个值
var Ancodevalue;//统一社会信用代码每一个值的权重
var total = 0;
var weightedfactors = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];//加权因子
var str = '0123456789ABCDEFGHJKLMNPQRTUWXY';
//不用I、O、S、V、Z
for (var i = 0; i < Code.length - 1; i++) {
Ancode = Code.substring(i, i + 1);
Ancodevalue = str.indexOf(Ancode);
total = total + Ancodevalue * weightedfactors[i];
//权重与加权因子相乘之和
}
var logiccheckcode = 31 - total % 31;
if (logiccheckcode == 31) {
logiccheckcode = 0;
}
var Str = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y";
var Array_Str = Str.split(',');
logiccheckcode = Array_Str[logiccheckcode];
var checkcode = Code.substring(17, 18);
if (logiccheckcode != checkcode) {
return false;
} else {
return true;
}
}
}
//锁屏 //锁屏
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'] = function () { window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'] = function () {
var detail_mask; var detail_mask;
...@@ -132,6 +169,20 @@ ...@@ -132,6 +169,20 @@
}else{ }else{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} }
var social_code=head_record.get('social_code');
var id_card_no_leg=head_record.get('id_card_no_leg');
if(id_card_no_leg){
if(!checkCard(id_card_no_leg)){
$L.showErrorMessage("错误",'请输入合法的身份证号!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}}
if(social_code){
if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}}
}; };
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......
...@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>--> <a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="credit_enhance_detail_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="credit_enhance_detail_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -21,47 +21,44 @@ $Purpose: 商业伙伴授信维护 ...@@ -21,47 +21,44 @@ $Purpose: 商业伙伴授信维护
$(credit_ds).query(); $(credit_ds).query();
}) })
var dirty_flag='N';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) { //更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
dirty_flag='Y';
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = true; var credit_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var record =$(credit_ds).getCurrentRecord();
var credit_date_from=Leaf.formatDate(record.get('credit_date_from')) var credit_date_from=Leaf.formatDate(record.get('credit_date_from'))
var credit_date_to=Leaf.formatDate(record.get('credit_date_to')); var credit_date_to=Leaf.formatDate(record.get('credit_date_to'));
var total_amount=record.get('credit_total_amount'); var total_amount=record.get('credit_total_amount');
var used_credit_amount=record.get('used_amount'); var used_credit_amount=record.get('used_amount');
if (record.dirty){ if (dirty_flag=='Y'){
if(total_amount<used_credit_amount){
$L.showErrorMessage("错误",'修改后剩余授信额度小于0',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(credit_date_from>credit_date_to){ if(credit_date_from>credit_date_to){
$L.showErrorMessage("错误",'终止日需大于生效日',null,null); $L.showErrorMessage("错误",'终止日需大于生效日',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
if(credit_date_to<Leaf.formatDate(new Date())){ if(credit_date_to<Leaf.formatDate(new Date())){
$L.showErrorMessage("错误",'终止日早于当前时间',null,null); $L.showErrorMessage("错误",'终止日早于当前时间',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
Leaf.request({ Leaf.request({
url: $('hls361N_update_credit_link_id').getUrl(), url: $('hls361N_update_credit_link_id').getUrl(),
para: { para: {
bp_credit_hd_id : record.get('bp_credit_hd_id'), bp_credit_hd_id : record.get('bp_credit_hd_id'),
credit_total_amount: total_amount, credit_total_amount: total_amount,
credit_date_from : credit_date_from, credit_date_from : credit_date_from,
credit_date_to : credit_date_to credit_date_to : credit_date_to,
used_amount: record.get('used_amount'),
bp_id:record.get('bp_id')
}, },
success: function () { success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close(); $('${/parameter/@winid}').close();
$('credit_ds').query(); //$('credit_ds').query();
}, },
error: function() { error: function() {
...@@ -70,21 +67,43 @@ $Purpose: 商业伙伴授信维护 ...@@ -70,21 +67,43 @@ $Purpose: 商业伙伴授信维护
failure: function() { failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
sync: true, scope: this,
scope: this sync:true
});}else{ });
}else{
if('${/parameter/@credit_status}'=='APPROVED'){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close(); $('${/parameter/@winid}').close();
$('credit_ds').query(); // $('credit_ds').query();
} }
else if('${/parameter/@credit_status}'=='REJECT'){
Leaf.request({
url: $('hls361N_update_credit_link_id').getUrl(),
para: {
bp_credit_hd_id : record.get('bp_credit_hd_id'),
credit_total_amount: total_amount,
credit_date_from : credit_date_from,
credit_date_to : credit_date_to,
used_amount: record.get('used_amount'),
bp_id:record.get('bp_id')
},
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return check_flag; },
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; },
scope: this
});
}
}
}
]]></script> ]]></script>
......
...@@ -30,11 +30,9 @@ $Purpose: 商业伙伴授信维护 ...@@ -30,11 +30,9 @@ $Purpose: 商业伙伴授信维护
}) })
//判断角色是否可以操作 //判断角色是否可以操作
function judgeRoles(position_code){ function judgeRoles(position_code){
var datas='${/model/position_code}'.data; var datas='${/model/position_code}'.data;
for(var i=0;i<datas.length;i++){ for(var i=0;i<datas.length;i++){
if(datas[i].data.position_code==position_code){ if(datas[i].data.position_code==position_code){
return true; return true;
} }
} }
...@@ -45,14 +43,12 @@ $Purpose: 商业伙伴授信维护 ...@@ -45,14 +43,12 @@ $Purpose: 商业伙伴授信维护
//console.log(record); //console.log(record);
var link_function = ''; var link_function = '';
window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'bp_code' && value) { if (name == 'bp_code' && value) {
if (record.get('bp_category')=='TENANT'){ if (record.get('bp_category')=='TENANT'){
link_function = 'on_business_tenant_detail_window'; link_function = 'on_business_tenant_detail_window';
}else if ( record.get('bp_category')=='AGENT'){ }else if ( record.get('bp_category')=='AGENT'){
link_function = 'on_business_agent_detail_window'; link_function = 'on_business_agent_detail_window';
} }
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + value + '</a>'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + value + '</a>';
} }
} }
...@@ -109,6 +105,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -109,6 +105,7 @@ $Purpose: 商业伙伴授信维护
param['credit_date_from']=datas[0].get('credit_date_from'); param['credit_date_from']=datas[0].get('credit_date_from');
param['credit_total_amount']=datas[0].get('credit_total_amount'); param['credit_total_amount']=datas[0].get('credit_total_amount');
param['bp_code']=datas[0].get('bp_code'); param['bp_code']=datas[0].get('bp_code');
param['bp_id']=datas[0].get('bp_id');
param['credit_status']=datas[0].get('credit_status'); param['credit_status']=datas[0].get('credit_status');
param['winid']='hls_bp_credit_winId'; param['winid']='hls_bp_credit_winId';
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
<a:columns> <a:columns>
<a:column name="bp_code" prompt="代理店编码" align="center" width="120"/> <a:column name="bp_code" prompt="代理店编码" align="center" width="120"/>
<a:column name="bp_name" prompt="代理店名称" align="center" width="170"/> <a:column name="bp_name" prompt="代理店名称" align="center" width="170"/>
<a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200"/> <a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200" renderer="Leaf.formatMoney"/>
<a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/> <a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/>
<a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/> <a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/>
<a:column name="last_updated_by_desclast_update_date" prompt="变更日期" width="110" align="center"/> <a:column name="last_update_date" prompt="变更日期" width="110" align="center"/>
<!--<a:column name="" prompt="变更人" width="110" align="center"/>--> <a:column name="temp_user_desc" prompt="变更人" width="110" align="center"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:fieldSet> </a:fieldSet>
......
...@@ -102,8 +102,8 @@ $Purpose: 商业伙伴授信维护 ...@@ -102,8 +102,8 @@ $Purpose: 商业伙伴授信维护
} }
//审批冻结判断 //审批冻结判断
var credit_status=datas[0].data.credit_status; var credit_status=datas[0].data.credit_status;
if(credit_status!='FREZZING'){ if(credit_status!='APPROVING'){
$L.showInfoMessage("提示",'请选择状态为审批冻结的数据!',null,null) $L.showInfoMessage("提示",'请选择状态为审批的数据!',null,null)
return; return;
} }
//角色判断 //角色判断
...@@ -184,7 +184,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -184,7 +184,7 @@ $Purpose: 商业伙伴授信维护
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'hls_bp_credit_record_window', id: 'hls_bp_credit_record_window',
params: { params: {
bp_credit_hd_id: record.get('bp_credit_hd_id'), bp_credit_hd_id: record[0].get('bp_credit_hd_id'),
winid: 'hls_bp_credit_record_window' winid: 'hls_bp_credit_record_window'
}, },
url: $('credit_detail_link').getUrl(), url: $('credit_detail_link').getUrl(),
......
...@@ -82,6 +82,10 @@ ...@@ -82,6 +82,10 @@
function hls_hls500_save(nextStep, source_procedure) { function hls_hls500_save(nextStep, source_procedure) {
lock_calc_current_window('${l:HLS.SAVING}'); lock_calc_current_window('${l:HLS.SAVING}');
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
}
if('${/parameter/@document_category}'=='PROJECT'){ if('${/parameter/@document_category}'=='PROJECT'){
Leaf.request({ Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(), url: $('prj_check_prj_record_link_id').getUrl(),
...@@ -89,27 +93,67 @@ ...@@ -89,27 +93,67 @@
'project_id': '${/parameter/@document_id}' 'project_id': '${/parameter/@document_id}'
}, },
success: function(res) { success: function(res) {
debugger;
var secondary_lease = res.result.secondary_lease; var secondary_lease = res.result.secondary_lease;
var payment_deduction = res.result.payment_deduction; var payment_deduction = res.result.payment_deduction;
var price_list = res.result.price_list; var price_list = res.result.price_list;
/* 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 down_payment_rate_new=res.result.down_payment_rate_new;
var count=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'){
var denominator=0; //比例=(H16+H97)/(H99+H102-H16)
var H16,H97,H99,H102;
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll(); var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) { for (var i = 0;i < temp_head_records.length;i++) {
if(temp_head_records[i].get('column_code')=='H16'||temp_head_records[i].get('column_code')=='H97'){ if(temp_head_records[i].get('column_code')=='H16'){
count=count+temp_head_records[i].get('column_value')||0 H16=temp_head_records[i].get('column_value')||0
}else if(temp_head_records[i].get('column_code')=='H99'||temp_head_records[i].get('column_code')=='H102'){ }else if(temp_head_records[i].get('column_code')=='H97'){
denominator=denominator+temp_head_records[i].get('column_value')||0 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;
}
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);
} }
} }
if((count/denominator)<0.15){ 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);
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于15%'); function hls_fin_cal_save_hd_submitsuccess(ds, res) {
unlock_calc_current_window('${l:HLS.CALCULATING}'); if (typeof(nextStep) == 'function') {
return false; 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);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
} }
}*/
if(price_list=='HL_PRICR_E' ||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN'){ 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' && payment_deduction!='TRI_AGREEMENT' ){ if(payment_deduction!='TRADE_IN' && payment_deduction!='TRI_AGREEMENT' ){
var record = $('hls_fin_calculator_hd_ds').getAll(); var record = $('hls_fin_calculator_hd_ds').getAll();
...@@ -129,18 +173,13 @@ ...@@ -129,18 +173,13 @@
if(temp_head_records[i].get('column_code')=='H16'){ if(temp_head_records[i].get('column_code')=='H16'){
H16=temp_head_records[i].get('column_value'); H16=temp_head_records[i].get('column_value');
} }
if(temp_head_records[i].get('column_code')=='H109') { if(temp_head_records[i].get('column_code')=='H109') {
temp_head_records[i].set('column_value',H16); temp_head_records[i].set('column_value',H16);
// temp_head_records[i].set('column_value_c',0); // temp_head_records[i].set('column_value_c',0);
} }
} }
} }
} }
}, },
failure: function() { failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}'); unlock_calc_current_window('${l:HLS.SAVING}');
...@@ -154,40 +193,6 @@ ...@@ -154,40 +193,6 @@
}); });
} }
if (!$('hls_fin_calculator_hd_ds').validate() || !$('hls_fin_calculator_ln_ds').validate()) {
unlock_calc_current_window();
return;
}
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 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(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);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
} }
......
...@@ -598,17 +598,17 @@ function prj501n_contract_number_renderer(id, name, query_only){ ...@@ -598,17 +598,17 @@ function prj501n_contract_number_renderer(id, name, query_only){
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if(name=='pay_method'){ if(name=='pay_method'){
if ( record.get('pay_method') == 'WIRE_TRANSFER') { if ( record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_branch_name',null); record.set('bank_account_id',null);
record.set('bank_branch_name_n',null); record.set('bank_account_id_n',null);
record.getField('bank_branch_name').setReadOnly(true); record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_branch_name_n').setReadOnly(true); record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_branch_name').setRequired(false); record.getField('bank_account_id').setRequired(false);
record.getField('bank_branch_name_n').setRequired(false); record.getField('bank_account_id_n').setRequired(false);
} else { } else {
record.getField('bank_branch_name').setReadOnly(false); record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_branch_name_n').setReadOnly(false); record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_branch_name').setRequired(true); record.getField('bank_account_id').setRequired(true);
record.getField('bank_branch_name_n').setRequired(true); record.getField('bank_account_id_n').setRequired(true);
} }
} }
......
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