Commit 0a50ba1f authored by stone's avatar stone

【fix】提交复核功能修改

parent 64ff0760
......@@ -3,7 +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"/>
<!-- <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}') {
......@@ -37,49 +37,49 @@
}
};
//发票确认
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}_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;
......
......@@ -11,6 +11,7 @@
<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="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="batch_update"/>
<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"/>
......@@ -20,6 +21,60 @@
<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"/>
<script><![CDATA[
//提交复核
function acr512_invoice_submit_selected(){
var records=$('acr512_invoice_result_ds').getSelected();
console.log(records)
if(records.length==0){
$L.showInfoMessage('提示','请至少选择一条数据!');
return;
}else{
//判断单据的状态
var datas=[];
for (var i=0;i<records.length;i++){
var data={};
var invoice_status=records[i].get('invoice_status');
if(invoice_status!='NEW' &&invoice_status!='REJECT'){
$L.showErrorMessage("提示",'发票状态有误!');
return;
}
data.invoice_hd_id=records[i].get('invoice_hd_id');
data.want_status='CONFIRMING';
data._status='update';
datas.push(data);
}
console.log(datas)
var detail_mask=Ext.getBody();
Leaf.showConfirm('提示', "确认执行该操作?", function() {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: datas,
success: function () {
$('acr512_invoice_result_ds').query();
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
//$('${/parameter/@winid}').close();
},
error: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
},
scope: this
});
},function(){
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
})
}
}
function lock_current_window() {
leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
......@@ -60,7 +115,6 @@
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;
......@@ -258,6 +312,7 @@
<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" text="HLS.SUBMIT"/>
-->
......
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