5 changed files with 1066 additions and 0 deletions
@ -0,0 +1,321 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('新增员工退料')" /> |
||||
|
<th:block th:include="include :: bootstrap-editable-css" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-baseReturnOrder-add"> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">关联领料单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="pickNo" name="pickNo" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">领料员:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="pickUser" id="pickUser" class="form-control" type="text" readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-xs-11" style="margin-left: 50px;"> |
||||
|
<div class="form-row"> |
||||
|
<div class="btn-group-sm" id="toolbar" role="group"> |
||||
|
<span>选择退料信息</span> |
||||
|
<a class="btn btn-success" onclick="insertRow()"> |
||||
|
<i class="fa fa-plus"></i> 添加物料 |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-material-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/baseReturnOrder"; |
||||
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
||||
|
var levelDatas = [[${@dict.getType('bomLevel')}]]; |
||||
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
||||
|
|
||||
|
|
||||
|
$("#form-baseReturnOrder-add").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
$(function(){ |
||||
|
var options = { |
||||
|
id: 'bootstrap-material-table', |
||||
|
// url: ctx + "system/makeorderpickdetail/mergedList", |
||||
|
// method: 'post', |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
pagination: false, // 设置不分页 |
||||
|
sidePagination: "client", |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
width: 1200, |
||||
|
// queryParams : { |
||||
|
// pickNo: $("#pickNo").val() |
||||
|
// }, |
||||
|
columns: [ |
||||
|
{ |
||||
|
field: 'id', |
||||
|
title: '主键id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialNo', |
||||
|
title: '料号', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'photoUrl', |
||||
|
align: 'center', |
||||
|
title: '图片', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.imageView(value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
align: 'center', |
||||
|
title: '物料名称', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialModel', |
||||
|
title: '型号', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'describe', |
||||
|
align: 'center', |
||||
|
title: '描述', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'brand', |
||||
|
align: 'center', |
||||
|
title: '品牌', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unit', |
||||
|
align: 'center', |
||||
|
title: '单位', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
field: 'processMethod', |
||||
|
align: 'center', |
||||
|
title: '加工方式', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(processMethodDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'useNum', |
||||
|
// align: 'center', |
||||
|
// title: '用量', |
||||
|
// formatter: function (value,row,index){ |
||||
|
// if (value == null || value == ''){ |
||||
|
// return '/'; |
||||
|
// }else{ |
||||
|
// return value |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'hasPickNum', |
||||
|
align: 'center', |
||||
|
title: '已领料数', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'hasReturnNum', |
||||
|
align: 'center', |
||||
|
title: '已退料数', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return 0; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'returnNum', |
||||
|
align: 'center', |
||||
|
title: '本次退料数', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return ''; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
}, |
||||
|
editable: { |
||||
|
type: 'text', // 编辑器类型 |
||||
|
validate: function (value) { |
||||
|
value = $.trim(value); // 去除前后空格 |
||||
|
if (!value) { |
||||
|
return '退料数不能为空'; |
||||
|
} |
||||
|
if (isNaN(value)) { |
||||
|
return '请输入有效的数字'; |
||||
|
} |
||||
|
if (parseFloat(value) < 0) { |
||||
|
return '退料数不能为负数'; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{title: '操作', align: 'center', |
||||
|
formatter: function (value, row, index) { |
||||
|
var actions = []; |
||||
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialNo + '\')"><i class="fa fa-remove"></i>删除</a> '); |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
function insertRow() { |
||||
|
var pickNo = $("#pickNo").val(); |
||||
|
console.log("pickNo" + pickNo); |
||||
|
if(pickNo == ''){ |
||||
|
$.modal.msgError("请输入领料单号"); |
||||
|
return; |
||||
|
} |
||||
|
var url = prefix + "/getMaterialList?pickNo=" + encodeURIComponent(pickNo); |
||||
|
var options = { |
||||
|
title: '选择料号', |
||||
|
url: url, |
||||
|
callBack: doSubmit |
||||
|
}; |
||||
|
$.modal.openOptions(options); |
||||
|
} |
||||
|
|
||||
|
function doSubmit(index, layero,uniqueId){ |
||||
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
||||
|
var pickUser = iframeWin.$("#pickUser").val(); |
||||
|
$("#pickUser").val(pickUser); |
||||
|
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections'); |
||||
|
//判断是否重复 |
||||
|
var data = $("#bootstrap-material-table").bootstrapTable('getData'); |
||||
|
var rows = data.length; |
||||
|
if(rows>0){ |
||||
|
for(var i=0;i<rows;i++){ |
||||
|
for(var j=0;j<rowData.length;j++){ |
||||
|
if(data[i].materialNo===rowData[j].materialNo){ |
||||
|
$.modal.alertError("不能选择已添加过的相同物料"); |
||||
|
rowData.split(j,1); |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
} |
||||
|
for(i=0;i<rowData.length;i++){ |
||||
|
insertTable(rowData[i]); |
||||
|
} |
||||
|
layer.close(index); |
||||
|
} |
||||
|
|
||||
|
function insertTable(rowData){ |
||||
|
var newRow = { |
||||
|
id:rowData.id, |
||||
|
materialNo: rowData.materialNo, |
||||
|
materialName: rowData.materialName, |
||||
|
describe: rowData.describe, |
||||
|
brand: rowData.brand, |
||||
|
unit: rowData.unit, |
||||
|
processMethod: rowData.processMethod, |
||||
|
photoUrl: rowData.photoUrl, |
||||
|
materialModel: rowData.materialModel, |
||||
|
hasPickNum: rowData.hasPickNum, |
||||
|
hasReturnNum: rowData.hasReturnNum, |
||||
|
returnNum: '', |
||||
|
}; |
||||
|
$("#bootstrap-material-table").bootstrapTable('append', newRow); |
||||
|
} |
||||
|
|
||||
|
function removeRow(materialNo){ |
||||
|
$("#bootstrap-material-table").bootstrapTable('remove', { |
||||
|
field: 'materialNo', |
||||
|
values: materialNo |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
var baseReturnOrder = { |
||||
|
pickNo: $("#pickNo").val(), |
||||
|
pickUser: $("#pickUser").val(), |
||||
|
returnOrderDetails: [], |
||||
|
}; |
||||
|
var returnDetailList = []; |
||||
|
var tableDatas = $("#bootstrap-material-table").bootstrapTable("getData"); |
||||
|
if(tableDatas.length <=0){ |
||||
|
$.modal.msgError("退料单物料信息为空,请检查"); |
||||
|
return; |
||||
|
} |
||||
|
tableDatas.forEach(function (data){ |
||||
|
if(data.returnNum != null && data.returnNum != '' |
||||
|
&& data.returnNum != undefined && Number(data.returnNum) > 0){ |
||||
|
returnDetailList.push(data); |
||||
|
} |
||||
|
}) |
||||
|
if(returnDetailList.length <= 0){ |
||||
|
$.modal.msgError("至少添加一条退料数有效数据"); |
||||
|
return; |
||||
|
} |
||||
|
baseReturnOrder.returnOrderDetails = returnDetailList; |
||||
|
console.log(baseReturnOrder); |
||||
|
$.operate.saveJson(prefix + "/add", JSON.stringify(baseReturnOrder)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,195 @@ |
|||||
|
<!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('员工退料列表')" /> |
||||
|
</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="baseReturnOrderCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>关联领料单号:</label> |
||||
|
<input type="text" name="pickNo"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>退料状态:</label> |
||||
|
<select name="returnStatus"> |
||||
|
<option value="">所有</option> |
||||
|
<option value="-1">代码生成请选择字典属性</option> |
||||
|
</select> |
||||
|
</li> |
||||
|
|
||||
|
<li> |
||||
|
<label>审核状态:</label> |
||||
|
<select name="auditStatus"> |
||||
|
<option value="">所有</option> |
||||
|
<option value="-1">代码生成请选择字典属性</option> |
||||
|
</select> |
||||
|
</li> |
||||
|
|
||||
|
<li> |
||||
|
<label>申请人:</label> |
||||
|
<input type="text" name="applyUser"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>申请时间:</label> |
||||
|
<input type="text" class="time-input" placeholder="请选择申请时间" name="applyTime"/> |
||||
|
</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="system:baseReturnOrder:add"> |
||||
|
<i class="fa fa-plus"></i> 添加 |
||||
|
</a> |
||||
|
|
||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:baseReturnOrder: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" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var editFlag = [[${@permission.hasPermi('system:baseReturnOrder:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('system:baseReturnOrder:remove')}]]; |
||||
|
var cancelFlag = [[${@permission.hasPermi('system:baseReturnOrder:cancel')}]]; |
||||
|
var restoreFlag = [[${@permission.hasPermi('system:baseReturnOrder:restore')}]]; |
||||
|
|
||||
|
var returnStatusDatas = [[${@dict.getType('return_status')}]]; |
||||
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
||||
|
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; |
||||
|
|
||||
|
var prefix = ctx + "system/baseReturnOrder"; |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/list", |
||||
|
createUrl: prefix + "/add", |
||||
|
updateUrl: prefix + "/edit/{id}", |
||||
|
detailUrl: prefix + "/detail/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
exportUrl: prefix + "/export", |
||||
|
modalName: "员工退料", |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, |
||||
|
{ |
||||
|
title: 'id', |
||||
|
field: 'id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
title: '退料单号', |
||||
|
field: 'baseReturnOrderCode', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '关联领料单号', |
||||
|
field: 'pickNo', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '退料状态', |
||||
|
field: 'returnStatus', |
||||
|
align: 'center', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(returnStatusDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: '物料合计', |
||||
|
field: 'materialSum', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '数量合计', |
||||
|
field: 'returnSum', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '合格数', |
||||
|
field: 'qualifiedNum', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '不良数', |
||||
|
field: 'unqualifiedNum', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '入库数', |
||||
|
field: 'storageNum', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '审核状态', |
||||
|
field: 'auditStatus', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '流程实例ID', |
||||
|
field: 'instanceId', |
||||
|
visible: false, |
||||
|
}, |
||||
|
{ |
||||
|
title: '流程实例类型', |
||||
|
field: 'instanceType', |
||||
|
visible: false, |
||||
|
}, |
||||
|
{ |
||||
|
title: '流程提交实例ID', |
||||
|
field: 'submitInstanceId', |
||||
|
visible: false, |
||||
|
}, |
||||
|
{ |
||||
|
title: '申请人', |
||||
|
field: 'applyUser', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '申请时间', |
||||
|
field: 'applyTime', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '更新人', |
||||
|
field: 'updateBy', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '更新时间', |
||||
|
field: 'updateTime', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '操作', |
||||
|
align: 'center', |
||||
|
formatter: function(value, row, index) { |
||||
|
var actions = []; |
||||
|
actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> '); |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,208 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('新增员工退料')" /> |
||||
|
<th:block th:include="include :: bootstrap-editable-css" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-baseReturnOrder-add" th:object="${baseReturnOrder}"> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">退料单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="baseReturnOrderCode" name="baseReturnOrderCode" th:field="*{baseReturnOrderCode}" class="form-control" type="text" readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">关联领料单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="pickNo" name="pickNo" th:field="*{pickNo}" class="form-control" type="text" readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">退料状态:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select class="form-control" name="returnStatus" th:field="*{returnStatus}" th:with="type=${@dict.getType('return_status')}" disabled> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">录入人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="createBy" th:field="*{createBy}" class="form-control" type="text" readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-xs-11" style="margin-left: 100px;"> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-material-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/baseReturnOrder"; |
||||
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
||||
|
var levelDatas = [[${@dict.getType('bomLevel')}]]; |
||||
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
||||
|
|
||||
|
|
||||
|
$("#form-baseReturnOrder-add").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
$(function(){ |
||||
|
var options = { |
||||
|
id: 'bootstrap-material-table', |
||||
|
url: ctx + "system/baseReturnOrderDetail/list", |
||||
|
method: 'post', |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
pagination: false, // 设置不分页 |
||||
|
sidePagination: "client", |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
width: 1200, |
||||
|
queryParams : { |
||||
|
baseReturnOrderCode: $("#baseReturnOrderCode").val() |
||||
|
}, |
||||
|
columns: [ |
||||
|
{ |
||||
|
field: 'id', |
||||
|
title: '主键id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialNo', |
||||
|
title: '料号', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'photoUrl', |
||||
|
align: 'center', |
||||
|
title: '图片', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.imageView(value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
align: 'center', |
||||
|
title: '物料名称', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialModel', |
||||
|
title: '型号', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'describe', |
||||
|
align: 'center', |
||||
|
title: '描述', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'brand', |
||||
|
align: 'center', |
||||
|
title: '品牌', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unit', |
||||
|
align: 'center', |
||||
|
title: '单位', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
field: 'processMethod', |
||||
|
align: 'center', |
||||
|
title: '加工方式', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(processMethodDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'useNum', |
||||
|
// align: 'center', |
||||
|
// title: '用量', |
||||
|
// formatter: function (value,row,index){ |
||||
|
// if (value == null || value == ''){ |
||||
|
// return '/'; |
||||
|
// }else{ |
||||
|
// return value |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'hasPickNum', |
||||
|
align: 'center', |
||||
|
title: '已领料数', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'hasReturnNum', |
||||
|
align: 'center', |
||||
|
title: '已退料数', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return 0; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'returnNum', |
||||
|
align: 'center', |
||||
|
title: '本次退料数', |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,160 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('修改员工退料')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-baseReturnOrder-edit" th:object="${baseReturnOrder}"> |
||||
|
<input name="id" th:field="*{id}" type="hidden"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">退料单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="baseReturnOrderCode" th:field="*{baseReturnOrderCode}" class="form-control" type="text" required> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">关联领料单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="pickNo" th:field="*{pickNo}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">退料状态:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="radio-box"> |
||||
|
<input type="radio" name="returnStatus" value=""> |
||||
|
<label th:for="returnStatus" th:text="未知"></label> |
||||
|
</div> |
||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">物料合计:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">退料数量合计:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="returnSum" th:field="*{returnSum}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">合格数:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="qualifiedNum" th:field="*{qualifiedNum}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">不良数:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="unqualifiedNum" th:field="*{unqualifiedNum}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">入库数:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="storageNum" th:field="*{storageNum}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">审核状态:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="radio-box"> |
||||
|
<input type="radio" name="auditStatus" value=""> |
||||
|
<label th:for="auditStatus" th:text="未知"></label> |
||||
|
</div> |
||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">使用状态:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="radio-box"> |
||||
|
<input type="radio" name="useStatus" value=""> |
||||
|
<label th:for="useStatus" th:text="未知"></label> |
||||
|
</div> |
||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">流程实例ID:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="instanceId" th:field="*{instanceId}" 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="instanceType" class="form-control m-b"> |
||||
|
<option value="">所有</option> |
||||
|
</select> |
||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">流程提交实例ID:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="submitInstanceId" th:field="*{submitInstanceId}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">流程作废实例ID:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="cancelInstanceId" th:field="*{cancelInstanceId}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">流程恢复实例ID:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="restoreInstanceId" th:field="*{restoreInstanceId}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">申请标题:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="applyTitle" th:field="*{applyTitle}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">申请人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<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"> |
||||
|
<div class="input-group date"> |
||||
|
<input name="applyTime" th:value="${#dates.format(baseReturnOrder.applyTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/baseReturnOrder"; |
||||
|
$("#form-baseReturnOrder-edit").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-baseReturnOrder-edit').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='applyTime']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,182 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('退料单选择物料')" /> |
||||
|
<th:block th:include="include :: bootstrap-editable-css" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-makeorderpick-edit"> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">领料单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="pickNo" name="pickNo" th:value="${pickNo}" class="form-control" type="text" readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-4 control-label">领料员:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="pickUser" id="pickUser" th:value="${pickUser}" class="form-control" type="text" readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-xs-11" style="margin-left: 50px;"> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-select-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/baseReturnOrder"; |
||||
|
|
||||
|
// 字典 |
||||
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
||||
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
||||
|
var levelDatas = [[${@dict.getType('bomLevel')}]]; |
||||
|
|
||||
|
$(function(){ |
||||
|
var options = { |
||||
|
id: 'bootstrap-select-table', |
||||
|
url: prefix + "/relatedMaterialList", |
||||
|
method: 'post', |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
pagination: false, // 设置不分页 |
||||
|
sidePagination: "client", |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
width: 1200, |
||||
|
queryParams : { |
||||
|
pickNo: $("#pickNo").val() |
||||
|
}, |
||||
|
columns: [ |
||||
|
{ |
||||
|
checkbox: true, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'id', |
||||
|
title: '主键id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialNo', |
||||
|
title: '料号', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'photoUrl', |
||||
|
align: 'center', |
||||
|
title: '图片', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.imageView(value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
align: 'center', |
||||
|
title: '物料名称', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialModel', |
||||
|
title: '型号', |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'describe', |
||||
|
align: 'center', |
||||
|
title: '描述', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'brand', |
||||
|
align: 'center', |
||||
|
title: '品牌', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unit', |
||||
|
align: 'center', |
||||
|
title: '单位', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return '/'; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
field: 'processMethod', |
||||
|
align: 'center', |
||||
|
title: '加工方式', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(processMethodDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'useNum', |
||||
|
// align: 'center', |
||||
|
// title: '用量', |
||||
|
// formatter: function (value,row,index){ |
||||
|
// if (value == null || value == ''){ |
||||
|
// return '/'; |
||||
|
// }else{ |
||||
|
// return value |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'hasPickNum', |
||||
|
align: 'center', |
||||
|
title: '已领料数', |
||||
|
}, |
||||
|
{ |
||||
|
field: 'hasReturnNum', |
||||
|
align: 'center', |
||||
|
title: '已退料数', |
||||
|
formatter: function (value,row,index){ |
||||
|
if (value == null || value == ''){ |
||||
|
return 0; |
||||
|
}else{ |
||||
|
return value |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue