Commit 1eae6abd authored by Darming's avatar Darming

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

parents 3b3c8cfd 9c8702c0
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-6-13 下午02:32:50
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from ( select h.bp_name, h.bp_id
from hls_bp_master h
where h.bp_category = 'VENDER'
and h.enabled_flag='Y')
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_name" displayWidth="200" forDisplay="true" prompt="厂商名称"/>
<bm:field name="bp_id" displayWidth="200" forDisplay="true" forQuery="true" prompt="厂商代码"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="bp_name" queryOperator="like"/>
<bm:query-field field="bp_id" queryOperator="like"/>
</bm:query-fields>
<!-- <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="h.enabled_flag=&apos;Y&apos;"/>
</bm:data-filters>-->
</bm:model>
...@@ -61,6 +61,10 @@ ...@@ -61,6 +61,10 @@
<bm:field name="withhold_way_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;WITHHOLD_WAYS&apos; and scv.code_value = t1.withhold_way)" forInsert="false" forUpdate="false"/> <bm:field name="withhold_way_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;WITHHOLD_WAYS&apos; and scv.code_value = t1.withhold_way)" forInsert="false" forUpdate="false"/>
<bm:field name="first_contract_flag"/> <bm:field name="first_contract_flag"/>
<bm:field name="finance_type"/> <bm:field name="finance_type"/>
<bm:field name="secondary_lease"/>
<bm:field name="vender_id"/>
<bm:field name="vender_id_n" expression="(select scv.bp_name from hls_bp_master scv where scv.enabled_flag=&apos;Y&apos; and scv.bp_id = t1.vender_id)" forInsert="false" forUpdate="false"/>
<bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/> <bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
from (select c.contract_number, from (select c.contract_number,
c.contract_name, c.contract_name,
c.contract_id, c.contract_id,
c.bp_id_agent_level1,
(select hli.pattern (select hli.pattern
from con_contract_lease_item ccli, hls_lease_item hli from con_contract_lease_item ccli, hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id where ccli.lease_item_id = hli.lease_item_id
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
hbm.bp_name, hbm.bp_name,
to_char(cpr.apply_pay_date,'yyyy-mm-dd') apply_pay_date, to_char(cpr.apply_pay_date,'yyyy-mm-dd') apply_pay_date,
cpr.bp_bank_account_id, cpr.bp_bank_account_id,
cpr.vender_bank_account_id,
(select cph.payment_req_number (select cph.payment_req_number
from csh_payment_req_hd cph from csh_payment_req_hd cph
where cpr.payment_req_id = cph.payment_req_id) payment_req_number, where cpr.payment_req_id = cph.payment_req_id) payment_req_number,
...@@ -53,9 +55,10 @@ ...@@ -53,9 +55,10 @@
and c.source_doc_id = cpr.payment_req_id and c.source_doc_id = cpr.payment_req_id
and c.transaction_type = 'PAYMENT') bank_slip_num,*/ and c.transaction_type = 'PAYMENT') bank_slip_num,*/
(select bp_name (select h.bank_account_name
from hls_bp_master hbm FROM hls_bp_master_bank_account h
where hbm.bp_id = cpr.bp_id) BP_ID_AGENT_N, WHERE
h.bank_account_id = cpr.bp_bank_account_id) BP_ID_AGENT_N,
(select hbm.bank_account_num (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
...@@ -74,19 +77,13 @@ ...@@ -74,19 +77,13 @@
--未付金额 --未付金额
(cpr.amount_agent - nvl(cpr.amount_agent_paid, 0)) residual_agent_amount, (cpr.amount_agent - nvl(cpr.amount_agent_paid, 0)) residual_agent_amount,
(cpr.amount_vender - nvl(cpr.amount_vender_paid, 0)) residual_vender_amount, (cpr.amount_vender - nvl(cpr.amount_vender_paid, 0)) residual_vender_amount,
(select bp_name
from hls_bp_master hbm
where hbm.bp_id =
(select bp_id
from hls_bp_master_bank_account t
where t.bank_account_id = cpr.vender_bank_account_id)) vender_name,
(select hbm.bank_account_name (select hbm.bank_account_name
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_ID, where hbm.bank_account_id = cpr.vender_bank_account_id
) vender_name,
(select hbm.bank_account_num (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_number, where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_number,
(select hbm.bank_account_num (select hbm.bank_account_num
from hls_bp_master_bank_account hbm from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_number_n, where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_number_n,
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
(select v.code_value_name (select v.code_value_name
from sys_code_values_v v from sys_code_values_v v
where v.code = 'CON_WRITE_OFF_FLAG' where v.code = 'CON_WRITE_OFF_FLAG'
and v.code_value = t1.cf_61_write_off_flag) cf_61_write_off_flag_n, and v.code_value = t1.cf_61_write_off_flag) cf_61_write_off_flag_n
(select v.code_value_name /* (select v.code_value_name
from sys_code_values_v v from sys_code_values_v v
where v.code = 'VENDER_NAME' where v.code = 'VENDER_NAME'
and v.code_value = t1.vender_name) vender_name_n and v.code_value = t1.vender_name) vender_name_n*/
FROM (SELECT hli.vender_name, FROM (SELECT
t.contract_id, t.contract_id,
t.contract_name, t.contract_name,
f.cashflow_id, f.cashflow_id,
...@@ -36,6 +36,17 @@ ...@@ -36,6 +36,17 @@
h.description cf_item_desc, h.description cf_item_desc,
h.cf_item, h.cf_item,
f.due_amount, f.due_amount,
--开票状态
f.billing_status,
(SELECT code_value_name
FROM sys_code_values_v scv
WHERE scv.code = 'CON_BILLING_STATUS'
AND code_value= f.billing_status
AND scv.code_value_enabled_flag = 'Y'
AND scv.code_enabled_flag = 'Y') billing_status_n,
--发票状态
acp_invoice_pkg.return_invoice_status(p_contract_id=>t.contract_id) invoice_status_n,
t.currency, t.currency,
/* (SELECT dbms_lob.substr(wmsys.wm_concat(ci.serial_number)) /* (SELECT dbms_lob.substr(wmsys.wm_concat(ci.serial_number))
FROM con_contract_lease_item ci FROM con_contract_lease_item ci
...@@ -146,8 +157,10 @@ ...@@ -146,8 +157,10 @@
--add by shen --add by shen
(select bp_name (select bp_name
from hls_bp_master from hls_bp_master
where hls_bp_master.bp_id = t.bp_id_agent_level1) bp_id_agent_n where hls_bp_master.bp_id = t.bp_id_agent_level1) bp_id_agent_n,
--查找厂商
(SELECT bp_name FROM hls_bp_master h WHERE h.bp_id=hli.vender_id) vender_name_n,
hli.vender_name
FROM con_contract_cashflow f, FROM con_contract_cashflow f,
hls_cashflow_item h, hls_cashflow_item h,
con_contract_lease_item i, con_contract_lease_item i,
...@@ -195,10 +208,18 @@ ...@@ -195,10 +208,18 @@
), ),
0)) > 0 0)) > 0
AND t.data_class = 'NORMAL' AND t.data_class = 'NORMAL'
AND t.contract_status NOT IN AND t.bp_id_agent_level1 IN (
('NEW', 'SIGN', 'CANCEL', 'PENDING', 'CLOSED') select h.bp_id
from exp_emp_assign_e_v ee, hls_bp_master h
where ee.user_id = ${/session/@user_id}
and ee.unit_id = h.unit_id
and h.bp_category = 'AGENT'
)
AND t.contract_status IN
('INCEPT')
and t.sign_contract_status in ('SIGN')
--测试用,cf_itme应当为0 --测试用,cf_itme应当为0
AND f.cf_item in (0,21)) t1 AND f.cf_item in (0)) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
#ORDER_BY_CLAUSE# #ORDER_BY_CLAUSE#
...@@ -244,7 +265,7 @@ ...@@ -244,7 +265,7 @@
<bm:field name="con_business_type_n"/> <bm:field name="con_business_type_n"/>
<bm:field name="cdd_list_id"/> <bm:field name="cdd_list_id"/>
<bm:field name="bp_id_agent_n"/> <bm:field name="bp_id_agent_n"/>
<bm:field name="vender_name"/> <!-- <bm:field name="vender_name"/>-->
<bm:field name="vender_name_n"/> <bm:field name="vender_name_n"/>
<bm:field name="division"/> <bm:field name="division"/>
<bm:field name="division_n"/> <bm:field name="division_n"/>
...@@ -263,6 +284,14 @@ ...@@ -263,6 +284,14 @@
<bm:field name="agent_extra_nam"/> <bm:field name="agent_extra_nam"/>
<bm:field name="cf_61_write_off_flag"/> <bm:field name="cf_61_write_off_flag"/>
<bm:field name="cf_61_write_off_flag_n"/> <bm:field name="cf_61_write_off_flag_n"/>
<bm:field name="billing_status_n"/>
<bm:field name="invoice_status_n"/>
<!-- <bm:field name="bp_bank_account_id"/>-->
<!-- <bm:field name="vender_bank_account_id"/>-->
<!-- <bm:field name="vender_name"/>-->
<!-- <bm:field name="VENDER_BANK_ACCOUNT_NUMBER"/>-->
<!-- <bm:field name="bp_bank_account_name"/>-->
<!-- <bm:field name="bp_bank_account_num"/>-->
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<s:bm-script><![CDATA[ <s:bm-script><![CDATA[
......
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
hls_bp_master_pkg.bp_create_user_authority(p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id}, p_company_id => ${/session/@company_id}); hls_bp_master_pkg.bp_create_user_authority(p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id}, p_company_id => ${/session/@company_id});
--校验简称 --校验简称
hls_bp_master_pkg.check_extra_name(p_extra_nam => ${@extra_nam},p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id}); hls_bp_master_pkg.check_extra_name(p_extra_nam => ${@extra_nam},p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id});
hls_bp_master_pkg.check_lease_item_agent(
p_bp_id =>${@bp_id},
p_division =>${@division},
p_user_id =>${/session/@user_id}
);
END; END;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
hls_bp_master_pkg.check_lease_item_count(
p_agent_division_id =>${@agent_division_id},
p_user_id =>${/session/@user_id}
);
hls_bp_master_pkg.check_lease_item_agent( hls_bp_master_pkg.check_lease_item_agent(
p_bp_id =>${@bp_id}, p_bp_id =>${@bp_id},
p_division =>${@division}, p_division =>${@division},
......
...@@ -12,13 +12,16 @@ ...@@ -12,13 +12,16 @@
begin begin
con_contract_workflow_pkg.check_con_record( con_contract_workflow_pkg.check_con_record(
p_contract_id =>${@contract_id}, p_contract_id =>${@contract_id},
p_contract_status =>${@contract_status} p_contract_status =>${@contract_status},
p_sign_contract_status =>${@sign_contract_status}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
<bm:parameter name="contract_status" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@contract_status"/> <bm:parameter name="contract_status" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@contract_status"/>
<bm:parameter name="sign_contract_status" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@sign_contract_status"/>
</bm:parameters> </bm:parameters>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
......
...@@ -2,7 +2,12 @@ var add_datafilters = [ ...@@ -2,7 +2,12 @@ var add_datafilters = [
{ {
name:'contract_status', name:'contract_status',
expression:"t1.contract_status in ('SIGNING','SIGN','INCEPTING','INCEPT','INCEPT_RETURN')" expression:"t1.contract_status in ('INCEPTING','INCEPT','INCEPT_RETURN','NEW')"
},
{
name:'sign_contract_status',
expression:"t1.sign_contract_status in ('SIGNING','SIGN')"
}, },
{ {
name : 'authority', name : 'authority',
......
...@@ -5,8 +5,8 @@ var add_datafilters = [ ...@@ -5,8 +5,8 @@ var add_datafilters = [
expression: "t1.document_type = 'CARCON'" expression: "t1.document_type = 'CARCON'"
}, },
{ {
name: 'contract_status', name: 'sign_contract_status',
expression: "t1.contract_status in ('NEW','SIGNING','SIGNING','SIGN_RETURN')" expression: "t1.sign_contract_status in ('NEW','SIGNING','SIGN','SIGN_RETURN')"
}, },
{ {
name : 'authority', name : 'authority',
......
...@@ -65,7 +65,7 @@ var override_queryfields = [ ...@@ -65,7 +65,7 @@ var override_queryfields = [
//}, //},
{ {
name:'project_status', name:'project_status',
queryexpression : "(t1.project_status in ('NEW','PRE_APPROVING','APPROVED_RETURN')" queryexpression : "t1.project_status in ('NEW','APPROVING','APPROVED_RETURN','REJECT','APPROVED','CONTRACT_CREATED')"
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="con202_withway_ds" lookupCode="WITHHOLD_WAYS"/> <a:dataSet id="con202_withway_ds" lookupCode="WITHHOLD_WAYS"/>
<a:dataSet id="secondary_lease_ds" lookupCode="SECONDARY_LEASE"/>
<a:dataSet id="con202_finance_type" lookupCode="FINANCE_TYPE"/> <a:dataSet id="con202_finance_type" lookupCode="FINANCE_TYPE"/>
<a:dataSet id="hls_bp_class_ds" lookupCode="HLS211_BP_CLASS"/> <a:dataSet id="hls_bp_class_ds" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="other_tmpt_clause_ds" lookupCode="CON202_CON_PRINT_OTHER_CONDITON"/> <a:dataSet id="other_tmpt_clause_ds" lookupCode="CON202_CON_PRINT_OTHER_CONDITON"/>
...@@ -30,6 +31,8 @@ ...@@ -30,6 +31,8 @@
<a:dataSet id="con_basic_clause_detail_ds" autoQuery="true" model="cont.CON202.con_contract_tmpt_clause_main" queryUrl="${/request/@context_path}/autocrud/cont.CON202.con_contract_tmpt_clause_main/query?tmpt_id=${/parameter/@tmpt_id}" selectable="true"> <a:dataSet id="con_basic_clause_detail_ds" autoQuery="true" model="cont.CON202.con_contract_tmpt_clause_main" queryUrl="${/request/@context_path}/autocrud/cont.CON202.con_contract_tmpt_clause_main/query?tmpt_id=${/parameter/@tmpt_id}" selectable="true">
<a:fields> <a:fields>
<a:field name="withhold_way_n" displayField="code_value_name" options="con202_withway_ds" returnField="withhold_way" valueField="code_value"/> <a:field name="withhold_way_n" displayField="code_value_name" options="con202_withway_ds" returnField="withhold_way" valueField="code_value"/>
<a:field name="secondary_lease_n" displayField="code_value_name" options="secondary_lease_ds" returnField="secondary_lease" valueField="code_value"/>
<a:field name="finance_type"/> <a:field name="finance_type"/>
<a:field name="finance_type_n" displayField="code_value_name" options="con202_finance_type" returnField="finance_type" valueField="code_value"/> <a:field name="finance_type_n" displayField="code_value_name" options="con202_finance_type" returnField="finance_type" valueField="code_value"/>
<a:field name="contract_number" lovGridHeight="360" lovHeight="540" lovService="basic.con_contract_for_lov" lovWidth="680"> <a:field name="contract_number" lovGridHeight="360" lovHeight="540" lovService="basic.con_contract_for_lov" lovWidth="680">
...@@ -44,6 +47,12 @@ ...@@ -44,6 +47,12 @@
<a:map from="description" to="bp_category_n"/> <a:map from="description" to="bp_category_n"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="vender_id_n" lovGridHeight="300" lovHeight="480" lovService="basic.hls_bp_agent_vender_lov" lovWidth="500">
<a:mapping>
<a:map from="bp_name" to="vender_id_n"/>
<a:map from="bp_id" to="vender_id"/>
</a:mapping>
</a:field>
<a:field name="bp_class_n" displayField="code_value_name" options="hls_bp_class_ds" returnField="bp_class" valueField="code_value"/> <a:field name="bp_class_n" displayField="code_value_name" options="hls_bp_class_ds" returnField="bp_class" valueField="code_value"/>
<a:field name="business_type_n" lovGridHeight="300" lovHeight="480" lovService="basic.hls_business_type_for_lov" lovWidth="500"> <a:field name="business_type_n" lovGridHeight="300" lovHeight="480" lovService="basic.hls_business_type_for_lov" lovWidth="500">
<a:mapping> <a:mapping>
...@@ -108,6 +117,8 @@ ...@@ -108,6 +117,8 @@
<a:column name="contract_number" editor="lov" prompt="合同编号" width="100"/> <a:column name="contract_number" editor="lov" prompt="合同编号" width="100"/>
<a:column name="withhold_way_n" editor="cb" prompt="代扣方式"/> <a:column name="withhold_way_n" editor="cb" prompt="代扣方式"/>
<a:column name="bp_category_n" editor="lov" prompt="商业伙伴类型" width="100"/> <a:column name="bp_category_n" editor="lov" prompt="商业伙伴类型" width="100"/>
<a:column name="vender_id_n" editor="lov" prompt="厂商" width="100"/>
<a:column name="secondary_lease_n" editor="cb" prompt="二次租赁" width="100"/>
<a:column name="bp_class_n" editor="cb" prompt="商业伙伴分类" width="100"/> <a:column name="bp_class_n" editor="cb" prompt="商业伙伴分类" width="100"/>
<a:column name="business_type_n" editor="lov" prompt="业务类型" width="80"/> <a:column name="business_type_n" editor="lov" prompt="业务类型" width="80"/>
<a:column name="document_type_n" editor="lov" prompt="单据类型" width="80"/> <a:column name="document_type_n" editor="lov" prompt="单据类型" width="80"/>
...@@ -120,6 +131,7 @@ ...@@ -120,6 +131,7 @@
<a:column name="price_list_n" editor="lov" prompt="报价方案" width="120"/> <a:column name="price_list_n" editor="lov" prompt="报价方案" width="120"/>
<a:column name="first_contract_flag" editor="check" prompt="首个支付表标志" width="120"/> <a:column name="first_contract_flag" editor="check" prompt="首个支付表标志" width="120"/>
<a:column name="other_tmpt_clause_n" editor="cb" prompt="其他" width="100"/> <a:column name="other_tmpt_clause_n" editor="cb" prompt="其他" width="100"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
<a:lov id="lov"/> <a:lov id="lov"/>
......
...@@ -75,8 +75,8 @@ ...@@ -75,8 +75,8 @@
url: $('con_contract_create_content_link_id').getUrl(), url: $('con_contract_create_content_link_id').getUrl(),
para: { para: {
contract_id: '${/parameter/@contract_id}', contract_id: '${/parameter/@contract_id}',
content_type: '${/parameter/@content_type}', content_type: '${/parameter/@content_type}'
templet_usage: 'CON_SALE' /* templet_usage: 'CON_SALE'*/
}, },
success: function(res) { success: function(res) {
var result_ds = $('con_contract_update_print_detail_line_ds'); var result_ds = $('con_contract_update_print_detail_line_ds');
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
function update_attachment_renderer(value, record, name) { function update_attachment_renderer(value, record, name) {
var content_id = record.get('content_id'); var content_id = record.get('content_id');
return '<a href="javascript:downloadfile_link(' + content_id + ')">下载</a>'; return '<a href="javascript:downloadfile_link(' + content_id +')">下载</a>';
} }
function downloadfile_link(content_id) { function downloadfile_link(content_id) {
...@@ -219,8 +219,8 @@ ...@@ -219,8 +219,8 @@
<a:column name="bp_category_desc" prompt="HLS.BP_CATEGORY"/> <a:column name="bp_category_desc" prompt="HLS.BP_CATEGORY"/>
<a:column name="content_print_flag_name" prompt="CON505.CON_CONTENT_STATUS" width="80"/> <a:column name="content_print_flag_name" prompt="CON505.CON_CONTENT_STATUS" width="80"/>
<a:column name="attachment" align="center" prompt="HLS.ATTACHMENT" renderer="update_attachment_renderer" width="50"/> <a:column name="attachment" align="center" prompt="HLS.ATTACHMENT" renderer="update_attachment_renderer" width="50"/>
<a:column align="center" prompt="附件上传" renderer="attachment_upload" width="80"/> <!-- <a:column align="center" prompt="附件上传" renderer="attachment_upload" width="80"/>
<a:column name="file_name" align="left" prompt="附件名" renderer="con500_link_render" width="220"/> <a:column name="file_name" align="left" prompt="附件名" renderer="con500_link_render" width="220"/>-->
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
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;
if(record.get('contract_status')=='NEW' || record.get('contract_status')=='SIGN_RETURN'){ if(record.get('sign_contract_status')=='NEW' || record.get('sign_contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM'; param['function_code'] = 'CON301MM';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
} }
......
...@@ -216,10 +216,16 @@ ...@@ -216,10 +216,16 @@
param['document_category'] = 'BP'; param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class'); param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category'); param['bp_category'] = record.get('bp_category');
param['bp_type'] = record.get('bp_type'); if( record.get('bp_category')=='AGENT'){
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'CON505H'; param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY'; }
param['bp_type'] = record.get('bp_type');
param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}'; param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}'); hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
}; };
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
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;
if(record.get('contract_status')=='SIGNING' || record.get('contract_status')=='INCEPT_RETURN'||record.get('contract_status')=='SIGN'){ if(record.get('contract_status')=='NEW' || record.get('contract_status')=='INCEPT_RETURN'||record.get('sign_contract_status')=='SIGNING' || record.get('sign_contract_status') =='SIGN'){
param['function_code'] = 'CON3200N'; param['function_code'] = 'CON3200N';
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
} }
......
<?xml version="1.0" encoding="UTF-8"?><!-- $Author: zlf $Date: 2014-11-10 下午5:42:24 $Revision: 1.0 $Purpose: --><a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:init-procedure> <a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/> <s:server-script import="contract_print_path.js"><![CDATA[ $ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source']; ]]> </s:server-script> <s:server-script import="con_print_path.js"><![CDATA[ set_parameter_file_path(); ]]> </s:server-script> </a:init-procedure> <a:view> <a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/> <a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/> <a:link id="contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/> <a:link id="contract_history_window_link" url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/> <a:link id="con505_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <!--打印使用--> <a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content" modelaction="update"/> <a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id" model="cont.CON505.con505_contract_content" modelaction="execute"/> <a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id" url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/> <a:link id="${/parameter/@layout_code}_con_batch_dl_link_id" url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/> <a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link" url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/> <a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="update"/> <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/> <script type="text/javascript"><![CDATA[ Ext.ux.Lightbox.register('a[ref=img]', true); function lock_current_window() { Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); } function unlock_current_window() { Leaf.Masker.unmask(Ext.getBody()); } window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var contract_id = $(ds_id).getCurrentRecord().get('contract_id'); new Leaf.Window({ id: 'contract_history_window', url: $('contract_history_window_link').getUrl(), params: { contract_id: contract_id }, fullScreen: true }); }; // window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { // if (name == 'car_detail') { // return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + config_record.get('prompt') + '</a>'; // } // return value; // }; window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) { var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl(); var record = $(ds_id).findById(id); if (record) { var win = new Leaf.Window({ id: 'con_cashflow_wirte_off_detail_window', url: url, params: { cashflow_id: record.get('cashflow_id'), winid: 'con_cashflow_wirte_off_detail_window' }, draggable: true, fullScreen: true }); } }; window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) { var link_function = ''; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; if (name == 'project_number') { return '<a href="javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; } else if (name == 'gps_attch') { link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'; if (record.get('atm_num3') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a style="font-weight:bolder;font-size:1.2em" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } else if (name == 'description') { if (record.get('important_flag') == 'Y') { return '<font color="RED">' + value + '</font>'; } return value; } else if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) { link_function = '${/parameter/@layout_code}_open_bp_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'car_detail' && record.get('contract_lease_item_id')) { link_function = '${/parameter/@layout_code}_open_lease_item_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attachment') { link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attach_file_name' || name == 'attach_file_name_print' ) { var content_type = record.get('content_type'); var content_id = record.get('content_id'); //电子合同 // if(content_type == '01'){ // var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN&content_id=' + content_id; // var url = ''; // url = url + '<a href=' + link + '>' + '下载' + '</a>' + ','; // return url; // }else { if (value != null) { var link = '${/request/@context_path}/atm_download.lsc?attachment_id='; var str = value.split(';;'); var url = ''; for (var i = 0; i < str.length; i++) { var temp = str[i].split('--'); if (!Leaf.isEmpty(temp[0])) { var file_name = temp[0].toUpperCase(); var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase(); if (file_name.indexOf('.PDF') >= 0) { url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ','; } else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') { url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ','; } else { url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; } } } return url; } //} } else if (name == 'received_amount') { link_function = '${/parameter/@layout_code}_received_amount_detail'; if (value) { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + Leaf.formatMoney(value) + '</a>'; } return ''; } }; function wfl_prj501_grid_update(record_id, ds_id) { var record = $(ds_id).findById(record_id); var param = {}; param['bp_class'] = record.get('bp_class'); param['project_id'] = record.get('project_id'); param['function_code'] = 'PRJ502D'; param['function_usage'] = 'QUERY'; param['url_title'] = '租赁申请查询'; hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}'); } window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); // if (record.get('con_contract_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } var win = new Leaf.Window({ url: url, title: 'gps附件上传', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function(){ // $(ds_id).query(); // }); // } else { // Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); // } }; window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = record.data; var contract_lease_item_id = record.get('contract_lease_item_id'); new Leaf.Window({ id: 'contract_lease_item_maintain_window', url: $('contract_lease_item_query_link').getUrl(), params: { contract_lease_item_id: contract_lease_item_id, winid: 'contract_lease_item_maintain_window' }, draggable: true, fullScreen: true }); }; window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = {};//record.data; param['bp_id'] = record.get('bp_id'); param['cdd_list_id'] = record.get('cdd_list_id'); param['company_id'] = '${/session/company_id}'; param['document_id'] = record.get('bp_id'); param['document_category'] = 'BP'; param['bp_class'] = record.get('bp_class'); param['bp_category'] = record.get('bp_category'); param['bp_type'] = record.get('bp_type'); param['function_code'] = 'CON505H'; param['function_usage'] = 'QUERY'; param['maintain_type'] = 'QUERY'; param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}'; hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}'); }; // function open_contract_window(record_id, ds_id) { // var record = $(ds_id).findById(record_id); // var param = record.data; // var contract_lease_item_id = record.get('contract_lease_item_id'); // new Leaf.Window({ // id: 'contract_lease_item_maintain_window', // url: $('contract_lease_item_maintain_link').getUrl(), // params: { // contract_lease_item_id: contract_lease_item_id // }, // fullScreen: true // }); // // param['function_code'] = 'CON501D'; // // param['function_usage'] = 'MODIFY'; // // param['maintain_type'] = 'UPDATE'; // // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; // // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id); // } window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url; if (query_only == 'Y'||'${/parameter/@download}'=='Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function () { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () { // var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var content_id; //alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl); Leaf.request({ url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(), para: { content_id: content_id, contract_id: record.get('contract_id'), contract_bp_id: record.get('content_bp_pk'), clause_usage: 'GH_WITHHOLD_AGREE' }, success: function (rsc) { // //alert(rsc.result.content_id); Leaf.request({ url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(), para: { content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}' }, success: function () { Leaf.request({ url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(), para: { contract_id: record.get('contract_id'), content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}', batch_flag: 'Y' }, success: function () { var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '&content_id=' + rsc.result.content_id; window.open(url, '_self'); unlock_current_window(); } }); unlock_current_window(); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }; window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); if (!Ext.isEmpty(record.get('contract_number'))) { new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { action: 'VIEW', contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id' }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同查看', width: 1300, height: 550 }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; var change_flag = 'N'; //工作流中合同文本生成按钮 //基本信息tab页 新增必输字段的校验 add by liukang 20160328 window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item'); var record = $(ds_id).getCurrentRecord(); var con_lease_record = $(con_lease_item_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); var color_of_apprearance = con_lease_record.get('color_of_apprearance'); var item_frame_number = con_lease_record.get('item_frame_number'); var item_engine_number = con_lease_record.get('item_engine_number'); var license_number = con_lease_record.get('license_number'); /* if (Ext.isEmpty(direct_debit_bank_id)) { Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!'); } else */ if (!Ext.isEmpty(record.get('contract_number'))) { var win = new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', change_flag: change_flag, contract_name: record.get('contract_name'), contract_number: record.get('contract_number') }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同文本生成', width: 1300, height: 550 }); //在关闭页面之后,刷新一下ds win.on('close', function () { if (ds_id) { $(ds_id).query(); } }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; //add by zhuxianfei 20180207 function view_pdf(attachment_id) { Leaf.request({ url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query', para: { attachment_id: attachment_id }, success: function (res) { var path = res.result.record.file_path; path = path.substr(path.indexOf('hls_attachment')); var tomcat_source = '${/parameter/@tomcat_source}'; var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path+'?type=pdf'; var oWin = window.open(source_path); }, scope: this }); } window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score'); if (ds == $(ds_id)) { qpara.contract_id = '${/parameter/@contract_id}'; //$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); } }; window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var contract_id=record.get('contract_id'); if (record.dirty == true) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); return; } if($(ds_id).validate()){ Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() { window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con_approval_link_id').getUrl(), para: { contract_id:contract_id }, scope: this, success: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $('${/parameter/@winid}').close(); }, failure: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, error: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); } }); }); } } ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view></a:screen> <?xml version="1.0" encoding="UTF-8"?><!-- $Author: zlf $Date: 2014-11-10 下午5:42:24 $Revision: 1.0 $Purpose: --><a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:init-procedure> <a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/> <s:server-script import="contract_print_path.js"><![CDATA[ $ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source']; ]]> </s:server-script> <s:server-script import="con_print_path.js"><![CDATA[ set_parameter_file_path(); ]]> </s:server-script> </a:init-procedure> <a:view> <a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/> <a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/> <a:link id="contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/> <a:link id="contract_history_window_link" url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/> <a:link id="con505_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <!--打印使用--> <a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content" modelaction="update"/> <a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id" model="cont.CON505.con505_contract_content" modelaction="execute"/> <a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id" url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/> <a:link id="${/parameter/@layout_code}_con_batch_dl_link_id" url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/> <a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link" url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/> <a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="update"/> <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/> <script type="text/javascript"><![CDATA[ Ext.ux.Lightbox.register('a[ref=img]', true); function lock_current_window() { Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); } function unlock_current_window() { Leaf.Masker.unmask(Ext.getBody()); } window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var contract_id = $(ds_id).getCurrentRecord().get('contract_id'); new Leaf.Window({ id: 'contract_history_window', url: $('contract_history_window_link').getUrl(), params: { contract_id: contract_id }, fullScreen: true }); }; // window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { // if (name == 'car_detail') { // return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + config_record.get('prompt') + '</a>'; // } // return value; // }; window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) { var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl(); var record = $(ds_id).findById(id); if (record) { var win = new Leaf.Window({ id: 'con_cashflow_wirte_off_detail_window', url: url, params: { cashflow_id: record.get('cashflow_id'), winid: 'con_cashflow_wirte_off_detail_window' }, draggable: true, fullScreen: true }); } }; window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) { var link_function = ''; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; if (name == 'project_number') { return '<a href="javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; } else if (name == 'gps_attch') { link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'; if (record.get('atm_num3') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a style="font-weight:bolder;font-size:1.2em" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } else if (name == 'description') { if (record.get('important_flag') == 'Y') { return '<font color="RED">' + value + '</font>'; } return value; } else if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) { link_function = '${/parameter/@layout_code}_open_bp_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'car_detail' && record.get('contract_lease_item_id')) { link_function = '${/parameter/@layout_code}_open_lease_item_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attachment') { link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attach_file_name' || name == 'attach_file_name_print' ) { var content_type = record.get('content_type'); var content_id = record.get('content_id'); //电子合同 // if(content_type == '01'){ // var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN&content_id=' + content_id; // var url = ''; // url = url + '<a href=' + link + '>' + '下载' + '</a>' + ','; // return url; // }else { if (value != null) { var link = '${/request/@context_path}/atm_download.lsc?attachment_id='; var str = value.split(';;'); var url = ''; for (var i = 0; i < str.length; i++) { var temp = str[i].split('--'); if (!Leaf.isEmpty(temp[0])) { var file_name = temp[0].toUpperCase(); var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase(); if (file_name.indexOf('.PDF') >= 0) { url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ','; } else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') { url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ','; } else { url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; } } } return url; } //} } else if (name == 'received_amount') { link_function = '${/parameter/@layout_code}_received_amount_detail'; if (value) { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + Leaf.formatMoney(value) + '</a>'; } return ''; } }; function wfl_prj501_grid_update(record_id, ds_id) { var record = $(ds_id).findById(record_id); var param = {}; param['bp_class'] = record.get('bp_class'); param['project_id'] = record.get('project_id'); param['function_code'] = 'PRJ502D'; param['function_usage'] = 'QUERY'; param['url_title'] = '租赁申请查询'; hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}'); } window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); // if (record.get('con_contract_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } var win = new Leaf.Window({ url: url, title: 'gps附件上传', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function(){ // $(ds_id).query(); // }); // } else { // Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); // } }; window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = record.data; var contract_lease_item_id = record.get('contract_lease_item_id'); new Leaf.Window({ id: 'contract_lease_item_maintain_window', url: $('contract_lease_item_query_link').getUrl(), params: { contract_lease_item_id: contract_lease_item_id, winid: 'contract_lease_item_maintain_window' }, draggable: true, fullScreen: true }); }; window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = {};//record.data; param['bp_id'] = record.get('bp_id'); param['cdd_list_id'] = record.get('cdd_list_id'); param['company_id'] = '${/session/company_id}'; param['document_id'] = record.get('bp_id'); param['document_category'] = 'BP'; param['bp_class'] = record.get('bp_class'); param['bp_category'] = record.get('bp_category'); if(record.get('bp_category') =='AGENT'){ param['function_code'] = 'HLS303_Q'; param['function_usage'] = 'QUERY'; }else{ param['function_code'] = 'CON505H'; param['function_usage'] = 'QUERY'; } param['bp_type'] = record.get('bp_type'); param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}'; hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}'); }; // function open_contract_window(record_id, ds_id) { // var record = $(ds_id).findById(record_id); // var param = record.data; // var contract_lease_item_id = record.get('contract_lease_item_id'); // new Leaf.Window({ // id: 'contract_lease_item_maintain_window', // url: $('contract_lease_item_maintain_link').getUrl(), // params: { // contract_lease_item_id: contract_lease_item_id // }, // fullScreen: true // }); // // param['function_code'] = 'CON501D'; // // param['function_usage'] = 'MODIFY'; // // param['maintain_type'] = 'UPDATE'; // // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; // // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id); // } window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url; //add by lijingjing 2019-11-15 if(record.get('attachment_tab_group')=='CREDIT_CHECK' && '${/parameter/@query_only}'=='Y'){ url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); }else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='N'){ url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); }else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='Y'){ url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else if (query_only == 'Y'||'${/parameter/@download}'=='Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function () { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () { // var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var content_id; //alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl); Leaf.request({ url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(), para: { content_id: content_id, contract_id: record.get('contract_id'), contract_bp_id: record.get('content_bp_pk'), clause_usage: 'GH_WITHHOLD_AGREE' }, success: function (rsc) { // //alert(rsc.result.content_id); Leaf.request({ url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(), para: { content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}' }, success: function () { Leaf.request({ url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(), para: { contract_id: record.get('contract_id'), content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}', batch_flag: 'Y' }, success: function () { var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '&content_id=' + rsc.result.content_id; window.open(url, '_self'); unlock_current_window(); } }); unlock_current_window(); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }; window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); if (!Ext.isEmpty(record.get('contract_number'))) { new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { action: 'VIEW', contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id' }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同查看', width: 1300, height: 550 }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; var change_flag = 'N'; //工作流中合同文本生成按钮 //基本信息tab页 新增必输字段的校验 add by liukang 20160328 window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item'); var record = $(ds_id).getCurrentRecord(); var con_lease_record = $(con_lease_item_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); var color_of_apprearance = con_lease_record.get('color_of_apprearance'); var item_frame_number = con_lease_record.get('item_frame_number'); var item_engine_number = con_lease_record.get('item_engine_number'); var license_number = con_lease_record.get('license_number'); /* if (Ext.isEmpty(direct_debit_bank_id)) { Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!'); } else */ if (!Ext.isEmpty(record.get('contract_number'))) { var win = new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', change_flag: change_flag, contract_name: record.get('contract_name'), contract_number: record.get('contract_number') }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同文本生成', width: 1300, height: 550 }); //在关闭页面之后,刷新一下ds win.on('close', function () { if (ds_id) { $(ds_id).query(); } }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; //add by zhuxianfei 20180207 function view_pdf(attachment_id) { Leaf.request({ url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query', para: { attachment_id: attachment_id }, success: function (res) { var path = res.result.record.file_path; path = path.substr(path.indexOf('hls_attachment')); var tomcat_source = '${/parameter/@tomcat_source}'; var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path+'?type=pdf'; var oWin = window.open(source_path); }, scope: this }); } window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score'); if (ds == $(ds_id)) { qpara.contract_id = '${/parameter/@contract_id}'; //$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); } }; window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var contract_id=record.get('contract_id'); if (record.dirty == true) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); return; } if($(ds_id).validate()){ Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() { window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con_approval_link_id').getUrl(), para: { contract_id:contract_id }, scope: this, success: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $('${/parameter/@winid}').close(); }, failure: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, error: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); } }); }); } } ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view></a:screen>
\ No newline at end of file \ No newline at end of file
......
...@@ -734,6 +734,8 @@ ...@@ -734,6 +734,8 @@
var amount_agent=line_data.get('amount_agent'); var amount_agent=line_data.get('amount_agent');
var amount_vender= line_data.get('amount_vender'); var amount_vender= line_data.get('amount_vender');
var due_amount= line_data.get('due_amount'); var due_amount= line_data.get('due_amount');
var bp_bank_account_id=line_data.get('bp_bank_account_id');
var vender_bank_account_id=line_data.get('vender_bank_account_id');
//首付款抵充金额 //首付款抵充金额
var other_payment2=line_data.get('other_payment2'); var other_payment2=line_data.get('other_payment2');
if(amount_agent<0||amount_vender<0){ if(amount_agent<0||amount_vender<0){
...@@ -741,6 +743,19 @@ ...@@ -741,6 +743,19 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
//根据金额判断代理店和厂商不能为空
if(amount_agent>0 &&!bp_bank_account_id){
$L.showErrorMessage("提示",'请选择代理店账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(amount_vender>0 &&!vender_bank_account_id){
$L.showErrorMessage("提示",'请选择厂商账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){ if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){
$L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!'); $L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!');
...@@ -773,8 +788,8 @@ ...@@ -773,8 +788,8 @@
//确认保存 //确认保存
var hd_record = $(ds_id).getCurrentRecord(); var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id'); var payment_req_id = hd_record.get('payment_req_id');
//console.log( $(ds_id));
// console.log( $(ds_line_id));
if (payment_req_id) { if (payment_req_id) {
Leaf.request({ Leaf.request({
......
...@@ -39,15 +39,22 @@ ...@@ -39,15 +39,22 @@
return; return;
} }
//对是否为同一个厂商进行检查 //对是否为同一个厂商进行检查
var vender_name=record.get('vender_name'); var vender_name=record.get('vender_name_n');
var vender_flag=true; var vender_flag=true;
//校验发票状态必须是全部开票且发票已确认
for (i = 0; i < a.length; i++) { for (i = 0; i < a.length; i++) {
//检验厂商 //检验厂商
if(a[i].get('vender_name')!=vender_name){ if(a[i].get('vender_name_n')!=vender_name){
vender_flag=false; vender_flag=false;
$L.showErrorMessage("提示",'请选择厂商相同的现金流信息!'); $L.showErrorMessage("提示",'请选择厂商相同的现金流信息!');
return; return;
} }
//暂时去掉
/* if(a[i].get('billing_status_n')!='FULL' ||a[i].get('billing_status_n')!='发票已确认'){
$L.showErrorMessage("提示",'请选择开票状态为已开票,发票状态为已确认的现金流!');
return;
}*/
cashflow_id = a[i].get('cashflow_id'); cashflow_id = a[i].get('cashflow_id');
var arr = {}; var arr = {};
contract_id_list[i] = a[i].get('contract_id'); contract_id_list[i] = a[i].get('contract_id');
...@@ -371,6 +378,8 @@ ...@@ -371,6 +378,8 @@
<a:column name="due_date" prompt="应付日期"/> <a:column name="due_date" prompt="应付日期"/>
<a:column name="bp_id_agent_n" prompt="代理店"/> <a:column name="bp_id_agent_n" prompt="代理店"/>
<a:column name="vender_name_n" prompt="厂商"/> <a:column name="vender_name_n" prompt="厂商"/>
<a:column name="billing_status_n" prompt="开票状态"/>
<a:column name="invoice_status_n" prompt="发票状态"/>
<!-- <a:column name="received_amount" align="right" prompt="实际支付金额" renderer="Leaf.formatMoney"/> <!-- <a:column name="received_amount" align="right" prompt="实际支付金额" renderer="Leaf.formatMoney"/>
<a:column name="residual_amount" align="right" prompt="剩余未支付金额" renderer="Leaf.formatMoney" width="110"/> <a:column name="residual_amount" align="right" prompt="剩余未支付金额" renderer="Leaf.formatMoney" width="110"/>
<a:column name="invoice_uploaded_flag_n" align="center" prompt="发票上传标志"/> <a:column name="invoice_uploaded_flag_n" align="center" prompt="发票上传标志"/>
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
--> -->
<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 fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields" <a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields"
modelaction="update"/> modelaction="update"/>
...@@ -25,6 +28,9 @@ ...@@ -25,6 +28,9 @@
<!-- <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>--> <!-- <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>-->
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Leaf.onReady(function () { Leaf.onReady(function () {
var agent_name = '${/model/user_agent_description/record/@bp_id}';
var agent_name_n = '${/model/user_agent_description/record/@bp_name}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
...@@ -33,6 +39,9 @@ ...@@ -33,6 +39,9 @@
var bp_record = $(bp_ds_id).getCurrentRecord(); var bp_record = $(bp_ds_id).getCurrentRecord();
bp_record.set('bp_category','${/parameter/@bp_category}'); bp_record.set('bp_category','${/parameter/@bp_category}');
bp_record.set('owner_user_id','${/session/@user_id}'); bp_record.set('owner_user_id','${/session/@user_id}');
bp_record.set('agent_name', agent_name);
bp_record.set('agent_name_n', agent_name_n);
if ('${/parameter/@bp_type}' == 'AGENT') { if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false); bp_record.getField('agent_type_n').setReadOnly(false);
// bp_record.getField('agent_type_n').setRequired(true); // bp_record.getField('agent_type_n').setRequired(true);
...@@ -73,7 +82,9 @@ ...@@ -73,7 +82,9 @@
bp_record.getField('brand_unbrand_n').setReadOnly(true); bp_record.getField('brand_unbrand_n').setReadOnly(true);
current_record.getField('bp_type_n').setReadOnly(true); current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true); current_record.getField('enabled_flag').setReadOnly(true);
} else { }else if(head_record.get('bp_category') == 'VENDER'){
bp_record.getField('agent_name_n').setReadOnly(true);
}else {
current_record.getField('bp_type_n').setReadOnly(true); current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true); current_record.getField('enabled_flag').setReadOnly(true);
} }
...@@ -354,7 +365,7 @@ ...@@ -354,7 +365,7 @@
} }
//保存前调用,生成商机编号 //保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {debugger; window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord(); var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class'); var bp_class = head_record.get('bp_class');
...@@ -515,7 +526,7 @@ ...@@ -515,7 +526,7 @@
scope: this scope: this
}); });
}; */ }; */
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {debugger; window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var f_bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var f_bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var gird_ds_id = 'BP_NP_CREATE_BP_ASSETS01_hls_bp_assets_ds'; var gird_ds_id = 'BP_NP_CREATE_BP_ASSETS01_hls_bp_assets_ds';
var gird_ds_id2 = 'BP_NP_CREATE_BP_ASSETS04_hls_bp_assets_ds'; var gird_ds_id2 = 'BP_NP_CREATE_BP_ASSETS04_hls_bp_assets_ds';
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
$Purpose: 商业伙伴维护 $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:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/> <a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/>
<a:link id="bp_agent_modify_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_create.lview"/> <a:link id="bp_agent_modify_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_create.lview"/>
...@@ -218,16 +221,20 @@ ...@@ -218,16 +221,20 @@
//新增和加载时调用form //新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) { // if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
// if (ds.fields.fin_institution_code) { // if (ds.fields.fin_institution_code) {
// ds.fields.fin_institution_code.pro.validator = fin_institution_code_validate; // ds.fields.fin_institution_code.pro.validator = fin_institution_code_validate;
// } // }
// if (ds.fields.trade_type_code) { // if (ds.fields.trade_type_code) {
// ds.fields.trade_type_code.pro.validator = trade_type_code_validate; // ds.fields.trade_type_code.pro.validator = trade_type_code_validate;
// } // }
// }
// }
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
if (record.get('bp_category') == 'VENDER') {
record.getField('agent_name_n').setReadOnly(true);
}
} }
}; };
...@@ -299,6 +306,12 @@ ...@@ -299,6 +306,12 @@
var hls_bp_master_credit_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit'); var hls_bp_master_credit_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit');
var bp_record = $(hls_bp_master_ds_id).getCurrentRecord(); var bp_record = $(hls_bp_master_ds_id).getCurrentRecord();
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) { if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
var agent_name = '${/model/user_agent_description/record/@bp_id}';
var agent_name_n = '${/model/user_agent_description/record/@bp_name}';
record.set('agent_name', agent_name);
record.set('agent_name_n', agent_name_n);
if (name == 'agent_type') { if (name == 'agent_type') {
if (value == 'AGENT_NO_REBATE' || value == 'AGENT_EE') { if (value == 'AGENT_NO_REBATE' || value == 'AGENT_EE') {
record.getField('parent_id_n').setReadOnly(false); record.getField('parent_id_n').setReadOnly(false);
......
...@@ -338,6 +338,13 @@ ...@@ -338,6 +338,13 @@
return '<font color="RED">' + value + '</font>'; return '<font color="RED">' + value + '</font>';
} }
return value; return value;
}else if(name == 'atm_attachment') {
link_function = 'upload_file';
if (record.get('attach_count') == 0 || !record.get('attach_count')) {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + '附件上传' + '</a>';
} else {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '(' + record.get('attach_count') + ')' + '</a>';
}
} }
}; };
...@@ -410,8 +417,8 @@ ...@@ -410,8 +417,8 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord(); var bp_record = $(ds_id).getCurrentRecord();
if (ds_id == ds.id) { if (ds_id == ds.id) {
record.set('taxpayer_type','Y'); // record.set('taxpayer_type','Y');
record.set('taxpayer_type_n','否'); // record.set('taxpayer_type_n','否');
if (record.get('taxpayer_type') == 'Y') { if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true); record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true); record.getField('invoice_bp_address').setRequired(true);
...@@ -435,26 +442,14 @@ ...@@ -435,26 +442,14 @@
}; };
//更新时调用 //新增时调用(grid,table,gridBox)
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_grid_add'] = function(ds, record, config_records, bp_seq) {
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if (ds_id == ds.id) { var bp_record = $(ds_id).getCurrentRecord();
if (record.get('taxpayer_type') == 'Y') { var bp_name = bp_record.get('bp_name');
record.getField('tax_registry_num').setRequired(true); // alert(bp_name);
record.getField('invoice_bp_address').setRequired(true); record.set('bp_name',bp_name);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account_id').setRequired(true);
} else {
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account_id').setRequired(false);
}
}
}; };
...@@ -466,15 +461,16 @@ ...@@ -466,15 +461,16 @@
var record = new Leaf.Record({ var record = new Leaf.Record({
'primary_flag': 'Y', 'primary_flag': 'Y',
'bp_category': 'AGENT', 'bp_category': 'AGENT',
'bp_category_n': '经销商', 'bp_category_n': '代理店',
'bp_type': 'AGENT', 'bp_type': 'AGENT',
'bp_type_n': '经销商', 'bp_type_n': '代理店',
'enabled_flag': 'Y' 'enabled_flag': 'Y'
}); });
bp_master_role_ds.add(record); bp_master_role_ds.add(record);
var current_record = bp_master_role_ds.getAt(0); var current_record = bp_master_role_ds.getAt(0);
current_record.getField('primary_flag').setReadOnly(true); current_record.getField('primary_flag').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true); current_record.getField('enabled_flag').setReadOnly(true);
current_record.getField('bp_type_n').setReadOnly(true);
} }
}); });
]]></script> ]]></script>
......
...@@ -74,23 +74,23 @@ ...@@ -74,23 +74,23 @@
//更新时调用 //更新时调用
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) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if (ds_id == ds.id) { // if (ds_id == ds.id) {
if (record.get('taxpayer_type') == 'Y') { // if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true); // record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true); // record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_title').setRequired(true); // record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true); // record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true); // record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account_id').setRequired(true); // record.getField('invoice_bp_bank_account_id').setRequired(true);
} else { // } else {
record.getField('tax_registry_num').setRequired(false); // record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_bp_address').setRequired(false); // record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_title').setRequired(false); // record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false); // record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false); // record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account_id').setRequired(false); // record.getField('invoice_bp_bank_account_id').setRequired(false);
} // }
} // }
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role'); var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) { if (role_ds == ds.id) {
...@@ -111,11 +111,26 @@ ...@@ -111,11 +111,26 @@
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_before_submit'] = function(ds, record) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division'); var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record_agent =$(agent_id).getAll(); var record_agent =$(agent_id).getAll();
//增加三位字母大写的校验
var head_record = $(ds_id).getCurrentRecord();
var english_name= head_record.get('english_name');
var patrn = /^[A-Z]{3}$/;
//对统一社会信用代码和身份生进行校验
if(patrn.test(english_name)==false){
$L.showErrorMessage('错误','代理店代码为三位大写字母!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(record_agent.length == 0){ if(record_agent.length == 0){
Leaf.showMessage('${l:PROMPT}', '必须维护租赁物信息且每种租赁物只能维护一次!'); Leaf.showMessage('${l:PROMPT}', '必须维护租赁物信息且每种租赁物只能维护一次!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
}else{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
} }
}; };
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
...@@ -267,14 +282,14 @@ ...@@ -267,14 +282,14 @@
var grid_id = ds_id.replace('ds', 'layout_grid_id'); var grid_id = ds_id.replace('ds', 'layout_grid_id');
$(grid_id).showEditorByRecord($(ds_id).create()); $(grid_id).showEditorByRecord($(ds_id).create());
} };
//删除 //删除
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_agent_renew'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_agent_renew');
$(ds_id).remove(); $(ds_id).remove();
} };
//超链接渲染 //超链接渲染
......
...@@ -799,7 +799,8 @@ ...@@ -799,7 +799,8 @@
}, },
success: function(res) { success: function(res) {
var contract_status = res.result.contract_status; var contract_status = res.result.contract_status;
if(contract_status=='SIGN'){ var sign_contract_status = res.result.sign_contract_status;
if(sign_contract_status=='SIGN'||sign_contract_status=='SIGNING'|| contract_status=='NEW' || contract_status=='INCEPT_RETURN'){
for (var i = 0;i < headRecords.length;i++) { for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name') var column_name = headRecords[i].get('column_name')
if(column_name !="lease_start_date"&&column_name !="contract_inception_date"){ if(column_name !="lease_start_date"&&column_name !="contract_inception_date"){
......
...@@ -229,6 +229,9 @@ ...@@ -229,6 +229,9 @@
while (e && e.getCause && e.getCause()) e = e.getCause(); while (e && e.getCause && e.getCause()) e = e.getCause();
var error_code = e.getErrorCode(); var error_code = e.getErrorCode();
if (error_code == 1) { if (error_code == 1) {
if(base_table.toUpperCase()=='HLS_LEASE_ITEM'){
raise_app_error('机种代码和型号不能重复!');
}else
raise_app_error('HLS_TABLE_UNIQUE.' + base_table.toUpperCase()); raise_app_error('HLS_TABLE_UNIQUE.' + base_table.toUpperCase());
} }
if (parent_error_code) { if (parent_error_code) {
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
<a:link id="${/parameter/@layout_code}tenant_rate_query_link" <a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/> url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_occu_object_display" rootPath="occu_object"/> <a:model-query fetchAll="true" model="prj.PRJ500D.prj_occu_object_display" rootPath="occu_object"/>
<a:link id="prj_two_secondary_lease_link_id" model="prj.PRJ501N.insert_two_secondary_lease" modelaction="update"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
// alert('${/parameter/@division}') // alert('${/parameter/@division}')
//add by zhuxianfei //add by zhuxianfei
...@@ -257,9 +259,14 @@ ...@@ -257,9 +259,14 @@
var param = {}; var param = {};
param['bp_id'] = record.get('bp_id'); param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class'); param['bp_class'] = record.get('bp_class');
if(record.get('bp_category') =='AGENT'){
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'HLS215D'; param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'; }
param['winid'] = '${/parameter/@layout_code}_bp_win_id'; param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}'; param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}'); hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
...@@ -378,6 +385,9 @@ ...@@ -378,6 +385,9 @@
$(prj_quotation_ds_id).query(); $(prj_quotation_ds_id).query();
} }
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(tenant_ds_id).setQueryUrl(url);
$(tenant_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var head_record = $(ds_id).getAt(0); var head_record = $(ds_id).getAt(0);
head_record.getField('invoice_agent_id_n').setRequired(true); head_record.getField('invoice_agent_id_n').setRequired(true);
var invoice_agent_id = '${/model/user_agent_description/record/@agent_id}'; var invoice_agent_id = '${/model/user_agent_description/record/@bp_id}';
var invoice_agent_id_n = '${/model/user_agent_description/record/@agent_name}'; var invoice_agent_id_n = '${/model/user_agent_description/record/@bp_name}';
head_record.set('unit_id', '${/model/4s_root_path/record/@value_code}'); head_record.set('unit_id', '${/model/4s_root_path/record/@value_code}');
head_record.set('unit_id_n', '${/model/4s_root_path/record/@value_name}'); head_record.set('unit_id_n', '${/model/4s_root_path/record/@value_name}');
......
...@@ -333,9 +333,14 @@ ...@@ -333,9 +333,14 @@
var param = {}; var param = {};
param['bp_id'] = record.get('bp_id'); param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class'); param['bp_class'] = record.get('bp_class');
if(record.get('bp_category') =='AGENT'){
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'HLS215D'; param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY'; }
param['winid'] = '${/parameter/@layout_code}_bp_win_id'; param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}'; param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}'); hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
......
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