@@ -336,36 +337,40 @@
//监听状态操作
form.on('switch(changeState)', function (obj) {
- var req = {};
- if (obj.elem.checked) {
- req["state"] = 1
- }
- req["id"] = this.value;
- $.ajax({
- url: "/place/editPlaceState",
- type: 'post',
- dataType: 'json',
- contentType: "application/json;charset=utf-8",
- data: JSON.stringify(req),
- beforeSend: function () {
- this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
- },
- success: function (data) {
- layer.close(this.layerIndex);
- if (data.status >= 300) {
- layer.msg(data.statusInfo.message);//失败的表情
+ let display = $("#display").val();
+ if(display !== "none"){
+ var req = {};
+ if (obj.elem.checked) {
+ req["state"] = 1
+ }
+ req["id"] = this.value;
+ $.ajax({
+ url: "/place/editPlaceState",
+ type: 'post',
+ dataType: 'json',
+ contentType: "application/json;charset=utf-8",
+ data: JSON.stringify(req),
+ beforeSend: function () {
+ this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
+ },
+ success: function (data) {
+ layer.close(this.layerIndex);
+ if (data.status >= 300) {
+ layer.msg(data.statusInfo.message);//失败的表情
- } else {
- layer.msg("修改成功", {
- icon: 6,//成功的表情
- time: 500 //1秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location = '/warehouseByParentId?parentId=' + parentId;
- })
+ } else {
+ layer.msg("修改成功", {
+ icon: 6,//成功的表情
+ time: 500 //1秒关闭(如果不配置,默认是3秒)
+ }, function () {
+ window.location = '/warehouseByParentId?parentId=' + parentId;
+ })
+ }
}
- }
- })
+ })
+ }
+
});
viewInfoForInventory = function (obj) {
diff --git a/target/classes/com/dreamchaser/depository_manage/mapper/GroupMapper.xml b/target/classes/com/dreamchaser/depository_manage/mapper/GroupMapper.xml
index 44c7733a..d12d182d 100644
--- a/target/classes/com/dreamchaser/depository_manage/mapper/GroupMapper.xml
+++ b/target/classes/com/dreamchaser/depository_manage/mapper/GroupMapper.xml
@@ -362,8 +362,8 @@
gname = #{gname},
-
- remark = #{applyRemark}
+
+ remark = #{remark}
where id = #{id}
diff --git a/target/classes/templates/pages/group/group-out.html b/target/classes/templates/pages/group/group-out.html
index 0c24a9e7..c60f9b35 100644
--- a/target/classes/templates/pages/group/group-out.html
+++ b/target/classes/templates/pages/group/group-out.html
@@ -89,7 +89,7 @@
@@ -86,7 +86,7 @@
@@ -460,109 +460,146 @@
//监听状态操作
form.on('switch(changeState)', function (obj) {
// 首先发送请求判断待禁用的仓库是否还有货物,如果没有就直接禁用,否则进行判断
- var hasMaterial = false
- var req = new Map
- if (obj.elem.checked) {
- req["state"] = 1
- }
- req["id"] = this.value;
- if (req["state"] === undefined) {// 如果禁用
- $.ajax({
- url: "/repository/findMaterialByDepository?depositoryId=" + this.value,
- type: "get",
- dataType: "json",
- contentType: "application/json;charset=utf-8",
- success: function (d) {
- hasMaterial = d.data;
- // 子仓库下是否有物品
- if (hasMaterial) { // 有
+ let display = $("#display").css("display");
+ if(display !== "none"){
+ var hasMaterial = false;
+ var req = new Map;
+ if (obj.elem.checked) {
+ req["state"] = 1
+ }
+ req["id"] = this.value;
+ if (req["state"] === undefined) {// 如果禁用
+ $.ajax({
+ url: "/repository/findMaterialByDepository?depositoryId=" + this.value,
+ type: "get",
+ dataType: "json",
+ contentType: "application/json;charset=utf-8",
+ success: function (d) {
+ hasMaterial = d.data;
+ // 子仓库下是否有物品
+ if (hasMaterial) { // 有
- layer.confirm('仓库下还有物品,确定封库?', {
- btn: ['封库', '取消'] //按钮
- },
- function () {
- req["envelop"] = 1; // 封库操作
- $.ajax({
- url: "/repository/EditDepositoryState",
- type: 'post',
- dataType: 'json',
- contentType: "application/json;charset=utf-8",
- data: JSON.stringify(req),
- beforeSend: function () {
- this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
+ layer.confirm('仓库下还有物品,确定封库?', {
+ btn: ['封库', '取消'] //按钮
},
- success: function (data) {
- layer.close(this.layerIndex);
- if (data.status >= 300) {
- layer.msg(data.statusInfo.message);//失败的表情
- return;
- } else {
- layer.msg("封库成功", {
- icon: 6,//成功的表情
- time: 500 //1秒关闭(如果不配置,默认是3秒)
- }, function () {
- // 执行重加载
- table.reload('currentTableId', {
- url: '/repository/warehouseRecord',
- page: {
- curr: 1
- },
- where: {"parentId": parentId}
- });
- })
- }
- }
- })
- },
- function () {
- // 执行重加载
- table.reload('currentTableId', {
- url: '/repository/warehouseRecord',
- page: {
- curr: 1
+ function () {
+ req["envelop"] = 1; // 封库操作
+ $.ajax({
+ url: "/repository/EditDepositoryState",
+ type: 'post',
+ dataType: 'json',
+ contentType: "application/json;charset=utf-8",
+ data: JSON.stringify(req),
+ beforeSend: function () {
+ this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
+ },
+ success: function (data) {
+ layer.close(this.layerIndex);
+ if (data.status >= 300) {
+ layer.msg(data.statusInfo.message);//失败的表情
+ return;
+ } else {
+ layer.msg("封库成功", {
+ icon: 6,//成功的表情
+ time: 500 //1秒关闭(如果不配置,默认是3秒)
+ }, function () {
+ // 执行重加载
+ table.reload('currentTableId', {
+ url: '/repository/warehouseRecord',
+ page: {
+ curr: 1
+ },
+ where: {"parentId": parentId}
+ });
+ })
+ }
+ }
+ })
},
- where: {"parentId": parentId}
- });
- });
- }
- else {
- layer.confirm('确定封库?',{
- btn:['确定','取消']
- },
- function () {
- $.ajax({
- url: "/repository/EditDepositoryState",
- type: 'post',
- dataType: 'json',
- contentType: "application/json;charset=utf-8",
- data: JSON.stringify(req),
- beforeSend: function () {
- this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
+ function () {
+ // 执行重加载
+ table.reload('currentTableId', {
+ url: '/repository/warehouseRecord',
+ page: {
+ curr: 1
+ },
+ where: {"parentId": parentId}
+ });
+ });
+ }
+ else {
+ layer.confirm('确定封库?',{
+ btn:['确定','取消']
},
- success: function (data) {
- layer.close(this.layerIndex);
- if (data.status >= 300) {
- layer.msg(data.statusInfo.message);//失败的表情
- return;
- } else {
- layer.msg("修改成功", {
- icon: 6,//成功的表情
- time: 500 //1秒关闭(如果不配置,默认是3秒)
- }, function () {
- // 执行重加载
- table.reload('currentTableId', {
- url: '/repository/warehouseRecord',
- page: {
- curr: 1
- },
- where: {"parentId": parentId}
- });
- })
- }
- }
- })
- },
- function () {
+ function () {
+ $.ajax({
+ url: "/repository/EditDepositoryState",
+ type: 'post',
+ dataType: 'json',
+ contentType: "application/json;charset=utf-8",
+ data: JSON.stringify(req),
+ beforeSend: function () {
+ this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
+ },
+ success: function (data) {
+ layer.close(this.layerIndex);
+ if (data.status >= 300) {
+ layer.msg(data.statusInfo.message);//失败的表情
+ return;
+ } else {
+ layer.msg("修改成功", {
+ icon: 6,//成功的表情
+ time: 500 //1秒关闭(如果不配置,默认是3秒)
+ }, function () {
+ // 执行重加载
+ table.reload('currentTableId', {
+ url: '/repository/warehouseRecord',
+ page: {
+ curr: 1
+ },
+ where: {"parentId": parentId}
+ });
+ })
+ }
+ }
+ })
+ },
+ function () {
+ // 执行重加载
+ table.reload('currentTableId', {
+ url: '/repository/warehouseRecord',
+ page: {
+ curr: 1
+ },
+ where: {"parentId": parentId}
+ });
+ })
+
+ }
+ }
+ })
+ }
+ else { // 如果启用
+ $.ajax({
+ url: "/repository/EditDepositoryState",
+ type: 'post',
+ dataType: 'json',
+ contentType: "application/json;charset=utf-8",
+ data: JSON.stringify(req),
+ beforeSend: function () {
+ this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
+ },
+ success: function (data) {
+ layer.close(this.layerIndex);
+ if (data.status >= 300) {
+ layer.msg(data.statusInfo.message);//失败的表情
+ return;
+ } else {
+ layer.msg("修改成功", {
+ icon: 6,//成功的表情
+ time: 500 //1秒关闭(如果不配置,默认是3秒)
+ }, function () {
+ // window.location='/findWareHouseByParentId?parentId=0'+parentId
// 执行重加载
table.reload('currentTableId', {
url: '/repository/warehouseRecord',
@@ -572,45 +609,14 @@
where: {"parentId": parentId}
});
})
-
- }
- }
- })
- } else { // 如果启用
- $.ajax({
- url: "/repository/EditDepositoryState",
- type: 'post',
- dataType: 'json',
- contentType: "application/json;charset=utf-8",
- data: JSON.stringify(req),
- beforeSend: function () {
- this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
- },
- success: function (data) {
- layer.close(this.layerIndex);
- if (data.status >= 300) {
- layer.msg(data.statusInfo.message);//失败的表情
- return;
- } else {
- layer.msg("修改成功", {
- icon: 6,//成功的表情
- time: 500 //1秒关闭(如果不配置,默认是3秒)
- }, function () {
- // window.location='/findWareHouseByParentId?parentId=0'+parentId
- // 执行重加载
- table.reload('currentTableId', {
- url: '/repository/warehouseRecord',
- page: {
- curr: 1
- },
- where: {"parentId": parentId}
- });
- })
+ }
}
- }
- })
+ })
+ }
}
+
+
});
showDetail = function (obj) {
diff --git a/target/classes/templates/pages/warehouse/warehouseByParentId.html b/target/classes/templates/pages/warehouse/warehouseByParentId.html
index d152f4ca..2395defb 100644
--- a/target/classes/templates/pages/warehouse/warehouseByParentId.html
+++ b/target/classes/templates/pages/warehouse/warehouseByParentId.html
@@ -21,6 +21,7 @@