zhangsiqi
3 months ago
37 changed files with 2550 additions and 268 deletions
@ -0,0 +1,197 @@ |
|||
package com.ruoyi.financial.domain; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 国税发票历史记录对象 financial_tax_invoice_history |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-14 |
|||
*/ |
|||
public class FinancialTaxInvoiceHistory extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 国税发票历史id */ |
|||
private Long invoiceHistoryId; |
|||
|
|||
/** 国税发票单号 */ |
|||
@Excel(name = "国税发票单号") |
|||
private String taxInvoiceCode; |
|||
|
|||
/** 销售订单编号 */ |
|||
private String salesOrderCode; |
|||
|
|||
/** 发票状态(0待审核、1待开具、2已开具、3审核拒绝) */ |
|||
@Excel(name = "发票状态(0待审核、1待开具、2已开具、3审核拒绝)") |
|||
private String taxInvoiceStatus; |
|||
|
|||
/** 申请时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
private Date applyTime; |
|||
|
|||
/** 财务员 */ |
|||
@Excel(name = "财务员") |
|||
private String financeMembers; |
|||
|
|||
/** 开票额度比例 */ |
|||
@Excel(name = "开票额度比例") |
|||
private BigDecimal invoiceQuotaRatio; |
|||
|
|||
/** 开票金额(RMB) */ |
|||
@Excel(name = "开票金额(RMB)") |
|||
private BigDecimal invoiceAmountRmb; |
|||
|
|||
/** 开票金额(美元) */ |
|||
@Excel(name = "开票金额(美元)") |
|||
private BigDecimal invoiceAmountUsd; |
|||
|
|||
/** 开票用途 */ |
|||
@Excel(name = "开票用途") |
|||
private String invoicePurpose; |
|||
|
|||
/** 使用状态(1是、0否、2已作废) */ |
|||
private String useStatus; |
|||
|
|||
/** 删除标志 0正常 1删除 */ |
|||
private String delFlag; |
|||
|
|||
public void setInvoiceHistoryId(Long invoiceHistoryId) |
|||
{ |
|||
this.invoiceHistoryId = invoiceHistoryId; |
|||
} |
|||
|
|||
public Long getInvoiceHistoryId() |
|||
{ |
|||
return invoiceHistoryId; |
|||
} |
|||
public void setTaxInvoiceCode(String taxInvoiceCode) |
|||
{ |
|||
this.taxInvoiceCode = taxInvoiceCode; |
|||
} |
|||
|
|||
public String getTaxInvoiceCode() |
|||
{ |
|||
return taxInvoiceCode; |
|||
} |
|||
public void setSalesOrderCode(String salesOrderCode) |
|||
{ |
|||
this.salesOrderCode = salesOrderCode; |
|||
} |
|||
|
|||
public String getSalesOrderCode() |
|||
{ |
|||
return salesOrderCode; |
|||
} |
|||
public void setTaxInvoiceStatus(String taxInvoiceStatus) |
|||
{ |
|||
this.taxInvoiceStatus = taxInvoiceStatus; |
|||
} |
|||
|
|||
public String getTaxInvoiceStatus() |
|||
{ |
|||
return taxInvoiceStatus; |
|||
} |
|||
public void setApplyTime(Date applyTime) |
|||
{ |
|||
this.applyTime = applyTime; |
|||
} |
|||
|
|||
public Date getApplyTime() |
|||
{ |
|||
return applyTime; |
|||
} |
|||
public void setFinanceMembers(String financeMembers) |
|||
{ |
|||
this.financeMembers = financeMembers; |
|||
} |
|||
|
|||
public String getFinanceMembers() |
|||
{ |
|||
return financeMembers; |
|||
} |
|||
public void setInvoiceQuotaRatio(BigDecimal invoiceQuotaRatio) |
|||
{ |
|||
this.invoiceQuotaRatio = invoiceQuotaRatio; |
|||
} |
|||
|
|||
public BigDecimal getInvoiceQuotaRatio() |
|||
{ |
|||
return invoiceQuotaRatio; |
|||
} |
|||
public void setInvoiceAmountRmb(BigDecimal invoiceAmountRmb) |
|||
{ |
|||
this.invoiceAmountRmb = invoiceAmountRmb; |
|||
} |
|||
|
|||
public BigDecimal getInvoiceAmountRmb() |
|||
{ |
|||
return invoiceAmountRmb; |
|||
} |
|||
public void setInvoiceAmountUsd(BigDecimal invoiceAmountUsd) |
|||
{ |
|||
this.invoiceAmountUsd = invoiceAmountUsd; |
|||
} |
|||
|
|||
public BigDecimal getInvoiceAmountUsd() |
|||
{ |
|||
return invoiceAmountUsd; |
|||
} |
|||
public void setInvoicePurpose(String invoicePurpose) |
|||
{ |
|||
this.invoicePurpose = invoicePurpose; |
|||
} |
|||
|
|||
public String getInvoicePurpose() |
|||
{ |
|||
return invoicePurpose; |
|||
} |
|||
public void setUseStatus(String useStatus) |
|||
{ |
|||
this.useStatus = useStatus; |
|||
} |
|||
|
|||
public String getUseStatus() |
|||
{ |
|||
return useStatus; |
|||
} |
|||
public void setDelFlag(String delFlag) |
|||
{ |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getDelFlag() |
|||
{ |
|||
return delFlag; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("invoiceHistoryId", getInvoiceHistoryId()) |
|||
.append("taxInvoiceCode", getTaxInvoiceCode()) |
|||
.append("salesOrderCode", getSalesOrderCode()) |
|||
.append("taxInvoiceStatus", getTaxInvoiceStatus()) |
|||
.append("applyTime", getApplyTime()) |
|||
.append("financeMembers", getFinanceMembers()) |
|||
.append("invoiceQuotaRatio", getInvoiceQuotaRatio()) |
|||
.append("invoiceAmountRmb", getInvoiceAmountRmb()) |
|||
.append("invoiceAmountUsd", getInvoiceAmountUsd()) |
|||
.append("invoicePurpose", getInvoicePurpose()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.append("useStatus", getUseStatus()) |
|||
.append("delFlag", getDelFlag()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,93 @@ |
|||
package com.ruoyi.financial.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; |
|||
|
|||
/** |
|||
* 国税发票历史记录Mapper接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-14 |
|||
*/ |
|||
public interface FinancialTaxInvoiceHistoryMapper |
|||
{ |
|||
/** |
|||
* 查询国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 国税发票历史记录 |
|||
*/ |
|||
public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 查询国税发票历史记录列表 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 国税发票历史记录集合 |
|||
*/ |
|||
public List<FinancialTaxInvoiceHistory> selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); |
|||
|
|||
/** |
|||
* 新增国税发票历史记录 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); |
|||
|
|||
/** |
|||
* 修改国税发票历史记录 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); |
|||
|
|||
/** |
|||
* 删除国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 批量删除国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialTaxInvoiceHistoryByIds(String[] invoiceHistoryIds); |
|||
|
|||
/** |
|||
* 作废国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 恢复国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 根据销售订单编号查询发票历史记录集合 |
|||
* |
|||
* @param salesOrderCode 销售订单编号 |
|||
* @return 结果 |
|||
*/ |
|||
List<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode); |
|||
|
|||
/** |
|||
* 根据发票编号查询发票历史记录 |
|||
* |
|||
* @param taxInvoiceCode 发票编号 |
|||
* @return 结果 |
|||
*/ |
|||
FinancialTaxInvoiceHistory selectInvoiceHistoryByInvoiceCode(String taxInvoiceCode); |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.ruoyi.financial.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; |
|||
|
|||
/** |
|||
* 国税发票历史记录Service接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-14 |
|||
*/ |
|||
public interface IFinancialTaxInvoiceHistoryService |
|||
{ |
|||
/** |
|||
* 查询国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 国税发票历史记录 |
|||
*/ |
|||
public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 查询国税发票历史记录列表 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 国税发票历史记录集合 |
|||
*/ |
|||
public List<FinancialTaxInvoiceHistory> selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); |
|||
|
|||
/** |
|||
* 新增国税发票历史记录 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); |
|||
|
|||
/** |
|||
* 修改国税发票历史记录 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); |
|||
|
|||
/** |
|||
* 批量删除国税发票历史记录 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialTaxInvoiceHistoryByIds(String ids); |
|||
|
|||
/** |
|||
* 删除国税发票历史记录信息 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 作废国税发票历史记录 |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return |
|||
*/ |
|||
int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 恢复国税发票历史记录 |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return |
|||
*/ |
|||
int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); |
|||
|
|||
/** |
|||
* 根据销售订单编号查询发票历史记录集合 |
|||
* @param salesOrderCode 销售订单编号 |
|||
* @return |
|||
*/ |
|||
List<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode); |
|||
} |
@ -0,0 +1,140 @@ |
|||
package com.ruoyi.financial.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.financial.mapper.FinancialTaxInvoiceHistoryMapper; |
|||
import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; |
|||
import com.ruoyi.financial.service.IFinancialTaxInvoiceHistoryService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 国税发票历史记录Service业务层处理 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-14 |
|||
*/ |
|||
@Service |
|||
public class FinancialTaxInvoiceHistoryServiceImpl implements IFinancialTaxInvoiceHistoryService |
|||
{ |
|||
@Autowired |
|||
private FinancialTaxInvoiceHistoryMapper financialTaxInvoiceHistoryMapper; |
|||
|
|||
/** |
|||
* 查询国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 国税发票历史记录 |
|||
*/ |
|||
@Override |
|||
public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) |
|||
{ |
|||
return financialTaxInvoiceHistoryMapper.selectFinancialTaxInvoiceHistoryById(invoiceHistoryId); |
|||
} |
|||
|
|||
/** |
|||
* 查询国税发票历史记录列表 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 国税发票历史记录 |
|||
*/ |
|||
@Override |
|||
public List<FinancialTaxInvoiceHistory> selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory) |
|||
{ |
|||
return financialTaxInvoiceHistoryMapper.selectFinancialTaxInvoiceHistoryList(financialTaxInvoiceHistory); |
|||
} |
|||
|
|||
/** |
|||
* 新增国税发票历史记录 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
financialTaxInvoiceHistory.setCreateBy(loginName); |
|||
financialTaxInvoiceHistory.setCreateTime(DateUtils.getNowDate()); |
|||
return financialTaxInvoiceHistoryMapper.insertFinancialTaxInvoiceHistory(financialTaxInvoiceHistory); |
|||
} |
|||
|
|||
/** |
|||
* 修改国税发票历史记录 |
|||
* |
|||
* @param financialTaxInvoiceHistory 国税发票历史记录 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
financialTaxInvoiceHistory.setUpdateBy(loginName); |
|||
financialTaxInvoiceHistory.setUpdateTime(DateUtils.getNowDate()); |
|||
return financialTaxInvoiceHistoryMapper.updateFinancialTaxInvoiceHistory(financialTaxInvoiceHistory); |
|||
} |
|||
|
|||
/** |
|||
* 删除国税发票历史记录对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteFinancialTaxInvoiceHistoryByIds(String ids) |
|||
{ |
|||
return financialTaxInvoiceHistoryMapper.deleteFinancialTaxInvoiceHistoryByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除国税发票历史记录信息 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) |
|||
{ |
|||
return financialTaxInvoiceHistoryMapper.deleteFinancialTaxInvoiceHistoryById(invoiceHistoryId); |
|||
} |
|||
|
|||
/** |
|||
* 作废国税发票历史记录 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) |
|||
{ |
|||
return financialTaxInvoiceHistoryMapper.cancelFinancialTaxInvoiceHistoryById(invoiceHistoryId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复国税发票历史记录信息 |
|||
* |
|||
* @param invoiceHistoryId 国税发票历史记录ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) |
|||
{ |
|||
return financialTaxInvoiceHistoryMapper.restoreFinancialTaxInvoiceHistoryById(invoiceHistoryId); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 根据销售订单编号查询历史记录集合 |
|||
* |
|||
* @param salesOrderCode 销售订单编号 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public List<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode) { |
|||
|
|||
List<FinancialTaxInvoiceHistory> list = financialTaxInvoiceHistoryMapper.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode); |
|||
return list; |
|||
} |
|||
} |
Binary file not shown.
@ -0,0 +1,134 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.financial.mapper.FinancialTaxInvoiceHistoryMapper"> |
|||
|
|||
<resultMap type="FinancialTaxInvoiceHistory" id="FinancialTaxInvoiceHistoryResult"> |
|||
<result property="invoiceHistoryId" column="invoice_history_id" /> |
|||
<result property="taxInvoiceCode" column="tax_invoice_code" /> |
|||
<result property="salesOrderCode" column="sales_order_code" /> |
|||
<result property="taxInvoiceStatus" column="tax_invoice_status" /> |
|||
<result property="applyTime" column="apply_time" /> |
|||
<result property="financeMembers" column="finance_members" /> |
|||
<result property="invoiceQuotaRatio" column="invoice_quota_ratio" /> |
|||
<result property="invoiceAmountRmb" column="invoice_amount_rmb" /> |
|||
<result property="invoiceAmountUsd" column="invoice_amount_usd" /> |
|||
<result property="invoicePurpose" column="invoice_purpose" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
<result property="useStatus" column="use_status" /> |
|||
<result property="delFlag" column="del_flag" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectFinancialTaxInvoiceHistoryVo"> |
|||
select invoice_history_id, tax_invoice_code, sales_order_code, tax_invoice_status, apply_time, finance_members, invoice_quota_ratio, invoice_amount_rmb, invoice_amount_usd, invoice_purpose, create_by, create_time, update_by, update_time, remark, use_status, del_flag from financial_tax_invoice_history |
|||
</sql> |
|||
|
|||
<select id="selectFinancialTaxInvoiceHistoryList" parameterType="FinancialTaxInvoiceHistory" resultMap="FinancialTaxInvoiceHistoryResult"> |
|||
<include refid="selectFinancialTaxInvoiceHistoryVo"/> |
|||
<where> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectFinancialTaxInvoiceHistoryById" parameterType="Long" resultMap="FinancialTaxInvoiceHistoryResult"> |
|||
<include refid="selectFinancialTaxInvoiceHistoryVo"/> |
|||
where invoice_history_id = #{invoiceHistoryId} |
|||
</select> |
|||
|
|||
<select id="selectInvoiceHistoryListBySalesOrderCode" parameterType="String" resultMap="FinancialTaxInvoiceHistoryResult"> |
|||
<include refid="selectFinancialTaxInvoiceHistoryVo"/> |
|||
where sales_order_code = #{salesOrderCode} |
|||
</select> |
|||
|
|||
<select id="selectInvoiceHistoryByInvoiceCode" parameterType="String" resultMap="FinancialTaxInvoiceHistoryResult"> |
|||
<include refid="selectFinancialTaxInvoiceHistoryVo"/> |
|||
where tax_invoice_code = #{taxInvoiceCode} |
|||
</select> |
|||
|
|||
<insert id="insertFinancialTaxInvoiceHistory" parameterType="FinancialTaxInvoiceHistory" useGeneratedKeys="true" keyProperty="invoiceHistoryId"> |
|||
insert into financial_tax_invoice_history |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="taxInvoiceCode != null">tax_invoice_code,</if> |
|||
<if test="salesOrderCode != null">sales_order_code,</if> |
|||
<if test="taxInvoiceStatus != null">tax_invoice_status,</if> |
|||
<if test="applyTime != null">apply_time,</if> |
|||
<if test="financeMembers != null">finance_members,</if> |
|||
<if test="invoiceQuotaRatio != null">invoice_quota_ratio,</if> |
|||
<if test="invoiceAmountRmb != null">invoice_amount_rmb,</if> |
|||
<if test="invoiceAmountUsd != null">invoice_amount_usd,</if> |
|||
<if test="invoicePurpose != null">invoice_purpose,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="remark != null">remark,</if> |
|||
<if test="useStatus != null">use_status,</if> |
|||
<if test="delFlag != null">del_flag,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="taxInvoiceCode != null">#{taxInvoiceCode},</if> |
|||
<if test="salesOrderCode != null">#{salesOrderCode},</if> |
|||
<if test="taxInvoiceStatus != null">#{taxInvoiceStatus},</if> |
|||
<if test="applyTime != null">#{applyTime},</if> |
|||
<if test="financeMembers != null">#{financeMembers},</if> |
|||
<if test="invoiceQuotaRatio != null">#{invoiceQuotaRatio},</if> |
|||
<if test="invoiceAmountRmb != null">#{invoiceAmountRmb},</if> |
|||
<if test="invoiceAmountUsd != null">#{invoiceAmountUsd},</if> |
|||
<if test="invoicePurpose != null">#{invoicePurpose},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="remark != null">#{remark},</if> |
|||
<if test="useStatus != null">#{useStatus},</if> |
|||
<if test="delFlag != null">#{delFlag},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateFinancialTaxInvoiceHistory" parameterType="FinancialTaxInvoiceHistory"> |
|||
update financial_tax_invoice_history |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="taxInvoiceCode != null">tax_invoice_code = #{taxInvoiceCode},</if> |
|||
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if> |
|||
<if test="taxInvoiceStatus != null">tax_invoice_status = #{taxInvoiceStatus},</if> |
|||
<if test="applyTime != null">apply_time = #{applyTime},</if> |
|||
<if test="financeMembers != null">finance_members = #{financeMembers},</if> |
|||
<if test="invoiceQuotaRatio != null">invoice_quota_ratio = #{invoiceQuotaRatio},</if> |
|||
<if test="invoiceAmountRmb != null">invoice_amount_rmb = #{invoiceAmountRmb},</if> |
|||
<if test="invoiceAmountUsd != null">invoice_amount_usd = #{invoiceAmountUsd},</if> |
|||
<if test="invoicePurpose != null">invoice_purpose = #{invoicePurpose},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
<if test="useStatus != null">use_status = #{useStatus},</if> |
|||
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|||
</trim> |
|||
where invoice_history_id = #{invoiceHistoryId} |
|||
</update> |
|||
|
|||
<delete id="deleteFinancialTaxInvoiceHistoryById" parameterType="Long"> |
|||
delete from financial_tax_invoice_history where invoice_history_id = #{invoiceHistoryId} |
|||
</delete> |
|||
|
|||
<delete id="deleteFinancialTaxInvoiceHistoryByIds" parameterType="String"> |
|||
delete from financial_tax_invoice_history where invoice_history_id in |
|||
<foreach item="invoiceHistoryId" collection="array" open="(" separator="," close=")"> |
|||
#{invoiceHistoryId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelFinancialTaxInvoiceHistoryById" parameterType="Long"> |
|||
update financial_tax_invoice_history set del_flag = '1' where invoice_history_id = #{invoiceHistoryId} |
|||
</update> |
|||
|
|||
<update id="restoreFinancialTaxInvoiceHistoryById" parameterType="Long"> |
|||
update financial_tax_invoice_history set del_flag = '0' where invoice_history_id = #{invoiceHistoryId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,342 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('审核国税发票')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-taxInvoice-auditRmb" th:object="${taxInvoice}"> |
|||
<input name="taxInvoiceId" th:field="*{taxInvoiceId}" type="hidden"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">发票单号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="taxInvoiceCode" th:field="*{taxInvoiceCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">销售订单编号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">订单类型:</label> |
|||
<div class="col-sm-7"> |
|||
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}" readonly> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{salesOrderType}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">报价币种:</label> |
|||
<div class="col-sm-7"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}" readonly> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">客户代码/ID:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">客户名称:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">联系电话:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司地址:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseAddress" th:field="*{enterpriseAddress}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票公司名称:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceCompanyName" th:field="*{invoiceCompanyName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票公司税号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceCompanyCode" th:field="*{invoiceCompanyCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司开户行:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司开户账号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">税率:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="input-group"> |
|||
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text" readonly> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required" >发票种类:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_class')}"> |
|||
<input type="radio" th:id="${'taxInvoiceClass_' + dict.dictCode}" name="taxInvoiceClass" th:value="${dict.dictValue}" th:field="*{taxInvoiceClass}" disabled> |
|||
<label th:for="${'taxInvoiceClass_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required">发票类型:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_type')}"> |
|||
<input type="radio" th:id="${'taxInvoiceType_' + dict.dictCode}" name="taxInvoiceType" th:value="${dict.dictValue}" th:field="*{taxInvoiceType}" disabled> |
|||
<label th:for="${'taxInvoiceType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required">发票抬头:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_title')}"> |
|||
<input type="radio" th:id="${'taxInvoiceTitle_' + dict.dictCode}" name="taxInvoiceTitle" th:value="${dict.dictValue}" th:field="*{taxInvoiceTitle}" disabled> |
|||
<label th:for="${'taxInvoiceTitle_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">邮箱:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceEmail" th:field="*{invoiceEmail}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">业务备注:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="businessRemark" th:field="*{businessRemark}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票物料</h4> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table-material"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票额度</h4> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">不含税总价(RMB):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="noRmbSum" th:field="*{noRmbSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">含税总价(RMB):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="rmbTaxSum" th:field="*{rmbTaxSum}" class="form-control" type="text" id="rmbTaxSumInput" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">物料数合计:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">数量合计:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseSum" th:field="*{enterpriseSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票额度比例:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="input-group"> |
|||
<input name="invoiceQuotaRatio" th:field="*{invoiceQuotaRatio}" class="form-control" type="text" id="invoiceQuotaRatioInput" readonly> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票金额(RMB):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceAmountRmb" th:field="*{invoiceAmountRmb}" class="form-control" type="text" id="invoiceAmountRmbInput" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票用途:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoicePurpose" th:field="*{invoicePurpose}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">备注:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="remark" th:field="*{remark}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
|
|||
var materialProcessMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var taxInvoiceStatusDatas = [[${@dict.getType('tax_invoice_status')}]]; |
|||
|
|||
var taxInvoice = [[${taxInvoice}]]; |
|||
|
|||
var prefix = ctx + "financial/taxInvoice"; |
|||
$("#form-taxInvoice-auditRmb").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
// function submitHandler() { |
|||
// |
|||
// |
|||
// $.operate.save(prefix + "/auditRmb", $('#form-taxInvoice-auditRmb').serialize()); |
|||
// } |
|||
|
|||
|
|||
//开票物料 |
|||
$(function() { |
|||
var options = { |
|||
id: 'bootstrap-table-material', |
|||
url: prefix + "/getInvoiceMaterialListByCode", |
|||
queryParams: function(params) { |
|||
return { |
|||
taxInvoiceCode: $("#taxInvoiceCode").val(), |
|||
} |
|||
}, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
pagination: false, // 设置不分页 |
|||
modalName: "国税发票物料", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '国税发票物料ID', |
|||
field: 'invoiceMaterialId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '物料编号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料加工方式', |
|||
field: 'materialProcessMethod', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialProcessMethodDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料品牌', |
|||
field: 'materialBrand', |
|||
}, |
|||
{ |
|||
title: '物料图片', |
|||
field: 'materialPhotourl', |
|||
}, |
|||
{ |
|||
title: '物料单位', |
|||
field: 'materialUnit', |
|||
}, |
|||
{ |
|||
title: '物料描述', |
|||
field: 'materialDescribe', |
|||
}, |
|||
{ |
|||
title: '物料的数量', |
|||
field: 'materialNum', |
|||
}, |
|||
{ |
|||
title: '物料的含税单价(RMB)', |
|||
field: 'taxRmb', |
|||
}, |
|||
{ |
|||
title: '物料的不含税单价(RMB)', |
|||
field: 'noTaxRmb', |
|||
}, |
|||
{ |
|||
title: '已出库数量', |
|||
field: 'outBoundQuantity', |
|||
}, |
|||
{ |
|||
title: '已验收数', |
|||
field: 'hasCheckNum', |
|||
}, |
|||
{ |
|||
title: '退货数', |
|||
field: 'refundsNum', |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,337 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('审核国税发票')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-taxInvoice-auditRmb" th:object="${taxInvoice}"> |
|||
<input name="taxInvoiceId" th:field="*{taxInvoiceId}" type="hidden"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">发票单号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="taxInvoiceCode" th:field="*{taxInvoiceCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">销售订单编号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">订单类型:</label> |
|||
<div class="col-sm-7"> |
|||
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}" readonly> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{salesOrderType}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">报价币种:</label> |
|||
<div class="col-sm-7"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}" readonly> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">客户代码/ID:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">客户名称:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">联系电话:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司地址:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseAddress" th:field="*{enterpriseAddress}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票公司名称:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceCompanyName" th:field="*{invoiceCompanyName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票公司税号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceCompanyCode" th:field="*{invoiceCompanyCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司开户行:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司开户账号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">税率:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="input-group"> |
|||
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text" readonly> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required" >发票种类:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_class')}"> |
|||
<input type="radio" th:id="${'taxInvoiceClass_' + dict.dictCode}" name="taxInvoiceClass" th:value="${dict.dictValue}" th:field="*{taxInvoiceClass}" disabled> |
|||
<label th:for="${'taxInvoiceClass_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required">发票类型:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_type')}"> |
|||
<input type="radio" th:id="${'taxInvoiceType_' + dict.dictCode}" name="taxInvoiceType" th:value="${dict.dictValue}" th:field="*{taxInvoiceType}" disabled> |
|||
<label th:for="${'taxInvoiceType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required">发票抬头:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_title')}"> |
|||
<input type="radio" th:id="${'taxInvoiceTitle_' + dict.dictCode}" name="taxInvoiceTitle" th:value="${dict.dictValue}" th:field="*{taxInvoiceTitle}" disabled> |
|||
<label th:for="${'taxInvoiceTitle_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">邮箱:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceEmail" th:field="*{invoiceEmail}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">业务备注:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="businessRemark" th:field="*{businessRemark}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票物料</h4> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table-material"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票额度</h4> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">不含税总价(美元):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="noUsdSum" th:field="*{noUsdSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">含税总价(美元):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="usdTaxSum" th:field="*{usdTaxSum}" class="form-control" type="text" id="usdTaxSumInput" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">物料数合计:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">数量合计:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseSum" th:field="*{enterpriseSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票额度比例:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="input-group"> |
|||
<input name="invoiceQuotaRatio" th:field="*{invoiceQuotaRatio}" class="form-control" type="text" id="invoiceQuotaRatioInput" readonly> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票金额(美元):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceAmountUsd" th:field="*{invoiceAmountUsd}" class="form-control" type="text" id="invoiceAmountUsdInput" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票用途:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoicePurpose" th:field="*{invoicePurpose}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">备注:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="remark" th:field="*{remark}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
|
|||
var materialProcessMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var taxInvoiceStatusDatas = [[${@dict.getType('tax_invoice_status')}]]; |
|||
|
|||
var taxInvoice = [[${taxInvoice}]]; |
|||
|
|||
var prefix = ctx + "financial/taxInvoice"; |
|||
$("#form-taxInvoice-auditRmb").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
// function submitHandler() { |
|||
// |
|||
// |
|||
// $.operate.save(prefix + "/auditRmb", $('#form-taxInvoice-auditRmb').serialize()); |
|||
// } |
|||
|
|||
|
|||
//开票物料 |
|||
$(function() { |
|||
var options = { |
|||
id: 'bootstrap-table-material', |
|||
url: prefix + "/getInvoiceMaterialListByCode", |
|||
queryParams: function(params) { |
|||
return { |
|||
taxInvoiceCode: $("#taxInvoiceCode").val(), |
|||
} |
|||
}, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
pagination: false, // 设置不分页 |
|||
modalName: "国税发票物料", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '国税发票物料ID', |
|||
field: 'invoiceMaterialId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '物料编号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料加工方式', |
|||
field: 'materialProcessMethod', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialProcessMethodDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料品牌', |
|||
field: 'materialBrand', |
|||
}, |
|||
{ |
|||
title: '物料图片', |
|||
field: 'materialPhotourl', |
|||
}, |
|||
{ |
|||
title: '物料单位', |
|||
field: 'materialUnit', |
|||
}, |
|||
{ |
|||
title: '物料描述', |
|||
field: 'materialDescribe', |
|||
}, |
|||
{ |
|||
title: '物料的数量', |
|||
field: 'materialNum', |
|||
}, |
|||
{ |
|||
title: '物料的含税单价(美元)', |
|||
field: 'taxUsd', |
|||
}, |
|||
{ |
|||
title: '物料的不含税单价(美元)', |
|||
field: 'noTaxUsd', |
|||
}, |
|||
{ |
|||
title: '已出库数量', |
|||
field: 'outBoundQuantity', |
|||
}, |
|||
{ |
|||
title: '已验收数', |
|||
field: 'hasCheckNum', |
|||
}, |
|||
{ |
|||
title: '退货数', |
|||
field: 'refundsNum', |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,566 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改国税发票')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-taxInvoice-USDAdd" th:object="${taxInvoice}"> |
|||
<input name="taxInvoiceId" th:field="*{taxInvoiceId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">销售订单编号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">订单类型:</label> |
|||
<div class="col-sm-7"> |
|||
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}" readonly> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{salesOrderType}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">报价币种:</label> |
|||
<div class="col-sm-7"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}" readonly> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">客户代码/ID:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">客户名称:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">联系电话:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司地址:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseAddress" th:field="*{enterpriseAddress}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票公司名称:</label> |
|||
<div class="col-sm-7"> |
|||
<select class="form-control" id="invoiceCompanyName" name="invoiceCompanyName" th:field="*{invoiceCompanyName}"> |
|||
<!-- 这里动态生成开票公司名称选项 --> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票公司税号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceCompanyCode" th:field="*{invoiceCompanyCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司开户行:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">公司开户账号:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">税率:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="input-group"> |
|||
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text" readonly> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required" >发票种类:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_class')}"> |
|||
<input type="radio" th:id="${'taxInvoiceClass_' + dict.dictCode}" name="taxInvoiceClass" th:value="${dict.dictValue}" th:field="*{taxInvoiceClass}" required> |
|||
<label th:for="${'taxInvoiceClass_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required">发票类型:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_type')}"> |
|||
<input type="radio" th:id="${'taxInvoiceType_' + dict.dictCode}" name="taxInvoiceType" th:value="${dict.dictValue}" th:field="*{taxInvoiceType}" required> |
|||
<label th:for="${'taxInvoiceType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label is-required">发票抬头:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_title')}"> |
|||
<input type="radio" th:id="${'taxInvoiceTitle_' + dict.dictCode}" name="taxInvoiceTitle" th:value="${dict.dictValue}" th:field="*{taxInvoiceTitle}" required> |
|||
<label th:for="${'taxInvoiceTitle_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">邮箱:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceEmail" th:field="*{invoiceEmail}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">业务备注:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="businessRemark" th:field="*{businessRemark}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票物料</h4> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table-material"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票历史</h4> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table-history"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">开票额度</h4> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">不含税总价(美元):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="noUsdSum" th:field="*{noUsdSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">含税总价(美元):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="usdTaxSum" th:field="*{usdTaxSum}" class="form-control" type="text" id="usdTaxSumInput" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">物料数合计:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">数量合计:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="enterpriseSum" th:field="*{enterpriseSum}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票额度比例:</label> |
|||
<div class="col-sm-7"> |
|||
<div class="input-group"> |
|||
<input name="invoiceQuotaRatio" th:field="*{invoiceQuotaRatio}" class="form-control" type="text" id="invoiceQuotaRatioInput"> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票金额(美元):</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoiceAmountUsd" th:field="*{invoiceAmountUsd}" class="form-control" type="text" id="invoiceAmountUsdInput" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-5 control-label">开票用途:</label> |
|||
<div class="col-sm-7"> |
|||
<input name="invoicePurpose" th:field="*{invoicePurpose}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
|
|||
var materialProcessMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
var taxInvoiceStatusDatas = [[${@dict.getType('tax_invoice_status')}]]; |
|||
|
|||
var taxInvoice = [[${taxInvoice}]]; |
|||
|
|||
var prefix = ctx + "system/salesOrder" |
|||
$("#form-taxInvoice-USDAdd").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
|
|||
//获取表单的数据 |
|||
const makeInvoiceRMBData = $('#form-taxInvoice-USDAdd').serializeArray().reduce((obj, item) => { |
|||
obj[item.name] = item.value; |
|||
return obj; |
|||
}, {}); |
|||
|
|||
var makeInvoiceMaterialTable = $("#bootstrap-table-material").bootstrapTable('getData'); |
|||
|
|||
//将makeInvoiceMaterialTable转换成和makeInvoiceRMBData一样的形式 |
|||
var makeInvoiceMaterialList = makeInvoiceMaterialTable.map(function (item) { |
|||
return { |
|||
invoiceMaterialId: item.invoiceMaterialId, |
|||
materialCode: item.materialCode, |
|||
materialName: item.materialName, |
|||
materialType: item.materialType, |
|||
materialProcessMethod: item.processMethod, |
|||
materialBrand:item.brand, |
|||
materialUnit: item.unit, |
|||
noTaxUsd: item.materialNoUsd, |
|||
taxUsd: item.materialUsd, |
|||
materialNum: item.materialNum, |
|||
outBoundQuantity: item.outBoundQuantity, |
|||
hasCheckNum: item.hasCheckNum, |
|||
refundsNum: item.refundsNum |
|||
} |
|||
}); |
|||
|
|||
const combinedData = Object.assign(makeInvoiceRMBData, { |
|||
invoiceMaterialList: makeInvoiceMaterialList |
|||
}); |
|||
|
|||
const jsonData = JSON.stringify(combinedData); |
|||
|
|||
$.operate.saveJson(prefix + "/makeInvoice",jsonData); |
|||
} |
|||
} |
|||
|
|||
|
|||
//开票物料 |
|||
$(function() { |
|||
var options = { |
|||
id: 'bootstrap-table-material', |
|||
url: prefix + "/getSalesOrderChildListByCode", |
|||
queryParams: function(params) { |
|||
return { |
|||
salesOrderCode: $("#salesOrderCode").val(), |
|||
} |
|||
}, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
pagination: false, // 设置不分页 |
|||
modalName: "国税发票物料", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '国税发票物料ID', |
|||
field: 'invoiceMaterialId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '物料编号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料加工方式', |
|||
field: 'processMethod', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialProcessMethodDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '物料品牌', |
|||
field: 'brand', |
|||
}, |
|||
{ |
|||
title: '物料图片', |
|||
field: 'photourl', |
|||
}, |
|||
{ |
|||
title: '物料单位', |
|||
field: 'unit', |
|||
}, |
|||
{ |
|||
title: '物料描述', |
|||
field: 'describe', |
|||
}, |
|||
{ |
|||
title: '物料的数量', |
|||
field: 'materialNum', |
|||
}, |
|||
{ |
|||
title: '物料的含税单价(美元)', |
|||
field: 'materialUsd', |
|||
}, |
|||
{ |
|||
title: '物料的不含税单价(美元)', |
|||
field: 'materialNoUsd', |
|||
}, |
|||
{ |
|||
title: '已出库数量', |
|||
field: 'outBoundQuantity', |
|||
}, |
|||
{ |
|||
title: '已验收数', |
|||
field: 'hasCheckNum', |
|||
}, |
|||
{ |
|||
title: '退货数', |
|||
field: 'refundsNum', |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
|
|||
//开票历史 |
|||
$(function() { |
|||
var options = { |
|||
id: 'bootstrap-table-history', |
|||
url: prefix + "/getInvoiceHistoryListBySalesOrderCode", |
|||
queryParams: function(params) { |
|||
return { |
|||
salesOrderCode: $("#salesOrderCode").val(), |
|||
} |
|||
}, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
pagination: false, // 设置不分页 |
|||
modalName: "国税发票历史记录", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '国税发票历史id', |
|||
field: 'invoiceHistoryId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '申请时间', |
|||
field: 'applyTime', |
|||
}, |
|||
{ |
|||
title: '国税发票单号', |
|||
field: 'taxInvoiceCode', |
|||
}, |
|||
{ |
|||
title: '开票额度比例', |
|||
field: 'invoiceQuotaRatio', |
|||
formatter: function (value,row,index){ |
|||
if (value == null || value == ''){ |
|||
return '/'; |
|||
}else{ |
|||
return value + "%"; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
title: '开票金额(美元)', |
|||
field: 'invoiceAmountUsd', |
|||
}, |
|||
|
|||
{ |
|||
title: '开票用途', |
|||
field: 'invoicePurpose', |
|||
}, |
|||
{ |
|||
title: '发票状态', //(0待审核、1待开具、2已开具、3审核拒绝) |
|||
field: 'taxInvoiceStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(taxInvoiceStatusDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '财务员', |
|||
field: 'financeMembers', |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.invoiceHistoryId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
|
|||
|
|||
|
|||
//获取客户发票信息 |
|||
$(document).ready(function() { |
|||
// 初始化时默认加载客户编号列表 |
|||
loadInvoiceCompanyNames(); |
|||
|
|||
// 监听开票公司名称下拉框的变化 |
|||
$('#invoiceCompanyName').on('change', function() { |
|||
var selectedInvoiceCompanyName = $(this).val(); // 获取选中的开票公司名称 |
|||
if (selectedInvoiceCompanyName) { |
|||
// 发起Ajax请求获取客户名称 |
|||
$.ajax({ |
|||
type: 'POST', |
|||
url: ctx + 'system/customer/getSysInvoiceInfoByName', |
|||
dataType: 'json', // 假设返回的数据格式是JSON |
|||
data: { invoiceCompanyName: selectedInvoiceCompanyName }, // 数据放在这里 |
|||
success: function(data) { |
|||
console.log(data); |
|||
// 将获取到的客户名称填充到输入框 |
|||
if (!data || !data.data) { |
|||
// 如果返回的数据有问题,可以给出提示或处理 |
|||
$.modal.alertWarning('未能获取到开票公司信息!'); |
|||
} else { |
|||
fillInvoiceDetails(data.data); |
|||
} |
|||
}, |
|||
error: function(jqXHR, textStatus, errorThrown) { |
|||
console.error('Error:', textStatus, errorThrown); |
|||
$.modal.alertWarning('查询开票公司名称时发生错误!'); |
|||
} |
|||
}); |
|||
} else { |
|||
// 如果没有选择开票公司名称,清开票信息输入框 |
|||
clearInvoiceDetails(); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
// 封装填充发票详情的函数 |
|||
function fillInvoiceDetails(details) { |
|||
$('input[name="invoiceCompanyCode"]').val(details.invoiceCompanyCode); |
|||
$('input[name="depositBank"]').val(details.depositBank); |
|||
$('input[name="bankAccount"]').val(details.bankAccount); |
|||
} |
|||
|
|||
// 封装清空发票详情的函数 |
|||
function clearInvoiceDetails() { |
|||
$('input[name="invoiceCompanyCode"]').val(''); |
|||
$('input[name="depositBank"]').val(''); |
|||
$('input[name="bankAccount"]').val(''); |
|||
} |
|||
|
|||
|
|||
|
|||
// 假设的加载客户编号列表函数 |
|||
function loadInvoiceCompanyNames() { |
|||
var enterpriseCode = $("#enterpriseCode").val(); |
|||
var url = ctx + 'system/customer/getAllInvoiceCompanyNameByCode' + '?enterpriseCode=' + enterpriseCode; |
|||
var tempInvoiceCompanyName = taxInvoice.invoiceCompanyName; |
|||
|
|||
$.ajax({ |
|||
type: 'GET', // 请求类型 |
|||
url: url, // 后端接口URL |
|||
dataType: 'json', // 预期服务器返回的数据类型 |
|||
success: function(data) { |
|||
if (data && Array.isArray(data)) { |
|||
var selectElement = $('#invoiceCompanyName'); // 获取开票公司名称下拉框元素 |
|||
// 清空下拉框现有选项 |
|||
selectElement.empty(); |
|||
|
|||
// 添加默认选项 |
|||
if (tempInvoiceCompanyName) { |
|||
selectElement.append('<option value="' + tempInvoiceCompanyName + '">' + tempInvoiceCompanyName + '</option>'); |
|||
} |
|||
|
|||
// 遍历返回的数据,添加为下拉框的选项 |
|||
$.each(data, function(index, item) { |
|||
// 假设item有invoiceCompanyName属性,代表客户名称 |
|||
selectElement.append('<option value="' + item.invoiceCompanyName + '">' + item.invoiceCompanyName + '</option>'); |
|||
}); |
|||
|
|||
// 设置默认值 |
|||
if (tempInvoiceCompanyName) { |
|||
selectElement.val(tempInvoiceCompanyName); |
|||
} |
|||
} else { |
|||
$.modal.errMsg("开票公司信息为空"); |
|||
} |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
//通过监听额度比例输入框的值,动态计算开票金额 |
|||
$(document).ready(function() { |
|||
|
|||
var invoiceAmountUsdInput = $('#invoiceAmountUsdInput'); |
|||
var invoiceQuotaRatioInput = $('#invoiceQuotaRatioInput'); |
|||
var usdTaxSumInput = $('#usdTaxSumInput'); |
|||
|
|||
//监听开票额度比例输入框的变化 |
|||
invoiceQuotaRatioInput.on('input', function() { |
|||
var usdTaxSum = parseFloat(usdTaxSumInput.val()); |
|||
var invoiceQuotaRatio = parseFloat($(this).val()); |
|||
if (!isNaN(usdTaxSum) && !isNaN(invoiceQuotaRatio)) { |
|||
//计算开票金额 = 税前总额 * 开票比例 |
|||
var invoiceAmountUsd = usdTaxSum * (invoiceQuotaRatio / 100); |
|||
//更新开票金额输入框 |
|||
invoiceAmountUsdInput.val(invoiceAmountUsd.toFixed(2)); |
|||
} else { |
|||
invoiceAmountUsdInput.val(''); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue