Commit 95fc39ac authored by liyuan.chen's avatar liyuan.chen

销项发票申请开发

parent ed545c7d
......@@ -98,7 +98,7 @@
t1.object_taxpayer_type) = 'SMALL_SCALE_TAXPAYER' and
to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or (t2.write_off_flag = 'FULL' and t1.contract_status not in('REPURING','REPUR')) or(nvl(t2.write_off_flag,'NOT')='FULL' and t1.contract_status in('REPURING','REPUR') and t2.cf_item<>1) or (nvl(t2.write_off_flag,'NOT') <> 'NOT' and t1.contract_status in('REPURING','REPUR') and t2.cf_item=1 ) )
AND cf_item<> 9
AND ((t2.cf_status='RELEASE' and t1.contract_status not in('REPURING','REPUR') and t2.cf_direction='INFLOW') or(t1.contract_status in ('REPURING','REPUR') and t2.cf_item in(1,250) and t2.cf_status='RELEASE' )or ( t2.cf_status in('BLOCK') and nvl(t2.write_off_flag,'NOT')='PARTIAL' and nvl(t2.billing_status,'NOT') != 'FULL' and t1.contract_status in ('REPURING','REPUR') and t2.cf_item =1 and t2.cf_direction='NONCASH' and nvl(t2.billing_amount,0) <> t2.received_amount))
AND ((t2.cf_status='RELEASE' and t1.contract_status not in('REPURING','REPUR') and t2.cf_direction='INFLOW') or(t1.contract_status in ('REPURING','REPUR') and t2.cf_item in(1,2,250) and t2.cf_status='RELEASE' )or ( t2.cf_status in('BLOCK') and nvl(t2.write_off_flag,'NOT')='PARTIAL' and nvl(t2.billing_status,'NOT') != 'FULL' and t1.contract_status in ('REPURING','REPUR') and t2.cf_item =1 and t2.cf_direction='NONCASH' and nvl(t2.billing_amount,0) <> t2.received_amount))
and t2.cashflow_id not in (20265,34267,24445)
and nvl(t2.billing_status,'NOT') != 'FULL'
--and t2.cf_direction='INFLOW'
......
......@@ -111,7 +111,8 @@
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
<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.invoice_status = &apos;CONFIRMING&apos;)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 下午06:07:55
$Author: Leauan
$Date: 20201106
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="execute">
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=> ${@invoice_hd_ids},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
begin
acr_invoice_wfl_pkg.acr_invoice_apply_insert(p_invoice_apply_id => ${@invoice_apply_id},
p_invoice_hd_id_rec => ${@invoice_hd_ids},
p_note => ${@note},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="invoice_apply_id" dataType="java.lang.Long" input="false" output="true" outputPath="/parameter/@invoice_apply_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_reject(p_invoice_hd_id=> ${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
begin
acr_invoice_wfl_pkg.acr_invoice_wfl_insert(p_invoice_apply_id => ${../../@invoice_apply_id},
p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-insert model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
<a:model-insert model="acr.ACR512N.acr_invoice_update_for_submit" trace="true"/>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
<a:model-update model="acr.ACR512N.acr_invoice_update_for_submit" trace="true"/>
</batch-apply>
<a:model-execute model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -17,16 +17,16 @@
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="acr512_invoice_update_page"
url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_detail.lview"/>
<!-- <a:link id="acr512_invoice_update_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.screen"/>
-->
<!--<a:link id="acr512_invoice_update_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.screen"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="acr512_submit_id" model="acr.ACR512.acr_invoice_hd_batch" modelaction="update"/>
<a:link id="get_document_number_link" model="acr.ACR512.get_document_number" modelaction="query"/>
<a:link id="acr512_update_for_submit_id" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_for_submit.lsc"/>
<a:link id="acr_invoice_apply_detail_link" url="${/request/@context_path}/modules/acr/ACR610/acr_invoice_apply_detail.lview"/>
<script><![CDATA[
//提交复核
function acr512_invoice_submit_selected() {
debugger;
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length == 0) {
$L.showInfoMessage('提示', '请至少选择一条数据!');
......@@ -80,11 +80,11 @@
}
function lock_current_window() {
leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask(Ext.getBody());
}
function acr512_invoice_query() {
......@@ -242,6 +242,78 @@
});
}
function acr512_invoice_insert() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = {};
var saveData = [];
var invoice_hd_ids = '';
var invoice_kind = records[0].get('invoice_kind');
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if(invoice_kind != records[i].get('invoice_kind')){
$L.showErrorMessage("提示", '普票和专票不能同时勾选!');
return;
}
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['details'] = saveData;
Leaf.showConfirm('提示', '<span style="color: #ff0000; ">发票在申请期间将无法进行修改操作!如需要取消发票申请,请点击取消申请!</span>', function () {
lock_current_window();
Leaf.request({
url: $('acr512_update_for_submit_id').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '申请成功',
duration: 3000
});
unlock_current_window();
//$('acr512_invoice_result_ds').query();
var win = new Leaf.Window({
id: 'acr_invoice_apply_detail_link_winid',
params: {
invoice_apply_id: res.result.invoice_apply_id,
winId: 'acr_invoice_apply_detail_link_winid'
},
url: $('acr_invoice_apply_detail_link').getUrl(),
title: '申请明细',
fullScreen: true
});
win.on('close',function(){
$('acr512_invoice_result_ds').query();
});
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -321,12 +393,6 @@
<a:dataSet id="acr512_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
<!-- <a:fields>-->
<!-- <a:field name="compare_date_flag"/>-->
<!-- </a:fields>-->
<!-- <a:events>-->
<!-- <a:event name="load" handler="load_do_info"/>-->
<!-- </a:events>-->
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -334,7 +400,8 @@
<a:toolbarButton click="acr512_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr512_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr512_invoice_delete" text="HLS.REMOVE"/>
<a:toolbarButton click="acr512_invoice_submit_selected" text="提交复核"/>
<!--<a:toolbarButton click="acr512_invoice_submit_selected" text="提交复核"/>-->
<a:toolbarButton click="acr512_invoice_insert" text="新建申请"/>
<!--
<a:toolbarButton click="acr512_invoice_submit" text="HLS.SUBMIT"/>
-->
......
......@@ -113,7 +113,7 @@
} catch (e) {
raise_app_error(e);
}
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_A4'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX'||record_data.templet_code=='BUSINESS_CONTRACT_GK'||record_data.templet_code == 'REPURCHASE_DEBT_OFFSET'||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE') {
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_A4'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX'||record_data.templet_code=='BUSINESS_CONTRACT_GK'||record_data.templet_code == 'REPURCHASE_DEBT_OFFSET'||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN_A4') {
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
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