Browse Source

[feat] 新增:字典新增借方科目:下拉选项为0 银行存款,1 为现金。开户银行:0表示 中行基本户,1表示建行一般户

修改:财务应付框创建收款凭证(销售订单),
修改开户银行,从input输入框改为下拉选项,提供选择。
导出是@excel注解新增@Excel(name = "借方科目", readConverterExp="0=银行存款,1=现金"),修改mapper.xml
插入SQL语句新增字段debitaccount。
新增:收款凭证导出方法excelReceivablesVoucher().
dev
zhangsiqi 3 months ago
parent
commit
f27c124cc1
  1. 66
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialReceivablesController.java
  2. 40
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivables.java
  3. 12
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivablesRecords.java
  4. 2
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/VO/FinancialReceivablesRecordsVO.java
  5. 7
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialReceivablesService.java
  6. 14
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java
  7. 60
      ruoyi-admin/src/main/resources/mapper/financial/FinancialReceivablesMapper.xml
  8. 2
      ruoyi-admin/src/main/resources/templates/financial/receivables/addFinancialReceivables.html
  9. 110
      ruoyi-admin/src/main/resources/templates/financial/receivables/addReceivablesVoucher.html
  10. 82
      ruoyi-admin/src/main/resources/templates/financial/receivables/addReceivablesVoucherNoSales.html

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

@ -1,11 +1,24 @@
package com.ruoyi.financial.controller;
import java.io.*;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.ruoyi.financial.domain.FinancialReceivablesRecords;
import com.ruoyi.financial.service.IFinancialReceivablesRecordsService;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
@ -17,6 +30,12 @@ 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;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.alibaba.excel.write.metadata.WriteSheet;
/**
* 财务应收账款Controller
@ -28,6 +47,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RequestMapping("/financial/receivables")
public class FinancialReceivablesController extends BaseController
{
private static final String CHARSET_UTF8 = "utf-8";
private String prefix = "financial/receivables";
@Autowired
@ -127,6 +147,49 @@ public class FinancialReceivablesController extends BaseController
}
return prefix + "/addReceivablesVoucher";
}
/**导出收款凭证*/
@RequiresPermissions("financial:receivables:export")
@Log(title = "财务应收账款凭证", businessType = BusinessType.EXPORT)
@GetMapping("/excelReceivablesVoucher/{financialReceivablesId}")
public void excelReceivablesVoucher(@PathVariable("financialReceivablesId") Long financialReceivablesId,HttpServletResponse response) throws IOException {
FinancialReceivables financialReceivables = financialReceivablesService.selectFinancialReceivablesById(financialReceivablesId);
// 模版位置
String name = "FinancialReceiptVoucherTemplate.xlsx";
// 设置响应头,指定文件名和文件类型
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("FinancialReceiptVoucher.xlsx", "UTF-8"));
response.setContentType("application/octet-stream");
InputStream inputStream = null;
try {
// 获取模板文件的输入流
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
if (inputStream == null) {
throw new FileNotFoundException("模板文件未找到:" + name);
}
// 创建一个ExcelWriterBuilder对象,并指定输出流和输入流
ExcelWriterBuilder writerBuilder = EasyExcel.write(response.getOutputStream());
// 创建一个WriteSheet对象,并指定模板中的Sheet编号
WriteSheet writeSheet = EasyExcel.writerSheet(0).build();
// 将数据写入Excel文件
writerBuilder.withTemplate(inputStream).sheet("sheet1").doFill(financialReceivables);
} finally {
// 关闭输入流
if (inputStream != null) {
inputStream.close();
}
}
// 刷新输出流
response.flushBuffer();
}
/**
* 新增保存销售订单创建收款凭证
@ -241,4 +304,7 @@ public class FinancialReceivablesController extends BaseController
return getDataTable(financialReceivablesRecords);
}
}

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

@ -6,10 +6,12 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.financial.domain.VO.FinancialReceivablesRecordsVO;
import lombok.Data;
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;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
/**
* 财务应收账款对象 financial_receivables
@ -17,6 +19,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author 刘晓旭
* @date 2024-05-08
*/
@Data
public class FinancialReceivables extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -35,6 +38,9 @@ public class FinancialReceivables extends BaseEntity
/** 关联销售订单号 */
@Excel(name = "关联销售订单号")
private String salesOrderCode;
/*借方科目*/
@Excel(name = "借方科目", readConverterExp="0=银行存款,1=现金")
private String debitAccount;
/** 贷方科目 */
@Excel(name = "贷方科目")
@ -45,7 +51,7 @@ public class FinancialReceivables extends BaseEntity
private String creditDetail;
/** 开户银行 */
@Excel(name = "开户银行")
@Excel(name = "开户银行",readConverterExp="0=中行基本户,建行一般户")
private String openBank;
/** 开户账号 */
@ -113,10 +119,41 @@ public class FinancialReceivables extends BaseEntity
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date operatingTime;
/*年*/
private String year;
/*月*/
private String month;
/*日*/
private String day;
/** 收款备注 */
@Excel(name = "收款备注")
private String receivablesRemark;
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
/** 收款记录集合 */
List<FinancialReceivablesRecords> receivablesRecordsList;
@ -354,7 +391,6 @@ public class FinancialReceivables extends BaseEntity
public void setReceivablesRecordsVOList(List<FinancialReceivablesRecordsVO> receivablesRecordsVOList) {
this.receivablesRecordsVOList = receivablesRecordsVOList;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

12
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivablesRecords.java

@ -51,8 +51,18 @@ public class FinancialReceivablesRecords extends BaseEntity
/** 收款备注 */
@Excel(name = "收款备注")
private String receivablesRemark;
/*获取当前登录的账号*/
private String operatingPerson;
public void setReceivablesRecordsId(Long receivablesRecordsId)
public String getOperatingPerson() {
return operatingPerson;
}
public void setOperatingPerson(String operatingPerson) {
this.operatingPerson = operatingPerson;
}
public void setReceivablesRecordsId(Long receivablesRecordsId)
{
this.receivablesRecordsId = receivablesRecordsId;
}

2
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/VO/FinancialReceivablesRecordsVO.java

@ -47,3 +47,5 @@ public class FinancialReceivablesRecordsVO extends BaseEntity {
@Excel(name = "收款备注")
private String receivablesRemark;
}

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

@ -1,6 +1,8 @@
package com.ruoyi.financial.service;
import java.util.List;
import java.util.Map;
import com.ruoyi.financial.domain.FinancialReceivables;
/**
@ -87,4 +89,9 @@ public interface IFinancialReceivablesService
* 销售订单审批完成后根据销售单号生成财务应收账款
* */
int generateReceivablesBySalesOrderCode(String salesOrderCode);
/**
* 查询导出收款凭证
*/
Map<String, Object> exportReceivables(FinancialReceivables financialReceivables);
}

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

@ -4,7 +4,9 @@ import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
@ -198,6 +200,18 @@ public class FinancialReceivablesServiceImpl implements IFinancialReceivablesSer
}
@Override
public Map<String, Object> exportReceivables(FinancialReceivables financialReceivables) {
//获取应收账款列表
FinancialReceivables financialReceivablesList = financialReceivablesMapper.selectFinancialReceivablesById(financialReceivables.getFinancialReceivablesId());
FinancialReceivablesRecords financialReceivablesRecords = new FinancialReceivablesRecords();
financialReceivablesRecords.setFinancialReceivablesCode(financialReceivablesList.getFinancialReceivablesCode());
//再获取对应应收账款的收款凭证列表
List<FinancialReceivablesRecords> financialReceivablesRecordsList = receivablesRecordsMapper.selectFinancialReceivablesRecordsList(financialReceivablesRecords);
Map<String, Object> map = new HashMap<>();
return map;
}
/**
* 删除财务应收账款对象

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

@ -5,34 +5,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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" />
<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="debitAccount" column="debit_account" />
<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">
@ -70,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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">debit_account,</if>
<if test="creditAccount != null">credit_account,</if>
<if test="creditDetail != null">credit_detail,</if>
<if test="openBank != null">open_bank,</if>
@ -99,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialReceivablesCode != null">#{financialReceivablesCode},</if>
<if test="receivablesClosingStatus != null">#{receivablesClosingStatus},</if>
<if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="creditAccount != null">#{debitAccount},</if>
<if test="creditAccount != null">#{creditAccount},</if>
<if test="creditDetail != null">#{creditDetail},</if>
<if test="openBank != null">#{openBank},</if>
@ -132,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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">debit_account = #{debitAccount},</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>

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

@ -31,7 +31,7 @@
<input name="openAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group"><label class="col-sm-3 control-label">币种:</label>
<div class="form-group"><label class="col-sm-3 control-label is-required">收款币种:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}">
<input type="radio"

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

@ -15,6 +15,15 @@
<input name="financialReceivablesCode" th:field="*{financialReceivablesCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">借方科目:</label>
<div class="col-sm-8">
<select name="debitAccount" th:field="*{debitAccount}" class="form-control" th:with="type=${@dict.getType('receivables_debit_entry')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{debitAccount}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款状态:</label>
<div class="col-sm-8">
@ -44,7 +53,11 @@
<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">
<select name="openBank" th:field="*{openBank}" class="form-control" th:with="type=${@dict.getType('receivables_bank')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{openBank}"></option>
</select>
<!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>-->
</div>
</div>
<div class="form-group">
@ -53,13 +66,13 @@
<input name="openAccount" th:field="*{openAccount}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<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" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">合同编号:</label>
<div class="col-sm-8">
<input name="contractNumber" th:field="*{contractNumber}" class="form-control" type="text" readonly>
@ -92,6 +105,12 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">已收金额:</label>
<div class="col-sm-8">
<input name="paymentCond" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<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')}" readonly disabled>
@ -99,7 +118,7 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<input name="businessMembers" th:field="*{businessMembers}" class="form-control" type="text" readonly>
@ -142,9 +161,7 @@
<script th:inline="javascript">
var financialReceivables = [[${financialReceivables}]];
var prefix = ctx + "financial/receivables";
$("#form-receivables-edit").validate({
focusCleanup: true
});
$("#form-receivables-edit").validate({focusCleanup: true});
function submitHandler() {
// 获取表单数据
@ -208,35 +225,17 @@
showSearch:false,
queryParams:queryParams,
columns: [
{
title: '财务应收账款记录id',
field: 'receivablesRecordsId',
visible: false
},
{
title: '操作时间',
field: 'operatingTime',
},
{
title: '摘要',
field: 'receivablesAbstract',
},
{
title: '收款金额',
field: 'receivablesPrice',
{title: '财务应收账款记录id', field: 'receivablesRecordsId', visible: false},
{title: '操作时间', field: 'operatingTime',},
{title: '摘要', field: 'receivablesAbstract',},
{title: '收款金额', field: 'receivablesPrice',
formatter: function(value, row, index) {
// 格式化收款金额为保留两位小数的字符串
return parseFloat(value).toFixed(2);
}
},
{
title: '收款日期',
field: 'receivablesDate',
},
{
title: '收款备注',
field: 'receivablesRemark',
},
{title: '收款日期', field: 'receivablesDate',},
{title: '收款备注', field: 'receivablesRemark',},
]
};
$.table.init(options);
@ -277,47 +276,22 @@
showRefresh:false,
showSearch:false,
singleSelect:true,
columns: [{
checkbox: false
},
{
title: '财务应收账款记录id',
field: 'receivablesRecordsId',
visible: false
},
{
title: '收款日期',
field: 'receivablesDate',
editable : {
type: 'date',
clear: false,
title: '请选择日期:'
}
columns: [
{checkbox: false},
{title: '财务应收账款记录id', field: 'receivablesRecordsId', visible: false},
{title: '收款日期', field: 'receivablesDate',
editable : {type: 'date', clear: false, title: '请选择日期:'}
},
{
title: '收款金额',
field: 'receivablesPrice',
editable: {
type: 'text', // 表示该列可以被编辑为文本
},
{title: '收款金额', field: 'receivablesPrice',
editable: {type: 'text',},
},
{
title: '收款摘要',
field: 'receivablesAbstract',
editable: {
type: 'text', // 表示该列可以被编辑为文本
},
{title: '收款摘要', field: 'receivablesAbstract',
editable: {type: 'text',},
},
{
title: '收款备注',
field: 'receivablesRemark',
editable: {
type: 'text', // 表示该列可以被编辑为文本
},
{title: '收款备注', field: 'receivablesRemark',
editable: {type: 'text', },
},
{
title: '操作',
align: 'center',
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> ');

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

@ -15,6 +15,15 @@
<input name="financialReceivablesCode" th:field="*{financialReceivablesCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">借方科目:</label>
<div class="col-sm-8">
<select name="debitAccount" th:field="*{debitAccount}" class="form-control" th:with="type=${@dict.getType('receivables_debit_entry')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{debitAccount}"></option>
</select>
<!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收款状态:</label>
<div class="col-sm-8">
@ -38,7 +47,10 @@
<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" readonly>
<select name="openBank" th:field="*{openBank}" class="form-control" th:with="type=${@dict.getType('receivables_bank')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{openBank}"></option>
</select>
<!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>-->
</div>
</div>
<div class="form-group">
@ -47,7 +59,7 @@
<input name="openAccount" th:field="*{openAccount}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">合同编号:</label>
<div class="col-sm-8">
<input name="contractNumber" th:field="*{contractNumber}" class="form-control" type="text" readonly>
@ -79,6 +91,12 @@
<input name="paymentCondition" th:field="*{paymentCondition}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">已收金额:</label>
<div class="col-sm-8">
<input name="remarks" class="form-control" type="text" readonly>
</div>
</div>
</form>
<div class="container">
<!-- 收款记录 -->
@ -116,10 +134,7 @@
<script th:inline="javascript">
var financialReceivables = [[${financialReceivables}]];
var prefix = ctx + "financial/receivables";
$("#form-receivables-edit").validate({
focusCleanup: true
});
$("#form-receivables-edit").validate({focusCleanup: true});
function submitHandler() {
// 获取表单数据
const financialReceivablesData = $("#form-receivables-edit").serializeArray().reduce((obj, item) => {
@ -153,20 +168,6 @@
$.operate.saveJson(prefix + "/addReceivablesVoucherNoSales", jsonData);
}
$("input[name='receivablesDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='operatingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
/*根据收款编号对应的收款明细*/
$(function() {
var options = {
@ -239,31 +240,12 @@
showRefresh:false,
showSearch:false,
singleSelect:true,
columns: [{
checkbox: false
},
{
title: '财务应收账款记录id',
field: 'receivablesRecordsId',
visible: false
},
{
title: '收款摘要',
field: 'receivablesAbstract',
editable: {
type: 'text', // 表示该列可以被编辑为文本
},
},
{
title: '收款金额',
field: 'receivablesPrice',
editable: {
type: 'text', // 表示该列可以被编辑为文本
},
},
{
title: '操作',
align: 'center',
columns: [
{checkbox: false},
{title: '财务应收账款记录id', field: 'receivablesRecordsId', visible: false},
{title: '收款摘要', field: 'receivablesAbstract', editable: {type: 'text',},},
{title: '收款金额', field: 'receivablesPrice', editable: {type: 'text',},},
{title: '操作', align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> ');
@ -285,6 +267,16 @@
values: receivablesRecordsId
});
}
$("input[name='operatingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='receivablesDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>
Loading…
Cancel
Save