|
|
@ -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> |