Browse Source

[feat]财务管理:

应收账款
新增应收账款前端列表页面
新增应收账款Controller
新增应收账款Mapper
新增应收账款Mapper.xml
新增应收账款Service
新增应收账款ServiceImpl
新增应收账款receivables.html
完成数据填充,页面展示,条件查询操作
dev
liuxiaoxu 10 months ago
parent
commit
7b088b6431
  1. 174
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialReceivablesController.java
  2. 367
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivables.java
  3. 86
      ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialReceivablesMapper.java
  4. 75
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialReceivablesService.java
  5. 170
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java
  6. 186
      ruoyi-admin/src/main/resources/mapper/financial/FinancialReceivablesMapper.xml
  7. 189
      ruoyi-admin/src/main/resources/templates/financial/receivables/add.html
  8. 190
      ruoyi-admin/src/main/resources/templates/financial/receivables/edit.html
  9. 245
      ruoyi-admin/src/main/resources/templates/financial/receivables/receivables.html

174
ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialReceivablesController.java

@ -0,0 +1,174 @@
package com.ruoyi.financial.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.financial.domain.FinancialReceivables;
import com.ruoyi.financial.service.IFinancialReceivablesService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 财务应收账款Controller
*
* @author 刘晓旭
* @date 2024-05-08
*/
@Controller
@RequestMapping("/financial/receivables")
public class FinancialReceivablesController extends BaseController
{
private String prefix = "financial/receivables";
@Autowired
private IFinancialReceivablesService financialReceivablesService;
@RequiresPermissions("financial:receivables:view")
@GetMapping()
public String receivables()
{
return prefix + "/receivables";
}
/**
* 查询财务应收账款列表
*/
@RequiresPermissions("financial:receivables:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(FinancialReceivables financialReceivables)
{
startPage();
List<FinancialReceivables> list = financialReceivablesService.selectFinancialReceivablesList(financialReceivables);
return getDataTable(list);
}
/**
* 导出财务应收账款列表
*/
@RequiresPermissions("financial:receivables:export")
@Log(title = "财务应收账款", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(FinancialReceivables financialReceivables)
{
List<FinancialReceivables> list = financialReceivablesService.selectFinancialReceivablesList(financialReceivables);
ExcelUtil<FinancialReceivables> util = new ExcelUtil<FinancialReceivables>(FinancialReceivables.class);
return util.exportExcel(list, "财务应收账款数据");
}
/**
* 新增财务应收账款
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存财务应收账款
*/
@RequiresPermissions("financial:receivables:add")
@Log(title = "财务应收账款", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(FinancialReceivables financialReceivables)
{
return toAjax(financialReceivablesService.insertFinancialReceivables(financialReceivables));
}
/**
* 添加非销售订单财务应收账款
*/
@GetMapping("/addFinancialReceivables")
public String addFinancialReceivables()
{
return prefix + "/addFinancialReceivables";
}
/**
* 添加保存非销售订单财务应收账款
*/
@RequiresPermissions("financial:receivables:addFinancialReceivables")
@Log(title = "财务应收账款", businessType = BusinessType.INSERT)
@PostMapping("/addFinancialReceivables")
@ResponseBody
public AjaxResult addFinancialReceivablesSave(FinancialReceivables financialReceivables)
{
return toAjax(financialReceivablesService.insertFinancialReceivables(financialReceivables));
}
/**
* 修改财务应收账款
*/
@GetMapping("/edit/{financialReceivablesId}")
public String edit(@PathVariable("financialReceivablesId") Long financialReceivablesId, ModelMap mmap)
{
FinancialReceivables financialReceivables = financialReceivablesService.selectFinancialReceivablesById(financialReceivablesId);
mmap.put("financialReceivables", financialReceivables);
return prefix + "/edit";
}
/**
* 修改保存财务应收账款
*/
@RequiresPermissions("financial:receivables:edit")
@Log(title = "财务应收账款", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(FinancialReceivables financialReceivables)
{
return toAjax(financialReceivablesService.updateFinancialReceivables(financialReceivables));
}
/**
* 删除财务应收账款
*/
@RequiresPermissions("financial:receivables:remove")
@Log(title = "财务应收账款", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(financialReceivablesService.deleteFinancialReceivablesByIds(ids));
}
/**
* 作废财务应收账款
*/
@RequiresPermissions("financial:receivables:cancel")
@Log(title = "财务应收账款", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(financialReceivablesService.cancelFinancialReceivablesById(id));
}
/**
* 恢复财务应收账款
*/
@RequiresPermissions("financial:receivables:restore")
@Log(title = "财务应收账款", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(financialReceivablesService.restoreFinancialReceivablesById(id));
}
}

367
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivables.java

@ -0,0 +1,367 @@
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_receivables
*
* @author 刘晓旭
* @date 2024-05-08
*/
public class FinancialReceivables extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 财务应收账款id */
private Long financialReceivablesId;
/** 应收单号 */
@Excel(name = "应收单号")
private String financialReceivablesCode;
/** 收款结案状态 */
@Excel(name = "收款结案状态")
private String receivablesClosingStatus;
/** 关联销售订单号 */
@Excel(name = "关联销售订单号")
private String salesOrderCode;
/** 贷方科目 */
@Excel(name = "贷方科目")
private String creditAccount;
/** 贷方明细 */
@Excel(name = "贷方明细")
private String creditDetail;
/** 开户银行 */
@Excel(name = "开户银行")
private String openBank;
/** 开户账号 */
@Excel(name = "开户账号")
private String openAccount;
/** 客户ID */
@Excel(name = "客户ID")
private String customerId;
/** 客户名称 */
private String customerName;
/** 合同编号 */
@Excel(name = "合同编号")
private String contractNumber;
/** 币种 */
@Excel(name = "币种")
private String currencyType;
/** 不含税金额 */
@Excel(name = "不含税金额")
private BigDecimal priceExcludingTax;
/** 含税金额 */
@Excel(name = "含税金额")
private BigDecimal priceIncludesTax;
/** 付款条件 */
@Excel(name = "付款条件")
private String paymentCondition;
/** 实收含税金额 */
@Excel(name = "实收含税金额")
private String receivedIncludesTax;
/** 未收含税金额 */
@Excel(name = "未收含税金额")
private String notReceivedIncludesTax;
/** 业务人员 */
@Excel(name = "业务人员")
private String businessMembers;
/** 发货状态 */
@Excel(name = "发货状态")
private String financialDeliverStatus;
/** 收款日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "收款日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date receivablesDate;
/** 收款金额 */
@Excel(name = "收款金额")
private BigDecimal receivablesPrice;
/** 收款摘要 */
@Excel(name = "收款摘要")
private String receivablesAbstract;
/** 操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date operatingTime;
/** 收款备注 */
@Excel(name = "收款备注")
private String receivablesRemark;
public void setFinancialReceivablesId(Long financialReceivablesId)
{
this.financialReceivablesId = financialReceivablesId;
}
public Long getFinancialReceivablesId()
{
return financialReceivablesId;
}
public void setFinancialReceivablesCode(String financialReceivablesCode)
{
this.financialReceivablesCode = financialReceivablesCode;
}
public String getFinancialReceivablesCode()
{
return financialReceivablesCode;
}
public void setReceivablesClosingStatus(String receivablesClosingStatus)
{
this.receivablesClosingStatus = receivablesClosingStatus;
}
public String getReceivablesClosingStatus()
{
return receivablesClosingStatus;
}
public void setSalesOrderCode(String salesOrderCode)
{
this.salesOrderCode = salesOrderCode;
}
public String getSalesOrderCode()
{
return salesOrderCode;
}
public void setCreditAccount(String creditAccount)
{
this.creditAccount = creditAccount;
}
public String getCreditAccount()
{
return creditAccount;
}
public void setCreditDetail(String creditDetail)
{
this.creditDetail = creditDetail;
}
public String getCreditDetail()
{
return creditDetail;
}
public void setOpenBank(String openBank)
{
this.openBank = openBank;
}
public String getOpenBank()
{
return openBank;
}
public void setOpenAccount(String openAccount)
{
this.openAccount = openAccount;
}
public String getOpenAccount()
{
return openAccount;
}
public void setCustomerId(String customerId)
{
this.customerId = customerId;
}
public String getCustomerId()
{
return customerId;
}
public void setCustomerName(String customerName)
{
this.customerName = customerName;
}
public String getCustomerName()
{
return customerName;
}
public void setContractNumber(String contractNumber)
{
this.contractNumber = contractNumber;
}
public String getContractNumber()
{
return contractNumber;
}
public void setCurrencyType(String currencyType)
{
this.currencyType = currencyType;
}
public String getCurrencyType()
{
return currencyType;
}
public void setPriceExcludingTax(BigDecimal priceExcludingTax)
{
this.priceExcludingTax = priceExcludingTax;
}
public BigDecimal getPriceExcludingTax()
{
return priceExcludingTax;
}
public void setPriceIncludesTax(BigDecimal priceIncludesTax)
{
this.priceIncludesTax = priceIncludesTax;
}
public BigDecimal getPriceIncludesTax()
{
return priceIncludesTax;
}
public void setPaymentCondition(String paymentCondition)
{
this.paymentCondition = paymentCondition;
}
public String getPaymentCondition()
{
return paymentCondition;
}
public void setReceivedIncludesTax(String receivedIncludesTax)
{
this.receivedIncludesTax = receivedIncludesTax;
}
public String getReceivedIncludesTax()
{
return receivedIncludesTax;
}
public void setNotReceivedIncludesTax(String notReceivedIncludesTax)
{
this.notReceivedIncludesTax = notReceivedIncludesTax;
}
public String getNotReceivedIncludesTax()
{
return notReceivedIncludesTax;
}
public void setBusinessMembers(String businessMembers)
{
this.businessMembers = businessMembers;
}
public String getBusinessMembers()
{
return businessMembers;
}
public void setFinancialDeliverStatus(String financialDeliverStatus)
{
this.financialDeliverStatus = financialDeliverStatus;
}
public String getFinancialDeliverStatus()
{
return financialDeliverStatus;
}
public void setReceivablesDate(Date receivablesDate)
{
this.receivablesDate = receivablesDate;
}
public Date getReceivablesDate()
{
return receivablesDate;
}
public void setReceivablesPrice(BigDecimal receivablesPrice)
{
this.receivablesPrice = receivablesPrice;
}
public BigDecimal getReceivablesPrice()
{
return receivablesPrice;
}
public void setReceivablesAbstract(String receivablesAbstract)
{
this.receivablesAbstract = receivablesAbstract;
}
public String getReceivablesAbstract()
{
return receivablesAbstract;
}
public void setOperatingTime(Date operatingTime)
{
this.operatingTime = operatingTime;
}
public Date getOperatingTime()
{
return operatingTime;
}
public void setReceivablesRemark(String receivablesRemark)
{
this.receivablesRemark = receivablesRemark;
}
public String getReceivablesRemark()
{
return receivablesRemark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("financialReceivablesId", getFinancialReceivablesId())
.append("financialReceivablesCode", getFinancialReceivablesCode())
.append("receivablesClosingStatus", getReceivablesClosingStatus())
.append("salesOrderCode", getSalesOrderCode())
.append("creditAccount", getCreditAccount())
.append("creditDetail", getCreditDetail())
.append("openBank", getOpenBank())
.append("openAccount", getOpenAccount())
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("contractNumber", getContractNumber())
.append("currencyType", getCurrencyType())
.append("priceExcludingTax", getPriceExcludingTax())
.append("priceIncludesTax", getPriceIncludesTax())
.append("paymentCondition", getPaymentCondition())
.append("receivedIncludesTax", getReceivedIncludesTax())
.append("notReceivedIncludesTax", getNotReceivedIncludesTax())
.append("businessMembers", getBusinessMembers())
.append("financialDeliverStatus", getFinancialDeliverStatus())
.append("receivablesDate", getReceivablesDate())
.append("receivablesPrice", getReceivablesPrice())
.append("receivablesAbstract", getReceivablesAbstract())
.append("operatingTime", getOperatingTime())
.append("receivablesRemark", getReceivablesRemark())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

86
ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialReceivablesMapper.java

@ -0,0 +1,86 @@
package com.ruoyi.financial.mapper;
import java.util.List;
import com.ruoyi.financial.domain.FinancialReceivables;
import org.springframework.data.repository.query.Param;
/**
* 财务应收账款Mapper接口
*
* @author 刘晓旭
* @date 2024-05-08
*/
public interface FinancialReceivablesMapper
{
/**
* 查询财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 财务应收账款
*/
public FinancialReceivables selectFinancialReceivablesById(Long financialReceivablesId);
/**
* 查询财务应收账款列表
*
* @param financialReceivables 财务应收账款
* @return 财务应收账款集合
*/
public List<FinancialReceivables> selectFinancialReceivablesList(FinancialReceivables financialReceivables);
/**
* 新增财务应收账款
*
* @param financialReceivables 财务应收账款
* @return 结果
*/
public int insertFinancialReceivables(FinancialReceivables financialReceivables);
/**
* 修改财务应收账款
*
* @param financialReceivables 财务应收账款
* @return 结果
*/
public int updateFinancialReceivables(FinancialReceivables financialReceivables);
/**
* 删除财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
public int deleteFinancialReceivablesById(Long financialReceivablesId);
/**
* 批量删除财务应收账款
*
* @param financialReceivablesIds 需要删除的数据ID
* @return 结果
*/
public int deleteFinancialReceivablesByIds(String[] financialReceivablesIds);
/**
* 作废财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
public int cancelFinancialReceivablesById(Long financialReceivablesId);
/**
* 恢复财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
public int restoreFinancialReceivablesById(Long financialReceivablesId);
/**
* 查询数据库中今天已经生产的最大序号
*
* @param prefix 前面的KS年月日
*/
public String findMaxRoundCode(@Param("prefix") String prefix);
}

75
ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialReceivablesService.java

@ -0,0 +1,75 @@
package com.ruoyi.financial.service;
import java.util.List;
import com.ruoyi.financial.domain.FinancialReceivables;
/**
* 财务应收账款Service接口
*
* @author 刘晓旭
* @date 2024-05-08
*/
public interface IFinancialReceivablesService
{
/**
* 查询财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 财务应收账款
*/
public FinancialReceivables selectFinancialReceivablesById(Long financialReceivablesId);
/**
* 查询财务应收账款列表
*
* @param financialReceivables 财务应收账款
* @return 财务应收账款集合
*/
public List<FinancialReceivables> selectFinancialReceivablesList(FinancialReceivables financialReceivables);
/**
* 新增财务应收账款
*
* @param financialReceivables 财务应收账款
* @return 结果
*/
public int insertFinancialReceivables(FinancialReceivables financialReceivables);
/**
* 修改财务应收账款
*
* @param financialReceivables 财务应收账款
* @return 结果
*/
public int updateFinancialReceivables(FinancialReceivables financialReceivables);
/**
* 批量删除财务应收账款
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteFinancialReceivablesByIds(String ids);
/**
* 删除财务应收账款信息
*
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
public int deleteFinancialReceivablesById(Long financialReceivablesId);
/**
* 作废财务应收账款
* @param financialReceivablesId 财务应收账款ID
* @return
*/
int cancelFinancialReceivablesById(Long financialReceivablesId);
/**
* 恢复财务应收账款
* @param financialReceivablesId 财务应收账款ID
* @return
*/
int restoreFinancialReceivablesById(Long financialReceivablesId);
}

170
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java

@ -0,0 +1,170 @@
package com.ruoyi.financial.service.impl;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.financial.mapper.FinancialReceivablesMapper;
import com.ruoyi.financial.domain.FinancialReceivables;
import com.ruoyi.financial.service.IFinancialReceivablesService;
import com.ruoyi.common.core.text.Convert;
/**
* 财务应收账款Service业务层处理
*
* @author 刘晓旭
* @date 2024-05-08
*/
@Service
public class FinancialReceivablesServiceImpl implements IFinancialReceivablesService
{
@Autowired
private FinancialReceivablesMapper financialReceivablesMapper;
/**
* 查询财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 财务应收账款
*/
@Override
public FinancialReceivables selectFinancialReceivablesById(Long financialReceivablesId)
{
return financialReceivablesMapper.selectFinancialReceivablesById(financialReceivablesId);
}
/**
* 查询财务应收账款列表
*
* @param financialReceivables 财务应收账款
* @return 财务应收账款
*/
@Override
public List<FinancialReceivables> selectFinancialReceivablesList(FinancialReceivables financialReceivables)
{
return financialReceivablesMapper.selectFinancialReceivablesList(financialReceivables);
}
/**
* 新增财务应收账款
*
* @param financialReceivables 财务应收账款
* @return 结果
*/
@Override
public int insertFinancialReceivables(FinancialReceivables financialReceivables)
{
// 更改日期格式以提高可读性
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String datePart = df.format(new Date());
// 移除日期中的分隔符以便于后续处理
String prefix = "YS" + datePart.replace("-", "");
// 查询数据库中当前最大编号
String maxCode = financialReceivablesMapper.findMaxRoundCode(prefix);
String newCode = generateNewCode(prefix, maxCode);
//自动生成 应收单号
financialReceivables.setFinancialReceivablesCode(newCode);
financialReceivables.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
financialReceivables.setCreateBy(loginName);
return financialReceivablesMapper.insertFinancialReceivables(financialReceivables);
}
/**
* 修改财务应收账款
*
* @param financialReceivables 财务应收账款
* @return 结果
*/
@Override
public int updateFinancialReceivables(FinancialReceivables financialReceivables)
{
String loginName = ShiroUtils.getLoginName();
financialReceivables.setUpdateBy(loginName);
financialReceivables.setUpdateTime(DateUtils.getNowDate());
return financialReceivablesMapper.updateFinancialReceivables(financialReceivables);
}
/**
* 删除财务应收账款对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteFinancialReceivablesByIds(String ids)
{
return financialReceivablesMapper.deleteFinancialReceivablesByIds(Convert.toStrArray(ids));
}
/**
* 删除财务应收账款信息
*
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
@Override
public int deleteFinancialReceivablesById(Long financialReceivablesId)
{
return financialReceivablesMapper.deleteFinancialReceivablesById(financialReceivablesId);
}
/**
* 作废财务应收账款
*
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
@Override
public int cancelFinancialReceivablesById(Long financialReceivablesId)
{
return financialReceivablesMapper.cancelFinancialReceivablesById(financialReceivablesId);
}
/**
* 恢复财务应收账款
* @param financialReceivablesId 财务应收账款ID
* @return 结果
*/
@Override
public int restoreFinancialReceivablesById(Long financialReceivablesId)
{
return financialReceivablesMapper.restoreFinancialReceivablesById(financialReceivablesId);
}
/**
*应收单号生产规则
*系统自动生成按照特定编码编码暂用KS+年月日+001
*自增长:KS20231111001KS20231111002
*
*/
private String generateNewCode(String prefix, String maxCode) {
if (StringUtils.isEmpty(maxCode)) {
return prefix + "001";
}
// 解析并递增编号
int sequence = Integer.parseInt(maxCode.substring(4)) + 1; // 假设前4位为固定部分
// 检查序列号是否溢出
if (sequence> 999) {
throw new BusinessException("当日编号已达到最大值999,请检查或调整策略。");
}
// 格式化序列号,自动补零至三位
DecimalFormat df = new DecimalFormat("000");
return prefix + df.format(sequence);
}
}

186
ruoyi-admin/src/main/resources/mapper/financial/FinancialReceivablesMapper.xml

@ -0,0 +1,186 @@
<?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.FinancialReceivablesMapper">
<resultMap type="FinancialReceivables" id="FinancialReceivablesResult">
<result property="financialReceivablesId" column="financial_receivables_id" />
<result property="financialReceivablesCode" column="financial_receivables_code" />
<result property="receivablesClosingStatus" column="receivables_closing_status" />
<result property="salesOrderCode" column="sales_order_code" />
<result property="creditAccount" column="credit_account" />
<result property="creditDetail" column="credit_detail" />
<result property="openBank" column="open_bank" />
<result property="openAccount" column="open_account" />
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="contractNumber" column="contract_number" />
<result property="currencyType" column="currency_type" />
<result property="priceExcludingTax" column="price_excluding_tax" />
<result property="priceIncludesTax" column="price_includes_tax" />
<result property="paymentCondition" column="payment_condition" />
<result property="receivedIncludesTax" column="received_includes_tax" />
<result property="notReceivedIncludesTax" column="not_received_includes_tax" />
<result property="businessMembers" column="business_members" />
<result property="financialDeliverStatus" column="financial_deliver_status" />
<result property="receivablesDate" column="receivables_date" />
<result property="receivablesPrice" column="receivables_price" />
<result property="receivablesAbstract" column="receivables_abstract" />
<result property="operatingTime" column="operating_time" />
<result property="receivablesRemark" column="receivables_remark" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectFinancialReceivablesVo">
select financial_receivables_id, financial_receivables_code, receivables_closing_status, sales_order_code, credit_account, credit_detail, open_bank, open_account, customer_id, customer_name, contract_number, currency_type, price_excluding_tax, price_includes_tax, payment_condition, received_includes_tax, not_received_includes_tax, business_members, financial_deliver_status, receivables_date, receivables_price, receivables_abstract, operating_time, receivables_remark, create_time, create_by, update_by, update_time from financial_receivables
</sql>
<select id="selectFinancialReceivablesList" parameterType="FinancialReceivables" resultMap="FinancialReceivablesResult">
<include refid="selectFinancialReceivablesVo"/>
<where>
<if test="financialReceivablesCode != null and financialReceivablesCode != ''"> and financial_receivables_code = #{financialReceivablesCode}</if>
<if test="receivablesClosingStatus != null and receivablesClosingStatus != ''"> and receivables_closing_status = #{receivablesClosingStatus}</if>
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code = #{salesOrderCode}</if>
<if test="creditAccount != null and creditAccount != ''"> and credit_account = #{creditAccount}</if>
<if test="creditDetail != null and creditDetail != ''"> and credit_detail = #{creditDetail}</if>
<if test="openBank != null and openBank != ''"> and open_bank = #{openBank}</if>
<if test="openAccount != null and openAccount != ''"> and open_account = #{openAccount}</if>
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
<if test="contractNumber != null and contractNumber != ''"> and contract_number = #{contractNumber}</if>
<if test="currencyType != null and currencyType != ''"> and currency_type = #{currencyType}</if>
<if test="businessMembers != null and businessMembers != ''"> and business_members = #{businessMembers}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
</where>
</select>
<select id="selectFinancialReceivablesById" parameterType="Long" resultMap="FinancialReceivablesResult">
<include refid="selectFinancialReceivablesVo"/>
where financial_receivables_id = #{financialReceivablesId}
</select>
<insert id="insertFinancialReceivables" parameterType="FinancialReceivables" useGeneratedKeys="true" keyProperty="financialReceivablesId">
insert into financial_receivables
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="financialReceivablesCode != null">financial_receivables_code,</if>
<if test="receivablesClosingStatus != null">receivables_closing_status,</if>
<if test="salesOrderCode != null">sales_order_code,</if>
<if test="creditAccount != null">credit_account,</if>
<if test="creditDetail != null">credit_detail,</if>
<if test="openBank != null">open_bank,</if>
<if test="openAccount != null">open_account,</if>
<if test="customerId != null">customer_id,</if>
<if test="customerName != null">customer_name,</if>
<if test="contractNumber != null">contract_number,</if>
<if test="currencyType != null">currency_type,</if>
<if test="priceExcludingTax != null">price_excluding_tax,</if>
<if test="priceIncludesTax != null">price_includes_tax,</if>
<if test="paymentCondition != null">payment_condition,</if>
<if test="receivedIncludesTax != null">received_includes_tax,</if>
<if test="notReceivedIncludesTax != null">not_received_includes_tax,</if>
<if test="businessMembers != null">business_members,</if>
<if test="financialDeliverStatus != null">financial_deliver_status,</if>
<if test="receivablesDate != null">receivables_date,</if>
<if test="receivablesPrice != null">receivables_price,</if>
<if test="receivablesAbstract != null">receivables_abstract,</if>
<if test="operatingTime != null">operating_time,</if>
<if test="receivablesRemark != null">receivables_remark,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="financialReceivablesCode != null">#{financialReceivablesCode},</if>
<if test="receivablesClosingStatus != null">#{receivablesClosingStatus},</if>
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="creditAccount != null">#{creditAccount},</if>
<if test="creditDetail != null">#{creditDetail},</if>
<if test="openBank != null">#{openBank},</if>
<if test="openAccount != null">#{openAccount},</if>
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="contractNumber != null">#{contractNumber},</if>
<if test="currencyType != null">#{currencyType},</if>
<if test="priceExcludingTax != null">#{priceExcludingTax},</if>
<if test="priceIncludesTax != null">#{priceIncludesTax},</if>
<if test="paymentCondition != null">#{paymentCondition},</if>
<if test="receivedIncludesTax != null">#{receivedIncludesTax},</if>
<if test="notReceivedIncludesTax != null">#{notReceivedIncludesTax},</if>
<if test="businessMembers != null">#{businessMembers},</if>
<if test="financialDeliverStatus != null">#{financialDeliverStatus},</if>
<if test="receivablesDate != null">#{receivablesDate},</if>
<if test="receivablesPrice != null">#{receivablesPrice},</if>
<if test="receivablesAbstract != null">#{receivablesAbstract},</if>
<if test="operatingTime != null">#{operatingTime},</if>
<if test="receivablesRemark != null">#{receivablesRemark},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateFinancialReceivables" parameterType="FinancialReceivables">
update financial_receivables
<trim prefix="SET" suffixOverrides=",">
<if test="financialReceivablesCode != null">financial_receivables_code = #{financialReceivablesCode},</if>
<if test="receivablesClosingStatus != null">receivables_closing_status = #{receivablesClosingStatus},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="creditAccount != null">credit_account = #{creditAccount},</if>
<if test="creditDetail != null">credit_detail = #{creditDetail},</if>
<if test="openBank != null">open_bank = #{openBank},</if>
<if test="openAccount != null">open_account = #{openAccount},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="contractNumber != null">contract_number = #{contractNumber},</if>
<if test="currencyType != null">currency_type = #{currencyType},</if>
<if test="priceExcludingTax != null">price_excluding_tax = #{priceExcludingTax},</if>
<if test="priceIncludesTax != null">price_includes_tax = #{priceIncludesTax},</if>
<if test="paymentCondition != null">payment_condition = #{paymentCondition},</if>
<if test="receivedIncludesTax != null">received_includes_tax = #{receivedIncludesTax},</if>
<if test="notReceivedIncludesTax != null">not_received_includes_tax = #{notReceivedIncludesTax},</if>
<if test="businessMembers != null">business_members = #{businessMembers},</if>
<if test="financialDeliverStatus != null">financial_deliver_status = #{financialDeliverStatus},</if>
<if test="receivablesDate != null">receivables_date = #{receivablesDate},</if>
<if test="receivablesPrice != null">receivables_price = #{receivablesPrice},</if>
<if test="receivablesAbstract != null">receivables_abstract = #{receivablesAbstract},</if>
<if test="operatingTime != null">operating_time = #{operatingTime},</if>
<if test="receivablesRemark != null">receivables_remark = #{receivablesRemark},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where financial_receivables_id = #{financialReceivablesId}
</update>
<delete id="deleteFinancialReceivablesById" parameterType="Long">
delete from financial_receivables where financial_receivables_id = #{financialReceivablesId}
</delete>
<delete id="deleteFinancialReceivablesByIds" parameterType="String">
delete from financial_receivables where financial_receivables_id in
<foreach item="financialReceivablesId" collection="array" open="(" separator="," close=")">
#{financialReceivablesId}
</foreach>
</delete>
<update id="cancelFinancialReceivablesById" parameterType="Long">
update financial_receivables set del_flag = '1' where financial_receivables_id = #{financialReceivablesId}
</update>
<update id="restoreFinancialReceivablesById" parameterType="Long">
update financial_receivables set del_flag = '0' where financial_receivables_id = #{financialReceivablesId}
</update>
<select id="findMaxRoundCode" resultType="String">
SELECT MAX(SUBSTRING(financial_receivables_code, 7)) FROM financial_receivables WHERE financial_receivables_code LIKE CONCAT(#{prefix}, '%')
</select>
</mapper>

189
ruoyi-admin/src/main/resources/templates/financial/receivables/add.html

@ -0,0 +1,189 @@
<!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-receivables-add">
<div class="form-group">
<label class="col-sm-3 control-label">应收单号:</label>
<div class="col-sm-8">
<input name="financialReceivablesCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款结案状态:</label>
<div class="col-sm-8">
<select name="receivablesClosingStatus" class="form-control m-b" th:with="type=${@dict.getType('receivables_closing_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售订单号:</label>
<div class="col-sm-8">
<input name="salesOrderCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">贷方科目:</label>
<div class="col-sm-8">
<input name="creditAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">贷方明细:</label>
<div class="col-sm-8">
<input name="creditDetail" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户银行:</label>
<div class="col-sm-8">
<input name="openBank" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户账号:</label>
<div class="col-sm-8">
<input name="openAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">合同编号:</label>
<div class="col-sm-8">
<input name="contractNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">币种:</label>
<div class="col-sm-8">
<select name="currencyType" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">不含税金额:</label>
<div class="col-sm-8">
<input name="priceExcludingTax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税金额:</label>
<div class="col-sm-8">
<input name="priceIncludesTax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款条件:</label>
<div class="col-sm-8">
<input name="paymentCondition" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实收含税金额:</label>
<div class="col-sm-8">
<input name="receivedIncludesTax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">未收含税金额:</label>
<div class="col-sm-8">
<input name="notReceivedIncludesTax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务人员:</label>
<div class="col-sm-8">
<input name="businessMembers" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发货状态:</label>
<div class="col-sm-8">
<select name="financialDeliverStatus" class="form-control m-b" th:with="type=${@dict.getType('financial_deliver_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="receivablesDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款金额:</label>
<div class="col-sm-8">
<input name="receivablesPrice" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款摘要:</label>
<div class="col-sm-8">
<input name="receivablesAbstract" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">操作时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="operatingTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款备注:</label>
<div class="col-sm-8">
<input name="receivablesRemark" 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 prefix = ctx + "financial/receivables"
$("#form-receivables-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-receivables-add').serialize());
}
}
$("input[name='receivablesDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='operatingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

190
ruoyi-admin/src/main/resources/templates/financial/receivables/edit.html

@ -0,0 +1,190 @@
<!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-receivables-edit" th:object="${financialReceivables}">
<input name="financialReceivablesId" th:field="*{financialReceivablesId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">应收单号:</label>
<div class="col-sm-8">
<input name="financialReceivablesCode" th:field="*{financialReceivablesCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款结案状态:</label>
<div class="col-sm-8">
<select name="receivablesClosingStatus" class="form-control m-b" th:with="type=${@dict.getType('receivables_closing_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{receivablesClosingStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售订单号:</label>
<div class="col-sm-8">
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">贷方科目:</label>
<div class="col-sm-8">
<input name="creditAccount" th:field="*{creditAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">贷方明细:</label>
<div class="col-sm-8">
<input name="creditDetail" th:field="*{creditDetail}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户银行:</label>
<div class="col-sm-8">
<input name="openBank" th:field="*{openBank}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开户账号:</label>
<div class="col-sm-8">
<input name="openAccount" th:field="*{openAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" th:field="*{customerId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">合同编号:</label>
<div class="col-sm-8">
<input name="contractNumber" th:field="*{contractNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">币种:</label>
<div class="col-sm-8">
<select name="currencyType" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{currencyType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">不含税金额:</label>
<div class="col-sm-8">
<input name="priceExcludingTax" th:field="*{priceExcludingTax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">含税金额:</label>
<div class="col-sm-8">
<input name="priceIncludesTax" th:field="*{priceIncludesTax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款条件:</label>
<div class="col-sm-8">
<input name="paymentCondition" th:field="*{paymentCondition}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实收含税金额:</label>
<div class="col-sm-8">
<input name="receivedIncludesTax" th:field="*{receivedIncludesTax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">未收含税金额:</label>
<div class="col-sm-8">
<input name="notReceivedIncludesTax" th:field="*{notReceivedIncludesTax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务人员:</label>
<div class="col-sm-8">
<input name="businessMembers" th:field="*{businessMembers}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发货状态:</label>
<div class="col-sm-8">
<select name="financialDeliverStatus" class="form-control m-b" th:with="type=${@dict.getType('financial_deliver_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{financialDeliverStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="receivablesDate" th:value="${#dates.format(financialReceivables.receivablesDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款金额:</label>
<div class="col-sm-8">
<input name="receivablesPrice" th:field="*{receivablesPrice}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款摘要:</label>
<div class="col-sm-8">
<input name="receivablesAbstract" th:field="*{receivablesAbstract}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">操作时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="operatingTime" th:value="${#dates.format(financialReceivables.operatingTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款备注:</label>
<div class="col-sm-8">
<input name="receivablesRemark" th:field="*{receivablesRemark}" 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 prefix = ctx + "financial/receivables";
$("#form-receivables-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-receivables-edit').serialize());
}
}
$("input[name='receivablesDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='operatingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

245
ruoyi-admin/src/main/resources/templates/financial/receivables/receivables.html

@ -0,0 +1,245 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('财务应收账款列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>应收单号:</label>
<input type="text" name="financialReceivablesCode"/>
</li>
<li>
<label>收款状态:</label>
<select name="receivablesClosingStatus" th:with="type=${@dict.getType('receivables_closing_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>关联单号:</label>
<input type="text" name="salesOrderCode"/>
</li>
<li>
<label>客户ID:</label>
<input type="text" name="customerId"/>
</li>
<li>
<label>贷方科目:</label>
<input type="text" name="creditAccount"/>
</li>
<li>
<label>贷方明细:</label>
<input type="text" name="creditDetail"/>
</li>
<li>
<label>开户银行:</label>
<input type="text" name="openBank"/>
</li>
<li>
<label>开户账号:</label>
<input type="text" name="openAccount"/>
</li>
<li>
<label>币种:</label>
<select name="currencyType" th:with="type=${@dict.getType('sys_common_currency')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>合同编号:</label>
<input type="text" name="contractNumber"/>
</li>
<li>
<label>业务员:</label>
<input type="text" name="businessMembers"/>
</li>
<li>
<label>更新人:</label>
<input type="text" name="updateBy"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li class="select-time">
<label>上次更新时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUpdateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUpdateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="addFinancialReceivables()" shiro:hasPermission="financial:receivables:add">
<i class="fa fa-plus"></i> 添加应收账款
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="financial:receivables:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('financial:receivables:edit')}]];
var removeFlag = [[${@permission.hasPermi('financial:receivables:remove')}]];
var cancelFlag = [[${@permission.hasPermi('financial:receivables:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('financial:receivables:restore')}]];
var receivablesClosingStatusDatas = [[${@dict.getType('receivables_closing_status')}]];
var currencyTypeDatas = [[${@dict.getType('sys_common_currency')}]];
var financialDeliverStatusDatas = [[${@dict.getType('financial_deliver_status')}]];
var prefix = ctx + "financial/receivables";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "财务应收账款",
columns: [{
checkbox: true
},
{
title: '财务应收账款id',
field: 'financialReceivablesId',
visible: false
},
{
title: '应收单号',
field: 'financialReceivablesCode',
},
{
title: '收款结案状态',
field: 'receivablesClosingStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(receivablesClosingStatusDatas, value);
}
},
{
title: '关联单号',
field: 'salesOrderCode',
},
{
title: '贷方科目',
field: 'creditAccount',
},
{
title: '贷方明细',
field: 'creditDetail',
},
{
title: '开户银行',
field: 'openBank',
},
{
title: '开户账号',
field: 'openAccount',
},
{
title: '客户ID',
field: 'customerId',
},
{
title: '合同编号',
field: 'contractNumber',
},
{
title: '币种',
field: 'currencyType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(currencyTypeDatas, value);
}
},
{
title: '不含税金额',
field: 'priceExcludingTax',
},
{
title: '含税金额',
field: 'priceIncludesTax',
},
{
title: '付款条件',
field: 'paymentCondition',
},
{
title: '实收含税金额',
field: 'receivedIncludesTax',
},
{
title: '未收含税金额',
field: 'notReceivedIncludesTax',
},
{
title: '业务员',
field: 'businessMembers',
},
{
title: '发货状态',
field: 'financialDeliverStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(financialDeliverStatusDatas, value);
}
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.financialReceivablesId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
//添加应收账款
function addFinancialReceivables(){
var url=ctx+'financial/receivables/addFinancialReceivables';
$.modal.open("添加应收账款",url);
}
</script>
</body>
</html>
Loading…
Cancel
Save