Commit 1aa923aa authored by stone's avatar stone

[fix]修改销项发票功能

parent 773ed308
......@@ -110,7 +110,7 @@
<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 = &apos;NEW&apos;"/>
<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="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 下午06:07:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=>${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -93,7 +93,7 @@
<bm:query-field name="confirmed_by" queryExpression="t1.confirmed_by = ${@confirmed_by}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status = &apos;NEW&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status NOT IN (&apos;NEW&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
......@@ -5,18 +5,18 @@
</settings>
<body>
<p align="center" line="200" >
<t bold="true" fontFamily="宋体" fontSize="40" fontColor="000000" >付款请求书</t>
<p align="center" line="100" >
<t bold="true" fontFamily="宋体" fontSize="20" fontColor="000000" >付款请求书</t>
</p>
<p line="200" >
<t fontFamily="宋体" fontSize="12" fontColor="000000" >宏菱融资租赁(上海)有限公司:
<t fontFamily="宋体" fontSize="10" fontColor="000000" >宏菱融资租赁(上海)有限公司:
</t>
</p>
<p indFirstLine="1" line="200" >
<t fontFamily="宋体" fontSize="12" fontColor="000000" >非常感谢贵司长期以来的支持与帮助!</t>
<p indFirstLine="1" line="100" >
<t fontFamily="宋体" fontSize="10" fontColor="000000" >非常感谢贵司长期以来的支持与帮助!</t>
</p>
<p indFirstLine="1" line="200" >
<t fontFamily="宋体" fontSize="12" fontColor="000000" >我司在${model.getObject('/model/static_data_date/record/@req_date')!''}向贵司销售${model.getObject('/model/static_data/record/@total_number')!''}台机器,具体委托明细如下:</t>
<p indFirstLine="1" line="100" >
<t fontFamily="宋体" fontSize="10" fontColor="000000" >我司在${model.getObject('/model/static_data_date/record/@req_date')!''}向贵司销售${model.getObject('/model/static_data/record/@total_number')!''}台机器,具体委托明细如下:</t>
</p>
<!--插入表单数据-->
<tbl indLeft="1" border="true">
......@@ -39,104 +39,104 @@
-->
<border type="bottom" color="000000" style="single"/>
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">序号</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">序号</t>
</p>
</tc>
<tc width="5">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">买卖合同号</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">买卖合同号</t>
</p>
</tc>
<tc width="2">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">机型</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">机型</t>
</p>
</tc>
<tc width="2">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">机号</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">机号</t>
</p>
</tc>
<tc width="6">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">付款预定日期</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">付款预定日期</t>
</p>
</tc>
<tc width="4">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">合同金额</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">合同金额</t>
</p>
</tc>
<tc width="6">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">委托付款金额</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">委托付款金额</t>
</p>
</tc>
<tc width="6">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">应付我司金额</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">应付我司金额</t>
</p>
</tc>
<tc width="4">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">客户名称</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">客户名称</t>
</p>
</tc>
<tc width="8">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">我司应付${model.getObject('/model/bank_info/record/@vender_name')!''}金额</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">我司应付${model.getObject('/model/bank_info/record/@vender_name')!''}金额</t>
</p>
</tc>
<tc width="5">
<p align="left">
<t fontFamily="宋体" fontSize="12" fontColor="000000">付款日期</t>
<t fontFamily="宋体" fontSize="10" fontColor="000000">付款日期</t>
</p>
</tc>
</tr>
<!--循环获取数据-->
<#if model.getObject("/model/payment_details").getChilds()??>
<#list model.getObject('/model/payment_details').getChilds() as detail_item_l>
<tr height="0.3">
<tr height="0.2">
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('rownum')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('rownum')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('contract_number')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('contract_number')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('pattern')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('pattern')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('machine_number')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('machine_number')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('apply_pay_date')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('apply_pay_date')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('lease_item_amount_print')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('lease_item_amount_print')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('amount_vender_print')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('amount_vender_print')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('amount_agent_print')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('amount_agent_print')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('bp_id_tenant_n')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('bp_id_tenant_n')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体">${detail_item_l.getString('other_payment2_print')!''}</t></p>
<p align="center"><t fontSize="10" fontFamily="宋体">${detail_item_l.getString('other_payment2_print')!''}</t></p>
</tc>
<tc width="4">
<p align="center"><t fontSize="12" fontFamily="宋体"></t></p>
<p align="center"><t fontSize="10" fontFamily="宋体"></t></p>
</tc>
</tr>
</#list>
......@@ -209,7 +209,7 @@
<p indFirstLine="1" line="200" >
<t fontFamily="宋体" fontSize="12" fontColor="000000" >烦请贵司将款项汇至以下账号:</t>
</p>
<p line="50"/>
<p height="0.1"/>
<tbl indLeft="1" border="false">
<tr height="0.3">
<tc width="10">
......
......@@ -9,9 +9,13 @@ var override_queryfields = [
queryexpression:"t1.bp_name like ${@bp_name}"
},
{
field:'bp_category',
queryoperator:"="
},
name:'bp_type',
queryexpression:"exists (select 1 from hls_bp_master_role r where r.bp_id = t1.bp_id and r.bp_type like ${@bp_type})"
},
{
name:'bp_type_n',
queryexpression:"exists (select 1 from dual)"
},
{
name:'contract_id',
queryexpression:"exists (select 1 from con_contract_bp b where b.contract_id = ${@contract_id} and t1.bp_id=b.bp_id )"
......
<?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>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="acr.ACR512.alter_acr_invoice_status" trace="true"/>
</batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -3,6 +3,7 @@
<a:view>
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.screen"/>
<a:link id="acr512_invoice_ln_update_1_link" model="acr.ACR512.acr_invoice_update_query" modelaction="update"/>
<a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="update"/>
<script><![CDATA[
// var dynamic_document_id = '$c{/parameter/@document_id}';
// if ('$c{/parameter/@document_id}') {
......@@ -35,7 +36,50 @@
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + value + '</a>';
}
};
//发票确认
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var detail_mask = Ext.getBody();
var record_hd="${/parameter/@invoice_hd_id}";
//确认发票状态
var invoice_status='${/parameter/@invoice_status}';
if(invoice_status!='NEW' &&invoice_status!='REJECT'){
$L.showErrorMessage("提示",'发票状态有误!');
return;
}
Leaf.showConfirm('提示', "确认执行该操作?", function() {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: {
invoice_hd_id: record_hd,
want_status: 'CONFIRMING'
},
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
$('${/parameter/@winid}').close();
//$('${/parameter/@winid}').close();
},
error: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
},
scope: this
});
},function(){
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
})
}
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;
......@@ -82,10 +126,7 @@
merge_flag: $(acr_invoice_hd_ds_id).getCurrentRecord().get('merge_flag')
},
success: function() {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$(ds_batch_id).query();
//$('${/parameter/@winid}').close();
},
......
......@@ -11,6 +11,8 @@
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list" rootPath="acr512_business_type_list"/>
</a:init-procedure>
<a:view>
<a:link id="acr513_invoice_readonly_page"
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"/>
-->
......@@ -58,12 +60,22 @@
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
debugger
param['function_code'] = 'ACR512';
param['winid']='confirm_invoice_win';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
if(param['invoice_status']=='CONFIRMING'){
param['function_code'] = 'ACR512R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
}else{
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
}
}
function acr512_document_number_render(value, record, name) {
......
......@@ -20,6 +20,8 @@
url="${/request/@context_path}/modules/prj/PRJ312/dmegc_emp_loan_cn_print.lview"/>
<a:link id="cash_deposit_printt_link"
url="${/request/@context_path}/modules/acr/ACR513/cash_deposit_print.lview"/>
<a:link id="acr512_invoice_status_change" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_status_change.lsc"/>
<script type="text/javascript"><![CDATA[
function acr513_invoice_query() {
$('acr513_invoice_result_ds').query();
......@@ -41,9 +43,9 @@
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr513_invoice_readonly_page', 'acr513_invoice_result_ds');
}
function acr513_document_number_render(value, record, name) {
return '<a href="javascript:acr513_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
// function acr513_document_number_render(value, record, name) {
// return '<a href="javascript:acr513_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
// }
function acr513_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
......@@ -116,16 +118,74 @@
function acr513_invoice_confirm() {
var records = $('acr513_invoice_result_ds').getSelected();
if (records.length != 1) {
Leaf.showMessage('提示', '请选择一条数据');
if (records.length== 0) {
Leaf.showMessage('提示', '请至少选择一条数据进行确认!');
return;
}
if (records[0].get('created_by') == ' ${/session/@user_id}') {
for (var i=0;i<records.length;i++){
if (records[i].get('created_by') == ' ${/session/@user_id}') {
Leaf.showMessage('提示', '确认人不能和开票人一样,请勿确认!');
return;
}
if(records[i].get('invoice_status')!='CONFIRMING'){
Leaf.showMessage('提示', '选择的单据中存在状态不为复核中的单据!');
return;
}
}
Leaf.showConfirm("提示",'确认执行该操作?',function(){
$('acr513_invoice_result_ds').submitSelected();
});
}
function acr513_invoice_reject() {
var records = $('acr513_invoice_result_ds').getSelected();
var detail_mask=Ext.getBody();
if (records.length== 0) {
Leaf.showMessage('提示', '请至少选择一条数据!');
return;
}
var param = {};
var saveDate=[];
for (var i=0;i<records.length;i++){
if (records[i].get('created_by') == ' ${/session/@user_id}') {
Leaf.showMessage('提示', '审批人和开票人一样,不能操作!');
return;
}
if(records[i].get('invoice_status')!='CONFIRMING'){
Leaf.showMessage('提示', '选择的单据中存在状态不为复核中的单据!');
return;
}
saveDate.push({
invoice_hd_id :records[i].get('invoice_hd_id'),
want_status : 'REJECT'
});
}
param['details'] = saveDate;
console.log(param);
Leaf.showConfirm("提示",'确认退回所选择的单据?',function(){
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: param,
success: function() {
Leaf.Masker.unmask(detail_mask);
$('acr513_invoice_result_ds').query();
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
},function(){
Leaf.Masker.unmask(detail_mask);
})
}
function acr513_invoice_result_ds_submitsuccess(ds) {
......@@ -278,6 +338,8 @@
<a:toolbarButton click="acr513_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr513_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr513_invoice_confirm" text="CONFIRM"/>
<a:toolbarButton click="acr513_invoice_reject" text="审批拒绝"/>
<!--<a:toolbarButton click="acr513_invoice_confirm" text="CONFIRM"/>-->
<!-- <a:toolbarButton click="cash_deposit_print" text="保证金打印"/>-->
<!-- <a:toolbarButton click="acr513_print_receipt" text="收据打印"/> -->
</a:screenTopToolbar>
......
......@@ -76,14 +76,12 @@
});
try {
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
download_file(to_file_name, to_file_path);
} catch (e) {
raise_app_error(e);
......
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