Browse Source

异常订单:转为正常功能

lxf 1 year ago
parent
commit
0d58a3e396
1 changed files with 20 additions and 1 deletions
  1. 20 1
      src/views/group/order/abnormal/index.vue

+ 20 - 1
src/views/group/order/abnormal/index.vue

@@ -105,12 +105,25 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 80,
+        width: 140,
         align: "center",
         fixed: "right",
       },
       renderHTML(row) {
         return [
+          ["1", "2", "3"].includes(row.exceptionType)
+            ? {
+                attrs: {
+                  label: "转为正常",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickNormalize(row);
+                },
+              }
+            : {},
           row.status == 0 || row.status == 10 || row.status == 20
             ? {
                 attrs: {
@@ -190,6 +203,12 @@ const clickDelete = (row) => {
     })
     .catch(() => {});
 };
+const clickNormalize = (row) => {
+  proxy.post("/orderInfo/turnToRegularOrder", { id: row.id }).then(() => {
+    ElMessage({ message: "操作成功", type: "success" });
+    getList();
+  });
+};
 </script>
 
 <style lang="scss" scoped>