Commit d95ee3f7 authored by stone's avatar stone

【fix】发票认领功能的开发。报价页面的修改

parent 1ad91cae
......@@ -213,6 +213,7 @@
<bm:data-filter enforceOperations="query" expression="vv.cf_status = &apos;RELEASE&apos;"/>
<bm:data-filter enforceOperations="query" expression="nvl(vv.billing_status,&apos;NOT&apos;) != &apos;FULL&apos; and vv.cf_direction=&apos;INFLOW&apos;"/>
<bm:data-filter name="contract_status" enforceOperations="query" expression="vv.contract_status in(&apos;NEW&apos;,&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;CLOSED&apos;)"/>
<bm:data-filter name="due_amount" enforceOperations="query" expression="vv.due_amount &lt;&gt; 0"/>
</bm:data-filters>
</bm:model>
......@@ -73,6 +73,7 @@
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>
<bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>
<bm:data-filter name="query" expression="rownum &lt;=1000"/>
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<!-- <bm:data-filter name="query" expression="rownum &lt;=1000"/>-->
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM acr_invoice_hd_v t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
acr_invoice_claim_pkg.apply_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &gt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_kind_desc" queryExpression="t1.invoice_kind_desc = ${@invoice_kind_desc}"/>
<bm:query-field name="invoice_status_desc" queryExpression="t1.invoice_status_desc = ${@invoice_status_desc}"/>
<bm:query-field name="claim_status" queryExpression="t1.claim_status = ${@claim_status}"/>
<bm:query-field name="claim_status_n" queryExpression="t1.claim_status_n = ${@claim_status_n}"/>
<bm:query-field name="cf_item_desc" queryExpression="t1.cf_item_desc = ${@cf_item_desc}"/>
<bm:query-field name="document_number" queryExpression="t1.document_number = ${@document_number}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name = ${@contract_name}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title = ${@invoice_title}"/>
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code = ${@invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number = ${@invoice_number}"/>
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<!-- <bm:data-filter name="query" expression="rownum &lt;=1000"/>-->
</bm:data-filters>
</bm:model>
......@@ -65,6 +65,7 @@
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>
<bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>
<bm:data-filter name="query" expression="rownum &lt;=1000"/>
<bm:data-filter enforceOperations="query" expression="t1.claim_status in(&apos;CLAIMING&apos;,&apos;CONFIRMED&apos;)"/>
<!-- <bm:data-filter name="query" expression="rownum &lt;=1000"/>-->
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM acr_invoice_hd_v t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
acr_invoice_claim_pkg.apply_invoice_confirm(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &gt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_kind_desc" queryExpression="t1.invoice_kind_desc = ${@invoice_kind_desc}"/>
<bm:query-field name="invoice_status_desc" queryExpression="t1.invoice_status_desc = ${@invoice_status_desc}"/>
<bm:query-field name="claim_status" queryExpression="t1.claim_status = ${@claim_status}"/>
<bm:query-field name="claim_status_n" queryExpression="t1.claim_status_n = ${@claim_status_n}"/>
<bm:query-field name="cf_item_desc" queryExpression="t1.cf_item_desc = ${@cf_item_desc}"/>
<bm:query-field name="document_number" queryExpression="t1.document_number = ${@document_number}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name = ${@contract_name}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title = ${@invoice_title}"/>
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code = ${@invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number = ${@invoice_number}"/>
<bm:query-field name="query_contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.claim_status not in ( &apos;UNCLAIMED&apos;)"/>
<!-- <bm:data-filter name="query" expression="rownum &lt;=1000"/>-->
</bm:data-filters>
</bm:model>
var add_datafilters = [ {
name : 'project_id',
expression : "t1.project_id=${@project_id}"
} ];
add_datafilter();
......@@ -14,9 +14,14 @@
}
function acr516_invoice_apply() {
$L.showConfirm("提示",'确认执行该操作?',function(){
$('acr516_invoice_result_ds').submitSelected();
}
})
}
function submit_success_btn(){
$('acr516_invoice_result_ds').query();
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -36,7 +41,7 @@
<a:field name="total_amount"/>
<a:field name="cf_item"/>
<a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item" valueField="cf_item"/>
<a:field name="claim_status" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/>
<a:field name="claim_status_n" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/>
<a:field name="cf_item_desc" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="acr.ACR510.hls_cashflow_item_v_lov" lovWidth="520" title="现金流项目">
<a:mapping>
<a:map from="cf_item" to="cf_item"/>
......@@ -48,7 +53,10 @@
</a:fields>
</a:dataSet>
<a:dataSet id="acr516_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR604.acr_invoice_claim_application" queryDataSet="acr516_invoice_query_ds" selectable="true">
model="acr.ACR604.acr_invoice_claim_application_new" queryDataSet="acr516_invoice_query_ds" selectable="true">
<a:events>
<a:event name="submitsuccess" handler="submit_success_btn"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
......@@ -70,7 +78,7 @@
<a:comboBox name="invoice_status_desc" bindTarget="acr516_invoice_query_ds" prompt="发票状态" width="135"/>
<a:textField name="invoice_code" bindTarget="acr516_invoice_query_ds" prompt="发票代码" width="135"/>
<a:textField name="invoice_number" bindTarget="acr516_invoice_query_ds" prompt="发票号码" width="135"/>
<a:comboBox name="claim_status" bindTarget="acr516_invoice_query_ds" prompt="认领状态" width="135"/>
<a:comboBox name="claim_status_n" bindTarget="acr516_invoice_query_ds" prompt="认领状态" width="135"/>
</a:form>
<a:grid id="acr516_invoice_grid_id" bindTarget="acr516_invoice_result_ds" marginHeight="225" marginWidth="30" navBar="true">
<a:columns>
......@@ -95,8 +103,8 @@
<a:column name="accounting_date" renderer="Leaf.formatDate" prompt="期间序号" width="100"/>
<a:column name="create_je_flag" prompt="凭证标志" width="60"/>
<a:column name="bp_tax_registry_num" prompt="纳税人识别号"/>
<a:column name="ele_invoice_status_desc" prompt="电子发票状态"/>
<a:column name="swno" prompt="电子发票流水号" width="100"/>
<!-- <a:column name="ele_invoice_status_desc" prompt="电子发票状态"/>-->
<!-- <a:column name="swno" prompt="电子发票流水号" width="100"/>-->
<a:column name="claim_status_n" prompt="认领状态" width="100"/>
</a:columns>
</a:grid>
......
......@@ -6,6 +6,8 @@
<a:view>
<a:link id="bmLink_acr_invoice_return" model="acr.ACR605.acr_invoice_claim_return" modelaction="update"/>
<a:link id="bmLink_acr_invoice_claim_confirm" model="acr.ACR605.acr_invoice_claim_confirm" modelaction="update"/>
<a:link id="acr_invoice_refuse_link_id" model="acr.ACR605.acr_invoice_claim_return" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function acr517_invoice_query() {
$('acr517_invoice_result_ds').query();
......@@ -16,47 +18,66 @@
}
function acr517_invoice_confirm() {
var record = $('acr517_invoice_result_ds').getCurrentRecord();
// var records = $('acr517_invoice_result_ds').getSelected();
$('acr517_invoice_result_ds').setSubmitUrl('${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update');
$L.showConfirm("提示",'确认执行该操作?',function(){
$('acr517_invoice_result_ds').submitSelected();
})
// alert(record.get('invoice_hd_id'));
// debugger;
invoice_hd_id = record.get('invoice_hd_id');
Leaf.request({
url: $("bmLink_acr_invoice_claim_confirm").getUrl(),
para: {
invoice_hd_id:invoice_hd_id
},
success:function(){
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
},
sync:true,
scope: this
});
// var invoice_hd_id = record.get('invoice_hd_id');
// Leaf.request({
// url: $("bmLink_acr_invoice_claim_confirm").getUrl(),
// para: {
// invoice_hd_id:invoice_hd_id
// },
// success:function(){
// $('acr517_invoice_result_ds').query();
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
// },
// sync:true,
// scope: this
// });
}
function acr517_invoice_return() {
var record = $('acr517_invoice_result_ds').getCurrentRecord();
// console.log($('acr517_invoice_result_ds'));
// return;
// var record = $('acr517_invoice_result_ds').getCurrentRecord();
var url=$('acr_invoice_refuse_link_id').getUrl();
$('acr517_invoice_result_ds').setSubmitUrl(url);
$L.showConfirm("提示",'确认执行该操作?',function(){
$('acr517_invoice_result_ds').submitSelected();
})
// alert(record.get('invoice_hd_id'));
// debugger;
invoice_hd_id = record.get('invoice_hd_id');
Leaf.request({
url: $("bmLink_acr_invoice_return").getUrl(),
para: {
invoice_hd_id:invoice_hd_id,
},
success:function(){
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
},
sync:true,
scope: this
});
// invoice_hd_id = record.get('invoice_hd_id');
// Leaf.request({
// url: $("bmLink_acr_invoice_return").getUrl(),
// para: {
// invoice_hd_id:invoice_hd_id,
// },
// success:function(){
// $('acr517_invoice_result_ds').query();
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
// },
// sync:true,
// scope: this
// });
}
function submit_success_btn(){
$('acr517_invoice_result_ds').query();
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......@@ -90,7 +111,10 @@
</a:fields>
</a:dataSet>
<a:dataSet id="acr517_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR605.acr_invoice_claim_confirm" queryDataSet="acr517_invoice_query_ds" selectable="true">
model="acr.ACR605.acr_invoice_claim_confirm_new" queryDataSet="acr517_invoice_query_ds" selectable="true">
<a:events>
<a:event name="submitsuccess" handler="submit_success_btn"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
......@@ -138,8 +162,8 @@
<a:column name="accounting_date" renderer="Leaf.formatDate" prompt="期间序号" width="100"/>
<a:column name="create_je_flag" prompt="凭证标志" width="60"/>
<a:column name="bp_tax_registry_num" prompt="纳税人识别号"/>
<a:column name="ele_invoice_status_desc" prompt="电子发票状态"/>
<a:column name="swno" prompt="电子发票流水号" width="100"/>
<!-- <a:column name="ele_invoice_status_desc" prompt="电子发票状态"/>-->
<!-- <a:column name="swno" prompt="电子发票流水号" width="100"/>-->
<a:column name="claim_status_n" prompt="认领状态" width="100"/>
</a:columns>
</a:grid>
......
......@@ -525,8 +525,8 @@
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}if(name == 'bp_id_tenant'){
......
......@@ -17,6 +17,8 @@
</s:server-script>
</a:init-procedure>
<a:view>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
model="cont.CON500.con_contract_get_special_fields" modelaction="update"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
......@@ -486,6 +488,43 @@ function prj501n_contract_number_renderer(id, name, query_only){
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
//选择承租人带出开票信息
if(prj_project_ds_id==ds.id &&prj_project_ds_id){
if(name=="bp_id_tenant" && value){
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('hls_bp_master_billing_link').getUrl(),
para: {
bp_id:value
},
success: function(res) {
var billing_into=res.result.record;
var prj_project_bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_bp');
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type_n',billing_into.taxpayer_type_n);
$(prj_project_bp_ds_id).getAt(0).set('taxpayer_type',billing_into.taxpayer_type);
$(prj_project_bp_ds_id).getAt(0).set('invoice_title',billing_into.invoice_title);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_address',billing_into.invoice_bp_address);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_phone_num',billing_into.invoice_bp_phone_num);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank',billing_into.invoice_bp_bank);
$(prj_project_bp_ds_id).getAt(0).set('invoice_bp_bank_account',billing_into.invoice_bp_bank_account);
$(prj_project_bp_ds_id).getAt(0).set('tax_registry_num',billing_into.tax_registry_num);
$(prj_project_bp_ds_id).getAt(0).set('ref_v07',billing_into.ref_v07);
//record.set();
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}
if(name=='pay_method'){
if ( record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id',null);
......@@ -499,8 +538,8 @@ function prj501n_contract_number_renderer(id, name, query_only){
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}
......
......@@ -509,6 +509,11 @@ function prj501n_contract_number_renderer(id, name, query_only){
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
//ADD BY SHEN
var billing_ds_id=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_bp');
// console.log('${/parameter/@project_id}');
$(billing_ds_id).setQueryParameter("project_id",'${/parameter/@project_id}');
$(billing_ds_id).query();
})
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
......@@ -598,6 +603,8 @@ function prj501n_contract_number_renderer(id, name, query_only){
if ( record.get('pay_method') == 'WIRE_TRANSFER') {
record.set('bank_account_id',null);
record.set('bank_account_id_n',null);
record.set('bank_branch_num','');
record.set('bank_account_name','');
record.getField('bank_account_id').setReadOnly(true);
record.getField('bank_account_id_n').setReadOnly(true);
record.getField('bank_account_id').setRequired(false);
......@@ -605,8 +612,8 @@ function prj501n_contract_number_renderer(id, name, query_only){
} else {
record.getField('bank_account_id').setReadOnly(false);
record.getField('bank_account_id_n').setReadOnly(false);
record.getField('bank_account_id').setRequired(true);
record.getField('bank_account_id_n').setRequired(true);
record.getField('bank_account_id').setRequired(false);
record.getField('bank_account_id_n').setRequired(false);
}
}
......
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