Commit 545bdf34 authored by 18083's avatar 18083

修改茂甲销项税发票邮件发送逻辑

parent b429cede
...@@ -92,19 +92,25 @@ ...@@ -92,19 +92,25 @@
Leaf.showMessage('提示','请勾选认领状态为已确认的单据'); Leaf.showMessage('提示','请勾选认领状态为已确认的单据');
return; return;
} }
if(records[i].get('invoice_type') != 'ECT'){ //18083 2022/11/24
if(records[i].get('invoice_kind_type') != 'ELECTRONIC_GENERAL' && records[i].get('invoice_kind_type') != 'ELECTRONIC_SPECIAL'){
Leaf.showMessage('提示','请勾选电子发票进行发送'); Leaf.showMessage('提示','请勾选电子发票进行发送');
return; return;
} }
if(records[i].get('division') == '70'){ // if(records[i].get('invoice_type') != 'ECT'){
if(!r_map.has(records[i].get('bp_id_agent_level1'))){ //Leaf.showMessage('提示','请勾选电子发票进行发送');
var arr = new Array(); //return;
arr.add(records[i].get('invoice_hd_id')); //}
r_map.set(records[i].get('bp_id_agent_level1'),arr); //if(records[i].get('division') == '70'){
}else{ // if(!r_map.has(records[i].get('bp_id_agent_level1'))){
r_map.get(records[i].get('bp_id_agent_level1')).add(records[i].get('invoice_hd_id')); //var arr = new Array();
} // arr.add(records[i].get('invoice_hd_id'));
} else if(!r_map.has(records[i].get('invoice_bp_id'))){ // r_map.set(records[i].get('bp_id_agent_level1'),arr);
// }else{
// r_map.get(records[i].get('bp_id_agent_level1')).add(records[i].get('invoice_hd_id'));
//}
//} else
if(!r_map.has(records[i].get('invoice_bp_id'))){
var arr = new Array(); var arr = new Array();
arr.add(records[i].get('invoice_hd_id')); arr.add(records[i].get('invoice_hd_id'));
r_map.set(records[i].get('invoice_bp_id'),arr); r_map.set(records[i].get('invoice_bp_id'),arr);
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
// $('acr517_invoice_result_ds').setSubmitUrl('${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update'); // $('acr517_invoice_result_ds').setSubmitUrl('${/request/@context_path}/autocrud/acr.ACR605.acr_invoice_claim_confirm_new/batch_update');
var records=$('acr517_invoice_result_ds').getSelected(); var records=$('acr517_invoice_result_ds').getSelected();
debugger;
var datas = []; var datas = [];
var r_map = new Map(); var r_map = new Map();
for (var i = 0;i < records.length;i++) { for (var i = 0;i < records.length;i++) {
...@@ -51,15 +50,17 @@ ...@@ -51,15 +50,17 @@
'invoice_hd_id':records[i].get('invoice_hd_id'), 'invoice_hd_id':records[i].get('invoice_hd_id'),
'_status': 'update' '_status': 'update'
}) })
if(records[i].get('division') == '70'){ //铁甲业务去掉特殊处理,与非铁甲业务保持一致 18083 2022/12/8
if(!r_map.has(records[i].get('bp_id_agent_level1'))){ //if(records[i].get('division') == '70'){
var arr = new Array(); // if(!r_map.has(records[i].get('bp_id_agent_level1'))){
arr.add(records[i].get('invoice_hd_id')); // var arr = new Array();
r_map.set(records[i].get('bp_id_agent_level1'),arr); // arr.add(records[i].get('invoice_hd_id'));
}else{ // r_map.set(records[i].get('bp_id_agent_level1'),arr);
r_map.get(records[i].get('bp_id_agent_level1')).add(records[i].get('invoice_hd_id')); // }else{
} // r_map.get(records[i].get('bp_id_agent_level1')).add(records[i].get('invoice_hd_id'));
} else if(records[i].get('invoice_type') == 'ECT'){ // }
// } else if(records[i].get('invoice_type') == 'ECT'){
if(records[i].get('invoice_kind_type') == 'ELECTRONIC_GENERAL' || records[i].get('invoice_kind_type') == 'ELECTRONIC_SPECIAL'){
if(!r_map.has(records[i].get('invoice_bp_id'))){ if(!r_map.has(records[i].get('invoice_bp_id'))){
var arr = new Array(); var arr = new Array();
arr.add(records[i].get('invoice_hd_id')); arr.add(records[i].get('invoice_hd_id'));
...@@ -67,7 +68,7 @@ ...@@ -67,7 +68,7 @@
}else{ }else{
r_map.get(records[i].get('invoice_bp_id')).add(records[i].get('invoice_hd_id')); r_map.get(records[i].get('invoice_bp_id')).add(records[i].get('invoice_hd_id'));
} }
} }
} }
var result_map = MapTOJson(r_map); var result_map = MapTOJson(r_map);
$L.showConfirm("提示",'确认执行该操作?',function(){ $L.showConfirm("提示",'确认执行该操作?',function(){
......
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