万材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.

184 lines
7.9 KiB

2 years ago
<!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('交货排程列表')" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
<script src="https://cdn.staticfile.org/axios/1.1.3/axios.min.js"></script>
</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="deliveryProgressCode"/>
</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>
<select name="confirmOrNot" 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>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.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="deliveryProgress:deliveryProgressInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="deliveryProgress:deliveryProgressInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="deliveryProgress:deliveryProgressInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="deliveryProgress:deliveryProgressInfo:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('deliveryProgress:deliveryProgressInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('deliveryProgress:deliveryProgressInfo:remove')}]];
var confirmOrNotDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "deliveryProgress/deliveryProgressInfo";
var prefixCustomer = ctx + 'system/customer';
var customerListData = [];
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "交货排程",
columns: [{
checkbox: true
},
{
field: 'deliveryProgressId',
title: '交货排程id',
visible: false
},
{
field: 'deliveryProgressCode',
title: '排程编号'
},
{
field: 'produceDate',
title: '制作日期'
},
{
field: 'enterpriseCode',
title: '客户代码'
},
{
field: 'enterpriseName',
title: '客户名称'
},
{
field: 'deliveryFactory',
title: '交货厂区'
},
{
field: 'beginningDate',
title: '开始日期'
},
{
field: 'endingDate',
title: '截止日期'
},
{
field: 'deliveryAddress',
title: '交货地点'
},
{
field: 'businessMembers',
title: '业务人员'
},
{
field: 'confirmOrNot',
title: '确认否',
formatter: function(value, row, index) {
return $.table.selectDictLabel(confirmOrNotDatas, value);
}
},
{
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.deliveryProgressId + '\')"><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.deliveryProgressId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
//客户信息
getCustomerList();
});
//客户信息
function getCustomerList() {
$.ajax({
url: prefixCustomer + '/list',
type: "post",
success: function (res) {
if (res.rows.length > 0) {
customerListData = res.rows;
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("后台出错啦!");
}
})
}
</script>
</body>
</html>