You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
753 lines
35 KiB
753 lines
35 KiB
<!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('国税发票列表')" />
|
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
|
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
|
|
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
|
|
<!-- <script src="https://cdn.staticfile.org/axios/1.1.3/axios.min.js"></script>-->
|
|
|
|
<style>
|
|
.table-striped{
|
|
border: 0px!important;
|
|
white-space:nowrap;
|
|
}
|
|
|
|
.base-taxInvoice-order {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.base-taxInvoice-order .form-group {
|
|
width: 30%;
|
|
}
|
|
|
|
.details-title {
|
|
width: 100%;
|
|
position: fixed;
|
|
font-size: 20px;
|
|
padding: 10px 0;
|
|
text-align: center;
|
|
background-color: #a7b1c2;
|
|
color: #FFFFFF;
|
|
z-index: 9999;
|
|
|
|
}
|
|
|
|
.details-body {
|
|
padding-top: 80px;
|
|
overflow-y: auto;
|
|
max-height: 750px;
|
|
|
|
}
|
|
|
|
</style>
|
|
</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="taxInvoiceNumber"/>
|
|
</li>
|
|
<li>
|
|
<label>送货单号:</label>
|
|
<input type="text" name="deliveryNoteNumber"/>
|
|
</li>
|
|
<li>
|
|
<label>客户代码:</label>
|
|
<select name="enterpriseCode">
|
|
<option value="">所有</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>客户名称:</label>
|
|
<select name="enterpriseName">
|
|
<option value="">所有</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>国税发票编号:</label>
|
|
<input type="text" name="taxInvoiceNo"/>
|
|
</li>
|
|
<li>
|
|
<label>是否收到款:</label>
|
|
<select name="getmoneyFlag" th:with="type=${@dict.getType('sys_whether')}">
|
|
<option value="">所有</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="taxInvoice:taxInvoiceInfo:add">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="taxInvoice:taxInvoiceInfo:edit">
|
|
<i class="fa fa-edit"></i> 修改
|
|
</a>
|
|
<a class="btn btn-danger single disabled" onclick="removeSelectedInvoice()" shiro:hasPermission="taxInvoice:taxInvoiceInfo:removeSelectedInvoice">
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning single disabled" onclick="exportInvoice()" shiro:hasPermission="taxInvoice:taxInvoiceInfo:exportInvoice">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
<a class="btn btn-info single disabled" onclick="showTaxInvoiceDetail()" shiro:hasPermission="taxInvoice:taxInvoiceInfo:showTaxInvoiceDetail">
|
|
<i class="fa fa-file-text"></i> 查看详情
|
|
</a>
|
|
</div>
|
|
<div class="col-sm-12 select-table table-striped">
|
|
<table id="bootstrap-table" style="white-space:nowrap"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!--详情信息模态框-->
|
|
<div class="modal inmodal" id="taxInvoiceDetailsModal" tabindex="-1"
|
|
role="dilog" aria-hidden="true">
|
|
<div class="modal-dialog" style="width: 1400px;max-height: 800px; background-color: #FFFFFF">
|
|
<div class="modal-content" style="background-color: #FFFFFF">
|
|
<div class="details-title">订单详情</div>
|
|
<div class="modal-body details-body">
|
|
<div class="row">
|
|
<div class="base-taxInvoice-order">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">发票编号:</label>
|
|
<div class="col-sm-8">
|
|
<input name="taxInvoiceCode" class="form-control" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">发票号码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="taxInvoiceNumber" id="taxInvoiceNumberDetail" 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="deliveryNoteNumber" id="deliveryNoteNumberDetail" class="form-control" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">客户代码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="enterpriseCode" id="enterpriseCodeDetail" class="form-control" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">客户名称:</label>
|
|
<div class="col-sm-8">
|
|
<input name="enterpriseName" id="enterpriseNameDetail" class="form-control m-b" type="text" readonly>
|
|
</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" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">付款条件:</label>
|
|
<div class="col-sm-8">
|
|
<input name="paymentTerm" 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="billingDate" 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="transportWay" 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="transportMeans" 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="departureDate" 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="exportCustoms" 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="billCommonCurrency" 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="packagesNumber" 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="arrivalArea" 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="portOfDestination" 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="hoistingNumber" 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="printVersionNumber" 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="billRemarks" 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="taxInvoiceNo" 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="getmoneyFlag" class="form-control" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
<div style="width:100%;height:1px;border-top:solid lightgrey 1px;margin-top:50px;padding:50px 0 0 0px;">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">全部数量:</label>
|
|
<div class="col-sm-8">
|
|
<input name="totalQuantity" 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="totalMoney" 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="totalMoneyUpCase" class="form-control" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="taxInvoiceList" style="margin-top: 20px;">
|
|
<div class="taxInvoiceProductList">
|
|
<div class="col-sm-12 table-striped" style="margin-top: 20px;">
|
|
<div class="details" style="font-size: 18px">产品信息</div>
|
|
<table id="taxInvoiceProductTable"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer" style=" border-top: none;background-color: #a7b1c2">
|
|
<!-- <button type="button" class="btn btn-success" onclick="btnAudit()">审核确认</button>-->
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeTaxInvoiceDetailModal()">关闭</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: select2-js"/>
|
|
<script th:inline="javascript">
|
|
var editFlag = [[${@permission.hasPermi('taxInvoice:taxInvoiceInfo:edit')}]];
|
|
var removeFlag = [[${@permission.hasPermi('taxInvoice:taxInvoiceInfo:remove')}]];
|
|
var billCommonCurrencyDatas = [[${@dict.getType('sys_coin_class')}]];
|
|
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
|
|
var getmoneyFlagDatas = [[${@dict.getType('sys_whether')}]];
|
|
var prefix = ctx + "taxInvoice/taxInvoiceInfo";
|
|
var prefixProduct = ctx + "taxInvoice/taxInvoiceProduct";
|
|
|
|
$(function() {
|
|
var options = {
|
|
url: prefix + "/list",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{id}",
|
|
removeUrl: prefix + "/remove",
|
|
exportUrl: prefix + "/export",
|
|
clickToSelect: true,
|
|
modalName: "国税发票",
|
|
columns: [{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'taxInvoiceId',
|
|
title: '国税发票id',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'taxInvoiceCode',
|
|
title: '发票编号'
|
|
},
|
|
{
|
|
field: 'taxInvoiceNumber',
|
|
title: '发票号码'
|
|
},
|
|
{
|
|
field: 'deliveryNoteNumber',
|
|
title: '送货单号'
|
|
},
|
|
{
|
|
field: 'enterpriseCode',
|
|
title: '客户代码'
|
|
},
|
|
{
|
|
field: 'enterpriseName',
|
|
title: '客户名称'
|
|
},
|
|
{
|
|
field: 'contractNumber',
|
|
title: '合同号码'
|
|
},
|
|
{
|
|
field: 'paymentTerm',
|
|
title: '付款条件'
|
|
},
|
|
{
|
|
field: 'billingDate',
|
|
title: '开票日期'
|
|
},
|
|
{
|
|
field: 'transportWay',
|
|
title: '运输方式'
|
|
},
|
|
{
|
|
field: 'transportMeans',
|
|
title: '运输工具'
|
|
},
|
|
{
|
|
field: 'departureDate',
|
|
title: '离境日期'
|
|
},
|
|
{
|
|
field: 'exportCustoms',
|
|
title: '出口海关'
|
|
},
|
|
{
|
|
field: 'billCommonCurrency',
|
|
title: '币种',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(billCommonCurrencyDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'packagesNumber',
|
|
title: '件数'
|
|
},
|
|
{
|
|
field: 'arrivalArea',
|
|
title: '抵运国'
|
|
},
|
|
{
|
|
field: 'portOfDestination',
|
|
title: '指运港'
|
|
},
|
|
{
|
|
field: 'hoistingNumber',
|
|
title: '提运单号'
|
|
},
|
|
{
|
|
field: 'printVersionNumber',
|
|
title: '发票印字版号'
|
|
},
|
|
{
|
|
field: 'billRemarks',
|
|
title: '备注'
|
|
},
|
|
{
|
|
field: 'taxInvoiceNo',
|
|
title: '国税发票编号'
|
|
},
|
|
{
|
|
field: 'getmoneyFlag',
|
|
title: '是否收到款',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(getmoneyFlagDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'firstAddTime',
|
|
title: '录入时间',
|
|
formatter: function (value, row, index) {
|
|
if (value == null) {
|
|
return " ";
|
|
} else {
|
|
return value;
|
|
}
|
|
}
|
|
},
|
|
{
|
|
field: 'updateInfoTime',
|
|
title: '上次修改时间',
|
|
formatter: function (value, row, index) {
|
|
if (value == null) {
|
|
return " ";
|
|
} else {
|
|
var vArr = value.split(',')
|
|
return vArr[0];
|
|
}
|
|
}
|
|
},
|
|
{
|
|
field: 'standbyOne',
|
|
title: '备用一',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'standbyTwo',
|
|
title: '备用二',
|
|
visible: false
|
|
}]
|
|
/*{
|
|
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.taxInvoiceId + '\')"><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.taxInvoiceId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
return actions.join('');
|
|
}
|
|
}*/
|
|
};
|
|
$.table.init(options);
|
|
|
|
//获取客户信息
|
|
getCustomerList();
|
|
});
|
|
|
|
/*获取客户信息*/
|
|
function getCustomerList() {
|
|
$.ajax({
|
|
url: prefix + "/getCustomerList",
|
|
type: "POST",
|
|
success: function (res) {
|
|
//console.log(res)
|
|
if (res.length > 0) {
|
|
customerListData = res;
|
|
//alert(JSON.stringify(data));
|
|
for (let i in customerListData) {
|
|
$("select[name='enterpriseCode']").append("<option value='" + customerListData[i].enterpriseCode + "'>" + customerListData[i].enterpriseCode + "</option>");
|
|
$("select[name='enterpriseName']").append("<option value='" + customerListData[i].enterpriseName + "'>" + customerListData[i].enterpriseName + "</option>");
|
|
}
|
|
|
|
} else {
|
|
$.modal.msgError(res.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
}
|
|
})
|
|
}
|
|
|
|
/*删除订单信息判断*/
|
|
function removeSelectedInvoice() {
|
|
table.set();
|
|
var invoiceId = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
|
var selectedData = $('#bootstrap-table').bootstrapTable("getSelections");
|
|
if (selectedData.length === 1) {
|
|
$.ajax({
|
|
url: prefixProduct + '/list?' + 'taxInvoiceCode=' + selectedData[0].taxInvoiceCode + '&taxInvoiceNumber=' + selectedData[0].taxInvoiceNumber,
|
|
type: "post",
|
|
data: {},
|
|
success: function (res) {
|
|
var productIds = []
|
|
for (let j=0;j<res.rows.length;j++) {
|
|
productIds.push(res.rows[j].taxInvoiceProductId)
|
|
}
|
|
// console.log(productIds)
|
|
if (res.rows.length > 0 ) {
|
|
$.modal.confirm("选中发票含有"+ res.rows.length +"条产品信息将一并删除,确认要删除选中的" + selectedData.length + "条数据吗?", function() {
|
|
removeData(invoiceId,productIds)
|
|
})
|
|
} else {
|
|
$.modal.confirm("确认要删除选中的" + selectedData.length + "条数据吗?", function() {
|
|
removeData(invoiceId,productIds);
|
|
})
|
|
}
|
|
}
|
|
})
|
|
} else {
|
|
$.modal.alertWarning("请选择一条记录");
|
|
}
|
|
}
|
|
|
|
//删除发票数据和成品数据
|
|
function removeData(invoiceId,productIds) {
|
|
$.ajax({
|
|
url: prefix + '/remove',
|
|
type: "POST",
|
|
data: {
|
|
ids: invoiceId.join()
|
|
},
|
|
dataType: "json",
|
|
success: function (resp) {
|
|
// console.log(resp)
|
|
$("#bootstrap-table").bootstrapTable('refresh');
|
|
}
|
|
|
|
})
|
|
$.ajax({
|
|
url: prefixProduct + '/remove',
|
|
type: "POST",
|
|
data: {
|
|
ids: productIds.join()
|
|
},
|
|
dataType: "json",
|
|
success: function (resp) {
|
|
// console.log(data)
|
|
// console.log(JSON.stringify(data))
|
|
// console.log(resp)
|
|
$("#bootstrap-table").bootstrapTable('refresh');
|
|
}
|
|
|
|
})
|
|
$.modal.msgSuccess("删除成功")
|
|
}
|
|
|
|
//导出发票信息
|
|
function exportInvoice() {
|
|
// rows为选中行的id
|
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
|
//选择的行数据
|
|
var selectData = $("#bootstrap-table").bootstrapTable("getSelections")
|
|
// console.log(JSON.stringify(selectData))
|
|
// console.log(selectData)
|
|
|
|
if (rows.length !== 1) {
|
|
$.modal.alert("请选择一条记录");
|
|
return;
|
|
} else {
|
|
$.modal.confirm("是否确认要导出本条信息?", function (){
|
|
axios({
|
|
// url: prefix + '/exportInvoice?taxInvoiceCode='+selectData[0].taxInvoiceCode+'&taxInvoiceNumber='+selectData[0].taxInvoiceNumber,
|
|
url: prefix + '/exportInvoice',
|
|
data:{
|
|
selectData:JSON.stringify(selectData)
|
|
},
|
|
method: 'POST',
|
|
responseType: 'blob'
|
|
}).then(response => {
|
|
// console.log(response)
|
|
// console.log(response.data)
|
|
const URL = window.URL.createObjectURL(response.data)
|
|
// 创建隐藏<a>标签进行下载
|
|
const tempLink = document.createElement('a')
|
|
tempLink.style.display = 'none'
|
|
tempLink.href = URL
|
|
let time = new Date().toLocaleString()
|
|
tempLink.setAttribute('download', time + "国税发票.xlsx")
|
|
if (typeof tempLink.download === 'undefined') {
|
|
tempLink.setAttribute('target', '_blank')
|
|
}
|
|
document.body.appendChild(tempLink)
|
|
tempLink.click()
|
|
document.body.removeChild(tempLink)// 移除dom元素
|
|
window.URL.revokeObjectURL(URL)//释放内存
|
|
})
|
|
});
|
|
}
|
|
}
|
|
|
|
//详细信息页面
|
|
function showTaxInvoiceDetail() {
|
|
$("#taxInvoiceDetailsModal").modal("show");
|
|
let selectData = $("#bootstrap-table").bootstrapTable("getSelections")
|
|
$("input[name='taxInvoiceCode']").val(selectData[0].taxInvoiceCode)
|
|
$('#taxInvoiceNumberDetail').val(selectData[0].taxInvoiceNumber)
|
|
$('#deliveryNoteNumberDetail').val(selectData[0].deliveryNoteNumber)
|
|
$("input[name='enterpriseCode']").val(selectData[0].enterpriseCode)
|
|
$("input[name='enterpriseName']").val(selectData[0].enterpriseName)
|
|
$("input[name='contractNumber']").val(selectData[0].contractNumber)
|
|
$("input[name='paymentTerm']").val(selectData[0].paymentTerm)
|
|
$("input[name='billingDate']").val(selectData[0].billingDate)
|
|
$("input[name='transportWay']").val(selectData[0].transportWay)
|
|
$("input[name='transportMeans']").val(selectData[0].transportMeans)
|
|
$("input[name='departureDate']").val(selectData[0].departureDate)
|
|
$("input[name='exportCustoms']").val(selectData[0].exportCustoms)
|
|
$("input[name='billCommonCurrency']").val(selectData[0].billCommonCurrency)
|
|
$("input[name='packagesNumber']").val(selectData[0].packagesNumber)
|
|
$("input[name='arrivalArea']").val(selectData[0].arrivalArea)
|
|
$("input[name='portOfDestination']").val(selectData[0].portOfDestination)
|
|
$("input[name='hoistingNumber']").val(selectData[0].hoistingNumber)
|
|
$("input[name='printVersionNumber']").val(selectData[0].printVersionNumber)
|
|
$("input[name='billRemarks']").val(selectData[0].billRemarks)
|
|
$('#taxInvoiceNo').val(selectData[0].taxInvoiceNo)
|
|
if(selectData[0].getmoneyFlag == 1) {
|
|
$("input[name='getmoneyFlag']").val("是")
|
|
} else if(selectData[0].getmoneyFlag == 0){
|
|
$("input[name='getmoneyFlag']").val("否")
|
|
} else {
|
|
$("input[name='getmoneyFlag']").val("")
|
|
}
|
|
|
|
$('#taxInvoiceProductTable').bootstrapTable('destroy');
|
|
$('#taxInvoiceProductTable').bootstrapTable({
|
|
url: prefixProduct + '/list',
|
|
pagination: false,
|
|
// pageNumber: 1,
|
|
// pageSize: 10,
|
|
// pageList: [10, 25, 50, 100],
|
|
showRefresh: false,
|
|
method: "post",
|
|
contentType: "application/x-www-form-urlencoded",
|
|
striped: true, // 是否显示行间隔色
|
|
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
|
|
clickToSelect: true, // 是否启用点击选中行
|
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
|
|
cardView: false, // 是否显示详细视图
|
|
detailView: false, // 是否显示父子表
|
|
smartDisplay: false, // 加了这个才显示每页显示的行数
|
|
showExport: false, // 是否显示导出按钮
|
|
singleSelect: true,
|
|
paginationDetailHAlign: ' hiddenDetailInfo',
|
|
height: 150,
|
|
onLoadSuccess: function (data) {
|
|
//计算全部数量、金额、大写
|
|
getTotal();
|
|
|
|
},
|
|
queryParams: function (params) {
|
|
//console.log("123");
|
|
var curParams = {
|
|
// 传递参数查询参数
|
|
// pageSize: params.limit,
|
|
// pageNum: params.offset / params.limit + 1,
|
|
taxInvoiceCode: selectData[0].taxInvoiceCode,
|
|
taxInvoiceNumber: selectData[0].taxInvoiceNumber
|
|
};
|
|
// console.log($("input[name='orderNumber']").val());
|
|
return curParams
|
|
},
|
|
columns: [
|
|
{
|
|
field: 'taxInvoiceProductId',
|
|
title: '国税产品id',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'taxInvoiceCode',
|
|
title: '发票编号',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'taxInvoiceNumber',
|
|
title: '发票号码',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'finishProductCode',
|
|
title: '成品代码'
|
|
},
|
|
{
|
|
field: 'finishProductName',
|
|
title: '成品名称'
|
|
},
|
|
{
|
|
field: 'specificationModel',
|
|
title: '规格型号'
|
|
},
|
|
{
|
|
field: 'inventoryUnit',
|
|
title: '单位'
|
|
},
|
|
{
|
|
field: 'commonCurrency',
|
|
title: '币别',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(commonCurrencyDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'quantity',
|
|
title: '数量'
|
|
},
|
|
{
|
|
field: 'processPrice',
|
|
title: '单价'
|
|
},
|
|
{
|
|
field: 'amountOfMoney',
|
|
title: '金额'
|
|
}]
|
|
})
|
|
}
|
|
|
|
//关闭详细信息页面
|
|
function closeTaxInvoiceDetailModal() {
|
|
$("#taxInvoiceDetailsModal").modal("hide");
|
|
}
|
|
|
|
|
|
//计算全部数量、金额、大写
|
|
function getTotal() {
|
|
var getDataAll = $("#taxInvoiceProductTable").bootstrapTable('getData');
|
|
// console.log(getDataAll)
|
|
var totalQuantity = 0;
|
|
var totalMoney = 0.00;
|
|
for (let i = 0;i<getDataAll.length;i++) {
|
|
// console.log(getDataAll[i])
|
|
totalQuantity = Math.floor(totalQuantity + Number(getDataAll[i].quantity));
|
|
totalMoney = totalMoney + parseFloat(getDataAll[i].amountOfMoney);
|
|
}
|
|
$("input[name='totalQuantity']").val(totalQuantity)
|
|
$("input[name='totalMoney']").val(parseFloat(totalMoney).toFixed(2))
|
|
$.ajax({
|
|
url: prefix + '/getMoneyUpCase',
|
|
type: 'post',
|
|
data: {
|
|
totalMoney: totalMoney
|
|
},
|
|
success: function (res) {
|
|
// console.log(res)
|
|
$("input[name='totalMoneyUpCase']").val(res)
|
|
}
|
|
})
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|