Browse Source

[feat]财务管理:

应付账款
新增应付账款前端列表页面
新增应付账款Controller
新增应付账款Mapper
新增应付账款Mapper.xml
新增应付账款Service
新增应付账款ServiceImpl
新增应付账款receivables.html
完成数据填充,页面展示,条件查询操作
dev
liuxiaoxu 7 months ago
parent
commit
9128bc6adf
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialAccountsPayableController.java
  2. 381
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialAccountsPayable.java
  3. 77
      ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialAccountsPayableMapper.java
  4. 75
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialAccountsPayableService.java
  5. 126
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialAccountsPayableServiceImpl.java
  6. 187
      ruoyi-admin/src/main/resources/mapper/financial/FinancialAccountsPayableMapper.xml
  7. 186
      ruoyi-admin/src/main/resources/templates/financial/payable/add.html
  8. 187
      ruoyi-admin/src/main/resources/templates/financial/payable/edit.html
  9. 243
      ruoyi-admin/src/main/resources/templates/financial/payable/payable.html

151
ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialAccountsPayableController.java

@ -0,0 +1,151 @@
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.FinancialAccountsPayable;
import com.ruoyi.financial.service.IFinancialAccountsPayableService;
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-10
*/
@Controller
@RequestMapping("/financial/payable")
public class FinancialAccountsPayableController extends BaseController
{
private String prefix = "financial/payable";
@Autowired
private IFinancialAccountsPayableService financialAccountsPayableService;
@RequiresPermissions("financial:payable:view")
@GetMapping()
public String payable()
{
return prefix + "/payable";
}
/**
* 查询财务应付账款列表
*/
@RequiresPermissions("financial:payable:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(FinancialAccountsPayable financialAccountsPayable)
{
startPage();
List<FinancialAccountsPayable> list = financialAccountsPayableService.selectFinancialAccountsPayableList(financialAccountsPayable);
return getDataTable(list);
}
/**
* 导出财务应付账款列表
*/
@RequiresPermissions("financial:payable:export")
@Log(title = "财务应付账款", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(FinancialAccountsPayable financialAccountsPayable)
{
List<FinancialAccountsPayable> list = financialAccountsPayableService.selectFinancialAccountsPayableList(financialAccountsPayable);
ExcelUtil<FinancialAccountsPayable> util = new ExcelUtil<FinancialAccountsPayable>(FinancialAccountsPayable.class);
return util.exportExcel(list, "财务应付账款数据");
}
/**
* 新增财务应付账款
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存财务应付账款
*/
@RequiresPermissions("financial:payable:add")
@Log(title = "财务应付账款", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(FinancialAccountsPayable financialAccountsPayable)
{
return toAjax(financialAccountsPayableService.insertFinancialAccountsPayable(financialAccountsPayable));
}
/**
* 修改财务应付账款
*/
@GetMapping("/edit/{accountsPayableId}")
public String edit(@PathVariable("accountsPayableId") Long accountsPayableId, ModelMap mmap)
{
FinancialAccountsPayable financialAccountsPayable = financialAccountsPayableService.selectFinancialAccountsPayableById(accountsPayableId);
mmap.put("financialAccountsPayable", financialAccountsPayable);
return prefix + "/edit";
}
/**
* 修改保存财务应付账款
*/
@RequiresPermissions("financial:payable:edit")
@Log(title = "财务应付账款", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(FinancialAccountsPayable financialAccountsPayable)
{
return toAjax(financialAccountsPayableService.updateFinancialAccountsPayable(financialAccountsPayable));
}
/**
* 删除财务应付账款
*/
@RequiresPermissions("financial:payable:remove")
@Log(title = "财务应付账款", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(financialAccountsPayableService.deleteFinancialAccountsPayableByIds(ids));
}
/**
* 作废财务应付账款
*/
@RequiresPermissions("financial:payable:cancel")
@Log(title = "财务应付账款", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(financialAccountsPayableService.cancelFinancialAccountsPayableById(id));
}
/**
* 恢复财务应付账款
*/
@RequiresPermissions("financial:payable:restore")
@Log(title = "财务应付账款", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(financialAccountsPayableService.restoreFinancialAccountsPayableById(id));
}
}

381
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialAccountsPayable.java

@ -0,0 +1,381 @@
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_accounts_payable
*
* @author 刘晓旭
* @date 2024-05-10
*/
public class FinancialAccountsPayable extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 财务应付账款id */
private Long accountsPayableId;
/** 应付单号 */
@Excel(name = "应付单号")
private String accountsPayableCode;
/** 付款状态 */
@Excel(name = "付款状态")
private String accountsPayableStatus;
/** 关联单号 */
@Excel(name = "关联单号")
private String relevanceCode;
/** 贷方科目 */
@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 supplierCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName;
/** 合同编号 */
@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 actualPaidPrice;
/** 未付金额 */
@Excel(name = "未付金额")
private String unpaidPrice;
/** 采购员 */
@Excel(name = "采购员")
private String purchaseBuyer;
/** 入库状态 */
@Excel(name = "入库状态")
private String storageStatus;
/** 付款凭证编号 */
@Excel(name = "付款凭证编号")
private String paidVoucherCode;
/** 付款金额 */
@Excel(name = "付款金额")
private BigDecimal paidPrice;
/** 付款时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date paidTime;
/** 付款明细 */
@Excel(name = "付款明细")
private String paidDetail;
/** 收款备注 */
@Excel(name = "收款备注")
private String paidPhotourl;
/** 操作人 */
@Excel(name = "操作人")
private String operatorPeople;
public void setAccountsPayableId(Long accountsPayableId)
{
this.accountsPayableId = accountsPayableId;
}
public Long getAccountsPayableId()
{
return accountsPayableId;
}
public void setAccountsPayableCode(String accountsPayableCode)
{
this.accountsPayableCode = accountsPayableCode;
}
public String getAccountsPayableCode()
{
return accountsPayableCode;
}
public void setAccountsPayableStatus(String accountsPayableStatus)
{
this.accountsPayableStatus = accountsPayableStatus;
}
public String getAccountsPayableStatus()
{
return accountsPayableStatus;
}
public void setRelevanceCode(String relevanceCode)
{
this.relevanceCode = relevanceCode;
}
public String getRelevanceCode()
{
return relevanceCode;
}
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 setSupplierCode(String supplierCode)
{
this.supplierCode = supplierCode;
}
public String getSupplierCode()
{
return supplierCode;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
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 setActualPaidPrice(String actualPaidPrice)
{
this.actualPaidPrice = actualPaidPrice;
}
public String getActualPaidPrice()
{
return actualPaidPrice;
}
public void setUnpaidPrice(String unpaidPrice)
{
this.unpaidPrice = unpaidPrice;
}
public String getUnpaidPrice()
{
return unpaidPrice;
}
public void setPurchaseBuyer(String purchaseBuyer)
{
this.purchaseBuyer = purchaseBuyer;
}
public String getPurchaseBuyer()
{
return purchaseBuyer;
}
public void setStorageStatus(String storageStatus)
{
this.storageStatus = storageStatus;
}
public String getStorageStatus()
{
return storageStatus;
}
public void setPaidVoucherCode(String paidVoucherCode)
{
this.paidVoucherCode = paidVoucherCode;
}
public String getPaidVoucherCode()
{
return paidVoucherCode;
}
public void setPaidPrice(BigDecimal paidPrice)
{
this.paidPrice = paidPrice;
}
public BigDecimal getPaidPrice()
{
return paidPrice;
}
public void setPaidTime(Date paidTime)
{
this.paidTime = paidTime;
}
public Date getPaidTime()
{
return paidTime;
}
public void setPaidDetail(String paidDetail)
{
this.paidDetail = paidDetail;
}
public String getPaidDetail()
{
return paidDetail;
}
public void setPaidPhotourl(String paidPhotourl)
{
this.paidPhotourl = paidPhotourl;
}
public String getPaidPhotourl()
{
return paidPhotourl;
}
public void setOperatorPeople(String operatorPeople)
{
this.operatorPeople = operatorPeople;
}
public String getOperatorPeople()
{
return operatorPeople;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("accountsPayableId", getAccountsPayableId())
.append("accountsPayableCode", getAccountsPayableCode())
.append("accountsPayableStatus", getAccountsPayableStatus())
.append("relevanceCode", getRelevanceCode())
.append("creditAccount", getCreditAccount())
.append("creditDetail", getCreditDetail())
.append("openBank", getOpenBank())
.append("openAccount", getOpenAccount())
.append("supplierCode", getSupplierCode())
.append("supplierName", getSupplierName())
.append("contractNumber", getContractNumber())
.append("currencyType", getCurrencyType())
.append("priceExcludingTax", getPriceExcludingTax())
.append("priceIncludesTax", getPriceIncludesTax())
.append("paymentCondition", getPaymentCondition())
.append("actualPaidPrice", getActualPaidPrice())
.append("unpaidPrice", getUnpaidPrice())
.append("purchaseBuyer", getPurchaseBuyer())
.append("storageStatus", getStorageStatus())
.append("paidVoucherCode", getPaidVoucherCode())
.append("paidPrice", getPaidPrice())
.append("paidTime", getPaidTime())
.append("paidDetail", getPaidDetail())
.append("paidPhotourl", getPaidPhotourl())
.append("operatorPeople", getOperatorPeople())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

77
ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialAccountsPayableMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.financial.mapper;
import java.util.List;
import com.ruoyi.financial.domain.FinancialAccountsPayable;
/**
* 财务应付账款Mapper接口
*
* @author 刘晓旭
* @date 2024-05-10
*/
public interface FinancialAccountsPayableMapper
{
/**
* 查询财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 财务应付账款
*/
public FinancialAccountsPayable selectFinancialAccountsPayableById(Long accountsPayableId);
/**
* 查询财务应付账款列表
*
* @param financialAccountsPayable 财务应付账款
* @return 财务应付账款集合
*/
public List<FinancialAccountsPayable> selectFinancialAccountsPayableList(FinancialAccountsPayable financialAccountsPayable);
/**
* 新增财务应付账款
*
* @param financialAccountsPayable 财务应付账款
* @return 结果
*/
public int insertFinancialAccountsPayable(FinancialAccountsPayable financialAccountsPayable);
/**
* 修改财务应付账款
*
* @param financialAccountsPayable 财务应付账款
* @return 结果
*/
public int updateFinancialAccountsPayable(FinancialAccountsPayable financialAccountsPayable);
/**
* 删除财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
public int deleteFinancialAccountsPayableById(Long accountsPayableId);
/**
* 批量删除财务应付账款
*
* @param accountsPayableIds 需要删除的数据ID
* @return 结果
*/
public int deleteFinancialAccountsPayableByIds(String[] accountsPayableIds);
/**
* 作废财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
public int cancelFinancialAccountsPayableById(Long accountsPayableId);
/**
* 恢复财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
public int restoreFinancialAccountsPayableById(Long accountsPayableId);
}

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

@ -0,0 +1,75 @@
package com.ruoyi.financial.service;
import java.util.List;
import com.ruoyi.financial.domain.FinancialAccountsPayable;
/**
* 财务应付账款Service接口
*
* @author 刘晓旭
* @date 2024-05-10
*/
public interface IFinancialAccountsPayableService
{
/**
* 查询财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 财务应付账款
*/
public FinancialAccountsPayable selectFinancialAccountsPayableById(Long accountsPayableId);
/**
* 查询财务应付账款列表
*
* @param financialAccountsPayable 财务应付账款
* @return 财务应付账款集合
*/
public List<FinancialAccountsPayable> selectFinancialAccountsPayableList(FinancialAccountsPayable financialAccountsPayable);
/**
* 新增财务应付账款
*
* @param financialAccountsPayable 财务应付账款
* @return 结果
*/
public int insertFinancialAccountsPayable(FinancialAccountsPayable financialAccountsPayable);
/**
* 修改财务应付账款
*
* @param financialAccountsPayable 财务应付账款
* @return 结果
*/
public int updateFinancialAccountsPayable(FinancialAccountsPayable financialAccountsPayable);
/**
* 批量删除财务应付账款
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteFinancialAccountsPayableByIds(String ids);
/**
* 删除财务应付账款信息
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
public int deleteFinancialAccountsPayableById(Long accountsPayableId);
/**
* 作废财务应付账款
* @param accountsPayableId 财务应付账款ID
* @return
*/
int cancelFinancialAccountsPayableById(Long accountsPayableId);
/**
* 恢复财务应付账款
* @param accountsPayableId 财务应付账款ID
* @return
*/
int restoreFinancialAccountsPayableById(Long accountsPayableId);
}

126
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialAccountsPayableServiceImpl.java

@ -0,0 +1,126 @@
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.FinancialAccountsPayableMapper;
import com.ruoyi.financial.domain.FinancialAccountsPayable;
import com.ruoyi.financial.service.IFinancialAccountsPayableService;
import com.ruoyi.common.core.text.Convert;
/**
* 财务应付账款Service业务层处理
*
* @author 刘晓旭
* @date 2024-05-10
*/
@Service
public class FinancialAccountsPayableServiceImpl implements IFinancialAccountsPayableService
{
@Autowired
private FinancialAccountsPayableMapper financialAccountsPayableMapper;
/**
* 查询财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 财务应付账款
*/
@Override
public FinancialAccountsPayable selectFinancialAccountsPayableById(Long accountsPayableId)
{
return financialAccountsPayableMapper.selectFinancialAccountsPayableById(accountsPayableId);
}
/**
* 查询财务应付账款列表
*
* @param financialAccountsPayable 财务应付账款
* @return 财务应付账款
*/
@Override
public List<FinancialAccountsPayable> selectFinancialAccountsPayableList(FinancialAccountsPayable financialAccountsPayable)
{
return financialAccountsPayableMapper.selectFinancialAccountsPayableList(financialAccountsPayable);
}
/**
* 新增财务应付账款
*
* @param financialAccountsPayable 财务应付账款
* @return 结果
*/
@Override
public int insertFinancialAccountsPayable(FinancialAccountsPayable financialAccountsPayable)
{
financialAccountsPayable.setCreateTime(DateUtils.getNowDate());
String loginName = ShiroUtils.getLoginName();
financialAccountsPayable.setCreateBy(loginName);
return financialAccountsPayableMapper.insertFinancialAccountsPayable(financialAccountsPayable);
}
/**
* 修改财务应付账款
*
* @param financialAccountsPayable 财务应付账款
* @return 结果
*/
@Override
public int updateFinancialAccountsPayable(FinancialAccountsPayable financialAccountsPayable)
{
String loginName = ShiroUtils.getLoginName();
financialAccountsPayable.setUpdateBy(loginName);
financialAccountsPayable.setUpdateTime(DateUtils.getNowDate());
return financialAccountsPayableMapper.updateFinancialAccountsPayable(financialAccountsPayable);
}
/**
* 删除财务应付账款对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteFinancialAccountsPayableByIds(String ids)
{
return financialAccountsPayableMapper.deleteFinancialAccountsPayableByIds(Convert.toStrArray(ids));
}
/**
* 删除财务应付账款信息
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
@Override
public int deleteFinancialAccountsPayableById(Long accountsPayableId)
{
return financialAccountsPayableMapper.deleteFinancialAccountsPayableById(accountsPayableId);
}
/**
* 作废财务应付账款
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
@Override
public int cancelFinancialAccountsPayableById(Long accountsPayableId)
{
return financialAccountsPayableMapper.cancelFinancialAccountsPayableById(accountsPayableId);
}
/**
* 恢复财务应付账款信息
*
* @param accountsPayableId 财务应付账款ID
* @return 结果
*/
@Override
public int restoreFinancialAccountsPayableById(Long accountsPayableId)
{
return financialAccountsPayableMapper.restoreFinancialAccountsPayableById(accountsPayableId);
}
}

187
ruoyi-admin/src/main/resources/mapper/financial/FinancialAccountsPayableMapper.xml

@ -0,0 +1,187 @@
<?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.FinancialAccountsPayableMapper">
<resultMap type="FinancialAccountsPayable" id="FinancialAccountsPayableResult">
<result property="accountsPayableId" column="accounts_payable_id" />
<result property="accountsPayableCode" column="accounts_payable_code" />
<result property="accountsPayableStatus" column="accounts_payable_status" />
<result property="relevanceCode" column="relevance_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="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_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="actualPaidPrice" column="actual_paid_price" />
<result property="unpaidPrice" column="unpaid_price" />
<result property="purchaseBuyer" column="purchase_buyer" />
<result property="storageStatus" column="storage_status" />
<result property="paidVoucherCode" column="paid_voucher_code" />
<result property="paidPrice" column="paid_price" />
<result property="paidTime" column="paid_time" />
<result property="paidDetail" column="paid_detail" />
<result property="paidPhotourl" column="paid_photoUrl" />
<result property="operatorPeople" column="operator_people" />
<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="selectFinancialAccountsPayableVo">
select accounts_payable_id, accounts_payable_code, accounts_payable_status, relevance_code, credit_account, credit_detail, open_bank, open_account, supplier_code, supplier_name, contract_number, currency_type, price_excluding_tax, price_includes_tax, payment_condition, actual_paid_price, unpaid_price, purchase_buyer, storage_status, paid_voucher_code, paid_price, paid_time, paid_detail, paid_photoUrl, operator_people, create_time, create_by, update_by, update_time from financial_accounts_payable
</sql>
<select id="selectFinancialAccountsPayableList" parameterType="FinancialAccountsPayable" resultMap="FinancialAccountsPayableResult">
<include refid="selectFinancialAccountsPayableVo"/>
<where>
<if test="accountsPayableCode != null and accountsPayableCode != ''"> and accounts_payable_code = #{accountsPayableCode}</if>
<if test="accountsPayableStatus != null and accountsPayableStatus != ''"> and accounts_payable_status = #{accountsPayableStatus}</if>
<if test="relevanceCode != null and relevanceCode != ''"> and relevance_code = #{relevanceCode}</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="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</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="purchaseBuyer != null and purchaseBuyer != ''"> and purchase_buyer like concat('%', #{purchaseBuyer}, '%')</if>
<if test="storageStatus != null and storageStatus != ''"> and storage_status = #{storageStatus}</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="selectFinancialAccountsPayableById" parameterType="Long" resultMap="FinancialAccountsPayableResult">
<include refid="selectFinancialAccountsPayableVo"/>
where accounts_payable_id = #{accountsPayableId}
</select>
<insert id="insertFinancialAccountsPayable" parameterType="FinancialAccountsPayable" useGeneratedKeys="true" keyProperty="accountsPayableId">
insert into financial_accounts_payable
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accountsPayableCode != null">accounts_payable_code,</if>
<if test="accountsPayableStatus != null">accounts_payable_status,</if>
<if test="relevanceCode != null">relevance_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="supplierCode != null">supplier_code,</if>
<if test="supplierName != null">supplier_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="actualPaidPrice != null">actual_paid_price,</if>
<if test="unpaidPrice != null">unpaid_price,</if>
<if test="purchaseBuyer != null">purchase_buyer,</if>
<if test="storageStatus != null">storage_status,</if>
<if test="paidVoucherCode != null">paid_voucher_code,</if>
<if test="paidPrice != null">paid_price,</if>
<if test="paidTime != null">paid_time,</if>
<if test="paidDetail != null">paid_detail,</if>
<if test="paidPhotourl != null">paid_photoUrl,</if>
<if test="operatorPeople != null">operator_people,</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="accountsPayableCode != null">#{accountsPayableCode},</if>
<if test="accountsPayableStatus != null">#{accountsPayableStatus},</if>
<if test="relevanceCode != null">#{relevanceCode},</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="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</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="actualPaidPrice != null">#{actualPaidPrice},</if>
<if test="unpaidPrice != null">#{unpaidPrice},</if>
<if test="purchaseBuyer != null">#{purchaseBuyer},</if>
<if test="storageStatus != null">#{storageStatus},</if>
<if test="paidVoucherCode != null">#{paidVoucherCode},</if>
<if test="paidPrice != null">#{paidPrice},</if>
<if test="paidTime != null">#{paidTime},</if>
<if test="paidDetail != null">#{paidDetail},</if>
<if test="paidPhotourl != null">#{paidPhotourl},</if>
<if test="operatorPeople != null">#{operatorPeople},</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="updateFinancialAccountsPayable" parameterType="FinancialAccountsPayable">
update financial_accounts_payable
<trim prefix="SET" suffixOverrides=",">
<if test="accountsPayableCode != null">accounts_payable_code = #{accountsPayableCode},</if>
<if test="accountsPayableStatus != null">accounts_payable_status = #{accountsPayableStatus},</if>
<if test="relevanceCode != null">relevance_code = #{relevanceCode},</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="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</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="actualPaidPrice != null">actual_paid_price = #{actualPaidPrice},</if>
<if test="unpaidPrice != null">unpaid_price = #{unpaidPrice},</if>
<if test="purchaseBuyer != null">purchase_buyer = #{purchaseBuyer},</if>
<if test="storageStatus != null">storage_status = #{storageStatus},</if>
<if test="paidVoucherCode != null">paid_voucher_code = #{paidVoucherCode},</if>
<if test="paidPrice != null">paid_price = #{paidPrice},</if>
<if test="paidTime != null">paid_time = #{paidTime},</if>
<if test="paidDetail != null">paid_detail = #{paidDetail},</if>
<if test="paidPhotourl != null">paid_photoUrl = #{paidPhotourl},</if>
<if test="operatorPeople != null">operator_people = #{operatorPeople},</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 accounts_payable_id = #{accountsPayableId}
</update>
<delete id="deleteFinancialAccountsPayableById" parameterType="Long">
delete from financial_accounts_payable where accounts_payable_id = #{accountsPayableId}
</delete>
<delete id="deleteFinancialAccountsPayableByIds" parameterType="String">
delete from financial_accounts_payable where accounts_payable_id in
<foreach item="accountsPayableId" collection="array" open="(" separator="," close=")">
#{accountsPayableId}
</foreach>
</delete>
<update id="cancelFinancialAccountsPayableById" parameterType="Long">
update financial_accounts_payable set del_flag = '1' where accounts_payable_id = #{accountsPayableId}
</update>
<update id="restoreFinancialAccountsPayableById" parameterType="Long">
update financial_accounts_payable set del_flag = '0' where accounts_payable_id = #{accountsPayableId}
</update>
</mapper>

186
ruoyi-admin/src/main/resources/templates/financial/payable/add.html

@ -0,0 +1,186 @@
<!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-payable-add">
<div class="form-group">
<label class="col-sm-3 control-label">应付单号:</label>
<div class="col-sm-8">
<input name="accountsPayableCode" 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="accountsPayableStatus" class="form-control m-b" th:with="type=${@dict.getType('accounts_payable_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="relevanceCode" 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="supplierCode" 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="supplierName" 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="actualPaidPrice" 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="unpaidPrice" 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="purchaseBuyer" 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="storageStatus" class="form-control m-b" th:with="type=${@dict.getType('erp_inbound_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="paidVoucherCode" 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="paidPrice" 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="paidTime" 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="paidDetail" 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="paidPhotourl" 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="operatorPeople" 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/payable"
$("#form-payable-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-payable-add').serialize());
}
}
$("input[name='paidTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

187
ruoyi-admin/src/main/resources/templates/financial/payable/edit.html

@ -0,0 +1,187 @@
<!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-payable-edit" th:object="${financialAccountsPayable}">
<input name="accountsPayableId" th:field="*{accountsPayableId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">应付单号:</label>
<div class="col-sm-8">
<input name="accountsPayableCode" th:field="*{accountsPayableCode}" 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="accountsPayableStatus" class="form-control m-b" th:with="type=${@dict.getType('accounts_payable_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{accountsPayableStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="relevanceCode" th:field="*{relevanceCode}" 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="supplierCode" th:field="*{supplierCode}" 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="supplierName" th:field="*{supplierName}" 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="actualPaidPrice" th:field="*{actualPaidPrice}" 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="unpaidPrice" th:field="*{unpaidPrice}" 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="purchaseBuyer" th:field="*{purchaseBuyer}" 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="storageStatus" class="form-control m-b" th:with="type=${@dict.getType('erp_inbound_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{storageStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款凭证编号:</label>
<div class="col-sm-8">
<input name="paidVoucherCode" th:field="*{paidVoucherCode}" 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="paidPrice" th:field="*{paidPrice}" 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="paidTime" th:value="${#dates.format(financialAccountsPayable.paidTime, '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="paidDetail" th:field="*{paidDetail}" 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="paidPhotourl" th:field="*{paidPhotourl}" 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="operatorPeople" th:field="*{operatorPeople}" 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/payable";
$("#form-payable-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-payable-edit').serialize());
}
}
$("input[name='paidTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

243
ruoyi-admin/src/main/resources/templates/financial/payable/payable.html

@ -0,0 +1,243 @@
<!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="accountsPayableCode"/>
</li>
<li>
<label>付款状态:</label>
<select name="accountsPayableStatus" th:with="type=${@dict.getType('accounts_payable_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="relevanceCode"/>
</li>
<li>
<label>供应商ID:</label>
<input type="text" name="supplierCode"/>
</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="purchaseBuyer"/>
</li>
<li>
<label>入库状态:</label>
<select name="storageStatus" th:with="type=${@dict.getType('erp_inbound_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="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-warning" onclick="$.table.exportExcel()" shiro:hasPermission="financial:payable: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:payable:edit')}]];
var removeFlag = [[${@permission.hasPermi('financial:payable:remove')}]];
var cancelFlag = [[${@permission.hasPermi('financial:payable:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('financial:payable:restore')}]];
var accountsPayableStatusDatas = [[${@dict.getType('accounts_payable_status')}]];
var currencyTypeDatas = [[${@dict.getType('sys_common_currency')}]];
var storageStatusDatas = [[${@dict.getType('erp_inbound_status')}]];
var prefix = ctx + "financial/payable";
$(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: 'accountsPayableId',
visible: false
},
{
title: '应付单号',
field: 'accountsPayableCode',
},
{
title: '付款状态',
field: 'accountsPayableStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(accountsPayableStatusDatas, value);
}
},
{
title: '关联单号',
field: 'relevanceCode',
},
{
title: '供应商ID',
field: 'supplierCode',
},
{
title: '供应商名称',
field: 'supplierName',
},
{
title: '开户银行',
field: 'openBank',
},
{
title: '开户账号',
field: 'openAccount',
},
{
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: 'actualPaidPrice',
},
{
title: '未付金额',
field: 'unpaidPrice',
},
{
title: '采购员',
field: 'purchaseBuyer',
},
{
title: '入库状态',
field: 'storageStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(storageStatusDatas, value);
}
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '录入人',
field: 'createBy',
},
{
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.accountsPayableId + '\')"><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.accountsPayableId + '\')"><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);
});
</script>
</body>
</html>
Loading…
Cancel
Save