| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 | <template>  <el-dialog    title="提报列表"    :visible.sync="visible"    top="5vh"    width="60%"    :before-close="onClose"    append-to-body    class="el-dialogDeep"    :close-on-click-modal="false"    v-dialog-drag  >    <avue-crud      :option="option"      :table-loading="loading"      :data="data"      ref="crud"      :page.sync="page"      @current-change="currentChange"      @size-change="sizeChange"      :cell-style="cellStyle"    >      <template slot-scope="{ row }" slot="name">        <el-tag style="cursor:pointer" @click="goReport(row.name)">{{          row.name | nameFormat        }}</el-tag>      </template>    </avue-crud>    <span slot="footer" class="dialog-footer">      <el-button @click="onClose()">关 闭</el-button>    </span>  </el-dialog></template><script>import { getList } from "@/api/report/report";import { nameReportFormat } from "@/filters/report";export default {  data() {    return {      visible: false,      loading: true,      query: {},      page: {        pageSize: 10,        currentPage: 1,        total: 0      },      option: {        addBtn: false,        border: true,        index: true,        refreshBtn: false,        menu: false,        columnBtn: false,        header: false,        column: [          {            label: "文件名",            prop: "name",            overHidden: true          },          {            label: "创建时间",            prop: "createTime",            overHidden: true          },          {            label: "更新时间",            prop: "updateTime",            overHidden: true          }        ]      },      data: []    };  },  props: {    switchDialog: {      type: Boolean,      default: false    },    reportName: {      type: String    },    reportId: {      type: String    },    searchValue: {      type: Object    },    corpType: {      type: String    }  },  filters: {    nameFormat(name) {      return nameReportFormat(name);    }  },  methods: {    cellStyle() {      return "padding:0;height:40px;";    },    onClose() {      this.visible = false;      Object.assign(this.$data, this.$options.data());      this.$emit("onClose", false);    },    getList() {      this.loading = true;      getList(        this.page.currentPage,        this.page.pageSize,        Object.assign(this.query)      ).then(res => {        const data = res.data.data;        this.page.total = data.total;        this.data = data.records;        this.loading = false;        if (this.page.total) {          this.option.height = window.innerHeight - 350;        }      });    },    goReport(name) {      let tenantId = this.$store.getters.userInfo.tenant_id;      if (this.reportName == "同海-统计列表") {        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}          &tenantId=${this.searchValue.tenantId}          &status=${this.searchValue.status}           &cornId=${this.searchValue.cornId}      &deptid=${this.searchValue.deptid}      &pname=${this.searchValue.pname}      &projectType=${this.searchValue.projectType}      &payStartTime=${this.searchValue.payStartTime}      &payEndTime=${this.searchValue.payEndTime}      &userName=${this.searchValue.userName}`        });      } else if (this.reportName == "进口贸易-提成统计表") {        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}          &year=${this.searchValue.year}          &quarter=${this.searchValue.quarter}           &userType=${this.searchValue.userType}      &userId=${this.searchValue.userId}      &goodsId=${this.searchValue.goodsId}`        });      }      // else if (name == "客户资料-客户资料.ureport.xml") {      //   this.$router.push({      //     path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}&id=${this.reportId}&tenantId=${tenantId}`,      //     query: {      //      //     }      //   });      // }      else if (name == "国内贸易-库存账.ureport.xml") {        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,          query: {            code: this.searchValue.code,            cname: this.searchValue.cname,            brandItem: this.searchValue.brandItem,            placeProduction: this.searchValue.placeProduction,            typeno: this.searchValue.typeno,            typenoOne: this.searchValue.typenoOne,            typenoTwo: this.searchValue.typenoTwo,            stockName: this.searchValue.stockName,            brand: this.searchValue.brand,            tenantId: tenantId          }        });      } else if (name == "国内贸易-客户确认.ureport.xml") {        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,          query: {            orgOrderNo: this.searchValue.orgOrderNo,            corpId: this.searchValue.corpId,            salesCompany: this.searchValue.salesCompany,            businessStartDate: this.searchValue.businessStartDate,            businessEndDate: this.searchValue.businessEndDate,            storageId: this.searchValue.storageId,            arrivalAddress: this.searchValue.arrivalAddress,            arrivalContact: this.searchValue.arrivalContact,            arrivalTel: this.searchValue.arrivalTel,            createUser: this.searchValue.createUser,            createTimeStart: this.searchValue.createTimeStart,            createTimeEnd: this.searchValue.createTimeEnd,            tenantId: tenantId          }        });      } else if (name == "经销商-可用库存表.ureport.xml") {        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,          query: {            tradeType: "JXS",            tenantId: tenantId          }        });      } else if (name == "客户信息.ureport.xml") {        let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content          .user_id;        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,          query: {            id: this.reportId,            userId: userId,            tenantId: tenantId,            corpType: this.corpType          }        });      } else if (name == "经销商-采购单.ureport.xml") {        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,          query: {            id: this.reportId,            tradeType: "JXS",            tenantId: tenantId          }        });      } else {        let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content          .user_id;        this.$router.push({          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,          query: {            id: this.reportId,            userId: userId,            tenantId: tenantId          }        });      }      this.$emit("onClose", false);    }  },  watch: {    switchDialog: function(i) {      this.visible = i;      this.query = {        name: this.reportName ? this.reportName : this.$router.currentRoute.name      };      if (i) {        this.getList();      }    }  }};</script><style lang="scss" scoped></style>
 |