소스 검색

订单管理列表,导出订单功能

lxf 1 년 전
부모
커밋
eed8ff8e1a
1개의 변경된 파일27개의 추가작업 그리고 1개의 파일을 삭제
  1. 27 1
      src/views/group/order/management/index.vue

+ 27 - 1
src/views/group/order/management/index.vue

@@ -340,12 +340,25 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 180,
+        width: 200,
         align: "center",
         fixed: "right",
       },
       renderHTML(row) {
         return [
+          !props.selectStatus && row.status == 40
+            ? {
+                attrs: {
+                  label: "导出",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  deriveExcel(row);
+                },
+              }
+            : {},
           props.selectStatus
             ? {
                 attrs: {
@@ -715,6 +728,19 @@ const clickCancel = (status) => {
     getList();
   }
 };
+const deriveExcel = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/orderInfo/orderExportExcel", { id: row.id }).then((res) => {
+        proxy.downloadFile(res, row.code + ".xlsx");
+      });
+    })
+    .catch(() => {});
+};
 </script>
 
 <style lang="scss" scoped>