1.回租 普票,直租专票 优化

This commit is contained in:
zhangbb 2020-11-27 13:31:43 +08:00
parent 47556b4cc5
commit a82bc13459
10 changed files with 223 additions and 48 deletions

View File

@ -51,6 +51,7 @@
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
json["tax_code"] =getItemValue(0, ros[i], "tax_code");
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
json["telephone"] =getItemValue(0, ros[i], "telephone");
json["cert_id"] =getItemValue(0, ros[i], "cert_id");

View File

@ -47,12 +47,10 @@
reloadSelf();
}
function redInkInvoice(){
debugger;
var a = getItemValueArray(0,"contract_no");
//var ros = getCheckedRows(0);
var ros = [];
ros.push(getRow());
if(ros.length==0){
if(ros.length==0||getRow()==-1){
alert("ÇëÑ¡Ôñ");
return ;
}
@ -64,6 +62,8 @@
json["customer_name"] =getItemValue(0, ros[i], "customer_name");
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
json["tax_code"] =getItemValue(0, ros[i], "tax_code");
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
json["telephone"] =getItemValue(0, ros[i], "telephone");
json["cert_id"] =getItemValue(0, ros[i], "cert_id");

View File

@ -1,7 +1,8 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
CurPage.setAttribute("leaseForm", "01");
ASObjectModel doTemp = new ASObjectModel("Invoice_TJ_Leasedirect");
doTemp.appendJboWhere("O.liti_id is null");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
@ -34,7 +35,7 @@
AsControl.OpenView("/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmList.jsp", "","_self","");
}
function createInvoice(){
var ros = getCheckedRows(0);
var ros = getCheckedRows(0);
if(ros.length==0){
alert("请至少选择一条数据!");
return;
@ -48,6 +49,7 @@
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
json["tax_code"] =getItemValue(0, ros[i], "tax_code");
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
json["telephone"] =getItemValue(0, ros[i], "telephone");
json["cert_id"] =getItemValue(0, ros[i], "cert_id");

View File

@ -1,7 +1,9 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
CurPage.setAttribute("leaseForm", "01");
ASObjectModel doTemp = new ASObjectModel("Invoice_TJ_Leasedirect");
doTemp.appendJboWhere("O.invoice_status='Y'");
doTemp.setColumnAttribute("plan_list,tax_no,fpdm,fphm,hztzdh,tax_code", "colvisible", "1");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
@ -9,28 +11,73 @@
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
//{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
//{"true","","Button","返回","返回","returnList()","","","","btn_icon_return",""},
{"true","","Button","发票作废","发票作废","deleteInvoice()","","","","",""},
{"true","","Button","发票红冲","发票红冲","redInkInvoice()","","","","",""},
{"true","","Button","发票打印","发票打印","printInvoice()","","","","",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "";
AsControl.OpenView(sUrl,'','_self','');
function printInvoice(){
var fpdm= getItemValue(0, getRow(), "fpdm");
if(typeof(fpdm)=="undefined" || fpdm.length==0 ){
alert("不能为空");
return ;
}
var fphm= getItemValue(0, getRow(), "fphm");
var param = "fpzl=00,fpdm="+fpdm+",fphm="+fphm;
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice_pr", param);
alert(res);
reloadSelf();
}
function deleteInvoice(){
var fpdm= getItemValue(0, getRow(), "fpdm");
if(typeof(fpdm)=="undefined" || fpdm.length==0 ){
alert("不能为空");
return ;
}
var fphm= getItemValue(0, getRow(), "fphm");
var param = "fpzl=00,fpdm="+fpdm+",fphm="+fphm;
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice_fpzf", param);
alert(res);
reloadSelf();
}
function redInkInvoice(){
//var ros = getCheckedRows(0);
var ros = [];
ros.push(getRow());
if(ros.length==0||getRow()==-1){
alert("请选择");
return ;
}
function viewAndEdit(){
var sUrl = "/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmInfo.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
}
function returnList(){
AsControl.OpenView("/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmList.jsp", "","_self","");
var jsonArr=[];
var json={};
for(var i = 0; i < ros.length; i++){
var contract_no= getItemValue(0, ros[i], "contract_no");
json["contract_no"] =getItemValue(0, ros[i], "contract_no");
json["customer_name"] =getItemValue(0, ros[i], "customer_name");
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
json["tax_code"] =getItemValue(0, ros[i], "tax_code");
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
json["telephone"] =getItemValue(0, ros[i], "telephone");
json["cert_id"] =getItemValue(0, ros[i], "cert_id");
json["tax_ratio"] =getItemValue(0, ros[i], "tax_ratio");
json["customer_type"] =getItemValue(0, ros[i], "customer_type");
json["plan_list"] =getItemValue(0, ros[i], "plan_list");
json["HCFPDM"] =getItemValue(0, ros[i], "fpdm");
json["HCFPHM"] =getItemValue(0, ros[i], "fphm");
json["HCTZDH"] =getItemValue(0, ros[i], "hctzdh");
jsonArr.push(json);
json={};
}
var param = JSON.stringify(jsonArr);
param = "InvoiceParam="+param.replace(/,/g,'@')+",fpzl=00,fpzf=01";
// alert(param);
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice", param);
alert(res);
reloadSelf();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -1,7 +1,8 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
CurPage.setAttribute("leaseForm", "02");
ASObjectModel doTemp = new ASObjectModel("Invoice_TJ_Leaseback");
doTemp.appendJboWhere("O.liti_id is null");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--ÉèÖÃΪGrid·ç¸ñ--
dwTemp.ReadOnly = "1"; //Ö»¶Áģʽ
@ -49,6 +50,7 @@
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
json["tax_code"] =getItemValue(0, ros[i], "tax_code");
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
json["telephone"] =getItemValue(0, ros[i], "telephone");
json["cert_id"] =getItemValue(0, ros[i], "cert_id");

View File

@ -1,8 +1,9 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
CurPage.setAttribute("leaseForm", "02");
ASObjectModel doTemp = new ASObjectModel("Invoice_TJ_Leaseback");
doTemp.appendJboWhere("O.fpdm is not null or O.fpdm=''");
doTemp.appendJboWhere("O.invoice_status='Y'");
doTemp.setColumnAttribute("plan_list,tax_no,fpdm,fphm,hztzdh,tax_code", "colvisible", "1");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
@ -10,28 +11,73 @@
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
//{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
//{"true","","Button","返回","返回","returnList()","","","","btn_icon_return",""},
{"true","","Button","发票作废","发票作废","deleteInvoice()","","","","",""},
{"true","","Button","发票红冲","发票红冲","redInkInvoice()","","","","",""},
{"true","","Button","发票打印","发票打印","printInvoice()","","","","",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var sUrl = "";
AsControl.OpenView(sUrl,'','_self','');
function printInvoice(){
var fpdm= getItemValue(0, getRow(), "fpdm");
if(typeof(fpdm)=="undefined" || fpdm.length==0 ){
alert("不能为空");
return ;
}
var fphm= getItemValue(0, getRow(), "fphm");
var param = "fpzl=02,fpdm="+fpdm+",fphm="+fphm;
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice_pr", param);
alert(res);
reloadSelf();
}
function deleteInvoice(){
var fpdm= getItemValue(0, getRow(), "fpdm");
if(typeof(fpdm)=="undefined" || fpdm.length==0 ){
alert("不能为空");
return ;
}
var fphm= getItemValue(0, getRow(), "fphm");
var param = "fpzl=02,fpdm="+fpdm+",fphm="+fphm;
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice_fpzf", param);
alert(res);
reloadSelf();
}
function redInkInvoice(){
//var ros = getCheckedRows(0);
var ros = [];
ros.push(getRow());
if(ros.length==0||getRow()==-1){
alert("请选择");
return ;
}
function viewAndEdit(){
var sUrl = "/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmInfo.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
}
function returnList(){
AsControl.OpenView("/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmList.jsp", "","_self","");
var jsonArr=[];
var json={};
for(var i = 0; i < ros.length; i++){
var contract_no= getItemValue(0, ros[i], "contract_no");
json["contract_no"] =getItemValue(0, ros[i], "contract_no");
json["customer_name"] =getItemValue(0, ros[i], "customer_name");
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
json["tax_code"] =getItemValue(0, ros[i], "tax_code");
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
json["telephone"] =getItemValue(0, ros[i], "telephone");
json["cert_id"] =getItemValue(0, ros[i], "cert_id");
json["tax_ratio"] =getItemValue(0, ros[i], "tax_ratio");
json["customer_type"] =getItemValue(0, ros[i], "customer_type");
json["plan_list"] =getItemValue(0, ros[i], "plan_list");
json["HCFPDM"] =getItemValue(0, ros[i], "fpdm");
json["HCFPHM"] =getItemValue(0, ros[i], "fphm");
json["HCTZDH"] =getItemValue(0, ros[i], "hctzdh");
jsonArr.push(json);
json={};
}
var param = JSON.stringify(jsonArr);
param = "InvoiceParam="+param.replace(/,/g,'@')+",fpzl=02,fpzf=01";
// alert(param);
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice", param);
alert(res);
reloadSelf();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -4402,8 +4402,10 @@
<attributes>
<attribute name="contract_id" label="contract_id" type="STRING"/>
<attribute name="contract_no" label="contract_no" type="STRING"/>
<attribute name="plan_list" label="plan_list" type="STRING"/>
<attribute name="invoice_money" label="invoice_money" type="STRING"/>
<attribute name="tax_type" label="tax_type" type="STRING"/>
<attribute name="tax_no" label="tax_no" type="STRING"/>
<attribute name="cert_id" label="cert_id" type="STRING"/>
<attribute name="account" label="account" type="STRING"/>
<attribute name="acc_number" label="acc_number" type="STRING"/>
@ -4412,6 +4414,13 @@
<attribute name="customer_type" label="customer_type" type="STRING"/>
<attribute name="customer_name" label="customer_name" type="STRING"/>
<attribute name="tax_ratio" label="tax_ratio" type="STRING"/>
<attribute name="invoice_status" label="invoice_status" type="STRING"/>
<attribute name="fpdm" label="fpdm" type="STRING"/>
<attribute name="fphm" label="fphm" type="STRING"/>
<attribute name="hztzdh" label="hztzdh" type="STRING"/>
<attribute name="liti_id" label="liti_id" type="STRING"/>
<attribute name="mxxh" label="mxxh" type="STRING"/>
<attribute name="tax_code" label="tax_code" type="STRING"/>
</attributes>
<manager>
<managerProperties>

View File

@ -31,6 +31,7 @@ public class IAutokpXML {
Map<String,String> mapi = new HashMap<>();
mapi.put("tax_type", obj.getString("tax_type"));
mapi.put("tax_no", obj.getString("tax_no"));
mapi.put("tax_code", obj.getString("tax_code"));
mapi.put("invoice_money",obj.getString("invoice_money"));
mapi.put("tax_ratio",obj.getString("tax_ratio"));
mapi.put("customer_name",obj.getString("customer_name"));
@ -57,9 +58,9 @@ public class IAutokpXML {
String HCFPHM= obj.getString("HCFPHM");
String mapKey = HCFPDM + "@" + HCFPHM;
Map<String,String> mapi = new HashMap<>();
mapi.put("MXXH",i+1+"");
mapi.put("tax_type", obj.getString("tax_type"));
mapi.put("tax_no", obj.getString("tax_no"));
mapi.put("tax_code", obj.getString("tax_code"));
mapi.put("invoice_money","-"+obj.getString("invoice_money"));
mapi.put("tax_ratio",obj.getString("tax_ratio"));
mapi.put("customer_name",obj.getString("customer_name"));
@ -173,6 +174,7 @@ public class IAutokpXML {
String JE = params.getValue().get(i).get("invoice_money");
String SLV ="0." + params.getValue().get(i).get("tax_ratio");
String SPMC = params.getValue().get(i).get("tax_type");
String taxCode = params.getValue().get(i).get("tax_code");
if(i==0){
String GFMC = params.getValue().get(i).get("customer_name");
Ele_GFMC.setText(GFMC);
@ -214,8 +216,7 @@ public class IAutokpXML {
Element Ele_GOODSNOVER = Ele_ITEM.addElement("goodsnover");
Ele_GOODSNOVER.setText("13.0");
Element Ele_SPBM = Ele_ITEM.addElement("sw_spbm");
//待客户确认
Ele_SPBM.setText("3040203");
Ele_SPBM.setText(taxCode);
Element Ele_YHZCBS = Ele_ITEM.addElement("YHZCBS");
Ele_YHZCBS.setText("0");
Element Ele_TAXPRECON = Ele_ITEM.addElement("TAXPRECON");

View File

@ -22,6 +22,10 @@ public interface VI_LI_INVOICE_TJ_LEASEDIRECT{
*/
public static final String contract_no = "contract_no";
/**
* plan_list STRING(20)<br>
*/
public static final String plan_list = "plan_list";
/**
* invoice_money STRING(20)<br>
*/
public static final String invoice_money = "invoice_money";
@ -30,6 +34,10 @@ public interface VI_LI_INVOICE_TJ_LEASEDIRECT{
*/
public static final String tax_type = "tax_type";
/**
* tax_no STRING(20)<br>
*/
public static final String tax_no = "tax_no";
/**
* cert_id STRING(20)<br>
*/
public static final String cert_id = "cert_id";
@ -61,4 +69,32 @@ public interface VI_LI_INVOICE_TJ_LEASEDIRECT{
* tax_ratio STRING(20)<br>
*/
public static final String tax_ratio = "tax_ratio";
/**
* invoice_status STRING(20)<br>
*/
public static final String invoice_status = "invoice_status";
/**
* fpdm STRING(20)<br>
*/
public static final String fpdm = "fpdm";
/**
* fphm STRING(20)<br>
*/
public static final String fphm = "fphm";
/**
* hztzdh STRING(20)<br>
*/
public static final String hztzdh = "hztzdh";
/**
* liti_id STRING(20)<br>
*/
public static final String liti_id = "liti_id";
/**
* mxxh STRING(20)<br>
*/
public static final String mxxh = "mxxh";
/**
* tax_code STRING(20)<br>
*/
public static final String tax_code = "tax_code";
}

View File

@ -0,0 +1,31 @@
package com.tenwa.flow.rent.rentincome;
import jbo.com.tenwa.entity.comm.taxinfo.TAX_INFO;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
public class TaxRatioListHandler extends CommonHandler{
@Override
protected void initDisplayForEdit(BizObject bo) throws Exception {
String taxNo = bo.getAttribute("tax_no").toString();
String leaseForm = this.asPage.getAttribute("leaseForm");
String feeType="";
switch(taxNo){
case "interest":feeType="INTEREST_RATE";break;
case "penalty":feeType="break_money";break;
case "rent":feeType="rent";break;
case "feetype1":feeType="HAND_RATE";break;
case "feetype24":feeType="gps_install_fee";break;
case "feetype30":feeType="penalty";break;
case "feetype4":feeType="NOMINAL_RATE";break;
default:feeType="1";break;
}
String sql = "select "+feeType+" from O where id in('5ceefeccd3af4db8a98d41c203c9dbe9','7672ff2fa48046ebbaf905c02e993221') and lease_form='"+leaseForm+"'" ;
String taxRatio = JBOFactory.getBizObjectManager(TAX_INFO.CLASS_NAME)
.createQuery(sql).getSingleResult(false).getAttribute(feeType).getString();
bo.setAttributeValue("tax_ratio", taxRatio);
}
}