Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
王晓迪 3 months ago
parent
commit
94b08c63f6
  1. 14
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java
  2. 10
      ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceMaterialMapper.java
  3. 9
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceMaterialService.java
  4. 20
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceMaterialServiceImpl.java
  5. 20
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java
  6. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  7. 20
      ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMaterialMapper.xml
  8. 2
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml
  9. 328
      ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html

14
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java

@ -2,6 +2,8 @@ package com.ruoyi.financial.domain;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@ -170,6 +172,10 @@ public class FinancialTaxInvoice extends BaseEntity
/** 删除标志 0正常 1删除 */
private String delFlag;
/** 国税发票物料集合*/
private List<FinancialTaxInvoiceMaterial> invoiceMaterialList;
public void setTaxInvoiceId(Long taxInvoiceId)
{
this.taxInvoiceId = taxInvoiceId;
@ -549,6 +555,14 @@ public class FinancialTaxInvoice extends BaseEntity
return delFlag;
}
public List<FinancialTaxInvoiceMaterial> getInvoiceMaterialList() {
return invoiceMaterialList;
}
public void setInvoiceMaterialList(List<FinancialTaxInvoiceMaterial> invoiceMaterialList) {
this.invoiceMaterialList = invoiceMaterialList;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

10
ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceMaterialMapper.java

@ -35,6 +35,16 @@ public interface FinancialTaxInvoiceMaterialMapper
*/
public int insertFinancialTaxInvoiceMaterial(FinancialTaxInvoiceMaterial financialTaxInvoiceMaterial);
/**
* 批量新增国税发票物料
*
* @param financialTaxInvoiceMaterialList 国税发票物料集合
* @return 结果
*/
public int insertFinancialTaxInvoiceMaterialBatch(List<FinancialTaxInvoiceMaterial> financialTaxInvoiceMaterialList);
/**
* 修改国税发票物料
*

9
ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceMaterialService.java

@ -35,6 +35,15 @@ public interface IFinancialTaxInvoiceMaterialService
*/
public int insertFinancialTaxInvoiceMaterial(FinancialTaxInvoiceMaterial financialTaxInvoiceMaterial);
/**
* 批量新增国税发票物料
*
* @param financialTaxInvoiceMaterialList 国税发票物料集合
* @return 结果
*/
public int insertFinancialTaxInvoiceMaterialBatch(List<FinancialTaxInvoiceMaterial> financialTaxInvoiceMaterialList);
/**
* 修改国税发票物料
*

20
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceMaterialServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.financial.service.impl;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
@ -61,6 +62,25 @@ public class FinancialTaxInvoiceMaterialServiceImpl implements IFinancialTaxInvo
return financialTaxInvoiceMaterialMapper.insertFinancialTaxInvoiceMaterial(financialTaxInvoiceMaterial);
}
/**
* 批量新增国税发票物料
*
* @param financialTaxInvoiceMaterialList 国税发票物料集合
* @return 结果
*/
@Override
public int insertFinancialTaxInvoiceMaterialBatch(List<FinancialTaxInvoiceMaterial> financialTaxInvoiceMaterialList) {
String loginName = ShiroUtils.getLoginName();
//使用并行流处理,提高性能
financialTaxInvoiceMaterialList.parallelStream().forEach(financialTaxInvoiceMaterial -> {
financialTaxInvoiceMaterial.setCreateBy(loginName);
financialTaxInvoiceMaterial.setCreateTime(new Date());
});
return financialTaxInvoiceMaterialMapper.insertFinancialTaxInvoiceMaterialBatch(financialTaxInvoiceMaterialList);
}
/**
* 修改国税发票物料
*

20
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java

@ -7,6 +7,9 @@ import java.util.List;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.financial.domain.FinancialTaxInvoiceMaterial;
import com.ruoyi.financial.mapper.FinancialTaxInvoiceMaterialMapper;
import com.ruoyi.financial.service.IFinancialTaxInvoiceMaterialService;
import com.ruoyi.system.domain.SysSalesOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -14,6 +17,7 @@ import com.ruoyi.financial.mapper.FinancialTaxInvoiceMapper;
import com.ruoyi.financial.domain.FinancialTaxInvoice;
import com.ruoyi.financial.service.IFinancialTaxInvoiceService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
/**
* 国税发票Service业务层处理
@ -27,6 +31,12 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi
@Autowired
private FinancialTaxInvoiceMapper financialTaxInvoiceMapper;
@Autowired
private FinancialTaxInvoiceMaterialMapper invoiceMaterialMapper;
@Autowired
private IFinancialTaxInvoiceMaterialService invoiceMaterialService;
@Autowired
private RedisCache redisCache;
@ -164,6 +174,7 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi
* @param financialTaxInvoice 发票信息
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int makeInvoiceSave(FinancialTaxInvoice financialTaxInvoice) {
@ -175,6 +186,15 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi
financialTaxInvoice.setTaxInvoiceStatus("0");//待审核
financialTaxInvoice.setApplyUser(loginName);
financialTaxInvoice.setBusinessMembers(loginName);
List<FinancialTaxInvoiceMaterial> invoiceMaterialList = financialTaxInvoice.getInvoiceMaterialList();
invoiceMaterialList.parallelStream().forEach(invoiceMaterial -> {
invoiceMaterial.setTaxInvoiceCode(taxInvoiceCode);
invoiceMaterial.setSalesOrderCode(financialTaxInvoice.getSalesOrderCode());
invoiceMaterial.setCreateBy(loginName);
invoiceMaterial.setCreateTime(new Date());
});
invoiceMaterialMapper.insertFinancialTaxInvoiceMaterialBatch(invoiceMaterialList);
return financialTaxInvoiceMapper.insertFinancialTaxInvoice(financialTaxInvoice);
}
}

13
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -613,10 +613,21 @@ public class SysSalesOrderController extends BaseController
@Log(title = "销售订单", businessType = BusinessType.MakeInvoice)
@PostMapping("/makeInvoice")
@ResponseBody
public AjaxResult makeInvoiceSave(FinancialTaxInvoice financialTaxInvoice)
public AjaxResult makeInvoiceSave(@RequestBody FinancialTaxInvoice financialTaxInvoice)
{
return toAjax(taxInvoiceService.makeInvoiceSave(financialTaxInvoice));
}
/**
* 新增开票物料列表
*/
@ResponseBody
@PostMapping("/getSalesOrderCodeChildListByCode")
public TableDataInfo getSalesOrderCodeChildListByCode(@RequestParam("salesOrderCode") String salesOrderCode)
{
startPage();
List<SysSalesOrderChild> list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode);
return getDataTable(list);
}
}

20
ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMaterialMapper.xml

@ -109,6 +109,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<insert id="insertFinancialTaxInvoiceMaterialBatch" parameterType="FinancialTaxInvoiceMaterial" useGeneratedKeys="true" keyProperty="invoiceMaterialId">
insert into financial_tax_invoice_material
(tax_invoice_code, sales_order_code, material_code, material_name,
material_type, material_process_method, material_brand, material_photoUrl,
material_unit, material_describe, warehouse_dept, material_num, tax_rmb,
no_tax_rmb, tax_usd, no_tax_usd, out_bound_quantity, has_check_num,
refunds_num, use_status, create_by, create_time,remark)
values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.taxInvoiceCode}, #{item.salesOrderCode}, #{item.materialCode}, #{item.materialName},
#{item.materialType}, #{item.materialProcessMethod}, #{item.materialBrand}, #{item.materialPhotourl},
#{item.materialUnit}, #{item.materialDescribe}, #{item.warehouseDept}, #{item.materialNum},
#{item.taxRmb}, #{item.noTaxRmb}, #{item.taxUsd}, #{item.noTaxUsd}, #{item.outBoundQuantity},
#{item.hasCheckNum}, #{item.refundsNum}, #{item.useStatus}, #{item.createBy}, #{item.createTime},
#{item.remark})
</foreach>
</insert>
<update id="updateFinancialTaxInvoiceMaterial" parameterType="FinancialTaxInvoiceMaterial">
update financial_tax_invoice_material
<trim prefix="SET" suffixOverrides=",">

2
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml

@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectOrderChildListBySalesOrderCode" resultMap="SysSalesOrderChildResult">
select id, quoteId, materialId, materialCode, materialName, materialType, processMethod, brand,
warehouseDept,materialNum, photoUrl,finish_num,apply_shipping_num,has_apply_shipping_num,out_bound_quantity
warehouseDept,materialNum, photoUrl,finish_num,apply_shipping_num,has_apply_shipping_num, has_check_num, out_bound_quantity
from sys_sales_order_child
where quoteId = #{quoteId}
</select>

328
ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html

@ -9,142 +9,231 @@
<form class="form-horizontal m" id="form-taxInvoice-RMBAdd" th:object="${taxInvoice}">
<input name="taxInvoiceId" th:field="*{taxInvoiceId}" type="hidden">
<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">
<label class="col-sm-5 control-label">销售订单编号:</label>
<div class="col-sm-7">
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单类型:</label>
<div class="col-sm-8">
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}">
<label class="col-sm-5 control-label">订单类型:</label>
<div class="col-sm-7">
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}" readonly>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{salesOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报价币种:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">报价币种:</label>
<div class="col-sm-7">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}">
<input type="radio" th:id="${'commonCurrency_' + dict.dictCode}" name="commonCurrency" th:value="${dict.dictValue}" th:field="*{commonCurrency}">
<input type="radio" th:id="${'commonCurrency_' + dict.dictCode}" name="commonCurrency" th:value="${dict.dictValue}" th:field="*{commonCurrency}" readonly>
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户代码/ID:</label>
<div class="col-sm-8">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text">
<label class="col-sm-5 control-label">客户代码/ID:</label>
<div class="col-sm-7">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text">
<label class="col-sm-5 control-label">客户名称:</label>
<div class="col-sm-7">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text">
<label class="col-sm-5 control-label">联系电话:</label>
<div class="col-sm-7">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址:</label>
<div class="col-sm-8">
<input name="enterpriseAddress" th:field="*{enterpriseAddress}" class="form-control" type="text">
<label class="col-sm-5 control-label">公司地址:</label>
<div class="col-sm-7">
<input name="enterpriseAddress" th:field="*{enterpriseAddress}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开票公司名称:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">开票公司名称:</label>
<div class="col-sm-7">
<input name="invoiceCompanyName" th:field="*{invoiceCompanyName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开票公司税号:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">开票公司税号:</label>
<div class="col-sm-7">
<input name="invoiceCompanyCode" th:field="*{invoiceCompanyCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司开户行:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">公司开户行:</label>
<div class="col-sm-7">
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司开户账号:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">公司开户账号:</label>
<div class="col-sm-7">
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">税率:</label>
<div class="col-sm-7">
<input name="taxRate" th:field="*{taxRate}" 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="taxInvoiceClass" class="form-control m-b" th:with="type=${@dict.getType('tax_invoice_class')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{taxInvoiceClass}"></option>
</select>
<label class="col-sm-5 control-label is-required" >发票种类:</label>
<div class="col-sm-7">
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_class')}">
<input type="radio" th:id="${'taxInvoiceClass_' + dict.dictCode}" name="taxInvoiceClass" th:value="${dict.dictValue}" th:field="*{taxInvoiceClass}" required>
<label th:for="${'taxInvoiceClass_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发票类型:</label>
<div class="col-sm-8">
<select name="taxInvoiceType" class="form-control m-b" th:with="type=${@dict.getType('tax_invoice_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{taxInvoiceType}"></option>
</select>
<label class="col-sm-5 control-label is-required">发票类型:</label>
<div class="col-sm-7">
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_type')}">
<input type="radio" th:id="${'taxInvoiceType_' + dict.dictCode}" name="taxInvoiceType" th:value="${dict.dictValue}" th:field="*{taxInvoiceType}" required>
<label th:for="${'taxInvoiceType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发票抬头:</label>
<div class="col-sm-8">
<select name="taxInvoiceTitle" class="form-control m-b" th:with="type=${@dict.getType('tax_invoice_title')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{taxInvoiceTitle}"></option>
</select>
<label class="col-sm-5 control-label is-required">发票抬头:</label>
<div class="col-sm-7">
<div class="radio-box" th:each="dict : ${@dict.getType('tax_invoice_title')}">
<input type="radio" th:id="${'taxInvoiceTitle_' + dict.dictCode}" name="taxInvoiceTitle" th:value="${dict.dictValue}" th:field="*{taxInvoiceTitle}" required>
<label th:for="${'taxInvoiceTitle_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务人员:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">业务人员:</label>
<div class="col-sm-7">
<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">
<label class="col-sm-5 control-label">申请人:</label>
<div class="col-sm-7">
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮箱:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">邮箱:</label>
<div class="col-sm-7">
<input name="invoiceEmail" th:field="*{invoiceEmail}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务备注:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">业务备注:</label>
<div class="col-sm-7">
<input name="businessRemark" th:field="*{businessRemark}" class="form-control" type="text">
</div>
</div>
<div class="container">
<div class="row">
<h4 class="font-weight-bold">开票物料</h4>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-material"></table>
</div>
</div>
</div>
<div class="container">
<div class="row">
<h4 class="font-weight-bold">开票历史</h4>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-history"></table>
</div>
</div>
</div>
<div class="container">
<div class="row">
<h4 class="font-weight-bold">开票额度</h4>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">不含税总价(RMB):</label>
<div class="col-sm-7">
<input name="noRmbSum" th:field="*{noRmbSum}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">含税总价(RMB):</label>
<div class="col-sm-7">
<input name="rmbTaxSum" th:field="*{rmbTaxSum}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">物料数合计:</label>
<div class="col-sm-7">
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">数量合计:</label>
<div class="col-sm-7">
<input name="enterpriseSum" th:field="*{enterpriseSum}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">开票额度比例:</label>
<div class="col-sm-7">
<div class="input-group">
<input name="invoiceQuotaRatio" th:field="*{invoiceQuotaRatio}" class="form-control" type="text">
<span class="input-group-addon">%</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">开票金额:</label>
<div class="col-sm-7">
<input name="invoiceAmount" th:field="*{invoiceAmount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">开票用途:</label>
<div class="col-sm-7">
<input name="invoicePurpose" th:field="*{invoicePurpose}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var materialProcessMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var prefix = ctx + "system/salesOrder"
$("#form-taxInvoice-RMBAdd").validate({
focusCleanup: true
@ -152,15 +241,136 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/makeInvoice", $('#form-taxInvoice-RMBAdd').serialize());
//获取表单的数据
const makeInvoiceRMBData = $('#form-taxInvoice-RMBAdd').serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
var makeInvoiceMaterialTable = $("#bootstrap-table-material").bootstrapTable('getData');
//将makeInvoiceMaterialTable转换成和makeInvoiceRMBData一样的形式
var makeInvoiceMaterialList = makeInvoiceMaterialTable.map(function (item) {
return {
invoiceMaterialId: item.invoiceMaterialId,
materialCode: item.materialCode,
materialName: item.materialName,
materialType: item.materialType,
materialProcessMethod: item.processMethod,
materialBrand:item.brand,
materialUnit: item.unit,
noTaxRmb: item.materialNoRmb,
taxRmb: item.materialRmb,
materialNum: item.materialNum,
outBoundQuantity: item.outBoundQuantity,
hasCheckNum: item.hasCheckNum,
refundsNum: item.refundsNum
}
});
const combinedData = Object.assign(makeInvoiceRMBData, {
invoiceMaterialList: makeInvoiceMaterialList
});
const jsonData = JSON.stringify(combinedData);
$.operate.saveJson(prefix + "/makeInvoice",jsonData);
}
}
$("input[name='invoiceData']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
$(function() {
var options = {
id: 'bootstrap-table-material',
url: prefix + "/getSalesOrderCodeChildListByCode",
queryParams: function(params) {
return {
salesOrderCode: $("#salesOrderCode").val(),
}
},
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
modalName: "国税发票物料",
columns: [{
checkbox: true
},
{
title: '国税发票物料ID',
field: 'invoiceMaterialId',
visible: false
},
{
title: '物料编号',
field: 'materialCode',
},
{
title: '物料名称',
field: 'materialName',
},
{
field: 'materialType',
title: '物料类型',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
title: '物料加工方式',
field: 'processMethod',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialProcessMethodDatas, value);
}
},
{
title: '物料品牌',
field: 'brand',
},
{
title: '物料图片',
field: 'photourl',
},
{
title: '物料单位',
field: 'unit',
},
{
title: '物料描述',
field: 'describe',
},
{
title: '物料的数量',
field: 'materialNum',
},
{
title: '物料的含税单价(RMB)',
field: 'materialRmb',
},
{
title: '物料的不含税单价(RMB)',
field: 'materialNoRmb',
},
{
title: '已出库数量',
field: 'outBoundQuantity',
},
{
title: '已验收数',
field: 'hasCheckNum',
},
{
title: '退货数',
field: 'refundsNum',
}]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save