diff --git a/src/main/resources/templates/pages/group/group_edit.html b/src/main/resources/templates/pages/group/group_edit.html
index 585a1123..f9a1f098 100644
--- a/src/main/resources/templates/pages/group/group_edit.html
+++ b/src/main/resources/templates/pages/group/group_edit.html
@@ -25,9 +25,11 @@
@@ -35,14 +37,16 @@
@@ -51,8 +55,9 @@
@@ -62,16 +67,22 @@
@@ -79,16 +90,22 @@
// 用于通过编码查询物料
function selectMaterialByCode(obj) {
}
+
// 用于点击搜索按钮
function selectMaterial(obj) {
}
+
// 用于修改组合名称
- function editGroupName(obj){}
+ function editGroupName(obj) {
+ }
+
// 用于修改组合备注
- function editGroupRemark(obj){}
+ function editGroupRemark(obj) {
+ }
// 用于创建二维码
- function createQrCode(obj){}
+ function createQrCode(obj) {
+ }
layui.use(['form', 'table'], function () {
var $ = layui.jquery,
@@ -113,7 +130,7 @@
pageName: 'page', //页码的参数名称,默认:page
limitName: 'size' //每页数据量的参数名,默认:limit
},
- where: {gid:id},
+ where: {gid: id},
response: {
statusName: 'status' //规定数据状态的字段名称,默认:code
, statusCode: 200 //规定成功的状态码,默认:0
@@ -160,29 +177,28 @@
area: ['100%', '100%'],
move: '.layui-layer-title',
fixed: false,
- content: '/materialForGroup?mid='+data.mid+'&gid='+id,
- end:function () {
+ content: '/materialForGroup?mid=' + data.mid + '&gid=' + id,
+ end: function () {
table.reload('currentTableId', {
url: '/group/findGroupInfo',
page: {
curr: 1
},
- where:{
- gid:id
+ where: {
+ gid: id
}
}, 'data');
}
});
- }
- else if (obj.event === 'delete') {
+ } else if (obj.event === 'delete') {
var req = {};
req.id = data.id;
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) {
$.ajax({
- url:"/group/delMaterialForGroup",
- type:"post",
- dataType:"json",
- data:JSON.stringify(req),
+ url: "/group/delMaterialForGroup",
+ type: "post",
+ dataType: "json",
+ data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (data) {
layer.close(this.layerIndex);
@@ -200,8 +216,8 @@
page: {
curr: 1
},
- where:{
- gid:id
+ where: {
+ gid: id
}
}, 'data');
return false;
@@ -226,21 +242,20 @@
area: ['100%', '100%'],
move: '.layui-layer-title',
fixed: false,
- content: '/group_add?gid='+id,
- end:function () {
+ content: '/group_add?gid=' + id,
+ end: function () {
table.reload('currentTableId', {
url: '/group/findGroupInfo',
page: {
curr: 1
},
- where:{
- gid:id
+ where: {
+ gid: id
}
}, 'data');
}
});
- }
- else if(obj.event === 'delete'){
+ } else if (obj.event === 'delete') {
var checkStatus = table.checkStatus('currentTableId')
, data = checkStatus.data;
var req = {};
@@ -248,13 +263,13 @@
for (i = 0, len = data.length; i < len; i++) {
req.ids[i] = data[i].id;
}
- if(req.ids.length > 0){
+ if (req.ids.length > 0) {
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) {
$.ajax({
- url:"/group/delMaterialForGroup",
- type:"post",
- dataType:"json",
- data:JSON.stringify(req),
+ url: "/group/delMaterialForGroup",
+ type: "post",
+ dataType: "json",
+ data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (data) {
layer.close(this.layerIndex);
@@ -272,8 +287,8 @@
page: {
curr: 1
},
- where:{
- gid:id
+ where: {
+ gid: id
}
}, 'data');
return false;
@@ -281,7 +296,7 @@
}
})
});
- }else{
+ } else {
layer.msg("未选中记录,请确认!");
return false;
}
@@ -293,17 +308,17 @@
// 用于修改组合名称
editGroupName = function (obj) {
let display = $("#display").css("display");
- if(display !== "none"){
+ if (display !== "none") {
let gid = $("#gid").val();
let gname = obj.value;
let req = {};
req.id = gid;
req.gname = gname;
$.ajax({
- url:'/group/editGroupInfo',
- dataType:"json",
- type:"post",
- data:JSON.stringify(req),
+ url: '/group/editGroupInfo',
+ dataType: "json",
+ type: "post",
+ data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (data) {
if (data.status >= 300) {
@@ -321,27 +336,30 @@
// 用于修改组合备注
editGroupRemark = function (obj) {
- let gid = $("#gid").val();
- let applyRemark = obj.value;
- let req = {};
- req.id = gid;
- req.remark = applyRemark;
- $.ajax({
- url:'/group/editGroupInfo',
- dataType:"json",
- type:"post",
- data:JSON.stringify(req),
- contentType: "application/json;charset=utf-8",
- success: function (data) {
- if (data.status >= 300) {
- layer.msg(data.statusInfo.message);//失败的表情
+ let display = $("#display").css("display");
+ if (display !== "none") {
+ let gid = $("#gid").val();
+ let applyRemark = obj.value;
+ let req = {};
+ req.id = gid;
+ req.remark = applyRemark;
+ $.ajax({
+ url: '/group/editGroupInfo',
+ dataType: "json",
+ type: "post",
+ data: JSON.stringify(req),
+ contentType: "application/json;charset=utf-8",
+ success: function (data) {
+ if (data.status >= 300) {
+ layer.msg(data.statusInfo.message);//失败的表情
- } else {
+ } else {
+ }
}
- }
- });
+ });
+ }
};
// 用于创建二维码