浏览代码

装集客项目更新

lijiangwei 4 年之前
父节点
当前提交
5bc5168815
共有 4 个文件被更改,包括 24 次插入6 次删除
  1. 1 1
      uis/views/agent/edit.html
  2. 11 2
      uis/views/agent/index.html
  3. 1 1
      uis/views/customer/edit.html
  4. 11 2
      uis/views/customer/index.html

+ 1 - 1
uis/views/agent/edit.html

@@ -110,7 +110,7 @@
                 , data: data.field
                 , data: data.field
                 , type: type
                 , type: type
                 , done: function (res) {
                 , done: function (res) {
-                    parent.layui.onSubmitChild(res.data);
+                    parent.layui.onSubmitChild(res);
                 }
                 }
             });
             });
 
 

+ 11 - 2
uis/views/agent/index.html

@@ -132,6 +132,9 @@
                         url: '/agent/agent/' + data.id + '/'
                         url: '/agent/agent/' + data.id + '/'
                         , type: 'delete'
                         , type: 'delete'
                         , done: function (res) {
                         , done: function (res) {
+                             if(res.code === 0){
+                                layer.msg('删除成功!', {icon: 1})
+                             }
                             table.reload('agent_datagrid', {});
                             table.reload('agent_datagrid', {});
                         }
                         }
                     });
                     });
@@ -145,7 +148,10 @@
                     area: ['40%', '50%'],
                     area: ['40%', '50%'],
                     btn: ['保存', '取消'],
                     btn: ['保存', '取消'],
                     yes: function (index, dom) {
                     yes: function (index, dom) {
-                        layui.onSubmitChild = function (data) {
+                        layui.onSubmitChild = function (res) {
+                            if(res.code === 0){
+                                layer.msg('修改成功!', {icon: 1})
+                            }
                             layer.close(index);
                             layer.close(index);
                             table.reload('agent_datagrid', {});
                             table.reload('agent_datagrid', {});
                         };
                         };
@@ -175,7 +181,10 @@
                 area: ['40%', '50%'],
                 area: ['40%', '50%'],
                 btn: ['保存', '取消'],
                 btn: ['保存', '取消'],
                 yes: function (index, dom) {
                 yes: function (index, dom) {
-                    layui.onSubmitChild = function (data) {
+                    layui.onSubmitChild = function (res) {
+                        if(res.code === 0){
+                            layer.msg('添加成功!', {icon: 1})
+                        }
                         layer.close(index);
                         layer.close(index);
                         table.reload('agent_datagrid', {});
                         table.reload('agent_datagrid', {});
                     };
                     };

+ 1 - 1
uis/views/customer/edit.html

@@ -170,7 +170,7 @@
                 , data: submitData
                 , data: submitData
                 , type: type
                 , type: type
                 , done: function (res) {
                 , done: function (res) {
-                    parent.layui.onSubmitChild(res.data);
+                    parent.layui.onSubmitChild(res);
                 }
                 }
             });
             });
 
 

+ 11 - 2
uis/views/customer/index.html

@@ -185,6 +185,9 @@
                         url: '/customer/report_customer/' + data.id + '/'
                         url: '/customer/report_customer/' + data.id + '/'
                         , type: 'delete'
                         , type: 'delete'
                         , done: function (res) {
                         , done: function (res) {
+                            if(res.code === 0){
+                                layer.msg('删除成功!', {icon: 1})
+                             }
                             table.reload('customer_datagrid', {});
                             table.reload('customer_datagrid', {});
                         }
                         }
                     });
                     });
@@ -202,7 +205,10 @@
                     area: ['45%', '80%'],
                     area: ['45%', '80%'],
                     btn: ['保存', '取消'],
                     btn: ['保存', '取消'],
                     yes: function (index, dom) {
                     yes: function (index, dom) {
-                        layui.onSubmitChild = function (data) {
+                        layui.onSubmitChild = function (res) {
+                            if(res.code === 0){
+                                layer.msg('修改成功!', {icon: 1})
+                             }
                             layer.close(index);
                             layer.close(index);
                             table.reload('customer_datagrid', {});
                             table.reload('customer_datagrid', {});
                         };
                         };
@@ -232,7 +238,10 @@
                 area: ['45%', '80%'],
                 area: ['45%', '80%'],
                 btn: ['保存', '取消'],
                 btn: ['保存', '取消'],
                 yes: function (index, dom) {
                 yes: function (index, dom) {
-                    layui.onSubmitChild = function (data) {
+                    layui.onSubmitChild = function (res) {
+                        if(res.code === 0){
+                            layer.msg('添加成功!', {icon: 1})
+                         }
                         layer.close(index);
                         layer.close(index);
                         table.reload('customer_datagrid', {});
                         table.reload('customer_datagrid', {});
                     };
                     };