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.
368 lines
12 KiB
368 lines
12 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('物料清单列表')"/>
|
|
<th:block th:include="include :: bootstrap-editable-css"/>
|
|
</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="cpCode"/>
|
|
</li>
|
|
<li>
|
|
<label>成品名称</label>
|
|
<input type="text" name="cpName">
|
|
</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="ck:bom:add">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="edit2()" shiro:hasPermission="ck:bom:edit">
|
|
<i class="fa fa-edit"></i> 修改
|
|
</a>
|
|
<a class="btn btn-danger multiple disabled" onclick=""
|
|
shiro:hasPermission="ck:bom:remove" disabled>
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.importExcel()">
|
|
<i class="fa fa-upload"></i> 物料导入
|
|
</a>
|
|
</div>
|
|
|
|
<div class="col-sm-12 select-table table-striped" style="padding-bottom: 100px;">
|
|
<table id="bootstrap-table">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<th:block th:include="include :: footer"/>
|
|
<script th:inline="javascript">
|
|
var editFlag = [[${@permission.hasPermi('ck:bom:edit')}]];
|
|
var removeFlag = [[${@permission.hasPermi('ck:bom:remove')}]];
|
|
var prefix = ctx + "ck/bom";
|
|
|
|
|
|
//打开添加页面
|
|
function newTab() {
|
|
window.location.href = "/ck/bom/add";
|
|
}
|
|
|
|
function edit2() {
|
|
let data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
let id = data[0].versionNo;
|
|
let cpCode = data[0].cpCode;
|
|
if ($.common.isNotEmpty(id) && $.common.isNotEmpty(cpCode)) {
|
|
let url = table.options.updateUrl.replace("{versionNo}", id);
|
|
url = url.replace("{cpCode}", cpCode);
|
|
$.modal.open("修改Bom信息" + table.options.modalName, url);
|
|
}
|
|
}
|
|
|
|
$(function () {
|
|
let options = {
|
|
url: prefix + "/allList",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{versionNo}/{cpCode}",
|
|
removeUrl: prefix + "/removeByCpcode",
|
|
exportUrl: prefix + "/export",
|
|
importUrl: prefix + "/importData",
|
|
importTemplateUrl: prefix + "/importTemplate",
|
|
modalName: "物料清单",
|
|
columns: [
|
|
{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'versionNo',
|
|
title: '版本号',
|
|
// visible: false
|
|
},
|
|
{
|
|
field: 'cpCode',
|
|
title: '成品代码',
|
|
},
|
|
{
|
|
field: 'cpName',
|
|
title: '成品名称',
|
|
},
|
|
{
|
|
field: 'cpType',
|
|
title: '规格型号'
|
|
},
|
|
{
|
|
field: 'cpMachineNo',
|
|
title: '机种代码'
|
|
},
|
|
{
|
|
field: 'cpDw',
|
|
title: '单位'
|
|
},
|
|
{
|
|
field: 'wlCode',
|
|
title: '客户编号',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'itemname',
|
|
title: '道具名称',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'itemstandard',
|
|
title: '道具描述',
|
|
visible: false
|
|
|
|
},
|
|
{
|
|
field: 'stockDw',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'useNum',
|
|
title: '使用量',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'lostpre',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'zpGuige',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'zpUseNum',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'mQty',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'memolist',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'nowversion',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'begindate',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'endtime',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'wldm',
|
|
title: '客户料号',
|
|
},
|
|
{
|
|
field: 'customno',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'sendflag',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'YDWDH',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'ZLDWDH',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'ylWeight',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'zongzhongWeight',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'pno',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'Addtime',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'fuWidth',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'yflItemclass',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'mouldNo',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'standNowversion',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'comfirmFlag',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'comfirmMan',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'comfirmDate',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'writeMan',
|
|
title: '修改人',
|
|
},
|
|
{
|
|
field: 'GongCha',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'factoryMouldNo',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'mainMaterial',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'limitFlag',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'gongchaMore',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'gongchaSmall',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'changtime',
|
|
title: '修改时间',
|
|
},
|
|
{
|
|
field: 'cpNum',
|
|
title: '',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'worklineclass',
|
|
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="" disabled><i class="fa fa-edit"></i>修改</a> ');
|
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="" disabled ><i class="fa fa-remove"></i>删除</a>');
|
|
return actions.join('');
|
|
}
|
|
}]
|
|
};
|
|
$.table.init(options);
|
|
});
|
|
|
|
|
|
function edit(id, cpCode) {//id指的是版本号
|
|
var url = "/404.html";
|
|
if ($.common.isNotEmpty(id) && $.common.isNotEmpty(cpCode)) {
|
|
url = table.options.updateUrl.replace("{versionNo}", id);
|
|
url = url.replace("{cpCode}", cpCode);
|
|
$.modal.openFull("查看Bom信息" + table.options.modalName, url);
|
|
} else {
|
|
|
|
}
|
|
// return url;
|
|
}
|
|
|
|
function remove(id, cpCode) {
|
|
table.set();
|
|
var url = table.options.removeUrl;
|
|
|
|
$.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function () {
|
|
var bom = {"versionNo": id, "cpCode": cpCode};
|
|
$.operate.submit(url, "post", "json", bom);
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
<script id="importTpl" type="text/template">
|
|
<form enctype="multipart/form-data" class="mt20 mb10">
|
|
<div class="col-xs-offset-1">
|
|
<input type="file" id="file" name="file"/>
|
|
<div class="mt10 pt5">
|
|
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果数据已经存在,更新这条数据。"> 是否更新已经存在的数据
|
|
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
|
</div>
|
|
<font color="red" class="pull-left mt10">
|
|
提示:仅允许导入“xls”或“xlsx”格式文件!
|
|
</font>
|
|
</div>
|
|
</form>
|
|
</script>
|
|
</body>
|
|
</html>
|