Commit 00479ad3 authored by stone's avatar stone

【fix】增值税台账功能修改

parent cfb12fe5
......@@ -43,7 +43,7 @@
WHERE t.session_id=${/session/@session_id}
) t1
#WHERE_CLAUSE#
-- order by invoice_hd_id
order by invoice_hd_id
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......
......@@ -12,67 +12,41 @@
<a:link id="process_vat_account_data_link" model="rpt.RPT555.con_je_vat_total_query" modelaction="update"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_SUM_RESULT', 'con_contract');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
if(ds.id==form_ds_id) {
if (name == 'base_period') {
if (value != old_value) {
var detail_mask = Ext.getBody();
var base_peroids = $(form_ds_id).getAt(0).get('base_period');
Leaf.Masker.mask(detail_mask, '正在查询中。。。');
Leaf.request({
url: $('process_vat_account_data_link').getUrl(),
para: {
base_period: base_peroids,
tmp_date: new Date()
},
success: function () {
Leaf.Masker.unmask(detail_mask);
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
}
}
};
// window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
// var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
// if(ds.id == form_ds_id){
// record.set('base_period',new Date().format('yyyymm').toString());
// record.set('base_period_n',new Date().format('yyyy-mm').toString());
//
// }
// };
//查询时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
//查询数据
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
if($(form_ds_id).getAt(0).get('base_period')){
var grid_ds_id_before= get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BEFORE_RESULT', 'con_contract');
var grid_ds_id_current= get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CURRENT_RESULT', 'con_contract');
var grid_ds_id_total= get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SUM_RESULT', 'con_contract');
if(ds.id==grid_ds_id_before){
ds.setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_query/query');
}else if(ds.id==grid_ds_id_current){
ds.setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_current_query/query');
}else if(ds.id==grid_ds_id_total) {
//先进行数据的处理
ds.setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_total_query/query');
}
}else{
// $L.showInfoMessage("提示",'基准期间不能为空');
return;
}
var grid_ds_id_before = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_BEFORE_RESULT', 'con_contract');
var grid_ds_id_current = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CURRENT_RESULT', 'con_contract');
var grid_ds_id_total = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SUM_RESULT', 'con_contract');
$(grid_ds_id_before).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_query/query');
$(grid_ds_id_current).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_current_query/query');
//先进行数据的处理
$(grid_ds_id_total).setQueryUrl('${/request/@context_path}/autocrud/rpt.RPT555.con_je_vat_total_query/query');
var detail_mask = Ext.getBody();
$(grid_ds_id_before).setQueryDataSet($(form_ds_id));
$(grid_ds_id_current).setQueryDataSet($(form_ds_id));
$(grid_ds_id_total).setQueryDataSet($(form_ds_id));
$(grid_ds_id_before).query();
$(grid_ds_id_current).query();
Leaf.Masker.mask(detail_mask, '正在保存中。。。');
Leaf.request({
url: $('process_vat_account_data_link').getUrl(),
para: {
base_period: $(form_ds_id).getAt(0).get('base_period'),
tmp_date: new Date()
},
success: function () {
Leaf.Masker.unmask(detail_mask);
$(grid_ds_id_total).query();
},
failure: function () {
Leaf.Masker.unmask(detail_mask);
},
error: function () {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
};
]]></script>
......
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