Commit 64f69435 authored by niminmin's avatar niminmin

[feat]功能新增与优化

parent 5b5cf8aa
...@@ -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>
......
<?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;
param['function_usage'] = 'MODIFY'; if(record.get('confirmation_status')=='APPROVING'||record.get('confirmation_status')=='APPROVED'){
param['function_code'] = 'ACP522I'; param['function_usage'] = 'QUERY';
param['function_code'] = 'ACP522WFL';
}else{
param['function_usage'] = 'MODIFY';
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);
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); if(name == 'invoice'&&value) {
$(acp_ds_id).query(); 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).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>
...@@ -14,191 +14,191 @@ ...@@ -14,191 +14,191 @@
<a:link id="acr514_invoice_readonly_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/> <a:link id="acr514_invoice_readonly_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<script><![CDATA[ <script><![CDATA[
function acr514_invoice_query() { function acr514_invoice_query() {
$('acr514_invoice_result_ds').query(); $('acr514_invoice_result_ds').query();
} }
function acr514_invoice_reset() { function acr514_invoice_reset() {
$('acr514_invoice_query_ds').reset(); $('acr514_invoice_query_ds').reset();
} }
function acr514_formatMoney(value, record, name) { function acr514_formatMoney(value, record, name) {
return Leaf.formatNumber(value); return Leaf.formatNumber(value);
} }
function acr514_invoice_query_Onupdate(ds, record, name, value, oldVlaue) { function acr514_invoice_query_Onupdate(ds, record, name, value, oldVlaue) {
if (name == 'document_number_f') { if (name == 'document_number_f') {
if (Leaf.isEmpty(record.get('document_number_t'))) { if (Leaf.isEmpty(record.get('document_number_t'))) {
record.set('document_number_t', value); record.set('document_number_t', value);
} }
} else if (name == 'project_number_f') { } else if (name == 'project_number_f') {
if (Leaf.isEmpty(record.get('project_number_t'))) { if (Leaf.isEmpty(record.get('project_number_t'))) {
record.set('project_number_t', value); record.set('project_number_t', value);
}
} else if (name == 'invoice_number_f') {
if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('invoice_number_t', value);
}
} else if (name == 'contract_number_f') {
if (Leaf.isEmpty(record.get('contract_number_t'))) {
record.set('contract_number_t', value);
}
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
}
} }
} else if (name == 'invoice_number_f') {
if (Ext.isEmpty(record.get('project_number_f')) && Ext.isEmpty(record.get('project_number_t'))) { if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('query_project_number', ''); record.set('invoice_number_t', value);
} else {
record.set('query_project_number', 'Y');
} }
if (Ext.isEmpty(record.get('contract_number_f')) && Ext.isEmpty(record.get('contract_number_t'))) { } else if (name == 'contract_number_f') {
record.set('query_contract_number', ''); if (Leaf.isEmpty(record.get('contract_number_t'))) {
} else { record.set('contract_number_t', value);
record.set('query_contract_number', 'Y'); }
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
} }
} }
function acr514_grid_query(reocrd_id, invoice_hd_id, status) { if (Ext.isEmpty(record.get('project_number_f')) && Ext.isEmpty(record.get('project_number_t'))) {
var maintain_type = 'READONLY'; record.set('query_project_number', '');
var currency_reocrd = $('acr514_invoice_result_ds').findById(reocrd_id); } else {
var param = currency_reocrd.data; record.set('query_project_number', 'Y');
param['function_code'] = 'ACR514';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr514_invoice_readonly_page', 'acr514_invoice_result_ds');
} }
if (Ext.isEmpty(record.get('contract_number_f')) && Ext.isEmpty(record.get('contract_number_t'))) {
record.set('query_contract_number', '');
function acr514_document_number_render(value, record, name) { } else {
return '<a href="javascript:acr514_grid_query(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>'; record.set('query_contract_number', 'Y');
} }
}
function acr514_invoice_reverse() {
acr514_invoice_handle('REVERSE'); function acr514_grid_query(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'READONLY';
var currency_reocrd = $('acr514_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR514';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr514_invoice_readonly_page', 'acr514_invoice_result_ds');
}
function acr514_document_number_render(value, record, name) {
return '<a href="javascript:acr514_grid_query(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
function acr514_invoice_reverse() {
acr514_invoice_handle('REVERSE');
}
function acr514_invoice_invalid() {
acr514_invoice_handle('INVALID');
}
function is_over_month(start_str, end_str) {
var start = Leaf.formatDate(start_str);
var end = Leaf.formatDate(end_str);
var year = Number(end.substr(0, 4)) - Number(start.substr(0, 4));
var month = Number(end.substr(5, 2)) - Number(start.substr(5, 2));
var day = Number(end.substr(8, 2)) - Number(start.substr(8, 2));
if (year == 1 && month == -11 && day <= 0) {
return false;
} }
if (year == 0 && month == 0) {
function acr514_invoice_invalid() { return false;
acr514_invoice_handle('INVALID');
} }
if (year == 0 && month == 1 && day <= 0) {
function is_over_month(start_str, end_str) { return false;
var start = Leaf.formatDate(start_str);
var end = Leaf.formatDate(end_str);
var year = Number(end.substr(0, 4)) - Number(start.substr(0, 4));
var month = Number(end.substr(5, 2)) - Number(start.substr(5, 2));
var day = Number(end.substr(8, 2)) - Number(start.substr(8, 2));
if (year == 1 && month == -11 && day <= 0) {
return false;
}
if (year == 0 && month == 0) {
return false;
}
if (year == 0 && month == 1 && day <= 0) {
return false;
}
return true;
} }
return true;
function acr514_invoice_handle(type) { }
var ds = $('acr514_invoice_result_ds'); function acr514_invoice_handle(type) {
var records = ds.getSelected();
if (records.length == 0) { var ds = $('acr514_invoice_result_ds');
return; var records = ds.getSelected();
} if (records.length == 0) {
return;
if (type == 'REVERSE') { }
for (var i = 0;i < records.length;i++) {
if (records[i].get('invoice_kind') == '0') { if (type == 'REVERSE') {
records[i].getField('vat_red_notice_num').setRequired(true); for (var i = 0;i < records.length;i++) {
} if (records[i].get('invoice_kind') == '0') {
records[i].getField('vat_red_notice_num').setRequired(true);
} }
} else if (type == 'INVALID') { }
for (var i = 0;i < records.length;i++) { } else if (type == 'INVALID') {
if (is_over_month(records[i].get('invoice_date'), records[i].get('reverse_date'))) { for (var i = 0;i < records.length;i++) {
Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '日期跨月'); if (is_over_month(records[i].get('invoice_date'), records[i].get('reverse_date'))) {
return; Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '日期跨月');
} return;
} }
// for (var i = 0;i < records.length;i++) { }
// if (records[i].get('vat_interface_status')=='BACK') { for (var i = 0;i < records.length;i++) {
// Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '金税状态已回写,不可反冲'); if (records[i].get('vat_interface_status')=='BACK') {
// return; Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '金税状态已回写,不可反冲');
// } return;
// }
for (var i = 0;i < records.length;i++) {
records[i].getField('vat_red_notice_num').setRequired(false);
} }
} else {
return;
} }
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认?', function() { for (var i = 0;i < records.length;i++) {
ds.submitSelected(); records[i].getField('vat_red_notice_num').setRequired(false);
}, function() { }
} else {
}); return;
}
function acr514_invoice_result_ds_submitsuccess(ds) {
$('acr514_invoice_grid_id').clear();
} }
function vat_red_notice_num_editorFunction(record, name) { Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认?', function() {
if (record.get('invoice_kind') == '0') { ds.submitSelected();
if (name == 'vat_red_notice_num') { }, function() {
return 'invoice_grid_tf';
} });
}
function acr514_invoice_result_ds_submitsuccess(ds) {
$('acr514_invoice_grid_id').clear();
}
function vat_red_notice_num_editorFunction(record, name) {
if (record.get('invoice_kind') == '0') {
if (name == 'vat_red_notice_num') {
return 'invoice_grid_tf';
} }
return '';
} }
return '';
function acr514_invoice_update(ds, record, name, value, oldVlaue) }
function acr514_invoice_update(ds, record, name, value, oldVlaue)
{
debugger;
var time,year,month,day,string;
var d,d_year_month;
if(name=='reverse_date')
{ {
debugger; time = new Date();
var time,year,month,day,string; year = time.getFullYear();
var d,d_year_month; month = time.getMonth()+1;
if(name=='reverse_date') if(month<10)
{
time = new Date();
year = time.getFullYear();
month = time.getMonth()+1;
if(month<10)
string = String(year)+'0'+String(month); string = String(year)+'0'+String(month);
else else
string = String(year)+String(month); string = String(year)+String(month);
d= new Date(value); d= new Date(value);
d_year=d.getFullYear(); d_year=d.getFullYear();
d_month=d.getMonth()+1; d_month=d.getMonth()+1;
if(d_month<10) if(d_month<10)
d_year_month = String(d_year)+'0'+String(d_month); d_year_month = String(d_year)+'0'+String(d_month);
else else
d_year_month = String(d_year)+String(d_month); d_year_month = String(d_year)+String(d_month);
//如果小于系统时间 //如果小于系统时间
if( d_year_month<string) if( d_year_month<string)
{ {
record.getField('vat_red_notice_num').setRequired(true); record.getField('vat_red_notice_num').setRequired(true);
} }
else else
{ {
record.getField('vat_red_notice_num').setRequired(false); record.getField('vat_red_notice_num').setRequired(false);
} }
record.set(name,value); record.set(name,value);
}
} }
}
]]></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"/>
<a:dataSets> <a:dataSets>
...@@ -231,20 +231,14 @@ ...@@ -231,20 +231,14 @@
<a:map from="description" to="confirmed_by_name"/> <a:map from="description" to="confirmed_by_name"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<!--<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">--> <a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<!--<a:mapping>-->
<!--<a:map from="bp_code" to="invoice_bp_code_f"/>-->
<!--</a:mapping>-->
<!--</a:field>-->
<!--<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">-->
<!--<a:mapping>-->
<!--<a:map from="bp_code" to="invoice_bp_code_t"/>-->
<!--</a:mapping>-->
<!--</a:field>-->
<a:field name="invoice_bp_name" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping> <a:mapping>
<a:map from="bp_code" to="invoice_bp_code"/> <a:map from="bp_code" to="invoice_bp_code_f"/>
<a:map from="bp_name" to="invoice_bp_name"/> </a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择"> <a:field name="project_number_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
...@@ -290,58 +284,40 @@ ...@@ -290,58 +284,40 @@
<a:screenTitle/> <a:screenTitle/>
<a:toolbarButton click="acr514_invoice_query" text="HLS.QUERY"/> <a:toolbarButton click="acr514_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr514_invoice_reset" text="HLS.RESET"/> <a:toolbarButton click="acr514_invoice_reset" text="HLS.RESET"/>
<!-- <a:toolbarButton click="acr514_invoice_reverse" text="HLS.REVERSE"/>--> <!-- <a:toolbarButton click="acr514_invoice_reverse" text="HLS.REVERSE"/>-->
<a:toolbarButton click="acr514_invoice_invalid" text="作废"/> <a:toolbarButton click="acr514_invoice_invalid" text="作废"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form marginWidth="30" padding="0" title="应收发票反冲" labelWidth="130"> <a:form marginWidth="30" padding="0" title="应收发票反冲" labelWidth="130">
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
<a:textField name="document_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/> <a:textField name="document_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据编号到" width="135"/>
<a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据号到" width="135"/> <a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据号到" width="135"/>
<!-- <a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>--> <!-- <a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>-->
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/> <!-- <a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>-->
<a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/> <!-- <a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>-->
<!-- <a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>-->
<!-- <a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>-->
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>--> <a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>-->
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/> <a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
<a:textField name="invoice_number_t" bindTarget="acr514_invoice_query_ds" prompt="发票编号到" width="135"/> <a:textField name="invoice_number_t" bindTarget="acr514_invoice_query_ds" prompt="发票编号到" width="135"/>
</a:hBox> </a:hBox>
<a:hBox labelWidth="100">
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
<!--<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>-->
<a:lov name="contract_number_f" bindTarget="acr514_invoice_query_ds" prompt="合同编号" width="135"/> <a:lov name="contract_number_f" bindTarget="acr514_invoice_query_ds" prompt="合同编号" width="135"/>
<!--<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>-->
<!-- <!--
<a:lov name="contract_number_t" bindTarget="acr514_invoice_query_ds" prompt="合同编号到" width="135"/> <a:lov name="contract_number_t" bindTarget="acr514_invoice_query_ds" prompt="合同编号到" width="135"/>
--> -->
<a:comboBox name="invoice_kind_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/> <a:comboBox name="invoice_kind_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/>
<a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/> <a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/>
<a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/> <a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/>
<a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/> <a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/>
</a:hBox> </a:hBox>
<a:hBox labelWidth="100">
<a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/>
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
<!--<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>--> <!--<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>-->
<a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/>
<!--<a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.CUSTOMER_NUMBER_FROM" width="135"/>-->
<!--&lt;!&ndash;<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>&ndash;&gt;-->
<!--<a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:lov name="invoice_bp_name" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/> <a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/>
<!--<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>--> <!--<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>--> <!-- <a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_title" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_TITLE" width="135"/> <a:textField name="invoice_title" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_TITLE" width="135"/>
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/> <a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/>
<a:datePicker name="accounting_date_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.ACCOUNT_DATE_FROM" width="135"/> <a:datePicker name="accounting_date_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.ACCOUNT_DATE_FROM" width="135"/>
<a:datePicker name="accounting_date_t" bindTarget="acr514_invoice_query_ds" prompt="记账日期到" width="135"/> <a:datePicker name="accounting_date_t" bindTarget="acr514_invoice_query_ds" prompt="记账日期到" width="135"/>
...@@ -351,14 +327,6 @@ ...@@ -351,14 +327,6 @@
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="ACR.TOTAL_AMOUNT_FROM" width="135"/> <a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="ACR.TOTAL_AMOUNT_FROM" width="135"/>
<!--<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>--> <!--<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>-->
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="发票金额到" width="135"/> <a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="发票金额到" width="135"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR310.VAT_INTERFACE_STATUS_NAME" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/>
<a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/>
<!--<a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="发票状态" width="135"/>-->
<a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_STATUS" width="135"/> <a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_STATUS" width="135"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="金税状态" width="135"/> <a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="金税状态" width="135"/>
</a:hBox> </a:hBox>
......
...@@ -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();
} }}
}); });
} }
}, },
......
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<!-- <a:link id="con_contract_closed_submit_link_id" model="cont.CON542.con_contract_cancel" modelaction="batch_update"/> --> <!-- <a:link id="con_contract_closed_submit_link_id" model="cont.CON542.con_contract_cancel" modelaction="batch_update"/> -->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="con_contract_closed_link" model="cont.CON542.con_contract_closed" modelaction="batch_update"/> <a:link id="con_contract_closed_link" model="cont.CON542.con_contract_closed" modelaction="batch_update"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
function CON542_con_contract_query() { function CON542_con_contract_query() {
$('CON542_contract_result_ds').query(); $('CON542_contract_result_ds').query();
...@@ -22,36 +27,44 @@ ...@@ -22,36 +27,44 @@
function CON542_con_contract_reset() { function CON542_con_contract_reset() {
$('CON542_contract_query_ds').reset(); $('CON542_contract_query_ds').reset();
} }
// function CON542_con_contract_submit() { function seeDetail_num(value, record, name) {
// var records = $('CON542_contract_result_ds').getSelected(); if(value){
// var cancelData = []; if (name=='contract_number') {
// records[0].set('_status', 'update'); return '<a href="javascript:open_contract_win(\'' + record.id + '\',\'' + record.ds.id + '\');">' + value + '</a>';
// var records_reason = $('contract_cancel_ds').getAt(0); }else if(name=='project_number'){
// if (Leaf.isEmpty(records_reason.get('cancel_reason'))) { return '<a href="javascript:open_project_Window(\'' + record.id + '\',\'' + record.ds.id + '\');">' + value + '</a>';
// Leaf.showMessage('提示', '请维护合同取消原因!'); }}else{
// return; return '';
// } }
// records[0].set('cancel_reason', records_reason.get('cancel_reason')); }
// cancelData.push(records[0].data);
// Leaf.showConfirm('${l:PROMPT}', '您确认要提交合同取消申请?', function() { function open_contract_win(record_id,ds_id) {
// Leaf.request({ debugger;
// url: $('con_contract_closed_submit_link_id').getUrl(), var record = $(ds_id).findById(record_id);
// para: cancelData, var param = record.data;
// success: function() { param['function_code'] = 'CON301';
// Leaf.SideBar.show({ param['function_usage'] = 'QUERY';
// msg: '提交成功', param['winid'] = 'con_contract_modify_win_id';
// duration: 2000 param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
// }); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
// $('CON542_contract_result_ds').query(); }
// },
// scope: this function open_project_Window(record_id, ds_id) {
// }); var record = $(ds_id).findById(record_id);
// }, function() { var param = record.data;
// return; param['company_id'] = record.get('company_id');
// }, null, null); param['project_id'] = record.get('project_id');
// } param['function_usage'] = 'QUERY';
param['function_code'] = 'PRJ501_WFL';
param['bp_class'] = record.get('bp_class');
param['maintain_type'] = 'QUERY';
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_special_link', ds_id, '${/parameter/@layout_code}');
}
function summaryRenderer(datas, name) { function summaryRenderer(datas, name) {
var sum = 0; var sum = 0;
var sum2 = 0; var sum2 = 0;
...@@ -127,6 +140,24 @@ ...@@ -127,6 +140,24 @@
<a:dataSet id="CON542_lease_channel_name_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/> <a:dataSet id="CON542_lease_channel_name_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="CON542_wfl_status_name_ds" lookupCode="CON500_WFL_STATUS"/> <a:dataSet id="CON542_wfl_status_name_ds" lookupCode="CON500_WFL_STATUS"/>
<a:dataSet id="CON542_companies_ds" loadData="true" model="fnd.fnd_companies"/> <a:dataSet id="CON542_companies_ds" loadData="true" model="fnd.fnd_companies"/>
<a:dataSet id="CONTRACT_STATUS_DS">
<a:datas>
<a:record code_value="NEW" code_value_name="新建"/>
<a:record code_value="INCEPT" code_value_name="起租"/>
<a:record code_value="INCEPTING" code_value_name="起租中"/>
<a:record code_value="INCEPT_RETURN" code_value_name="起租退回"/>
<a:record code_value="CANCEL" code_value_name="取消"/>
</a:datas>
</a:dataSet>
<a:dataSet id="SIGN_CONTRACT_STATUS_DS">
<a:datas>
<a:record code_value="NEW" code_value_name="新建"/>
<a:record code_value="SIGN" code_value_name="签约"/>
<a:record code_value="SIGNING" code_value_name="签约中"/>
<a:record code_value="SIGN_RETURN" code_value_name="签约退回"/>
<a:record code_value="CANCEL" code_value_name="取消"/>
</a:datas>
</a:dataSet>
<a:dataSet id="CON542_document_type_name_ds"> <a:dataSet id="CON542_document_type_name_ds">
<a:datas dataSource="/model/CON542_document_type_path"/> <a:datas dataSource="/model/CON542_document_type_path"/>
</a:dataSet> </a:dataSet>
...@@ -135,26 +166,24 @@ ...@@ -135,26 +166,24 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="CON542_contract_query_ds" autoCreate="true"> <a:dataSet id="CON542_contract_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bp_name" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="520" title="HLS.BP_TITLE"> <a:field name="bp_id_tenant_n" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="520" title="HLS.BP_TITLE">
<a:mapping> <a:mapping>
<a:map from="bp_name" to="bp_name"/> <a:map from="bp_name" to="bp_id_tenant_n"/>
<a:map from="bp_id" to="bp_id_tenant"/> <a:map from="bp_id" to="bp_id_tenant"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="bp_id_tenant"/> <a:field name="bp_id_tenant"/>
<!-- <a:field name="contract_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="cont.CON531.con_contract_lov" lovWidth="500" title="HLS.CONTRACT_NUMBER"> <a:field name="bp_agent_name" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=AGENT" lovWidth="520" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
<a:map from="contract_id" to="contract_id"/>
</a:mapping>
</a:field> -->
<a:field name="lease_channel_desc" displayField="description" options="CON542_lease_channel_name_ds" returnField="lease_channel" valueField="lease_channel"/>
<!-- <a:field name="project_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="HLS.PROJECT_NUMBER">
<a:mapping> <a:mapping>
<a:map from="project_number" to="project_number"/> <a:map from="bp_name" to="bp_agent_name"/>
<a:map from="project_id" to="project_id"/> <a:map from="bp_id" to="bp_id_agent_level1"/>
</a:mapping> </a:mapping>
</a:field> --> </a:field>
<a:field name="contract_status_n" options="CONTRACT_STATUS_DS"
returnField="contract_status" displayField="code_value_name" valueField="code_value"/>
<a:field name="sign_contract_status_n" options="SIGN_CONTRACT_STATUS_DS"
returnField="sign_contract_status" displayField="code_value_name" valueField="code_value"/>
<a:field name="bp_id_tenant"/>
<a:field name="contract_number" typeCase="Upper"/> <a:field name="contract_number" typeCase="Upper"/>
<a:field name="project_number" typeCase="Upper"/> <a:field name="project_number" typeCase="Upper"/>
<a:field name="document_type_desc" displayField="description" options="contract_document_ds" returnField="document_type" valueField="document_type"/> <a:field name="document_type_desc" displayField="description" options="contract_document_ds" returnField="document_type" valueField="document_type"/>
...@@ -172,37 +201,32 @@ ...@@ -172,37 +201,32 @@
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="CON542_con_contract_query" text="HLS.QUERY"/> <a:gridButton click="CON542_con_contract_query" text="HLS.QUERY"/>
<a:gridButton click="CON542_con_contract_reset" text="HLS.RESET"/> <a:gridButton click="CON542_con_contract_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="CON542_con_contract_submit" text="申请提交"/> --> <a:gridButton click="CON542_con_contract_closed" text="合同取消"/>
<a:gridButton click="CON542_con_contract_closed" text="合同关闭"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="4" labelWidth="100" marginWidth="30" title="CON301.CONTRACT_QUERY"> <a:form column="4" labelWidth="100" marginWidth="30" title="CON301.CONTRACT_QUERY">
<a:textField name="contract_number" bindTarget="CON542_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/> <a:textField name="contract_number" bindTarget="CON542_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/>
<a:lov name="bp_name" bindTarget="CON542_contract_query_ds" prompt="HLS.TENANT_CODE"/> <a:lov name="bp_id_tenant_n" bindTarget="CON542_contract_query_ds" prompt="HLS.TENANT_CODE"/>
<a:lov name="bp_agent_name" bindTarget="CON542_contract_query_ds" prompt="代理店"/>
<a:numberField name="lease_item_amount_from" bindTarget="CON542_contract_query_ds" prompt="租赁物总价从"/> <a:numberField name="lease_item_amount_from" bindTarget="CON542_contract_query_ds" prompt="租赁物总价从"/>
<a:numberField name="lease_item_amount_to" bindTarget="CON542_contract_query_ds" prompt="租赁物总价到"/> <a:numberField name="lease_item_amount_to" bindTarget="CON542_contract_query_ds" prompt="租赁物总价到"/>
<a:comboBox name="lease_channel_desc" bindTarget="CON542_contract_query_ds" prompt="HLS.LEASE_CHANNEL_NAME"/> <a:textField name="project_number" bindTarget="CON542_contract_query_ds" prompt="报单编号"/>
<a:textField name="project_number" bindTarget="CON542_contract_query_ds" prompt="申请编号"/> <a:comboBox name="contract_status_n" bindTarget="CON542_contract_query_ds" prompt="合同状态"/>
<a:comboBox name="lease_organization_name" bindTarget="CON542_contract_query_ds" prompt="事业部"/> <a:comboBox name="sign_contract_status_n" bindTarget="CON542_contract_query_ds" prompt="签约状态"/>
<a:comboBox name="document_type_desc" bindTarget="CON542_contract_query_ds" prompt="HLS.CONTRACT_TYPE"/>
</a:form> </a:form>
<!-- <a:form labelWidth="100" marginWidth="30" title="取消原因"> <!-- <a:form labelWidth="100" marginWidth="30" title="取消原因">
<a:textArea name="cancel_reason" bindTarget="contract_cancel_ds" height="60" prompt="取消原因" width="800"/> <a:textArea name="cancel_reason" bindTarget="contract_cancel_ds" height="60" prompt="取消原因" width="800"/>
</a:form>--> </a:form>-->
<a:grid id="CON542_con_contract_grid_ds" bindTarget="CON542_contract_result_ds" marginHeight="300" marginWidth="30" navBar="true"> <a:grid id="CON542_con_contract_grid_ds" bindTarget="CON542_contract_result_ds" marginHeight="150" marginWidth="30" navBar="true">
<a:columns> <a:columns>
<a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="150"/> <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="150" renderer="seeDetail_num"/>
<a:column name="project_number" prompt="申请编号" width="120"/> <a:column name="project_number" prompt="报单编号" width="120" renderer="seeDetail_num"/>
<!--<a:column name="signing_user" prompt="签约人" width="120"/>--> <a:column name="bp_id_agent_level1_n" prompt="代理店" width="200"/>
<a:column name="print_date" prompt="签约时间" renderer="Leaf.formatDate" width="120"/>
<a:column name="document_type_desc" prompt="HLS.CONTRACT_TYPE" width="80"/>
<a:column name="bp_name" prompt="HLS.TENANT_NAME" width="200"/> <a:column name="bp_name" prompt="HLS.TENANT_NAME" width="200"/>
<!--<a:column name="bp_vender" align="center" footerRenderer="summaryRenderer" prompt="主供应商名称" width="200"/>--> <!--<a:column name="bp_vender" align="center" footerRenderer="summaryRenderer" prompt="主供应商名称" width="200"/>-->
<a:column name="lease_item_amount" align="right" footerRenderer="summaryRenderer" prompt="租赁物总价" renderer="Leaf.formatMoney" width="120"/> <a:column name="lease_item_amount" align="right" footerRenderer="summaryRenderer" prompt="租赁物总价" renderer="Leaf.formatMoney" width="120"/>
<a:column name="down_payment" align="right" footerRenderer="summaryRenderer" prompt="首付款" renderer="Leaf.formatMoney" width="120"/> <!--<a:column name="down_payment" align="right" footerRenderer="summaryRenderer" prompt="首付款" renderer="Leaf.formatMoney" width="120"/>-->
<!--<a:column name="owner_user_id_n" prompt="出单人" width="80"/>--> <a:column name="contract_status_n" prompt="合同状态" align="center"/>
<a:column name="lease_channel_n" prompt="商业模式" width="70"/> <a:column name="sign_contract_status_n" prompt="签约状态" align="center"/>
<a:column name="lease_organization_desc" prompt="事业部"/>
<a:column name="contract_status_n" prompt="合同状态"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
...@@ -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>
......
...@@ -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];
......
...@@ -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,70 +21,89 @@ $Purpose: 商业伙伴授信维护 ...@@ -21,70 +21,89 @@ $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 credit_date_from=Leaf.formatDate(record.get('credit_date_from')) var record =$(credit_ds).getCurrentRecord();
var credit_date_to=Leaf.formatDate(record.get('credit_date_to')); var credit_date_from=Leaf.formatDate(record.get('credit_date_from'))
var total_amount=record.get('credit_total_amount'); var credit_date_to=Leaf.formatDate(record.get('credit_date_to'));
var used_credit_amount=record.get('used_amount'); var total_amount=record.get('credit_total_amount');
if (record.dirty){ var used_credit_amount=record.get('used_amount');
if(total_amount<used_credit_amount){ if (dirty_flag=='Y'){
$L.showErrorMessage("错误",'修改后剩余授信额度小于0',null,null); if(credit_date_from>credit_date_to){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $L.showErrorMessage("错误",'终止日需大于生效日',null,null);
return false;
}
if(credit_date_from>credit_date_to){
$L.showErrorMessage("错误",'终止日需大于生效日',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(credit_date_to<Leaf.formatDate(new Date())){
$L.showErrorMessage("错误",'终止日早于当前时间',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
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
},
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close(); return false;
$('credit_ds').query(); }
if(credit_date_to<Leaf.formatDate(new Date())){
}, $L.showErrorMessage("错误",'终止日早于当前时间',null,null);
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, return false;
failure: function() { }
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();
//$('credit_ds').query();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync:true
});
}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();
sync: true, // $('credit_ds').query();
scope: this }
});}else{ else if('${/parameter/@credit_status}'=='REJECT'){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close(); Leaf.request({
$('credit_ds').query(); 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,
return check_flag; 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']();
},
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
} }
} }
if((count/denominator)<0.15){ var aa=H16+H97;
var bb=H99+H102-H16;
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于15%'); var cc=div((H16+H97),(H99+H102-H16));
unlock_calc_current_window('${l:HLS.CALCULATING}'); // 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; 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);
}
}
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();
}
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,42 +193,8 @@ ...@@ -154,42 +193,8 @@
}); });
} }
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();
} }
function on_hls_fin_cal_save_hd_submitfailed(ds, res) { function on_hls_fin_cal_save_hd_submitfailed(ds, res) {
......
...@@ -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