|
@ -2,17 +2,13 @@ |
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
|
<head> |
|
|
<head> |
|
|
<th:block th:include="include :: header('开发修改单领料')" /> |
|
|
<th:block th:include="include :: header('开发修改单领料')" /> |
|
|
|
|
|
<th:block th:include="include :: select2-css" /> |
|
|
|
|
|
<th:block th:include="include :: datetimepicker-css" /> |
|
|
|
|
|
<th:block th:include="include :: bootstrap-editable-css" /> |
|
|
</head> |
|
|
</head> |
|
|
<body class="white-bg"> |
|
|
<body class="white-bg"> |
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
<form class="form-horizontal m" id="form-picking-add"> |
|
|
<form class="form-horizontal m" id="form-picking-add"> |
|
|
<!-- <div class="form-row">--> |
|
|
|
|
|
<!-- <label class="col-sm-3 control-label">领料单号:</label>--> |
|
|
|
|
|
<!-- <div class="col-sm-8">--> |
|
|
|
|
|
<!-- <input name="pickNo" class="form-control" type="text">--> |
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">开发修改单号:</label> |
|
|
<label class="col-sm-3 control-label">开发修改单号:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
@ -22,7 +18,9 @@ |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">关联生产订单号:</label> |
|
|
<label class="col-sm-3 control-label">关联生产订单号:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<input name="makeNo" class="form-control" type="text"> |
|
|
<select id="makeNo" name="makeNo" class="form-control" type="text" required> |
|
|
|
|
|
<option value="">请选择</option> |
|
|
|
|
|
</select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
@ -48,12 +46,120 @@ |
|
|
</div> |
|
|
</div> |
|
|
<th:block th:include="include :: footer" /> |
|
|
<th:block th:include="include :: footer" /> |
|
|
<script th:inline="javascript"> |
|
|
<script th:inline="javascript"> |
|
|
|
|
|
var prefix = ctx + "erp/developModifyOrder"; |
|
|
|
|
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|
|
|
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
|
|
|
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; |
|
|
|
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
|
|
|
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; |
|
|
|
|
|
var userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|
|
var prefix = ctx + "system/picking" |
|
|
var prefix = ctx + "system/picking" |
|
|
$("#form-picking-add").validate({focusCleanup: true}); |
|
|
$("#form-picking-add").validate({focusCleanup: true}); |
|
|
$(function () { |
|
|
$(function () { |
|
|
|
|
|
$("#makeNo").select2({ |
|
|
|
|
|
theme: "bootstrap", |
|
|
|
|
|
allowClear: true, |
|
|
|
|
|
placeholder: "请选择生产单号", |
|
|
|
|
|
ajax: { |
|
|
|
|
|
url: ctx + "/system/makeorder/getAllMakeNos", |
|
|
|
|
|
dataType: 'json', |
|
|
|
|
|
type: "POST", |
|
|
|
|
|
delay: 250, |
|
|
|
|
|
processResults: function (res, params) { |
|
|
|
|
|
var options = []; |
|
|
|
|
|
if(res.code==0){ |
|
|
|
|
|
var resultList = res.data; |
|
|
|
|
|
console.log(resultList); |
|
|
|
|
|
for(var i= 0, len=resultList.length;i<len;i++){ |
|
|
|
|
|
var option = resultList[i]; |
|
|
|
|
|
option.id = resultList[i]["makeNo"]; |
|
|
|
|
|
option.text = resultList[i]["makeNo"]; |
|
|
|
|
|
options.push(option); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return { |
|
|
|
|
|
results: options |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
var options = { |
|
|
|
|
|
id: "bootstrap-sub-table-developModify", |
|
|
|
|
|
// url: prefix + "/getDevelopModifyOrderList", |
|
|
|
|
|
showSearch: false, |
|
|
|
|
|
showRefresh: false, |
|
|
|
|
|
showToggle: false, |
|
|
|
|
|
showColumns: false, |
|
|
|
|
|
columns: [ |
|
|
|
|
|
{checkbox: true}, |
|
|
|
|
|
{field: 'index',align: 'center', title: "序号", |
|
|
|
|
|
formatter: function (value, row, index) { |
|
|
|
|
|
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index)); |
|
|
|
|
|
return columnIndex + $.table.serialNumber(index); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|
|
|
|
|
{title: '料号',field: 'materialCode',align: 'center'}, |
|
|
|
|
|
{title: '物料名称',field: 'materialName',align: 'center'}, |
|
|
|
|
|
{title: '图片',field: 'photoUrl', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
if(value == null || value == ""){ |
|
|
|
|
|
value = ""; |
|
|
|
|
|
return "<img src='' herf='' />"; |
|
|
|
|
|
} |
|
|
|
|
|
return $.table.imageView(value); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{title: '物料类型',field: 'materialType',align: 'center', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ title: '描述',field: 'describe',align: 'center'}, |
|
|
|
|
|
{title: '品牌',field: 'brand',align: 'center'}, |
|
|
|
|
|
{ title: '单位',field: 'unit',align: 'center', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{title: '半成品类型',field: 'processMethod',align: 'center', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ title: '对外售价',field: 'materialSole',}, |
|
|
|
|
|
{title: '国内税率',field: 'countTax',align: 'center',}, |
|
|
|
|
|
{ title: '美元汇率',field: 'usdTax', align: 'center',}, |
|
|
|
|
|
{field: 'materialNum',align: 'center',title: '物料的数量',}, |
|
|
|
|
|
{ title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, |
|
|
|
|
|
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',}, |
|
|
|
|
|
{title: '修改详情',align: 'center', |
|
|
|
|
|
formatter:function formatterForm(value, row, index) { |
|
|
|
|
|
// 这里的代码会为每行生成一个表单 |
|
|
|
|
|
var form = $('<form></form>').append( |
|
|
|
|
|
$('<input/>', { type: 'text', value: row.name, name: 'name', placeholder: 'Name' }), |
|
|
|
|
|
$('<input/>', { type: 'email', value: row.email, name: 'email', placeholder: 'Email' }), |
|
|
|
|
|
$('<button/>', { type: 'submit' }).text('Submit') |
|
|
|
|
|
); |
|
|
|
|
|
form.on('submit', function(e) { |
|
|
|
|
|
e.preventDefault(); // 阻止表单默认提交行为 |
|
|
|
|
|
var formData = form.serializeArray(); // 序列化表单数据为数组 |
|
|
|
|
|
console.log(formData); // 在控制台输出表单数据 |
|
|
|
|
|
// 这里可以添加代码处理表单提交,例如发送到服务器等 |
|
|
|
|
|
}); |
|
|
|
|
|
return form; // 返回生成的表单HTML |
|
|
|
|
|
}}, |
|
|
|
|
|
] |
|
|
|
|
|
}; |
|
|
|
|
|
$.table.init(options); |
|
|
|
|
|
|
|
|
var option1 = { |
|
|
var option1 = { |
|
|
id: "bootstrap-sub-table-material", |
|
|
id: "bootstrap-sub-table-material", |
|
|
url: prefix + "/list", |
|
|
// url: prefix + "/list", |
|
|
|
|
|
showSearch: false, |
|
|
|
|
|
showRefresh: false, |
|
|
|
|
|
showToggle: false, |
|
|
|
|
|
showColumns: false, |
|
|
modalName: "bom", |
|
|
modalName: "bom", |
|
|
detailView: true, |
|
|
detailView: true, |
|
|
height: $(window).height() - 100, |
|
|
height: $(window).height() - 100, |
|
@ -87,10 +193,34 @@ |
|
|
}; |
|
|
}; |
|
|
$.table.init(option1); |
|
|
$.table.init(option1); |
|
|
|
|
|
|
|
|
|
|
|
var option2 = { |
|
|
|
|
|
id: "bootstrap-sub-table-biztoitem", |
|
|
|
|
|
// url: prefix + "/list", |
|
|
|
|
|
showSearch: false, |
|
|
|
|
|
showRefresh: false, |
|
|
|
|
|
showToggle: false, |
|
|
|
|
|
showColumns: false, |
|
|
|
|
|
modalName: "通知人", |
|
|
|
|
|
detailView: true, |
|
|
|
|
|
height: $(window).height() - 100, |
|
|
|
|
|
//指定父id列 |
|
|
|
|
|
columns: [ |
|
|
|
|
|
{checkbox: false}, |
|
|
|
|
|
{title: '通知人',field: 'item', }, |
|
|
|
|
|
{title: '确认时间',field: 'materialNo', }, |
|
|
|
|
|
{title: '操作',align: 'center', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
var actions = []; |
|
|
|
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-eye"></i> 删除</a> '); |
|
|
|
|
|
return actions.join(''); |
|
|
|
|
|
} |
|
|
|
|
|
}] |
|
|
|
|
|
}; |
|
|
|
|
|
$.table.init(option2); |
|
|
}); |
|
|
}); |
|
|
initAllLevelTable = function(index, row, $detail) { |
|
|
initAllLevelTable = function(index, row, $detail) { |
|
|
$("#"+"all_level_table_"+row.id).bootstrapTable({ |
|
|
$("#"+"all_level_table_"+row.id).bootstrapTable({ |
|
|
url: prefix + "/allLevelList", |
|
|
// url: prefix + "/allLevelList", |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
sidePagination: "server", |
|
|
sidePagination: "server", |
|
|
contentType: "application/x-www-form-urlencoded", |
|
|
contentType: "application/x-www-form-urlencoded", |
|
@ -232,7 +362,7 @@ |
|
|
initChildSonTable = function(index, row, $detail) { |
|
|
initChildSonTable = function(index, row, $detail) { |
|
|
var childSonTable = $detail.html('<table style="table-layout:fixed"></table>').find('table'); |
|
|
var childSonTable = $detail.html('<table style="table-layout:fixed"></table>').find('table'); |
|
|
$(childSonTable).bootstrapTable({ |
|
|
$(childSonTable).bootstrapTable({ |
|
|
url: prefix + "/subList", |
|
|
// url: prefix + "/subList", |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
detailView: true, |
|
|
detailView: true, |
|
|
sidePagination: "server", |
|
|
sidePagination: "server", |
|
|