提交 392ac223 编写于 作者: W weizhiqiang

ERP产品选择列表整改

上级 e1cd343d
......@@ -121,7 +121,7 @@ layui.config({
{ field: 'typeName', title: '商品来源', align: 'left', width: 100 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }
]],
done: function(res, curr, count){
done: function(json, curr, count) {
matchingLanguage();
if(checkType == '1'){
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function(){
......@@ -129,7 +129,7 @@ layui.config({
dubClick.find("input[type='radio']").prop("checked", true);
form.render();
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = res.rows[chooseIndex];
var obj = json.rows[chooseIndex];
parent.erpOrderUtil.chooseProductMation = obj;
parent.refreshCode = '0';
......@@ -148,6 +148,11 @@ layui.config({
fieldName: 'productId'
});
}
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入商品名称,型号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
......@@ -162,7 +167,7 @@ layui.config({
form.render();
}
//详情
// 详情
function details(data) {
rowId = data.productId;
_openNewWindows({
......@@ -174,7 +179,7 @@ layui.config({
}});
}
//保存按钮-多选才有
// 保存按钮-多选才有
$("body").on("click", "#saveCheckBox", function() {
var selectedData = tableCheckBoxUtil.getValue({
gridId: 'messageTable'
......@@ -185,13 +190,8 @@ layui.config({
parent.refreshCode = '0';
}});
});
$("body").on("click", "#formSearch", function() {
refreshTable();
});
$("body").on("click", "#reloadTable", function() {
$("body").on("click", "#reloadTable", function() {
loadTable();
});
......@@ -204,12 +204,7 @@ layui.config({
}
function getTableParams() {
return {
materialName: $("#materialName").val(),
model: $("#model").val(),
categoryId: categoryId,
typeNum: $("#typeNum").val()
};
return $.extend(true, {categoryId: categoryId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('materialChoose', {});
......
......@@ -117,11 +117,15 @@ layui.config({
]],
done: function(res, curr, count){
matchingLanguage();
//设置选中
// 设置选中
tableCheckBoxUtil.checkedDefault({
gridId: 'messageTable',
fieldName: 'productId'
});
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入商品名称,型号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
......@@ -269,14 +273,6 @@ layui.config({
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshTable();
}
return false;
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
......@@ -290,12 +286,7 @@ layui.config({
}
function getTableParams() {
return {
materialName: $("#materialName").val(),
model: $("#model").val(),
categoryId: categoryId,
typeNum: $("#typeNum").val()
};
return $.extend(true, {categoryId: categoryId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('materialChooseToProduce', {});
......
......@@ -9,41 +9,10 @@
<link href="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<div class="winui-tip alert-info" id="showInfo">
</div>
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">商品名称</label>
<div class="layui-input-inline">
<input type="text" id="materialName" name="materialName" placeholder="请输入商品名称" class="layui-input" />
</div>
<label class="layui-form-label">型号</label>
<div class="layui-input-inline">
<input type="text" id="model" name="model" placeholder="请输入产品型号" class="layui-input" />
</div>
<label class="layui-form-label">商品来源</label>
<div class="layui-input-inline">
<select lay-filter="typeNum" lay-search="" id="typeNum">
<option value="">全部</option>
<option value="1">自产</option>
<option value="2">外购</option>
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button class="layui-btn layui-btn-sm layui-btn-normal" type="button" id="saveCheckBox" style="float: right; display: none;">
<i class="fa fa-save" aria-hidden="true" style="margin-right: 5px"></i>保存
</button>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button class="layui-btn layui-btn-sm layui-btn-normal search-table-btn-right" type="button" id="saveCheckBox" style="display: none;"><i class="fa fa-save" aria-hidden="true"></i>保存</button>
</div>
</div>
<div style="margin:auto 10px;">
......
......@@ -24,38 +24,9 @@
<body>
<div id="step"></div>
<div id="firstTab">
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<div class="winui-tip alert-info" id="showInfo">
</div>
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">商品名称</label>
<div class="layui-input-inline">
<input type="text" id="materialName" name="materialName" placeholder="请输入商品名称" class="layui-input" />
</div>
<label class="layui-form-label">型号</label>
<div class="layui-input-inline">
<input type="text" id="model" name="model" placeholder="请输入产品型号" class="layui-input" />
</div>
<label class="layui-form-label">商品来源</label>
<div class="layui-input-inline">
<select lay-filter="typeNum" lay-search="" id="typeNum">
<option value="">全部</option>
<option value="1">自产</option>
<option value="2">外购</option>
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册