Browse Source

[feat]工程管理:修改查询物料查询排序有先根据创建时间排序。修改入库,物料料号,物料名称,物料类型,半成品类型,描述为必填项,添加配置技术团队页面。

dev
zhangsiqi 6 months ago
parent
commit
4ffd242bc9
  1. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java
  2. 2
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml
  3. 236
      ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html
  4. 71
      ruoyi-admin/src/main/resources/templates/erp/material/add.html
  5. 9
      ruoyi-admin/src/main/resources/templates/erp/material/detail.html
  6. 75
      ruoyi-admin/src/main/resources/templates/erp/material/edit.html
  7. 167
      ruoyi-admin/src/main/resources/templates/erp/material/editTechnologyTeam.html
  8. 76
      ruoyi-admin/src/main/resources/templates/erp/material/material.html
  9. 49
      ruoyi-admin/src/main/resources/templates/erp/material/taskGcjlVerify.html
  10. 40
      ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html
  11. 45
      ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html
  12. 45
      ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html

5
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java

@ -308,6 +308,11 @@ public class ErpMaterialController extends BaseController
return prefix + "/select";
}
@GetMapping("/editTechnologyTeam")
public String editTechnologyTeam()
{
return prefix + "/editTechnologyTeam";
}
//配置技术团队
@PostMapping("/addErpMaterialProduct")
@ResponseBody

2
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierId != null and supplierId != ''"> and erp.supplier_id = #{supplierId}</if>
<if test="businessMembers != null and businessMembers != ''"> and erp.business_members = #{businessMembers}</if>
</where>
order by erp.update_time desc
order by erp.create_time desc
</select>
<select id="selectErpMaterialById" parameterType="Long" resultMap="ErpMaterialResult">

236
ruoyi-admin/src/main/resources/templates/erp/bom/taskGcjlVerify.html

@ -36,21 +36,21 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<label class="col-sm-3 control-label is-required">料号:</label>
<div class="col-sm-8">
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" readonly>
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" readonly required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" disabled>
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" required disabled>
<optgroup>
<option value="">请选择</option>
</optgroup>
@ -62,9 +62,9 @@
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" readonly hidden />
</div>
<div class="form-group">
<label class="col-sm-3 control-label">半成品类型:</label>
<label class="col-sm-3 control-label is-required">半成品类型:</label>
<div class="col-sm-8">
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" disabled>
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" required disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option>
</select>
</div>
@ -84,9 +84,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<label class="col-sm-3 control-label is-required">描述:</label>
<div class="col-sm-8">
<textarea name="describe" class="form-control" readonly>[[*{describe}]]</textarea>
<textarea name="describe" class="form-control" readonly required>[[*{describe}]]</textarea>
</div>
</div>
<div class="form-group">
@ -245,7 +245,8 @@
}
},
}
})
});
var erpBom = [[${formData}]];
$(function() {
$.ajax({
url: ctx + 'erp/material/getEngineerList',
@ -267,7 +268,220 @@
$("#form-edit").validate({
focusCleanup: true
});
$(function() {
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(erpBom.businessMembers);
} else {
$.modal.msgError(res.msg);
}
}
});
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
detailUrl: prefix + "/detail/{id}",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
pageList: [5, 10, 25, 50],
pageSize: 10,
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
modalName: "bom",
detailView: true,
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
height: $(window).height() - 100,
//指定父id列
onExpandRow : function(index, row, $detail) {
$detail.html('<h4>一阶</h4><table class="table-container" id="one_level_table_'+row.id+'"></table>' +
'<h4>多阶</h4><table class="table-container" id="all_level_table_'+row.id+'"></table>'
).find('table');
// 一阶
initOneLevelTable(index,row,$detail);
// 多阶
initAllLevelTable(index,row,$detail);
$.table.bootstrapTable('resetView');
},
columns: [{
checkbox: true
},
{title: '主键ID',field: 'id'},
{ title: '流程实例ID',field: 'instanceId',visible: false},
{ title: '流程提交实例ID',field: 'submitInstanceId',visible: false},
{title: '流程作废实例ID', field: 'cancelInstanceId',visible: false},
{ title: '流程恢复实例ID',field: 'restoreInstanceId',visible: false},
{ title: '流程实例类型',field: 'instanceTypeName', visible: false},
{
field: 'applyUser',
title: '申请人ID',
visible: false
},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{
field: 'applyTime',
title: '申请时间',
sortable: true,
},
{
field: 'taskId',
title: '当前任务ID',
visible: false,
},
{
field: 'todoUserId',
title: '待办用户ID',
visible: false,
},
{
field: 'taskName',
title: '当前任务名称',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{
field: 'auditStatus',
title: '审核状态',
sortable: true,
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
field: 'useStatus',
title: '使用状态',
sortable: true,
formatter: function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);
}
},
{title: '工程员',field: 'businessMembers', sortable: true,},
{title: 'bom号',field: 'bomNo', sortable: true,},
{title: '关联料号',field: 'materialNo', sortable: true,},
{
field: 'photoUrl',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{ title: '物料名称',field: 'materialName', sortable: true,},
{
field: 'materialType',
title: '物料类型',
sortable: true,
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
field: 'processMethod',
title: '半成品类型',
sortable: true,
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'unit',
title: '单位',
sortable: true,
},
{ title: '品牌',field: 'brand', sortable: true,},
{title: '描述',field: 'describe', sortable: true,},
{title: '用量',field: 'useNum', sortable: true,},
{title: '损耗率',field: 'lossRate', sortable: true,
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'parentId',
title: '父级id',
visible:false
},
{
field: 'level',
title: '层级',
visible:false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(levelDatas, value);
}
},
{
field: 'sortNo',
title: '排序',
visible: false
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
// 审核状态-审核通过 使用状态-是 未发起作废流程
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId){
// 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}else{
actions.push('<a class="btn btn-default btn-xs" disabled href="javascript:void(0)"><i class="fa fa-edit"></i> 编辑</a> ');
}
// 已作废
if(row.useStatus=="2" && !row.restoreInstanceId){
// 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
}
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+row.instanceTypeName+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
// 详情
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

71
ruoyi-admin/src/main/resources/templates/erp/material/add.html

@ -11,11 +11,11 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">料号:</label>
<div class="col-sm-8">
<input id = "materialNo" name="materialNo" class="form-control" type="text" required />
<input id="materialNo" maxlength="10" name="materialNo" class="form-control" type="text" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text" required />
</div>
@ -24,9 +24,6 @@
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" required>
<optgroup>
<option value="">请选择</option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
</optgroup>
@ -37,11 +34,10 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">半成品类型:</label>
<div class="col-sm-8">
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" required>
<option value="">请选择</option>
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
<div id="weiwai" hidden>
<div id="add-weiwai">
<label class="col-sm-3 control-label">委外工序:</label>
<div class="col-sm-8">
<a class="btn btn-primary" onclick="insertRowWai()">添加委外工序</a>
@ -51,26 +47,24 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">供应商:</label>
<label class="col-sm-3 control-label is-required">供应商:</label>
<div class="col-sm-8">
<select name="supplierItem" class="form-control m-b" th:with="supplierList=${@supplierItems.selectSysSupperWithMaterial()}">
<option value="">请选择</option>
<option th:each="supplier:${supplierList}" th:value="${supplier.supplierId}" th:text="${supplier.supplierName}"></option>
<select name="supplierName" class="form-control m-b">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单位:</label>
<label class="col-sm-3 control-label ">单位:</label>
<div class="col-sm-8">
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" required>
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<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-3 control-label is-required">品牌:</label>
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" class="form-control" type="text" required />
<input name="brand" class="form-control" type="text"/>
</div>
</div>
<div class="form-group">
@ -80,16 +74,15 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}">
<option value=""></option>
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" required>
<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-3 control-label">工程员:</label>
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<input name="businessMembers" id="businessMembers_add" class="form-control m-b" disabled required />
</div>
@ -178,6 +171,27 @@
//获取工程员
$(function(){
$("#businessMembers_add").val(userName);
supplierName();
engineer();
$("#add-weiwai").hide();
})
//获取供应商
function supplierName(){
$.ajax({
url: ctx + 'system/supplier/getSupplier',
type: 'post',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-material-add select[name='supplierName']").append(
"<option value='" + usertData[i].supplierName + "'>" + usertData[i].supplierName + "</option>");
}
}
}
})
}
function engineer(){
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
@ -193,8 +207,7 @@
}
}
});
})
}
$("#form-material-add").validate({
onkeyup: false,
rules:{
@ -254,9 +267,21 @@
}
}
function insertRowWai() {
var html = '<tr><td><input type="text" name="weiwai" class="form-control" required></td><td><a class="btn btn-danger" onclick="removeRowWai(this)">删除</a></td></tr>';
var html = '<tr>' +
'<td><input type="text" name="weiwai" class="form-control" required></td>' +
'<td><a class="btn btn-danger" onclick="removeRowWai(this)">删除</a></td>' +
'</tr>';
$(".bootstrap-table-sub-2").append(html);
}
$("select[name='processMethod']").on("select2:select", function (e) {
data = e.params.data;
if (data.dictLabel == '委外加工') {
$("#add-weiwai").show();
} else {
$("#add-weiwai").hide();
}
});
</script>
</body>
</html>

9
ruoyi-admin/src/main/resources/templates/erp/material/detail.html

@ -72,9 +72,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required >
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" disabled required >
</select>
</div>
</div>
@ -128,6 +128,8 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var enginner = [[${erpMaterial.businessMembers}]];
$(function(){
$.ajax({
url: ctx + 'erp/material/getEngineerList',
@ -136,9 +138,10 @@
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
$("#form-material-detail select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#form-material-detail select[name='businessMembers']").val(enginner);
} else {
$.modal.msgError(res.msg);
}

75
ruoyi-admin/src/main/resources/templates/erp/material/edit.html

@ -12,22 +12,19 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">料号:</label>
<div class="col-sm-8">
<input readonly id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" required />
<input name="materialNo" th:field="*{materialNo}" class="form-control" type="text" required disabled/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" />
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" required disabled/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}">
<optgroup>
<option value="">请选择</option>
</optgroup>
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" required>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
</optgroup>
@ -39,17 +36,14 @@
<label class="col-sm-3 control-label is-required">半成品类型:</label>
<div class="col-sm-8">
<select name="processMethod" class="form-control m-b" th:field="*{processMethod}" th:with="type=${@dict.getType('processMethod')}" required>
<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-3 control-label">供应商:</label>
<label class="col-sm-3 control-label is-required">供应商:</label>
<div class="col-sm-8">
<select name="supplierItem" class="form-control m-b" th:with="supplierList=${@supplierItems.selectSysSupperWithMaterial()}">
<option value="">请选择</option>
<option th:each="supplier:${supplierList}" th:value="${supplier.supplierId}" th:text="${supplier.supplierName}"></option>
<select name="supplierName" class="form-control m-b" required>
</select>
</div>
</div>
@ -57,14 +51,15 @@
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">品牌:</label>
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text" required/>
<input name="brand" th:field="*{brand}" class="form-control" type="text"/>
</div>
</div>
<div class="form-group">
@ -74,10 +69,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:field="*{warehouseDept}" th:with="type=${@dict.getType('warehouseDept')}">
<option value="">未选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
</select>
</div>
@ -86,28 +80,27 @@
<label class="col-sm-3 control-label">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" id="businessMembers_edit" class="form-control m-b" required >
<option value="">未选择</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">照片:</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label">照片:</label>
<div class="col-sm-10">
<el-upload
:action="fileUploadUrl"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
:file-list="fileList"
:limit="5"
list-type="picture"
limit="5"
accept=".jpg,.png"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div>
</el-upload>
</div>
<input id="fileIdStr" type="text" name="fileIdStr" hidden>
<input id="photoAttachId" name = "photoAttachId" hidden th:field="*{photoAttachId}" />
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden />
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden />
</div>
</form>
@ -117,6 +110,8 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var erpMaterial = [[${erpMaterial}]];
new Vue({
el: '#app',
data: function() {
@ -252,43 +247,47 @@
});
$(function(){
var materialType = $("#materialType").val();
$("#selectMaterialType").val(materialType).trigger("change");
$("#selectMaterialType").val(materialType);
engineer();
supplierName();
})
//获取工程员
function engineer() {
var engineerSelect = $("#form-material-edit select[name='businessMembers']");
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
var usertData = res.rows;
for (let i in usertData) {
$("form-material- select[name='businessMembers']").append(
engineerSelect.append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
engineerSelect.val(userName);
} else {
$.modal.msgError(res.msg);
}
}
});
})
//获取工程员
$(function(){
}
//获取供应商
function supplierName(){
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
url: ctx + 'system/supplier/getSupplier',
type: 'post',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
$("#form-material-edit select[name='supplierName']").append(
"<option value='" + usertData[i].supplierName + "'>" + usertData[i].supplierName + "</option>");
}
} else {
$.modal.msgError(res.msg);
$("#form-material-edit select[name='supplierName']").val(erpMaterial.supplierName);
}
}
});
})
var materialType = $("#materialType").val();
$("#selectMaterialType").val(materialType).trigger("change");
})
}
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

167
ruoyi-admin/src/main/resources/templates/erp/material/editTechnologyTeam.html

@ -0,0 +1,167 @@
<!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" />
</head>
<body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-materialTechnologyTeam">
<div class="container">
<div class="form-row">
<div class="content-header" role="group">
<h3>技术团队配置</h3>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">料号:</label>
<div class="col-sm-8">
<input type="text" class="form-control" value="team001" disabled />
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">物料名称:</label>
<div class="col-sm-8">
<input type="text" class="form-control" value="" disabled />
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">团队ID:</label>
<div class="col-sm-8">
<select class="form-control" name="teamCode"></select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">团队名称:</label>
<div class="col-sm-8">
<select class="form-control" name="teamName">
<option value="">请选择</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<table class="table table-bordered">
<thead>
<tr>
<th>职能</th>
<th>电气</th>
<th>结构</th>
<th>软件</th>
<th>测试</th>
<th>主管1</th>
<th>主管2</th>
<th>经理</th>
<th>总监</th>
</tr>
</thead>
<tbody>
<tr id="add_teachnologyTeamList">
<td>人员</td>
<td>张三</td>
<td>李四</td>
<td>王五</td>
<td>张飞</td>
<td>佛山</td>
<td>朱一</td>
<td>朱明</td>
<td>祝福</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
$("#form-materialTechnologyTeam").validate({focusCleanup: true});
$(function () {
$("select[name='teamCode']").select2({
placeholder: "请选择",
ajax: {
url: ctx + "system/technicalTeam/list",
dataType: 'json',
delay: 250,
processResults: function (res, params) {
var resultList = res.rows;
var options = [];
for (let i in resultList) {
var option = resultList[i];
option.id = resultList[i]["technicalTeamId"];
option.text = resultList[i]["technicalTeamId"];
options.push(option);
}
return {results: options,}
},
escapeMarkup: function (markup) {return markup;},
}
});
$("select[name='teamName']").select2({
placeholder: "请选择",
ajax: {
url: ctx + "system/technicalTeam/list",
dataType: 'json',
delay: 250,
processResults: function (res, params) {
var resultList = res.rows;
var options = [];
for (let i in resultList) {
var option = resultList[i];
option.id = resultList[i]["technicalTeamName"];
option.text = resultList[i]["technicalTeamName"];
options.push(option);
}
return {results: options,}
},
escapeMarkup: function (markup) {return markup;},
}
});
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(ctx + "material/materialTechnologyTeam/edit", $('#form-materialTechnologyTeam').serialize());
}
}
$("select[name='teamCode']").on("select2:select", function (e) {
var selectData = e.params.data;
var teamCode = $(this).val();
$("select[name='teamName']").val(selectData.technicalTeamName);
$("#add_teachnologyTeamList").find("td:eq(2)").text(selectData.dianqi);
$("#add_teachnologyTeamList").find("td:eq(3)").text(selectData.struct);
$("#add_teachnologyTeamList").find("td:eq(4)").text(selectData.soft);
$("#add_teachnologyTeamList").find("td:eq(5)").text(selectData.test);
$("#add_teachnologyTeamList").find("td:eq(6)").text(selectData.zhuguan1);
$("#add_teachnologyTeamList").find("td:eq(7)").text(selectData.zhuguan2);
$("#add_teachnologyTeamList").find("td:eq(8)").text(selectData.manger);
$("#add_teachnologyTeamList").find("td:eq(9)").text(selectData.director);
});
$("select[name='teamName']").on("select2:select", function (e) {
var selectData = e.params.data;
$("select[name='teamCode']").val(selectData.technicalTeamId);
$("#add_teachnologyTeamList").find("td:eq(2)").text(selectData.dianqi);
$("#add_teachnologyTeamList").find("td:eq(3)").text(selectData.struct);
$("#add_teachnologyTeamList").find("td:eq(4)").text(selectData.soft);
$("#add_teachnologyTeamList").find("td:eq(5)").text(selectData.test);
$("#add_teachnologyTeamList").find("td:eq(6)").text(selectData.zhuguan1);
$("#add_teachnologyTeamList").find("td:eq(7)").text(selectData.zhuguan2);
$("#add_teachnologyTeamList").find("td:eq(8)").text(selectData.manger);
$("#add_teachnologyTeamList").find("td:eq(9)").text(selectData.director);
});
</script>
</body>
</html>

76
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -70,29 +70,6 @@
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<!-- <li>
<label>半成品类型:</label>
<select name="processMethod" th:with="type=${@dict.getType('processMethod')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>单位:</label>
<input type="text" name="unit"/>
</li>
<li>
<label>品牌:</label>
<input type="text" name="brand"/>
</li>
<li>
<label>入库部门:</label>
<select name="warehouseDept" th:with="type=${@dict.getType('warehouseDept')}">
<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>
@ -106,7 +83,7 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:material:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-success" onclick="" shiro:hasPermission="erp:material:item">
<a class="btn btn-success" onclick="technologyTeam()" shiro:hasPermission="erp:material:item">
<i class="fa fa-plus"></i> 技术团队配置
</a>
<a class="btn btn-warning" onclick="exportSelect()" shiro:hasPermission="erp:material:export">
@ -143,21 +120,7 @@
var productItems = [];
var prefix = ctx + "erp/material";
$(function() {
$.ajax({
url: prefix + '/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
engineer();
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -212,6 +175,7 @@
},
{title: '品牌',field: 'brand',},
{title: '描述',field: 'describe',},
{title: '利润率',field: '',visible: false,},
{title: '是否有技术团队',field: 'havaProductTem',visible: false,
formatter:function (value, row, index){return $.table.selectDictLabel(haveProductTem,value);}
},
@ -268,8 +232,38 @@
$.table.init(options);
});
function technologyTeam(){
const rows = $("#bootstrap-table").bootstrapTable('getSelections');
if(rows.length!==1){
$.modal.msgError("一次只能选择一个物料数据");
return;
}
// var materialNoArr = [];
// selectedRows.forEach(function(row) {
// var value = row[materialNo];
// materialNoArr.push(value);
// });
// materialNo = materialNoArr.join(",");
var materialNo = rows[0].materialNo;
$.modal.open("编辑物料技术团队配置", prefix + "/editTechnologyTeam");
}
function engineer(){
$.ajax({
url: prefix + '/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
}
//导出数据
function exportSelect() {

49
ruoyi-admin/src/main/resources/templates/erp/material/taskGcjlVerify.html

@ -42,41 +42,15 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly required>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">是否有生产团队:</label>
<div class="col-sm-8">
<select name="haveProductTem" class="form-control m-b" th:with="type=${@dict.getType('havaProductTem')}" disabled>
<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-3 control-label">生产团队id:</label>
<div class="col-sm-8">
<select name="productItem" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" disabled>
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.id}" th:text="${product.id}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产团队名称:</label>
<div class="col-sm-8">
<select name="itemName" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" disabled>
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.productItem}" th:text="${product.productItem}"></option>
</select>
</div>
</div> -->
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" disabled>
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" required disabled>
<optgroup>
<option value="">请选择</option>
</optgroup>
@ -97,17 +71,17 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单位:</label>
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" required disabled>
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">品牌:</label>
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text" required readonly>
<input name="brand" th:field="*{brand}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
@ -117,15 +91,15 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" disabled>
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" required disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseDept}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required >
</select>
@ -176,6 +150,7 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script type="text/javascript">
var erpMaterial = [[${erpMaterial}]];
new Vue({
el: '#app',
data: function() {

40
ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html

@ -42,41 +42,15 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly required>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">是否有生产团队:</label>
<div class="col-sm-8">
<select name="haveProductTem" class="form-control m-b" th:with="type=${@dict.getType('havaProductTem')}" disabled>
<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-3 control-label">生产团队id:</label>
<div class="col-sm-8">
<select name="productItem" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" disabled>
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.technicalTeamId}" th:text="${product.technicalTeamId}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产团队名称:</label>
<div class="col-sm-8">
<select name="itemName" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" disabled>
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.technicalTeamName}" th:text="${product.technicalTeamName}"></option>
</select>
</div>
</div> -->
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" disabled>
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" required disabled>
<optgroup>
<option value="">请选择</option>
</optgroup>
@ -117,9 +91,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" disabled>
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" disabled required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseDept}"></option>
</select>
</div>
@ -280,7 +254,7 @@
},
}
})
var erpMaterial = [[${erpMaterial}]];
var prefix = ctx + "erp/material";
$("#form-edit").validate({focusCleanup: true});
$(function() {

45
ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html

@ -48,32 +48,6 @@
<input name="materialName" th:field="*{materialName}" 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">
<select name="haveProductTem" class="form-control m-b" th:with="type=${@dict.getType('havaProductTem')}" >
<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-3 control-label">生产团队id:</label>
<div class="col-sm-8">
<select name="productItem" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" >
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.technicalTeamId}" th:text="${product.technicalTeamIdid}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产团队名称:</label>
<div class="col-sm-8">
<select name="itemName" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" >
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.technicalTeamName}" th:text="${product.technicalTeamName}"></option>
</select>
</div>
</div> -->
<div class="form-group">
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
@ -98,17 +72,17 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单位:</label>
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" required>
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">品牌:</label>
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text" required />
<input name="brand" th:field="*{brand}" class="form-control" type="text" />
</div>
</div>
<div class="form-group">
@ -118,17 +92,17 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" >
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" required disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseDept}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required >
<select name="businessMembers" id="businessMembers_edit" class="form-control m-b" required disabled>
</select>
</div>
</div>
@ -273,7 +247,7 @@
},
}
})
var erpMaterial = [[${erpMaterial}]];
var prefix = ctx + "erp/material";
$("#form-edit").validate({
onkeyup: false,
@ -318,6 +292,7 @@
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(erpMaterial.businessMembers);
} else {
$.modal.msgError(res.msg);
}

45
ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html

@ -47,32 +47,6 @@
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label">是否有生产团队:</label>
<div class="col-sm-8">
<select name="haveProductTem" class="form-control m-b" th:with="type=${@dict.getType('havaProductTem')}" disabled>
<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-3 control-label">生产团队id:</label>
<div class="col-sm-8">
<select name="productItem" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" disabled>
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.technicalTeamId}" th:text="${product.technicalTeamId}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产团队名称:</label>
<div class="col-sm-8">
<select name="itemName" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}" disabled>
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.technicalTeamName}" th:text="${product.technicalTeamName}"></option>
</select>
</div>
</div> -->
<div class="form-group">
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
@ -97,17 +71,17 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单位:</label>
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" disabled required>
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">品牌:</label>
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text" required readonly>
<input name="brand" th:field="*{brand}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
@ -117,17 +91,17 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<label class="col-sm-3 control-label is-required">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" disabled>
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" disabled required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseDept}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required >
<select name="businessMembers" id="businessMembers_edit" class="form-control m-b" required disabled>
</select>
</div>
</div>
@ -280,7 +254,7 @@
},
}
})
var erpMaterial = [[${erpMaterial}]];
var prefix = ctx + "erp/material";
$("#form-edit").validate({focusCleanup: true});
$(function() {
@ -294,6 +268,7 @@
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(erpMaterial.businessMembers);
} else {
$.modal.msgError(res.msg);
}

Loading…
Cancel
Save