Selaa lähdekoodia

大件调度详情打印

caojunjie 2 vuotta sitten
vanhempi
commit
6f35010c23
1 muutettua tiedostoa jossa 35 lisäystä ja 0 poistoa
  1. 35 0
      src/views/SpecialTrade/dispatchingCars/detailPage.vue

+ 35 - 0
src/views/SpecialTrade/dispatchingCars/detailPage.vue

@@ -29,6 +29,12 @@
             <div>
                 <div class="el-button&#45;&#45;small-yh add-customer-btn">
                     <el-button
+                        class="el-icon-download"
+                        type="danger"
+                        size="small"
+                        @click="openReport">打印
+                    </el-button>
+                    <el-button
                         type="primary"
                         size="small"
                         @click="diaodubaocun"
@@ -629,6 +635,13 @@
         </span>
         </el-dialog>
         <track-playback :dialogVisible="dialogVisibleTwo" :lineArr="lineArr" ref="playback"></track-playback>
+
+        <report-dialog
+            :switchDialog="switchDialog"
+            :reportId="id"
+            :reportName="reportName"
+            @onClose="onClose()"
+        />
     </div>
 </template>
 
@@ -652,8 +665,10 @@ import website from "@/config/website";
 import {getDeptTree} from "@/api/system/dept";
 import {customerList} from "@/api/basicData/basicFeesDesc";
 import {gaude, location} from "@/api/gaude";
+import reportDialog from "@/components/report-dialog/main.vue";
 
 export default {
+    components: {reportDialog},
     props: {
         id: {
             type: String
@@ -664,6 +679,9 @@ export default {
     },
     data() {
         return {
+            // 打印组件
+            switchDialog: false,
+            reportName: '',
             // 预估费用参数
             yugudata:[],
             yuguoption:{},
@@ -1823,6 +1841,23 @@ export default {
                 loading.close();
             })
         },
+        // 打印
+        openReport(){
+            if (this.id) {
+                this.$confirm("是否打印数据?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(() => {
+                    this.reportName = "陆运-大件运输"
+                    this.switchDialog = true
+                })
+            }
+        },
+        // 打印报表关闭
+        onClose(val) {
+            this.switchDialog = val;
+        },
         schedulingFileSaving() {
             this.c_button = true
             conserveDispatch({