Commit eb6bef66 authored by liyuan.chen's avatar liyuan.chen

发票反冲流程,对账单sql修改,发票申请明细sql修改,工作流监控页面修改

parent 95fc39ac
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
p_invoice_hd_id_rec => ${@invoice_hd_ids}, p_invoice_hd_id_rec => ${@invoice_hd_ids},
p_note => ${@note}, p_note => ${@note},
p_company_id => ${/session/@company_id}, p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id}); p_user_id => ${/session/@user_id},
p_apply_mode => ${@apply_mode});
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
......
...@@ -99,5 +99,6 @@ ...@@ -99,5 +99,6 @@
<bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id}"/> <bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.reversed_flag = &apos;N&apos;"/> <bm:data-filter enforceOperations="query" expression="t1.reversed_flag = &apos;N&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status IN (&apos;CONFIRM&apos;, &apos;POST&apos;)"/> <bm:data-filter enforceOperations="query" expression="t1.invoice_status IN (&apos;CONFIRM&apos;, &apos;POST&apos;)"/>
<bm:data-filter enforceOperations="query" expression="not exists (select 1 from acr_invoice_hd_wfl ah where ah.invoice_hd_id = t1.invoice_hd_id and ah.reversed_flag = &apos;I&apos;)"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -172,6 +172,19 @@ ...@@ -172,6 +172,19 @@
'HL_CSH_CONSOLIDATION_DALAY_CM') 'HL_CSH_CONSOLIDATION_DALAY_CM')
And rownum = 1), And rownum = 1),
1, 1,
(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 = cwo.cashflow_id
And Exists(Select 1
From gld_je_template_hds jh
Where jh.je_template_hd_id =
h.je_template_hd_id
And jh.je_template_code In
('HL_SALES_TAX_ACT_NEW',
'HL_SALES_TAX_ACT_NEW_LB'))
And rownum = 1),
101,
(Select h.journal_num (Select h.journal_num
From hls_journal_header h, hls_journal_detail l From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id Where h.journal_header_id = l.journal_header_id
......
...@@ -56,7 +56,22 @@ ...@@ -56,7 +56,22 @@
t.ref_d02, t.ref_d02,
t.ref_d03, t.ref_d03,
t.ref_d04, t.ref_d04,
t.ref_d05 t.ref_d05,
t.apply_mode,
t.reverse_method,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'REVERSE_METHOD'
And v.code_value = t.reverse_method
and v.code_enabled_flag = 'Y'
and v.code_value_enabled_flag = 'Y') As reverse_method_n,
t.vat_interface_status,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'ACR515_VAT_INTERFACE_STATUS'
And v.code_value = t.vat_interface_status
and v.code_enabled_flag = 'Y'
and v.code_value_enabled_flag = 'Y') As vat_interface_status_n
From acr_invoice_apply t #WHERE_CLAUSE# From acr_invoice_apply t #WHERE_CLAUSE#
order by t.invoice_apply_id desc order by t.invoice_apply_id desc
]]></bm:query-sql> ]]></bm:query-sql>
...@@ -69,15 +84,30 @@ ...@@ -69,15 +84,30 @@
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_wfl_pkg.update_reverse_method(p_invoice_apply_id => ${@invoice_apply_id},
p_reverse_method => ${@reverse_method},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations> </bm:operations>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="invoice_apply_num" queryExpression="t.invoice_apply_num like &apos;%&apos;||${@invoice_apply_num}||&apos;%&apos;"/> <bm:query-field name="invoice_apply_num"
<bm:query-field name="invoice_apply_date" queryExpression="trunc(t.invoice_apply_date) = to_date(${@invoice_apply_date}, 'yyyy-mm-dd')"/> queryExpression="t.invoice_apply_num like &apos;%&apos;||${@invoice_apply_num}||&apos;%&apos;"/>
<bm:query-field name="invoice_apply_date"
queryExpression="trunc(t.invoice_apply_date) = to_date(${@invoice_apply_date}, 'yyyy-mm-dd')"/>
<bm:query-field name="invoice_apply_user_n" queryExpression="t.invoice_apply_user = ${@invoice_apply_user}"/> <bm:query-field name="invoice_apply_user_n" queryExpression="t.invoice_apply_user = ${@invoice_apply_user}"/>
<bm:query-field name="wfl_apply_status_n" queryExpression="t.wfl_apply_status = ${@wfl_apply_status}"/> <bm:query-field name="wfl_apply_status_n" queryExpression="t.wfl_apply_status = ${@wfl_apply_status}"/>
<bm:query-field name="vat_interface_status_n"
queryExpression="t.vat_interface_status = ${@vat_interface_status}"/>
<bm:query-field name="invoice_apply_id" queryExpression="t.invoice_apply_id = ${@invoice_apply_id}"/> <bm:query-field name="invoice_apply_id" queryExpression="t.invoice_apply_id = ${@invoice_apply_id}"/>
<bm:query-field name="apply_mode" queryExpression="nvl(t.apply_mode, &apos;APPLY&apos;) = ${@apply_mode}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t.wfl_apply_status != 'CANCEL'"/> <bm:data-filter enforceOperations="query" expression="t.wfl_apply_status != &apos;CANCEL&apos;"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
<?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
h.invoice_apply_id,
h.invoice_hd_wfl_id,
h.document_number,
h.invoice_number,
(Select c.contract_number
From con_contract c
Where c.contract_id = h.contract_id) contract_number,
(Select c.contract_name
From con_contract c
Where c.contract_id = h.contract_id) contract_name,
(Select hb.bp_code
From hls_bp_master hb
Where hb.bp_id = h.bp_id) bp_code,
h.bp_name,
to_char(h.invoice_date, 'yyyy-mm-dd') invoice_date,
h.bp_name invoice_title,
h.total_amount,
(Select u.description
From sys_user u, acr_invoice_hd ah
Where u.user_id = ah.created_by
And ah.invoice_hd_id = h.invoice_hd_id) created_by_n,
h.invoice_status,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'ACR510_AR_INVOICE_STATUS'
And v.code_value = h.invoice_status) invoice_status_n,
(decode((Select he.status
From acr_ele_invoice_hd he
Where he.invoice_hd_id = h.invoice_hd_id),
'DOWNLOAD',
'BACK',
h.vat_interface_status)) vat_interface_status,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'ACR515_VAT_INTERFACE_STATUS'
And v.code_value =
(decode((Select he.status
From acr_ele_invoice_hd he
Where he.invoice_hd_id = h.invoice_hd_id),
'DOWNLOAD',
'金税已回写',
h.vat_interface_status))) vat_interface_status_n,
to_char(h.accounting_date, 'yyyy-mm-dd') accounting_date,
h.vat_red_notice_num
From acr_invoice_hd_wfl h #WHERE_CLAUSE#
order by h.invoice_hd_wfl_id desc
]]></bm:query-sql>
</bm:operation>
<!--工作流提交-->
<bm:operation name="execute">
<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:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_wfl_pkg.update_vat_red_notice_num(p_invoice_hd_wfl_id => ${@invoice_hd_wfl_id},
p_vat_red_notice_num => ${@vat_red_notice_num},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="h.contract_number = ${@contract_number}"/>
<bm:query-field name="bp_code" queryExpression="h.bp_code = ${@bp_code}"/>
<bm:query-field name="journal_month" queryExpression="h.journal_month = ${@journal_month}"/>
<bm:query-field name="paid_byother_flag_n" queryExpression="h.paid_byother_flag = ${@paid_byother_flag}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="h.invoice_apply_id = ${@invoice_apply_id}"/>
</bm:data-filters>
</bm:model>
...@@ -276,6 +276,7 @@ ...@@ -276,6 +276,7 @@
return a.invoice_hd_id - b.invoice_hd_id; return a.invoice_hd_id - b.invoice_hd_id;
}); });
datas['invoice_hd_ids'] = invoice_hd_ids; datas['invoice_hd_ids'] = invoice_hd_ids;
datas['apply_mode'] = 'APPLY';
datas['details'] = saveData; datas['details'] = saveData;
Leaf.showConfirm('提示', '<span style="color: #ff0000; ">发票在申请期间将无法进行修改操作!如需要取消发票申请,请点击取消申请!</span>', function () { Leaf.showConfirm('提示', '<span style="color: #ff0000; ">发票在申请期间将无法进行修改操作!如需要取消发票申请,请点击取消申请!</span>', function () {
lock_current_window(); lock_current_window();
......
...@@ -13,7 +13,18 @@ ...@@ -13,7 +13,18 @@
<a:view> <a:view>
<a:link id="acr514_invoice_readonly_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/> <a:link id="acr514_invoice_readonly_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="acr514_update_for_submit_id" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_for_submit.lsc"/>
<a:link id="acr_invoice_reverse_apply_detail_link" url="${/request/@context_path}/modules/acr/ACR620/acr_invoice_reverse_apply_detail.lview"/>
<script><![CDATA[ <script><![CDATA[
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function acr514_invoice_query() { function acr514_invoice_query() {
$('acr514_invoice_result_ds').query(); $('acr514_invoice_result_ds').query();
} }
...@@ -166,7 +177,6 @@ ...@@ -166,7 +177,6 @@
function acr514_invoice_update(ds, record, name, value, oldVlaue) function acr514_invoice_update(ds, record, name, value, oldVlaue)
{ {
debugger;
var time,year,month,day,string; var time,year,month,day,string;
var d,d_year_month; var d,d_year_month;
if(name=='reverse_date') if(name=='reverse_date')
...@@ -199,6 +209,66 @@ ...@@ -199,6 +209,66 @@
record.set(name,value); record.set(name,value);
} }
} }
function acr514_invoice_insert() {
var records = $('acr514_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = {};
var saveData = [];
var invoice_hd_ids = '';
for (var i = 0; i < records.length; i++) {
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
saveData.sort(function (a, b) {
return a.invoice_hd_id - b.invoice_hd_id;
});
datas['invoice_hd_ids'] = invoice_hd_ids;
datas['apply_mode'] = 'REVERSE';
datas['details'] = saveData;
Leaf.showConfirm('提示', '<span style="color: #ff0000; ">所选发票即将创建反冲申请!如需要取消发票反冲申请,请点击取消申请!</span>', function () {
lock_current_window();
Leaf.request({
url: $('acr514_update_for_submit_id').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '申请成功',
duration: 3000
});
unlock_current_window();
var win = new Leaf.Window({
id: 'acr_invoice_reverse_apply_detail_link_winid',
params: {
invoice_apply_id: res.result.invoice_apply_id,
winId: 'acr_invoice_reverse_apply_detail_link_winid'
},
url: $('acr_invoice_reverse_apply_detail_link').getUrl(),
title: '申请明细',
fullScreen: true
});
win.on('close',function(){
$('acr514_invoice_result_ds').query();
});
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets> <a:dataSets>
...@@ -269,14 +339,14 @@ ...@@ -269,14 +339,14 @@
<a:event name="update" handler="acr514_invoice_query_Onupdate"/> <a:event name="update" handler="acr514_invoice_query_Onupdate"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="acr514_invoice_result_ds" autoPageSize="true" model="acr.ACR514.acr_invoice_reverse" queryDataSet="acr514_invoice_query_ds" selectable="true"> <a:dataSet id="acr514_invoice_result_ds" autoQuery="true" autoPageSize="true" model="acr.ACR514.acr_invoice_reverse" queryDataSet="acr514_invoice_query_ds" selectable="true">
<a:fields> <!--<a:fields>
<a:field name="reverse_date" required="true"/> <a:field name="reverse_date" required="true"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="submitsuccess" handler="acr514_invoice_result_ds_submitsuccess"/> <a:event name="submitsuccess" handler="acr514_invoice_result_ds_submitsuccess"/>
<a:event name="update" handler="acr514_invoice_update"/> <a:event name="update" handler="acr514_invoice_update"/>
</a:events> </a:events>-->
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
...@@ -285,7 +355,8 @@ ...@@ -285,7 +355,8 @@
<a:toolbarButton click="acr514_invoice_query" text="HLS.QUERY"/> <a:toolbarButton click="acr514_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr514_invoice_reset" text="HLS.RESET"/> <a:toolbarButton click="acr514_invoice_reset" text="HLS.RESET"/>
<!-- <a:toolbarButton click="acr514_invoice_reverse" text="HLS.REVERSE"/>--> <!-- <a:toolbarButton click="acr514_invoice_reverse" text="HLS.REVERSE"/>-->
<a:toolbarButton click="acr514_invoice_invalid" text="作废"/> <!--<a:toolbarButton click="acr514_invoice_invalid" text="作废"/>-->
<a:toolbarButton click="acr514_invoice_insert" text="新建申请"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form marginWidth="30" padding="0" title="应收发票反冲" labelWidth="130"> <a:form marginWidth="30" padding="0" title="应收发票反冲" labelWidth="130">
<a:hBox labelSeparator="" labelWidth="120"> <a:hBox labelSeparator="" labelWidth="120">
...@@ -340,7 +411,7 @@ ...@@ -340,7 +411,7 @@
<a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/> <a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>
<!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/>--> <!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/>-->
<a:column name="invoice_date" prompt="ACR.INVOICE_DATE" width="100"/> <a:column name="invoice_date" prompt="ACR.INVOICE_DATE" width="100"/>
<a:column name="reverse_date" editor="invoice_grid_dp" prompt="HLS.REVERSE_DATE" renderer="Leaf.formatDate" width="100"/> <!--<a:column name="reverse_date" editor="invoice_grid_dp" prompt="HLS.REVERSE_DATE" renderer="Leaf.formatDate" width="100"/>-->
<!-- <a:column name="vat_red_notice_num" editorFunction="vat_red_notice_num_editorFunction" prompt="ACR.VAT_RED_NOTICE_NUM" width="120"/>--> <!-- <a:column name="vat_red_notice_num" editorFunction="vat_red_notice_num_editorFunction" prompt="ACR.VAT_RED_NOTICE_NUM" width="120"/>-->
<!-- <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/> <!-- <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/>
<a:column name="bp_code" prompt="HLS.CUSTOMER_NUMBER" width="100"/> --> <a:column name="bp_code" prompt="HLS.CUSTOMER_NUMBER" width="100"/> -->
...@@ -356,10 +427,10 @@ ...@@ -356,10 +427,10 @@
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> <!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/>
<a:column name="project_name" autoAdjust="false" prompt="HLS.PROJECT_NAME" showTitle="true" width="150"/> --> <a:column name="project_name" autoAdjust="false" prompt="HLS.PROJECT_NAME" showTitle="true" width="150"/> -->
</a:columns> </a:columns>
<a:editors> <!--<a:editors>
<a:datePicker id="invoice_grid_dp"/> <a:datePicker id="invoice_grid_dp"/>
<a:textField id="invoice_grid_tf"/> <a:textField id="invoice_grid_tf"/>
</a:editors> </a:editors>-->
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
</a:view> </a:view>
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="acr610_invoice_result_ds" autoPageSize="true" autoQuery="true" <a:dataSet id="acr610_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR610.acr_invoice_apply_query" queryDataSet="acr610_invoice_apply_query_ds" model="acr.ACR610.acr_invoice_apply_query" queryUrl="${/request/@context_path}/autocrud/acr.ACR610.acr_invoice_apply_query/query?apply_mode=APPLY" queryDataSet="acr610_invoice_apply_query_ds"
selectable="true" selectionModel="single"> selectable="true" selectionModel="single">
<a:events> <a:events>
<a:event name="select" handler="acr610_invoice_result_select"/> <a:event name="select" handler="acr610_invoice_result_select"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:view>
<a:link id="acr_invoice_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="acr620_invoice_reverse_detail_link" url="${/request/@context_path}/modules/acr/ACR610/acr_invoice_detail_readonly.lview"/>
<a:link id="acr620_detail_submit_link" model="acr.ACR620.acr_invoice_reverse_apply_detail" modelaction="execute"/>
<a:link id="acr620_invoice_reverse_save_link" model="acr.ACR610.acr_invoice_apply_query" modelaction="update"/>
<script><![CDATA[
function lock_current_detail_window() {
Leaf.Masker.mask($('${/parameter/@winId}').wrap, '${l:HLS.EXECUTING}');
}
function unlock_current_detail_window() {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
}
function acr620_invoice_reverse_detail_exit() {
$('${/parameter/@winId}').close();
}
function acr620_invoice_reverse_detail_save() {
var ds = $('acr620_invoice_reverse_apply_basic_ds');
if(ds.validate()){
var record = ds.getAt(0);
Leaf.request({
url: $('acr620_invoice_reverse_save_link').getUrl(),
para: {
invoice_apply_id: '${/parameter/@invoice_apply_id}',
reverse_method: record.get('reverse_method')
},
success: function () {
Leaf.SideBar.show({
msg: '保存成功',
duration: 3000
});
unlock_current_detail_window();
$('acr620_invoice_reverse_apply_basic_ds').query();
},
failure: function () {
unlock_current_detail_window();
},
error: function () {
unlock_current_detail_window();
},
scope: this
});
}
}
function acr620_invoice_reverse_detail_submit() {
var ds = $('acr620_invoice_reverse_apply_basic_ds');
var record = ds.getAt(0);
if(record.dirty){
Leaf.showMessage('提示','请先保存!');
return;
}
if(ds.validate()) {
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_detail_window();
Leaf.request({
url: $('acr620_detail_submit_link').getUrl(),
para: {
invoice_apply_id: '${/parameter/@invoice_apply_id}'
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_detail_window();
acr620_invoice_reverse_detail_exit();
},
failure: function () {
unlock_current_detail_window();
},
error: function () {
unlock_current_detail_window();
},
scope: this
});
});
}
}
function acr620_detail_grid_readonly(reocrd_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr620_invoice_reverse_detail_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['winid'] = 'confirm_invoice_detail_win';
param['document_id'] = invoice_hd_wfl_id;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
param['function_code'] = 'ACR610R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('acr_invoice_get_layout_code_link_id', param, 'acr620_invoice_reverse_detail_link');
}
function acr620_detail_renderer(value, record, name) {
if (name == 'document_number') {
return '<a href="javascript:acr620_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + ');">' + value + '</a>';
}
}
function acr620_detail_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
function acr620_invoice_reverse_load(ds, record, index) {
if(ds.data[0].data.vat_interface_status && ds.data[0].data.vat_interface_status == 'UNTRANSFERED'){
ds.data[0].getField('reverse_method_n').setReadOnly(true);
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<!--<a:dataSet id="acr620_reverse_method_ds" lookupCode="REVERSE_METHOD"/>-->
<a:dataSet id="acr620_reverse_method_ds">
<a:datas>
<a:record code_value="REDPUNCH" code_value_name="红冲"/>
<a:record code_value="INVALID" code_value_name="作废"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr620_invoice_reverse_apply_basic_ds" autoQuery="true" fetchAll="true" model="acr.ACR610.acr_invoice_apply_query" queryUrl="${/request/@context_path}/autocrud/acr.ACR610.acr_invoice_apply_query/query?invoice_apply_id=${/parameter/@invoice_apply_id}">
<a:fields>
<a:field name="invoice_apply_num"/>
<a:field name="invoice_apply_user_n"/>
<a:field name="invoice_apply_date"/>
<a:field name="reverse_method_n" displayField="code_value_name" options="acr620_reverse_method_ds"
returnField="reverse_method" valueField="code_value" required="true" requiredMessage="请输入必输字段:反冲方式"/>
</a:fields>
<a:events>
<a:event name="load" handler="acr620_invoice_reverse_load"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr620_invoice_reverse_detail_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
model="acr.ACR620.acr_invoice_reverse_apply_detail" queryUrl="${/request/@context_path}/autocrud/acr.ACR620.acr_invoice_reverse_apply_detail/query?invoice_apply_id=${/parameter/@invoice_apply_id}"
selectable="false"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr620_invoice_reverse_detail_exit" text="HLS.EXIT"/>
<a:toolbarButton click="acr620_invoice_reverse_detail_save" text="HLS.SAVE"/>
<a:toolbarButton click="acr620_invoice_reverse_detail_submit" text="HLS.SUBMIT"/>
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="基本信息">
<a:hBox labelSeparator=" ">
<a:textField name="invoice_apply_num" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="申请编号" width="135" readOnly="true"/>
<a:textField name="invoice_apply_user_n" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="申请人" width="135" readOnly="true"/>
<a:textField name="invoice_apply_date" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="申请时间" width="135" readOnly="true"/>
<a:comboBox name="reverse_method_n" bindTarget="acr620_invoice_reverse_apply_basic_ds" prompt="反冲方式" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr620_invoice_reverse_detail_grid_ds" bindTarget="acr620_invoice_reverse_detail_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="单据编号" align="center" renderer="acr620_detail_renderer" width="120"/>
<a:column name="invoice_number" prompt="发票号码" align="center" width="100"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="invoice_date" prompt="发票日期" renderer="Leaf.formatDate" align="center" width="100"/>
<a:column name="invoice_title" prompt="发票抬头" align="center" width="100"/>
<a:column name="total_amount" prompt="开票金额" renderer="acr620_detail_formatMoney" align="right" width="100"/>
<a:column name="created_by_n" prompt="创建人" align="center" width="100"/>
<a:column name="invoice_status_n" prompt="发票状态" align="center" width="100"/>
<a:column name="vat_interface_status_n" prompt="金税状态" align="center" width="100"/>
<a:column name="accounting_date" prompt="记账日期" renderer="Leaf.formatDate" align="center" width="100"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:view>
<a:link id="acr_invoice_reverse_apply_detail_link" url="${/request/@context_path}/modules/acr/ACR620/acr_invoice_reverse_apply_detail.lview"/>
<a:link id="acr_invoice_reverse_apply_detail_readonly_link" url="${/request/@context_path}/modules/acr/ACR620/acr_invoice_reverse_apply_detail_wfl.lview"/>
<a:link id="acr620_invoice_reverse_apply_status_change" model="acr.ACR610.acr_invoice_apply_query" modelaction="delete"/>
<script><![CDATA[
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function acr620_invoice_reverse_query() {
$('acr620_invoice_reverse_result_ds').query();
}
function acr620_invoice_reverse_reset() {
$('acr620_invoice_reverse_apply_query_ds').reset();
}
function acr610_grid_update(url) {
var win = new Leaf.Window({
id: 'acr_invoice_reverse_apply_detail_link_winid',
params: {
winId: 'acr_invoice_reverse_apply_detail_link_winid'
},
url: url,
title: '申请明细',
fullScreen: true
});
win.on('close',function(){
$('acr620_invoice_reverse_result_ds').query();
});
}
function acr620_apply_num_render(value, record, name) {
if (name == 'invoice_apply_num') {
if (record.get('wfl_apply_status') == 'NEW') {
url = $('acr_invoice_reverse_apply_detail_link').getUrl() + '?invoice_apply_id=' + record.get('invoice_apply_id') + '&invoice_apply_num=' + record.get('invoice_apply_num') + '&invoice_apply_user_n=' + record.get('invoice_apply_user_n') + '&invoice_apply_date=' + record.get('invoice_apply_date') ;
} else {
url = $('acr_invoice_reverse_apply_detail_readonly_link').getUrl() + '?invoice_apply_id=' + record.get('invoice_apply_id') + '&invoice_apply_num=' + record.get('invoice_apply_num') + '&invoice_apply_user_n=' + record.get('invoice_apply_user_n') + '&invoice_apply_date=' + record.get('invoice_apply_date') + '&button_flag=NO';
}
return '<a href="javascript:acr610_grid_update(\'' + url + '\');">' + value + '</a>';
}
}
function acr610_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
function acr620_invoice_reverse_cancel() {
var records = $('acr620_invoice_reverse_result_ds').getSelected();
if (records.length == 0) {
$L.showInfoMessage('提示', '请至少选择一条数据!');
return;
}
var record = records[0];
if(record.get('wfl_apply_status') != 'NEW'){
$L.showInfoMessage('提示', '仅新建状态的申请单据可以取消!');
return;
}
Leaf.showConfirm('提示', "确认执行该操作?", function () {
lock_current_window();
Leaf.request({
url: $('acr620_invoice_reverse_apply_status_change').getUrl(),
para: record.data,
success: function () {
unlock_current_window();
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr620_invoice_reverse_result_ds').query();
},
error: function () {
unlock_current_window();
},
scope: this
});
}, function () {
unlock_current_window();
});
}
function acr620_invoice_reverse_result_select(ds, record, bp_seq) {
if(record.get('wfl_apply_status') != 'NEW'){
document.getElementById("acr620_invoice_reverse_cancel_id").style.display = "none";
}else{
document.getElementById("acr620_invoice_reverse_cancel_id").style.display = "";
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="acr620_invoice_reverse_apply_status_ds" lookupCode="WFL_STATUS"/>
<a:dataSet id="acr620_vat_interface_status_ds" lookupCode="ACR515_VAT_INTERFACE_STATUS"/>
<a:dataSet id="acr620_invoice_reverse_apply_query_ds">
<a:fields>
<a:field name="invoice_apply_num"/>
<a:field name="invoice_apply_date"/>
<a:field name="invoice_apply_user_n" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
<a:mapping>
<a:map from="user_id" to="invoice_apply_user"/>
<a:map from="description" to="invoice_apply_user_n"/>
</a:mapping>
</a:field>
<a:field name="invoice_apply_user"/>
<a:field name="wfl_apply_status_n" displayField="code_value_name" options="acr620_invoice_reverse_apply_status_ds"
returnField="wfl_apply_status" valueField="code_value"/>
<a:field name="vat_interface_status_n" displayField="code_value_name" options="acr620_vat_interface_status_ds"
returnField="vat_interface_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr620_invoice_reverse_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
model="acr.ACR610.acr_invoice_apply_query" queryUrl="${/request/@context_path}/autocrud/acr.ACR610.acr_invoice_apply_query/query?apply_mode=REVERSE" queryDataSet="acr620_invoice_reverse_apply_query_ds"
selectable="true" selectionModel="single">
<a:events>
<a:event name="select" handler="acr620_invoice_reverse_result_select"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr620_invoice_reverse_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr620_invoice_reverse_query" text="HLS.QUERY"/>
<a:toolbarButton id="acr620_invoice_reverse_cancel_id" click="acr620_invoice_reverse_cancel" text="取消申请"/>
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="查询条件">
<a:hBox labelSeparator=" ">
<a:textField name="invoice_apply_num" bindTarget="acr620_invoice_reverse_apply_query_ds" prompt="申请编号" width="135"/>
<a:datePicker name="invoice_apply_date" bindTarget="acr620_invoice_reverse_apply_query_ds" prompt="申请时间" width="135"/>
<a:lov name="invoice_apply_user_n" bindTarget="acr620_invoice_reverse_apply_query_ds" prompt="申请人" width="135"/>
<a:comboBox name="wfl_apply_status_n" bindTarget="acr620_invoice_reverse_apply_query_ds" prompt="申请状态" width="135"/>
</a:hBox>
<a:hBox>
<a:comboBox name="vat_interface_status_n" bindTarget="acr620_invoice_reverse_apply_query_ds" prompt="金税状态" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr620_invoice_reverse_update_grid_ds" bindTarget="acr620_invoice_reverse_result_ds" marginHeight="250" marginWidth="30" navBar="true">
<a:columns>
<a:column name="invoice_apply_num" lock="true" prompt="申请编号" renderer="acr620_apply_num_render" align="center" width="150"/>
<a:column name="invoice_apply_date" prompt="申请日期" align="center" width="100"/>
<a:column name="invoice_apply_user_n" prompt="申请人" align="center" width="100"/>
<a:column name="total_amount" prompt="反冲总金额" align="right" renderer="acr610_formatMoney" width="100"/>
<a:column name="wfl_apply_status_n" prompt="申请状态" align="center" width="150"/>
<a:column name="vat_interface_status_n" prompt="金税状态" align="center" width="150"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<a:init-procedure> <a:init-procedure>
<a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value = &apos;1&apos;" model="zjwfl.sys_code_default_value" rootPath="workflow_status_default_value"/> <a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value = &apos;1&apos;" model="zjwfl.sys_code_default_value" rootPath="workflow_status_default_value"/>
<a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value in (&apos;1&apos;,&apos;10&apos;,&apos;-1&apos;,&apos;-1000&apos;)" model="zjwfl.sys_code_default_value" rootPath="workflow_status_list"/> <a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value in (&apos;1&apos;,&apos;10&apos;,&apos;-1&apos;,&apos;-1000&apos;)" model="zjwfl.sys_code_default_value" rootPath="workflow_status_list"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0014&apos;,&apos;0013&apos;,&apos;0012&apos;,&apos;0006&apos;,&apos;0005&apos;,&apos;0008&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/> <a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0014&apos;,&apos;0013&apos;,&apos;0012&apos;,&apos;0006&apos;,&apos;0005&apos;,&apos;0008&apos;,&apos;0022&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="pageLink_node_approve_history" url="${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_node_approve_history.lview"/> <a:link id="pageLink_node_approve_history" url="${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_node_approve_history.lview"/>
......
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