Selaa lähdekoodia

福达 出口贸易-采购 报表打印

wangzhuo 1 vuosi sitten
vanhempi
commit
76176980c2

+ 7 - 0
src/components/report-dialog/main.vue

@@ -176,6 +176,13 @@ export default {
           &userId=${this.searchValue.userId}
           &goodsId=${this.searchValue.goodsId}`
         });
+      } else if (this.reportName == "出口贸易-采购") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            id: this.reportId,
+          }
+        });
       }
       else if (name == "轮胎商城-入库工单.ureport.xml") {
         console.log('this.reportId',this.reportId);

+ 15 - 3
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -7,9 +7,12 @@
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut" size="small">
-          <el-button type="primary" size="small" class="el-button--small-yh "
-              @click.stop="exportOrderfun">导出订单
-          </el-button>
+<!--          <el-button type="primary" size="small" class="el-button&#45;&#45;small-yh "-->
+<!--              @click.stop="exportOrderfun">导出订单-->
+<!--          </el-button>-->
+        <el-button type="primary" size="small" class="el-button--small-yh "
+                   @click.stop="openReports">导出订单
+        </el-button>
         <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
           @click.stop="openEdit">编辑
         </el-button>
@@ -214,6 +217,8 @@
       <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
       </check>
     </el-dialog>
+    <report-dialog :switchDialog="switchDialogs" :reportId="form.srcIds" reportName="出口贸易-采购"
+                   @onClose="onCloses()"></report-dialog>
   </div>
 </template>
 
@@ -266,6 +271,7 @@ export default {
       applicationDialog: false,
       treeStyle: "height:" + (window.innerHeight - 315) + "px",
       switchDialog: false,
+      switchDialogs: false,
       form: {
         orderStatus: "录入"
       },
@@ -1084,9 +1090,15 @@ export default {
     openReport() {
       this.switchDialog = !this.switchDialog;
     },
+    openReports() {
+      this.switchDialogs = !this.switchDialogs;
+    },
     onClose(val) {
       this.switchDialog = val;
     },
+    onCloses(val) {
+      this.switchDialogs = val;
+    },
     summaryMethod({ columns, data }) {
       const sums = [];
       if (columns.length > 0) {

+ 15 - 2
src/views/exportTrade/purchaseContract/index.vue

@@ -143,16 +143,21 @@
                 </el-row>
             </span>
             <span slot="footer" class="dialog-footer">
-                <el-button type="warning" @click="outExport">导出</el-button>
+<!--                <el-button type="warning" @click="outExport">导出</el-button>-->
+                <el-button type="warning" @click="openReport">导出</el-button>
                 <el-button @click="dialogVisible = false; params = {}">取 消</el-button>
                 <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
             </span>
         </el-dialog>
+
+      <report-dialog :switchDialog="switchDialog" :reportId="params.pid" reportName="出口贸易-采购"
+                     @onClose="onClose()"></report-dialog>
     </div>
 </template>
 
 <script>
 import option from "./config/mainList.json";
+import reportDialog from "@/components/report-dialog/main";
 import {
     getList,
     remove,
@@ -172,6 +177,7 @@ export default {
     name: "customerInformation",
     data() {
         return {
+          switchDialog: false,
             search: {
                 // businesDate: defaultDate()
                 // businesDate: ''
@@ -410,7 +416,7 @@ export default {
             selectionList: []
         };
     },
-    components: { detailPage },
+    components: { detailPage, reportDialog },
     async created() {
         this.option = await this.getColumnData(this.getColumnName(2), option);
         this.dialogOption = await this.getColumnData(this.getColumnName(2.1), this.dialogOptionList);
@@ -618,6 +624,12 @@ export default {
                 this.$refs[ref].$refs.dialogColumn.columnBox = false;
             }
         },
+        openReport() {
+          this.switchDialog = !this.switchDialog;
+        },
+        onClose(val) {
+          this.switchDialog = val;
+        },
         confirmImport() {
             let ids = this.goodsListSave.map(item => {
                 return item.id
@@ -744,6 +756,7 @@ export default {
             }
         },
         handleCurrentChange(val) {
+          console.log(val)
             // this.currentRow = val;
             this.params.pid = val.id
             this.dialogPage.currentPage = 1;