zhangsiqi
4 months ago
6 changed files with 345 additions and 78 deletions
@ -1,4 +1,4 @@ |
|||||
package com.ruoyi.system; |
package com.ruoyi.system.controller; |
||||
|
|
||||
import com.ruoyi.common.core.controller.BaseController; |
import com.ruoyi.common.core.controller.BaseController; |
||||
import com.ruoyi.framework.web.service.CategoryService; |
import com.ruoyi.framework.web.service.CategoryService; |
@ -0,0 +1,286 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<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> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-developModifyOrder-confirm" th:object="${erpDevelopModifyorder}"> |
||||
|
<input name="developOrderId" th:field="*{developOrderId}" type="hidden"> |
||||
|
<div class="form-group" hidden="hidden"> |
||||
|
<label class="col-sm-3 control-label">开发修改单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="developOderCode" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="container"> |
||||
|
<div class="header"> |
||||
|
<div class="btn-group-sm" role="group"> |
||||
|
<header>修改开发修改单:</header> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">生产单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select id="makeNo" name="makeNo" class="form-control" type="text" required> |
||||
|
<option value="">请选择</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">修改完成时间:</label> |
||||
|
<div class="input-group date"> |
||||
|
<input name="updateInfoTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
<div class="container"> |
||||
|
<div class="form-row"> |
||||
|
<div class="btn-group-sm" 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-sub-table-developModify"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="container"> |
||||
|
<div class="form-row"> |
||||
|
<div class="btn-group-sm" role="group"> |
||||
|
<span>选择采购物料</span> |
||||
|
<a class="btn btn-success" onclick="insertRow2()"> |
||||
|
<i class="fa fa-plus"></i> 添加修改物料 |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-sub-table-material"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="container"> |
||||
|
<div class="form-row"> |
||||
|
<div class="btn-group-sm" role="group"> |
||||
|
<span>选择通知人</span> |
||||
|
<a class="btn btn-success" onclick="insertRow3()"> |
||||
|
<i class="fa fa-plus"></i> 添加通知人 |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-sub-table-biztoitem"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
||||
|
<th:block th:include="include :: select2-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "erp/developModifyOrder"; |
||||
|
$("#form-developModifyOrder-confirm").validate({focusCleanup: true}); |
||||
|
$(function () { |
||||
|
$.ajax({ |
||||
|
url: ctx + 'erp/developModifyOrder/getEngineerList', |
||||
|
type: 'post', |
||||
|
data: { roleKey: 'gcwyRole' }, |
||||
|
success: function (res) { |
||||
|
if (res.data.length > 0) { |
||||
|
var userData = res.data; |
||||
|
for (let i in userData) { |
||||
|
$("#userId_add").append( |
||||
|
"<option value='" + userData[i].userId + "'>" + userData[i].userName + "</option>" // 显示用户姓名 |
||||
|
); |
||||
|
} |
||||
|
$("userId_add").val(userData[i].userId).trigger("change"); |
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
$("#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 = { |
||||
|
id: "bootstrap-sub-table-material", |
||||
|
// url: prefix + "/list", |
||||
|
showSearch: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
showColumns: false, |
||||
|
modalName: "bom", |
||||
|
detailView: true, |
||||
|
height: $(window).height() - 100, |
||||
|
//指定父id列 |
||||
|
onExpandRow : function(index, row, $detail) { |
||||
|
$detail.html('<table class="table-container" id="all_level_table_'+row.id+'"></table>').find('table'); |
||||
|
// 多阶 |
||||
|
initAllLevelTable(index,row,$detail); |
||||
|
// $.table.bootstrapTable('resetView'); |
||||
|
}, |
||||
|
columns: [ |
||||
|
{checkbox: false}, |
||||
|
{title: 'bom号',field: 'bomNo', }, |
||||
|
{title: '关联料号',field: 'materialNo', }, |
||||
|
{field: 'photoUrl',title: '图片',formatter: function(value, row, index) {return $.table.imageView(value);}}, |
||||
|
{title: '物料名称',field: 'materialName', }, |
||||
|
{field: 'materialType',title: '物料类型',formatter: function(value, row, index) { return $.table.selectCategoryLabel(materialTypeDatas, value);}}, |
||||
|
{field: 'processMethod', title: '半成品类型',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}}, |
||||
|
{field: 'unit',title: '单位',}, |
||||
|
{ title: '品牌',field: 'brand', }, |
||||
|
{title: '描述',field: 'describe'}, |
||||
|
{field: 'num',title: '订单数量',}, |
||||
|
{field: 'parentId',title: '父级id',visible:false}, |
||||
|
{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(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); |
||||
|
}) |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-developModifyOrder-confirm').serialize()); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue