万材erp项目
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.
 
 
 
 

283 lines
11 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">
</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="invoiceId"/>
</li>
<li>
<label>发票号:</label>
<input type="text" name="invoiceNo"/>
</li>
<li>
<label>厂商代码:</label>
<select name="pCode" class="form-control m-b">
<option value="">所有</option>
</select>
</li>
<li>
<label>厂商名称:</label>
<select name="pName" class="form-control">
<option value="">所有</option>
</select>
</li>
<li class="select-time">
<label>开票日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginInvoiceDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endInvoiceDate]"/>
</li>
<li>
<label>收款否:</label>
<select name="getMoneyFlag">
<option value="">所有</option>
<option value="1">已收款</option>
<option value="0">未收款</option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</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="invoice:poinvoicehead:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="invoice:poinvoicehead:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="invoice:poinvoicehead:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="invoice:poinvoicehead:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" style="overflow : hidden; text-overflow : ellipsis ; white-space:nowrap ;"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('invoice:poinvoicehead:edit')}]];
var removeFlag = [[${@permission.hasPermi('invoice:poinvoicehead:remove')}]];
var prefix = ctx + "invoice/poinvoicehead";
//鼠标移入,显示完整的数据
function paramsMatter(value, row, index) {
var span = document.createElement("span");
span.setAttribute("title", value);
span.innerHTML = value;
return span.outerHTML;
}
//重置
function reset(){
$("select[name='pCode']").val("").trigger("change");
$("select[name='pName']").val("").trigger("change");
$.form.reset();
}
//添加
function add(){
window.location.href=prefix+"/add";
}
//修改
function edit(){
let row = $("#bootstrap-table").bootstrapTable("getSelections");
window.location.href=prefix+"/edit/"+row[0].invoiceId;
}
$(function () {
let options = {
url: prefix + "/list2",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "税发票列表",
columns: [{
checkbox: true
},
{
field: 'invoiceId',
title: '发票编号'
},
{
field: 'invoiceNo',
title: '发票号'
},
{
field: 'pCode',
title: '厂商名'
},
{
field: 'pName',
title: '厂商名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'HTNo',
title: '合同号'
},
{
field: 'payWay',
title: '付款条件'
},
{
field: 'invoiceDate',
title: '开票日期',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'orderNo',
title: '规格型号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'wlCode',
title: '物料代码'
},
{
field: 'itemName',
title: '物料名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "130px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "150px",
"white-space": "nowrap"
}
}
},
formatter: paramsMatter
},
{
field: 'stockDw',
title: '单位'
},
{
field: 'crlName',
title: '币别'
},
{
field: 'qty',
title: '数量'
},
{
field: 'price',
title: '单价'
},
{
field: 'amt',
title: '金额'
},
{
field: 'getMoneyFlag',
title: '收款否'
},
{
field: 'taxInvoiceNo',
title: '税款发票号'
},
{
field: 'taxPriceVersion',
title: '税款打印版本'
},
{
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.invoiceid + '\')"><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.invoiceid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
//获取供应商代码和名称
$.ajax({
url: ctx + "ProviderPrice/ProviderPrice/all",
type: "post",
resultType: "json",
success: function (resp) {
if (resp.data.length > 0) {
var data = resp.data;
for (var i in data) {
//alert(data[i].pCode);
$("select[name='pCode']").append("<option value='" + data[i].pCode + "'>" + data[i].pCode + "</option>");
$("select[name='pName']").append("<option value='" + data[i].pName + "'>" + data[i].pName + "</option>");
}
}
},
error: function () {
$.modal.msgError("出错了!");
}
});
</script>
</body>
</html>