Commit 3cc0c57f authored by niminmin's avatar niminmin

Merge branch 'feature/销项发票申请开发' into develop

# Conflicts:
#	src/main/webapp/WEB-INF/classes/acr/ACR510/acr_invoice_cf_v_new.lwm
parents c58b71fd 9a831b73
......@@ -143,8 +143,8 @@
(t1.invoice_method = 'NO_BILLING' and
((t1.bill_object_bp_class = 'NP' and
t1.inv_billing_object_code <> 'D00000009' AND
((to_number(to_char(sysdate, 'MM')) in
(3, 6, 9, 12) and trunc(t2.due_date) <= sysdate
(((to_number(to_char(sysdate, 'MM')) in
(3, 6, 9, 12) and trunc(t2.due_date) <= sysdate
and ((to_number(to_char(t2.due_date, 'MM')) in
(3, 6, 9, 12)) or
......@@ -155,33 +155,34 @@
(2, 5, 8, 11) and
nextduedate(t2.due_date, 1, 1) <= sysdate))
) or (
) or (
to_number(to_char(sysdate, 'MM')) in (1, 2) and
to_number(to_char(sysdate, 'MM')) in (1, 2) and
trunc(t2.due_date) <=
(trunc(sysdate, 'yyyy') - 1)) or
(
trunc(t2.due_date) <=
(trunc(sysdate, 'yyyy') - 1)) or
(
to_number(to_char(sysdate, 'MM')) in (4, 5) and
t2.due_date <=
last_day(to_date(to_char(sysdate, 'yyyy') ||
'-03',
'yyyy-mm'))) or
(to_number(to_char(sysdate, 'MM')) in (7, 8) and
t2.due_date <=
last_day(to_date(to_char(sysdate, 'yyyy') ||
'-06',
'yyyy-mm'))) or
(to_number(to_char(sysdate, 'MM')) in (10, 11) and
t2.due_date <=
last_day(to_date(to_char(sysdate, 'yyyy') ||
'-09',
'yyyy-mm'))))) or
to_number(to_char(sysdate, 'MM')) in (4, 5) and
t2.due_date <=
last_day(to_date(to_char(sysdate, 'yyyy') ||
'-03',
'yyyy-mm'))) or
(to_number(to_char(sysdate, 'MM')) in (7, 8) and
t2.due_date <=
last_day(to_date(to_char(sysdate, 'yyyy') ||
'-06',
'yyyy-mm'))) or
(to_number(to_char(sysdate, 'MM')) in (10, 11) and
t2.due_date <=
last_day(to_date(to_char(sysdate, 'yyyy') ||
'-09',
'yyyy-mm'))) and t1.contract_status not in ('TERMINATE', 'ET','TERMINATING','ETING'))or
t1.contract_status in ('TERMINATE', 'ET','TERMINATING','ETING'))) or
((t1.bill_object_bp_class = 'ORG' or
(t1.inv_billing_object_code = 'D00000009' and
t1.bill_object_bp_class = 'NP')) AND
t1.contract_status in ('TERMINATE', 'ET', 'REPUR')))))
t1.contract_status in ('TERMINATE', 'ET', 'REPUR','TERMINATING','ETING','REPURING')))))
and ((decode(t2.cf_item,
'250',
......@@ -304,7 +305,7 @@
t1.business_type,
t1.business_type_desc,
'FULL' as write_off_flag,
'全部核销' as write_off_flag_desc
'全部核销' as write_off_flag_desc
from cus_acr_invoice_contract_v t1, acr_invoice_penalty_v t2
where t2.contract_id = t1.contract_id
and t1.bp_wfl_status = 'APPROVED'
......
......@@ -18,9 +18,10 @@
ah.contract_id,
ah.project_id,
ah.bp_id,
ah.invoice_kind,
al.cashflow_id,
al.cf_item,
ah.document_number,
cwo.write_off_id,
(Select c.contract_number
From con_contract c
Where c.contract_id = ah.contract_id) contract_number,
......@@ -40,7 +41,7 @@
And ((l.cashflow_id = al.cashflow_id
and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9))
And rownum = 1) journal_month,
(Select h.journal_num
(Select h.sbo_num
From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id
And ((l.cashflow_id = al.cashflow_id
......@@ -51,46 +52,60 @@
al.total_amount,
al.net_amount,
al.tax_amount,
nvl((Select ctr.paid_byother_flag
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id),
'F') paid_byother_flag,
decode((Select count(1)
From csh_transaction ctr,csh_write_off cw
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N'
and ctr.paid_byother_flag='T'),0,'F','T') paid_byother_flag,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'PAID_BYOTHER_FLAG'
And v.code_value =
nvl((Select ctr.paid_byother_flag
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id),
'F')) paid_byother_flag_n,
(Select ctr.bp_bank_account_name
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) bp_bank_account_name,
(Select ctr.transaction_amount
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) transaction_amount,
cwo.write_off_due_amount,
(Select ctr.transaction_num
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) transaction_num,
And v.code_value =
decode((Select count(1)
From csh_transaction ctr,csh_write_off cw
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N'
and ctr.paid_byother_flag='T'),0,'F','T')) paid_byother_flag_n,
(case when al.cf_item<>'9' then cwo.received_amount else
al.total_amount end)received_amount,
ah.invoice_hd_id,
(cwo.write_off_id + al.invoice_ln_wfl_id) file_id,
(Select ctr.guarantor_name_duty
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) guarantor_name_duty
decode(ah.invoice_kind,'0',(aa.invoice_apply_id+al.invoice_ln_wfl_id),'2',aa.invoice_apply_id) file_id,
decode((Select count(1)
From csh_transaction ctr, csh_write_off cw
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N'
and nvl(ctr.guarantor_name_duty,'N')='Y'),0,'N','Y') guarantor_name_duty,
(Select to_char(max(cw.write_off_date),'yyyy-mm-dd')
From csh_transaction ctr,csh_write_off cw
Where ctr.transaction_id = cw.csh_transaction_id
and al.cashflow_id = cw.cashflow_id
and cw.reversed_flag='N') write_off_max_date,
(Select count(1)
From csh_transaction ctr, csh_write_off cw,con_contract_cashflow cco, acr_invoice_apply aaa
,acr_invoice_hd_wfl ahh, acr_invoice_ln_wfl alw
Where ctr.transaction_id = cw.csh_transaction_id
and aaa.invoice_apply_id = ahh.invoice_apply_id
And ahh.invoice_hd_wfl_id = alw.invoice_hd_wfl_id
and cco.cashflow_id = cw.cashflow_id
and cco.contract_id=cco.contract_id
and aaa.invoice_apply_id =aa.invoice_apply_id
And alw.cashflow_id = cco.cashflow_id
and cw.reversed_flag='N'
and ctr.paid_byother_flag='T'
and nvl(ctr.guarantor_name_duty,'N')='N')paid_byother_sum_flag,
null attachment
From acr_invoice_apply aa,
acr_invoice_hd_wfl ah,
acr_invoice_ln_wfl al,
csh_write_off cwo
con_contract_cashflow cwo
Where aa.invoice_apply_id = ah.invoice_apply_id
And ah.invoice_hd_wfl_id = al.invoice_hd_wfl_id
And al.cashflow_id = cwo.cashflow_id (+)) t1 #WHERE_CLAUSE#
order by t1.contract_id desc, t1.times asc
And al.cashflow_id = cwo.cashflow_id(+)
order by cwo.contract_id desc, cwo.times asc) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (Select
aa.invoice_apply_id,
ah.invoice_hd_wfl_id,
al.invoice_ln_wfl_id,
ah.contract_id,
ah.project_id,
ah.bp_id,
al.cashflow_id,
ah.document_number,
cwo.write_off_id,
(Select c.contract_number
From con_contract c
Where c.contract_id = ah.contract_id) contract_number,
(Select hb.bp_code
From hls_bp_master hb
Where hb.bp_id = ah.bp_id) bp_code,
ah.bp_name,
nvl(cwo.times,
(Select t.times
From con_contract_cashflow t
Where t.cashflow_id = al.cashflow_id)) times,
(Select to_char(h.journal_date, 'yyyy-mm')
From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id
And ((l.cashflow_id = al.cashflow_id
and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9))
And rownum = 1) journal_month,
(Select h.journal_num
From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id
And ((l.cashflow_id = al.cashflow_id
and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9))
And rownum = 1) journal_num,
al.tax_type_rate,
al.total_amount,
al.net_amount,
al.tax_amount,
nvl((Select ctr.paid_byother_flag
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id),
'F') paid_byother_flag,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'PAID_BYOTHER_FLAG'
And v.code_value =
nvl((Select ctr.paid_byother_flag
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id),
'F')) paid_byother_flag_n,
(Select ctr.bp_bank_account_name
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) bp_bank_account_name,
(Select ctr.transaction_amount
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) transaction_amount,
cwo.write_off_due_amount,
(Select ctr.transaction_num
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) transaction_num,
ah.invoice_hd_id,
(cwo.write_off_id + al.invoice_ln_wfl_id) file_id,
(Select ctr.guarantor_name_duty
From csh_transaction ctr
Where ctr.transaction_id = cwo.csh_transaction_id) guarantor_name_duty
From acr_invoice_apply aa,
acr_invoice_hd_wfl ah,
acr_invoice_ln_wfl al,
csh_write_off cwo
Where aa.invoice_apply_id = ah.invoice_apply_id
And ah.invoice_hd_wfl_id = al.invoice_hd_wfl_id
And al.cashflow_id = cwo.cashflow_id (+)) t1 #WHERE_CLAUSE#
order by t1.contract_id desc, t1.times asc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_wfl_pkg.acr_invoice_wfl_submit(p_invoice_apply_id => ${@invoice_apply_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="bp_code" queryExpression="t1.bp_code = ${@bp_code}"/>
<bm:query-field name="journal_month" queryExpression="t1.journal_month = ${@journal_month}"/>
<bm:query-field name="paid_byother_flag_n" queryExpression="t1.paid_byother_flag = ${@paid_byother_flag}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_apply_id = ${@invoice_apply_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: chenlingfeng
$Date: 2018-09-28 15:37:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" accessControlMode="false" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select cwo.write_off_type,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'CSH513_WRITE_OFF_TYPE'
and v.code_value = cwo.write_off_type) write_off_type_desc,
cwo.write_off_classification,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DS_CSH_WRITE_OFF_CLASSIFICATION'
and v.code_value = cwo.write_off_classification) write_off_classification_desc,
cwo.write_off_date,
to_char(cwo.journal_date, 'yyyy-mm-dd') as journal_date,
cwo.write_off_due_amount,
ct.transaction_num,
ct.transaction_date,
ct.bp_bank_account_name,
ct.bp_bank_account_num,
ct.transaction_amount,
cwo.contract_id,
cwo.cashflow_id,
cwo.times,
cwo.cf_item,
cwo.cf_type,
ct.transaction_id,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'CSH511_TRANSACTION_TYPE'
and v.code_value = ct.transaction_type) transaction_type,
(select u.description
from sys_user u
where u.user_id = cwo.created_by) created_by_n,
(select ahd.document_number from acr_invoice_hd ahd where ahd.invoice_hd_id=${@invoice_hd_id})document_number,
(Select hb.bp_name
From hls_bp_master hb,acr_invoice_hd ahd
Where hb.bp_id = ahd.bp_id and ahd.invoice_hd_id=${@invoice_hd_id}) bp_name,
(Select c.contract_number
From con_contract c,acr_invoice_hd ahd
Where c.contract_id = ahd.contract_id and ahd.invoice_hd_id=${@invoice_hd_id}) contract_number
from csh_write_off cwo, csh_transaction ct
where cwo.csh_transaction_id = ct.transaction_id
and cwo.reversed_flag = 'N'
and cwo.cashflow_id = ${@cashflow_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_USER">
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_USER" needAccessControl="false">
<bm:fields>
<bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="SYS_USER.USER_ID"/>
<bm:field name="user_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="USER_NAME" prompt="SYS_USER.USER_NAME"/>
......
......@@ -13,7 +13,7 @@
begin
zj_wfl_workflow_pkg.insert_workflow_deliver(
${@record_id},
${/session/@user_id},
${@recipient_id},
${@workflow_id},
${@date_from},
${@date_to},
......
......@@ -15,7 +15,7 @@
begin
zj_wfl_workflow_pkg.insert_workflow_deliver(
${@record_id},
${/session/@user_id},
${@recipient_id},
${@workflow_id},
${@date_from},
${@date_to},
......@@ -38,7 +38,7 @@
begin
zj_wfl_workflow_pkg.update_workflow_deliver(
${@record_id},
${/session/@user_id},
${@recipient_id},
${@workflow_id},
${@date_from},
${@date_to},
......
......@@ -8,6 +8,7 @@
<bm:field name="deliver_reason" databasetype="VARCHAR2" datatype="java.lang.String" prompt="转交原因"/>
<bm:field name="workflow_id" databasetype="NUMBER" datatype="java.lang.Long"/>
<bm:field name="record_id" databasetype="NUMBER" datatype="java.lang.Long"/>
<!-- <bm:field name="recipient_name" databasetype="VARCHAR2" datatype="java.lang.String" expression="(select user_name)"/>-->
<bm:field name="workflow_name" databasetype="VARCHAR2" datatype="java.lang.String" expression="(select z.workflow_desc workflow_name from zj_wfl_workflow z where z.workflow_id= t.workflow_id)" prompt="WFL_WORKFLOW.NAME"/>
<bm:field name="workflow_desc" databasetype="VARCHAR2" datatype="java.lang.String" expression="(select z.workflow_desc workflow_name from zj_wfl_workflow z where z.workflow_id= t.workflow_id)" prompt="WFL_WORKFLOW.NAME"/>
</bm:fields>
......@@ -25,6 +26,12 @@
<bm:relation name="u" jointype="INNER" refmodel="sys.sys_user">
<bm:reference foreignfield="user_id" localfield="deliver_to_id"/>
</bm:relation>
<bm:relation name="r" jointype="INNER" refmodel="zjwfl.zj_wfl_users_v_lov">
<bm:reference foreignfield="user_id" localfield="recipient_id"/>
</bm:relation>
<bm:relation name="s" jointype="INNER" refmodel="zjwfl.zj_wfl_users_v_lov">
<bm:reference foreignfield="user_id" localfield="created_by"/>
</bm:relation>
<bm:relation name="e" jointype="INNER" refmodel="exp.exp_employees">
<bm:reference expression="e.employee_id=u.employee_id"/>
</bm:relation>
......@@ -34,8 +41,13 @@
<f:standard-who/>
</bm:features>
<bm:ref-fields>
<bm:ref-field name="recipient_name" prompt="转交人" relationname="r" sourcefield="employee_name"/>
<bm:ref-field name="created_by_name" prompt="操作人" relationname="s" sourcefield="employee_name"/>
<bm:ref-field name="user_name" prompt="转交给" relationname="u" sourcefield="user_name"/>
<!-- <bm:ref-field name="name_id" relationname="w" sourcefield="name_id"/> -->
<bm:ref-field name="employee_name" prompt="WFL_WORKFLOW_DELIVER.DELIVER_TO" relationname="e" sourcefield="name"/>
</bm:ref-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="(exists (select 1 from sys_user su where su.user_id= ${/session/@user_id} and (su.user_name in('HAND','HL_ADMIN') or (su.user_name not in('HAND','HL_ADMIN') and su.user_id=t.recipient_id) )))"/>
</bm:data-filters>
</bm:model>
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="zjwfl.zj_wfl_users_v" extendMode="reference">
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="zjwfl.zj_wfl_users_v" extendMode="reference" needAccessControl="false">
<ns1:fields>
<ns1:field name="user_id"/>
<ns1:field name="user_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="用户代码"/>
......@@ -17,5 +17,7 @@
<ns1:query-fields>
<ns1:query-field field="user_name" queryOperator="like"/>
<ns1:query-field field="employee_name" queryOperator="like"/>
<ns1:query-field field="user_id" queryOperator="="/>
<ns1:query-field field="employee_id" queryOperator="="/>
</ns1:query-fields>
</ns1:model>
......@@ -14,6 +14,8 @@
<a:link id="acr610_detail_submit_link" model="acr.ACR610.acr_invoice_apply_detail" modelaction="update"/>
<a:link id="attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link"
url="${/request/@context_path}/modules/acr/ACR610/con_cashflow_wirte_off_detail.lview"/>
<script><![CDATA[
function lock_current_detail_window() {
......@@ -63,8 +65,8 @@
});
}
function acr610_detail_grid_readonly(reocrd_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(reocrd_id);
function acr610_detail_grid_readonly(record_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(record_id);
var param = currency_reocrd.data;
param['winid'] = 'confirm_invoice_detail_win';
param['document_id'] = invoice_hd_wfl_id;
......@@ -92,27 +94,47 @@
}
function acr610_detail_renderer(value, record, name) {
debugger;
if (name == 'document_number') {
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + ');">' + value + '</a>';
}
if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') == 'NULL'){
if (record.get('invoice_kind') == '0') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') == 'NULL') {
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
} else if (record.get('invoice_kind') == '2') {
if (record.get('paid_byother_sum_flag') > 0) {
var current_record = $('acr610_invoice_detail_result_ds').getAt(0);
if (current_record.id == record.id) {
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
}
}
if (name == 'received_amount') {
debugger;
if ((!Leaf.isEmpty(value) && value > 0)&&record.get('cf_item') != '9') {
return '<a href="javascript:csh_write_off_detail(' + record.id + ',' + record.get('invoice_hd_id') + ');">' + Leaf.formatMoney(value) + '</a>';
} else {
return Leaf.formatMoney(value);
}
}
}
function acr610_detail_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
return Leaf.formatMoney(value);
}
function sumFunction_foot(data, name) {
if (name == 'journal_month') {
return '<font color=red>' + '合计' + '</font>';
} else if (name == 'total_amount' || name == 'net_amount' || name == 'tax_amount' || name == 'write_off_due_amount') {
} else if (name == 'total_amount' || name == 'net_amount' || name == 'tax_amount' || name == 'received_amount') {
return colum_caculateTotal(data, name);
}
}
......@@ -132,6 +154,24 @@
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function csh_write_off_detail(record_id, invoice_hd_id) {
var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl();
var record = $('acr610_invoice_detail_result_ds').findById(record_id);
if (record) {
var win = new Leaf.Window({
id: 'acr610WFL_con_cashflow_wirte_off_detail_window',
url: url,
params: {
cashflow_id: record.get('cashflow_id'),
invoice_hd_id: invoice_hd_id,
winid: 'acr610WFL_con_cashflow_wirte_off_detail_window'
},
draggable: true,
fullScreen: true
});
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -209,12 +249,9 @@
<a:column name="tax_amount" prompt="税额" footerRenderer="sumFunction_foot"
renderer="acr610_detail_formatMoney" align="right" width="100"/>
<a:column name="paid_byother_flag_n" prompt="担保支付" align="center" width="100"/>
<a:column name="bp_bank_account_name" prompt="付款人" align="center" width="100"/>
<a:column name="transaction_amount" prompt="付款金额" renderer="acr610_detail_formatMoney" align="right"
width="100"/>
<a:column name="write_off_due_amount" prompt="核销金额" footerRenderer="sumFunction_foot"
renderer="acr610_detail_formatMoney" align="right" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" align="center" width="100"/>
<a:column name="received_amount" prompt="核销金额" footerRenderer="sumFunction_foot"
renderer="acr610_detail_renderer" align="right" width="100"/>
<a:column name="write_off_max_date" prompt="核销日期" align="center" width="90"/>
<a:column name="journal_num" prompt="增值税凭证号" align="center" width="100"/>
<a:column name="guarantor_name_duty" prompt="担保人履行担保义务" hidden="true"/>
<a:column name="attachment" prompt="担保代付协议" align="center" width="100"
......
......@@ -14,6 +14,8 @@
<a:link id="acr610_detail_submit_link" model="acr.ACR610.acr_invoice_apply_detail" modelaction="update"/>
<a:link id="attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link"
url="${/request/@context_path}/modules/acr/ACR610/con_cashflow_wirte_off_detail.lview"/>
<script><![CDATA[
function lock_current_detail_window() {
......@@ -63,8 +65,8 @@
});
}
function acr610_detail_grid_readonly(reocrd_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(reocrd_id);
function acr610_detail_grid_readonly(record_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(record_id);
var param = currency_reocrd.data;
param['winid'] = 'confirm_invoice_detail_win';
param['document_id'] = invoice_hd_wfl_id;
......@@ -92,27 +94,46 @@
}
function acr610_detail_renderer(value, record, name) {
debugger;
if (name == 'document_number') {
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + ');">' + value + '</a>';
}
if (name == 'attachment') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') == 'NULL'){
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
if (record.get('invoice_kind') == '0') {
if (record.get('paid_byother_flag') == 'T') {
if (record.get('guarantor_name_duty') != 'Y' || record.get('guarantor_name_duty') == 'NULL') {
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
} else if (record.get('invoice_kind') == '2') {
if (record.get('paid_byother_sum_flag') > 0) {
var current_record = $('acr610_invoice_detail_result_ds').getAt(0);
if (current_record.id == record.id) {
return '<a href="javascript:acr610_detail_upload_window(' + record.get('file_id') + ')">附件</a>';
}
}
}
}
if (name == 'received_amount') {
if ((!Leaf.isEmpty(value) && value > 0)&&record.get('cf_item') != '9') {
return '<a href="javascript:csh_write_off_detail(' + record.id + ',' + record.get('invoice_hd_id') + ');">' + Leaf.formatMoney(value) + '</a>';
} else {
return Leaf.formatMoney(value);
}
}
}
function acr610_detail_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
return Leaf.formatMoney(value);
}
function sumFunction_foot(data, name) {
if (name == 'journal_month') {
return '<font color=red>' + '合计' + '</font>';
} else if (name == 'total_amount' || name == 'net_amount' || name == 'tax_amount' || name == 'write_off_due_amount') {
} else if (name == 'total_amount' || name == 'net_amount' || name == 'tax_amount' || name == 'received_amount') {
return colum_caculateTotal(data, name);
}
}
......@@ -132,6 +153,25 @@
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function csh_write_off_detail(record_id, invoice_hd_id) {
var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl();
var record = $('acr610_invoice_detail_result_ds').findById(record_id);
if (record) {
var win = new Leaf.Window({
id: 'acr610WFL_con_cashflow_wirte_off_detail_window',
url: url,
params: {
cashflow_id: record.get('cashflow_id'),
invoice_hd_id: invoice_hd_id,
winid: 'acr610WFL_con_cashflow_wirte_off_detail_window'
},
draggable: true,
fullScreen: true
});
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -156,7 +196,7 @@
returnField="paid_byother_flag" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr610_invoice_detail_result_ds" autoQuery="true" fetchAll="true"
<a:dataSet id="acr610_invoice_detail_result_ds" autoQuery="true" autoPageSize="true"
model="acr.ACR610.acr_invoice_apply_detail"
queryUrl="${/request/@context_path}/autocrud/acr.ACR610.acr_invoice_apply_detail/query?invoice_apply_id=${/parameter/@invoice_apply_id}"
queryDataSet="acr610_invoice_detail_query_ds"
......@@ -220,12 +260,9 @@
<a:column name="tax_amount" prompt="税额" footerRenderer="sumFunction_foot"
renderer="acr610_detail_formatMoney" align="right" width="100"/>
<a:column name="paid_byother_flag_n" prompt="担保支付" align="center" width="100"/>
<a:column name="bp_bank_account_name" prompt="付款人" align="center" width="100"/>
<a:column name="transaction_amount" prompt="付款金额" renderer="acr610_detail_formatMoney" align="right"
width="100"/>
<a:column name="write_off_due_amount" prompt="核销金额" footerRenderer="sumFunction_foot"
renderer="acr610_detail_formatMoney" align="right" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" align="center" width="100"/>
<a:column name="received_amount" prompt="核销金额" footerRenderer="sumFunction_foot"
renderer="acr610_detail_renderer" align="right" width="100"/>
<a:column name="write_off_max_date" prompt="核销日期" align="center" width="90"/>
<a:column name="journal_num" prompt="增值税凭证号" align="center" width="100"/>
<a:column name="guarantor_name_duty" prompt="担保人履行担保义务" hidden="true"/>
<a:column name="attachment" prompt="担保代付协议" align="center" width="100"
......
......@@ -60,7 +60,7 @@
}
function acr610_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
return Leaf.formatMoney(value);
}
function acr610_invoice_cancel() {
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: chenlingfeng7543
$Date: 2018/9/28 14:20
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure/>
<a:view>
<script type="text/javascript"></script>
<a:dataSets>
<a:dataSet id="con302n_con_cashflow_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="cashflow_id" defaultValue="${/parameter/@cashflow_id}"/>
<a:field name="invoice_hd_id" defaultValue="${/parameter/@invoice_hd_id}"/>
</a:fields>
</a:dataSet>
<a:dataSet id="con302n_con_cashflow_write_off_ds" queryDataSet="con302n_con_cashflow_write_off_query_ds" model="acr.ACR610.con_cashflow_write_off" autoQuery="true">
<a:fields>
<a:field name="write_off_date" datatype="date"/>
<a:field name="transaction_date" datatype="date"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:grid marginHeight="300" marginWidth="30" bindtarget="con302n_con_cashflow_write_off_ds" id="con302n_con_cashflow_write_off_grid">
<a:columns>
<a:column name="document_number" prompt="单据编号" align="center" width="120"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="times" prompt="租期" align="center" width="60"/>
<a:column name="bp_bank_account_name" prompt="付款人名称" align="center" width="120"/>
<a:column name="transaction_amount" prompt="付款金额" align="right" renderer="Leaf.formatMoney" width="120"/>
<a:column name="write_off_due_amount" prompt="核销金额" align="right" renderer="Leaf.formatMoney" width="120"/>
<a:column name="write_off_date" prompt="核销日期" align="center" renderer="Leaf.formatDate" width="120"/>
<a:column name="transaction_num" prompt="收款业务编号" width="120" align="center"/>
<!-- <a:column name="write_off_type_desc" prompt="核销类型" width="120"/>-->
<!-- <a:column name="write_off_classification_desc" prompt="核销分类" width="120"/>-->
<!-- <a:column name="transaction_type" prompt="收款类型" align="center" width="120"/>-->
<!-- <a:column name="transaction_date" prompt="收款日期" renderer="Leaf.formatDate" width="120"/>-->
<!-- <a:column name="bp_bank_account_num" prompt="汇款方账号" width="120"/>-->
<!-- <a:column name="created_by_n" prompt="制单人" width="120"/>-->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -6,23 +6,47 @@
$Purpose: 工作流转交设置(设置转交条件)
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure/>
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" fetchAll="true" model="zjwfl.zj_wfl_users_v_lov"
rootPath="sys_user_employee_rp"/>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function () {
var record = $('wfl_workflow_deliver_batch_create_ds').getAt(0);
if ('${/model/sys_user_employee_rp/record/@user_name}' != 'HAND' && '${/model/sys_user_employee_rp/record/@user_name}' != 'HL_ADMIN') {
record.set('recipient_name', '${/model/sys_user_employee_rp/record/@employee_name}');
record.set('recipient_id', '${/model/sys_user_employee_rp/record/@user_id}');
record.getField('recipient_name').setReadOnly(true);
record.getField('recipient_id').setReadOnly(true);
}
});
]]></script>
<a:dataSets>
<a:dataSet id="wfl_workflow_deliver_batch_create_ds" autoCreate="true" fetchAll="false" model="zjwfl.WFL2110.zj_wfl_workflow_deliver_query" selectable="true">
<a:dataSet id="wfl_workflow_deliver_batch_create_ds" autoCreate="true" fetchAll="false"
model="zjwfl.WFL2110.zj_wfl_workflow_deliver_query" selectable="true">
<a:fields>
<a:field name="workflow_id"/>
<a:field name="date_from" required="true" validator="dateValidator"/>
<a:field name="date_to" required="true" validator="dateValidator"/>
<a:field name="user_name" lovGridHeight="320" lovHeight="440" lovService="zjwfl.zj_wfl_users_v_lov" lovWidth="480" required="true" title="转交人">
<a:field name="created_by_name" readOnly="true"
defaultValue="${/model/sys_user_employee_rp/record/@employee_name}"/>
<a:field name="employee_name" lovGridHeight="320" lovHeight="440"
lovService="zjwfl.zj_wfl_users_v_lov" lovWidth="480" required="true" title="转交人">
<a:mapping>
<a:map from="user_id" to="deliver_to_id"/>
<a:map from="employee_name" to="user_name"/>
<a:map from="employee_name" to="employee_name"/>
</a:mapping>
</a:field>
<a:field name="recipient_name" lovGridHeight="320" lovHeight="440"
lovService="zjwfl.zj_wfl_users_v_lov" lovWidth="480" required="true" title="转交人">
<a:mapping>
<a:map from="user_id" to="recipient_id"/>
<a:map from="employee_name" to="recipient_name"/>
</a:mapping>
</a:field>
<a:field name="deliver_to_id" required="true"/>
<a:field name="recipient_id" required="true"/>
<a:field name="deliver_reason"/>
</a:fields>
<a:events>
......@@ -35,8 +59,14 @@
<a:form column="1" title="转交设置" width="320">
<a:datePicker name="date_from" bindTarget="wfl_workflow_deliver_batch_create_ds" width="200"/>
<a:datePicker name="date_to" bindTarget="wfl_workflow_deliver_batch_create_ds" width="200"/>
<a:lov name="user_name" bindTarget="wfl_workflow_deliver_batch_create_ds" width="200"/>
<a:textArea name="deliver_reason" bindTarget="wfl_workflow_deliver_batch_create_ds" height="140" width="200"/>
<a:textField name="created_by_name" bindTarget="wfl_workflow_deliver_batch_create_ds" prompt="操作人"
width="200"/>
<a:lov name="recipient_name" bindTarget="wfl_workflow_deliver_batch_create_ds" prompt="转交人"
width="200"/>
<!-- <a:lov name="user_name" bindTarget="wfl_workflow_deliver_batch_create_ds" width="200"/>-->
<a:lov name="employee_name" bindTarget="wfl_workflow_deliver_batch_create_ds" prompt="转交给" width="200"/>
<a:textArea name="deliver_reason" bindTarget="wfl_workflow_deliver_batch_create_ds" height="140"
width="200"/>
</a:form>
</a:vBox>
</a:screenBody>
......
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