Browse Source

修改报表

Qukatie 3 weeks ago
parent
commit
07ce8ab9a8
1 changed files with 18 additions and 8 deletions
  1. 18 8
      src/views/allocationContract/detailsPageEdit.vue

+ 18 - 8
src/views/allocationContract/detailsPageEdit.vue

@@ -252,12 +252,12 @@
                 <el-input type="age" v-model.trim="form.interestAmount" size="small" autocomplete="off" disabled v-input-limit="2"> </el-input>
               </el-form-item>
             </el-col>
-            <el-col span="8" :offset="1">
+            <el-col span="11" :offset="1">
               <el-button class="el-button--small-yh" type="primary" :loading="saveLoading" size="small" @click="calculateInterest()"
                 >利息计算
               </el-button>
-              <el-button type="info" size="small" icon="el-icon-printer" @click.stop="openReport()">订货合同</el-button>
-              <el-button type="info" size="small" icon="el-icon-printer" @click.stop="openReport2()">配资合同</el-button>
+              <el-button type="info" size="small" icon="el-icon-printer" @click.stop="openReport('订货合同.ureport.xml')">订货合同</el-button>
+              <el-button type="info" size="small" icon="el-icon-printer" @click.stop="openReport('配资合同.ureport.xml')">配资合同</el-button>
             </el-col>
           </el-row>
         </basic-container>
@@ -1714,13 +1714,23 @@ export default {
       this.$set(this.form, "isLabel", 0);
     },
     // 报表
-    openReport() {
-      this.switchDialog = !this.switchDialog;
+    openReport(name) {
+      // this.switchDialog = !this.switchDialog;
+      let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id;
+      let tenantId = this.$store.getters.userInfo.tenant_id;
+      this.$router.push({
+        path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+        query: {
+          id: this.form.id,
+          userId: userId,
+          tenantId: tenantId
+        }
+      });
     },
     // 报表
-    openReport2() {
-      this.switchDialog2 = !this.switchDialog2;
-    },
+    // openReport2() {
+    //   this.switchDialog2 = !this.switchDialog2;
+    // },
     // 导出
     exportHandle() {
       this.$confirm("是否导出产品信息?", "提示", {