|
|
@ -2,6 +2,7 @@ |
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|
|
|
<head> |
|
|
|
<th:block th:include="include :: header('物料信息列表')" /> |
|
|
|
<th:block th:include="include :: select2-css" /> |
|
|
|
</head> |
|
|
|
<body class="gray-bg"> |
|
|
|
<div class="container-div"> |
|
|
@ -12,7 +13,7 @@ |
|
|
|
<ul> |
|
|
|
<li> |
|
|
|
<label>料号:</label> |
|
|
|
<input type="text" name="materialNo"/> |
|
|
|
<input type="text" name="params[materialNo]"/> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>物料名称:</label> |
|
|
@ -34,18 +35,20 @@ |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>工程员:</label> |
|
|
|
<input type="text" name="createBy"/> |
|
|
|
<select id="createBySel" name="createBy"> |
|
|
|
|
|
|
|
</select> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>是否有生产团队:</label> |
|
|
|
<select name="createBy" th:with="type=${@dict.getType('havaProductTem')}"> |
|
|
|
<select name="havaProductTem" th:with="type=${@dict.getType('havaProductTem')}"> |
|
|
|
<option value="">所有</option> |
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
|
|
</select> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>物料类型:</label> |
|
|
|
<select id="selectMaterialType" th:with="childList=${@category.getChildByCode('materialType')}"> |
|
|
|
<select name="materialType" id="selectMaterialType" th:with="childList=${@category.getChildByCode('materialType')}"> |
|
|
|
<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> |
|
|
@ -425,6 +428,42 @@ |
|
|
|
var productItems = []; |
|
|
|
var prefix = ctx + "erp/material"; |
|
|
|
$(function() { |
|
|
|
$('#createBySel').select2({ |
|
|
|
placeholder: "请选择工程员", |
|
|
|
allowClear: true, // 允许清除 |
|
|
|
minimumInputLength: 1, // 触发搜索的最小字符数 |
|
|
|
ajax: { |
|
|
|
url: ctx + "system/user/selectUserSelList", // 你的搜索接口 URL |
|
|
|
dataType: 'json', |
|
|
|
delay: 250, // 查询延迟 |
|
|
|
data: function (params) { |
|
|
|
console.log(params); |
|
|
|
return { |
|
|
|
userName: params.term, // 当前查询的关键词 |
|
|
|
}; |
|
|
|
}, |
|
|
|
processResults: function (data, params) { |
|
|
|
console.log(data); |
|
|
|
if(data.code==0){ |
|
|
|
return { |
|
|
|
results: data.data |
|
|
|
}; |
|
|
|
} |
|
|
|
return { |
|
|
|
results: [] |
|
|
|
}; |
|
|
|
}, |
|
|
|
cache: true // 启用缓存 |
|
|
|
}, |
|
|
|
/*escapeMarkup: function (markup) { return markup; }, // 让 Select2 正确处理 HTML 内容 |
|
|
|
templateResult: function (data) { |
|
|
|
return data.text; // 自定义显示的内容 |
|
|
|
}, |
|
|
|
templateSelection: function (data) { |
|
|
|
return data.text; // 自定义选择后显示的内容 |
|
|
|
}*/ |
|
|
|
}); |
|
|
|
|
|
|
|
var options = { |
|
|
|
url: prefix + "/list", |
|
|
|
createUrl: prefix + "/add", |
|
|
|