From db0722ccb5dda632e8c0153b5b01df569926d727 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Sun, 11 Jul 2021 09:12:27 +0800
Subject: [PATCH] 总部新增取消按钮

---
 zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html |   19 +++++++++++++++++++
 zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html    |   21 ++++++++++++++++++++-
 zq-erp/pom.xml                                                                       |    4 ++--
 zq-erp/src/main/resources/config/application.properties                              |   12 ++++++------
 4 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index 56646a2..bb6f6d3 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -408,11 +408,11 @@
                     <exclude>config/xcx/*</exclude>
                     <exclude>config/xcshop/*</exclude>
 
-                    <!--
+                    <!---->
                     <exclude>config/config.json</exclude>
                     <exclude>config/application.properties</exclude>
                     <exclude>config/system.properties</exclude>
--->
+
 
 
                     <exclude>**/*.woff</exclude>
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index 863a592..496ce97 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -4,9 +4,9 @@
 
 #线上测试环境
 #
-#spring.datasource.username=ct_test
-#spring.datasource.password=123456
-#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+spring.datasource.username=ct_test
+spring.datasource.password=123456
+spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
 #spring.datasource.username=xc_shop
 #spring.datasource.password=xc_shop123!@#
@@ -17,9 +17,9 @@
 #spring.datasource.password=hive123!@#
 #spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
-spring.datasource.username=meidu_data
-spring.datasource.password=meidu_4321#&@
-spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+#spring.datasource.username=meidu_data
+#spring.datasource.password=meidu_4321#&@
+#spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
 
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html
index 8aa79f5..16bf980 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html
@@ -79,6 +79,7 @@
         <div id="option-bar">
             <button matrix:btn="mdfwd-exportExcel"   onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button>
             <button  class="btn btn-info btn-sm" onClick="openEdit2()" title=""><i class="fa fa-lg fa-eye"></i> 查看详情</button>
+            <button   matrix:btn="mdfwd-del"  onClick="removeOrder()" type="button" class="btn btn-danger btn-sm"><i class="fa fa-trash" ></i> 删除</button>
         </div>
         <!-- 数据表格部分 -->
         <table id="mgrid">
@@ -135,6 +136,24 @@
         });
     });
 
+    function removeOrder(id) {
+        var id=myGrid.getSelectItemId();
+        layer.confirm('确定取消此订单?', {
+            btn: ['确认', '取消'] //可以无限个按钮
+        }, function(index, layero){
+            $.post(basePath+'/admin/projService/cancelOrder?id='+id, {}, function(data){
+                parent.layer.msg(data.info,{icon: 1});
+                layer.closeAll();
+                myGrid.serchData();
+            });
+            //按钮【按钮一】的回调
+        }, function(index){
+            // alert("2 = "+index);
+            //按钮【按钮二】的回调
+        });
+
+    }
+
     /**
      超时
      **/
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
index 2af8d9b..5089a00 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
@@ -84,6 +84,7 @@
         <div id="option-bar">
             <button   class="btn btn-info btn-sm mr-5" onClick="openLook()"  ><i class="fa fa-eye fa-trash-o"></i> 查看详情</button>
             <button matrix:btn="mddd-exportExcel"  onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button>
+            <button  matrix:btn="mddd-del"  class="btn btn-danger btn-sm mr-5" onClick="cancelOrder()"  ><i class="fa fa-trash-o fa-fw"></i> 取消</button>
 
         </div>
         <!-- 数据表格部分 -->
@@ -142,7 +143,25 @@
         });
 
     });
-
+    function cancelOrder() {
+        var id=myGrid.getSelectItemId();
+        layer.confirm('确定取消此订单?', {
+                btn: ['确认', '取消'] //可以无限个按钮
+            }, function(index, layero){
+                $.post(basePath+'/admin/order/cancelOrder?id='+id+'&del=0', {}, function(data){
+                    if (data.status == '200') {
+                        parent.layer.msg(data.info,{icon: 1});
+                    } else {
+                        parent.layer.msg(data.info,{icon: 2});
+                    }
+                    layer.closeAll();
+                    myGrid.serchData();
+                });
+            },
+            function(index){
+                //按钮【按钮二】的回调
+            });
+    }
 
     /**
      * 跳转消费流水详情页面

--
Gitblit v1.9.1