Browse Source

提交代码

陈少旭 1 year ago
parent
commit
3cb4b89685
1 changed files with 53 additions and 0 deletions
  1. 53 0
      src/xt_pages/outpatientCharges/summary.vue

+ 53 - 0
src/xt_pages/outpatientCharges/summary.vue View File

@@ -738,6 +738,59 @@ export default {
738 738
           })
739 739
           .catch(function (error) {
740 740
           });
741
+    },export_detail_zzzz(){
742
+      handleTeamData({}).then((response) => {
743
+        if (response.data.state == 0) {
744
+          this.$message.error(response.data.msg);
745
+          return false;
746
+        } else {
747
+          let list = [];
748
+          for (let i = 0; i < response.data.data.ps.length; i++) {
749
+            let order = response.data.data.ps[i];
750
+            let obj = {
751
+              id:order.team_id,
752
+              name:order.pn,
753
+              sub_id:order.project.id,
754
+              sub_name:order.project.project_name
755
+            }
756
+            list.push(obj)
757
+          }
758
+
759
+          var tarList = [];
760
+          for (let i = 0; i < list.length; i++) {
761
+            let obj = {
762
+              "大项id": list[i].id,
763
+              "大项名称": list[i].name,
764
+              "子项id": list[i].sub_id,
765
+              "子项名称": list[i].sub_name,
766
+            }
767
+            tarList.push(obj)
768
+          }
769
+
770
+          import("@/vendor/Export2Excel").then((excel) => {
771
+            const tHeader = [
772
+              "大项id",
773
+              "大项名称",
774
+              "子项id",
775
+              "子项名称",
776
+            ];
777
+            const filterVal = [
778
+              "大项id",
779
+              "大项名称",
780
+              "子项id",
781
+              "子项名称",
782
+            ];
783
+            const data = this.formatJson(filterVal, tarList);
784
+            excel.export_json_to_excel({
785
+              header: tHeader,
786
+              data,
787
+              filename: "消费明细",
788
+            });
789
+          });
790
+        }
791
+      });
792
+
793
+
741 794
     },
742 795
     queryData(row){
743 796
       var that = this;