소스 검색

订单管理-总订单/团购订单-订单关闭

gcz 1 년 전
부모
커밋
e71047c34e
2개의 변경된 파일55개의 추가작업 그리고 3개의 파일을 삭제
  1. 27 1
      src/views/order/groupBuyingMr/index.vue
  2. 28 2
      src/views/order/orderMr/index.vue

+ 27 - 1
src/views/order/groupBuyingMr/index.vue

@@ -177,6 +177,13 @@
             @click="handleCorporatePay(scope.row)"
             v-hasPermi="['groupBuyingMr:groupBuyingMr:details']"
           >对公转账</el-button>
+          <el-button
+            v-if="scope.row.status === 0"
+            size="mini"
+            type="text"
+            @click="handleCancelOrder(scope.row)"
+            v-hasPermi="['groupBuyingMr:groupBuyingMr:cancel']"
+          >关闭订单</el-button>
           <el-button
               v-if="scope.row.status == 3 || scope.row.status == 7"
               size="mini"
@@ -255,7 +262,8 @@
 
 <script>
 import { getToken } from "@/utils/auth";
-import { pageList,gotoCorporatePay, downOrderListXls } from '@/api/order/groupBuyingMr'
+import { pageList,gotoCorporatePay, downOrderListXls } from '@/api/order/groupBuyingMr';
+import { orderInfoCancel } from '@/api/windowTicketSales/ticketingSales';
 import detailsDia from "./dialog/details.vue";
 
 import { printApi } from '@/api/order/orderMr'
@@ -658,6 +666,24 @@ export default {
         
       }
     },
+    /** 关闭订单 */
+    handleCancelOrder(row) {
+      this.$confirm("是否关闭" + row.id + "的订单?", '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        orderInfoCancel({ orderId: row.id}).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            this.getList();
+          }
+        });
+      }).catch(() => {});
+    },
   }
 };
 </script>

+ 28 - 2
src/views/order/orderMr/index.vue

@@ -217,6 +217,13 @@
             @click="openDetails(scope.row)"
             v-hasPermi="['orderMr:orderMr:details']"
           >详情</el-button>
+          <el-button
+            v-if="scope.row.status === 0"
+            size="mini"
+            type="text"
+            @click="handleCancelOrder(scope.row)"
+            v-hasPermi="['orderMr:orderMr:cancel']"
+          >关闭订单</el-button>
           <el-button
               v-if="scope.row.status == 3 || scope.row.status == 7"
               size="mini"
@@ -261,7 +268,8 @@
 
 <script>
 
-import { pageList,downOrderListXls, printApi } from '@/api/order/orderMr'
+import { pageList,downOrderListXls, printApi } from '@/api/order/orderMr';
+import { orderInfoCancel } from '@/api/windowTicketSales/ticketingSales';
 import detailsDia from "./dialog/details";
 import { pagePerformTimeList } from "@/api/schedulingMr/schedulingMr"
 import { exportExcel } from '@/utils/exportexcel'
@@ -539,7 +547,25 @@ export default {
             this.dialogVisibleLoading = false
           })
 
-        }
+        },
+        /** 关闭订单 */
+        handleCancelOrder(row) {
+          this.$confirm("是否关闭" + row.id + "的订单?", '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            orderInfoCancel({ orderId: row.id}).then((res) => {
+              if (res.code == 200) {
+                this.$message({
+                  type: 'success',
+                  message: '操作成功!'
+                });
+                this.getList();
+              }
+            });
+          }).catch(() => {});
+        },
   }
 };
 </script>