Browse Source

[feat]销售管理

新增 开票物料列表查询后端接口
修改发起开票前端页面:发票种类、发票类型、
发票抬头由下拉框改成单选框;新增开票物料相关新增的table列表展示;新增 通过销售订单号查询开票物料相关信息前端js方法
修改通过销售订单号查询销售订单子表的信息后端接口:新增已验收数字段
dev
liuxiaoxu 6 months ago
parent
commit
53877293e3
  1. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  2. 2
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml
  3. 132
      ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html

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

@ -618,5 +618,16 @@ public class SysSalesOrderController extends BaseController
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);
}
}

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>

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

@ -92,29 +92,34 @@
<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>
<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}">
<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>
<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}">
<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>
<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}">
<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">
@ -140,11 +145,27 @@
<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>
</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
@ -161,6 +182,99 @@
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: 'materialProcessMethod',
formatter: function(value, row, index) {
return $.table.selectDictLabel(materialProcessMethodDatas, value);
}
},
{
title: '物料品牌',
field: 'materialBrand',
},
{
title: '物料图片',
field: 'materialPhotourl',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '物料的数量',
field: 'materialNum',
},
{
title: '物料的含税单价(RMB)',
field: 'taxRmb',
},
{
title: '物料的不含税单价(RMB)',
field: 'noTaxRmb',
},
{
title: '已出库数量',
field: 'outBoundQuantity',
},
{
title: '已验收数',
field: 'hasCheckNum',
},
{
title: '退货数',
field: 'refundsNum',
}]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save