|
@@ -0,0 +1,130 @@
|
|
|
+<template>
|
|
|
+ <div class="hui-flex hui-content">
|
|
|
+ <div class="hui-flex">
|
|
|
+ <div class="hui-content-title">
|
|
|
+ <div class="hui-title-item active">公司付款发票</div>
|
|
|
+ </div>
|
|
|
+ <div class="hui-flex-box hui-flex hui-table">
|
|
|
+ <list-filter ref="invoice" type="invoice" @filter="filterInit"></list-filter>
|
|
|
+ <div class="hui-flex-box">
|
|
|
+ <el-table :data="tableData" row-key="id" border height="100%">
|
|
|
+ <el-table-column label="序号" width="50">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="text-align: center;">{{scope.$index + 1}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="发票名称" prop="name"></el-table-column>
|
|
|
+ <el-table-column label="发票类型" prop="code" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{$field.findTypeName('invoiceType',scope.row.invoiceType)}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="发票代码" prop="code"></el-table-column>
|
|
|
+ <el-table-column label="发票号码" prop="number"></el-table-column>
|
|
|
+ <el-table-column label="货物名称" prop="cargoName"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="hui-table-operation">
|
|
|
+ <span class="table-operation" @click="detailItem(scope.row)">
|
|
|
+ 详情
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <template slot="empty">
|
|
|
+ <empty description="暂无数据"></empty>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="hui-content-pagination">
|
|
|
+ <el-pagination :page-size="pageSize" :pager-count="9" layout="prev, pager, next" :total="totalCount"
|
|
|
+ @current-change="currentChange">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-drawer title="发票详情" :visible.sync="drawer" :size="400" :append-to-body="true">
|
|
|
+ <detail v-if="drawer" :detailId="detailId" @reload="init"></detail>
|
|
|
+ </el-drawer>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import detail from '@/components/work/invoice/detail'
|
|
|
+ import listFilter from '@/components/common/listFilter'
|
|
|
+ import {
|
|
|
+ getInvoiceListByPage
|
|
|
+ } from '@/httpApi/invoice'
|
|
|
+ import {
|
|
|
+ bindProjectDetail
|
|
|
+ } from '@/httpApi/organization'
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData: [],
|
|
|
+ currPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ totalCount: 0,
|
|
|
+ detailId: '',
|
|
|
+ filterOption: {},
|
|
|
+ drawer: false,
|
|
|
+ payMerchantId: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ bindProjectDetail({
|
|
|
+ bindOrganizationId: this.$store.getters.organization.id,
|
|
|
+ projectId: this.$store.getters.project.id,
|
|
|
+ identityId: 4
|
|
|
+ }).then(res => {
|
|
|
+ if (res.state) {
|
|
|
+ if (res.data.length == 0) return;
|
|
|
+ this.payMerchantId = res.data[0].merchantId;
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ let postData = {
|
|
|
+ currPage: this.currPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ projectId: this.$store.getters.project.id,
|
|
|
+ payMerchantId: this.payMerchantId,
|
|
|
+ type: 2
|
|
|
+ }
|
|
|
+ postData = Object.assign(postData, this.filterOption);
|
|
|
+ getInvoiceListByPage(postData).then(res => {
|
|
|
+ if (res.state) {
|
|
|
+ this.tableData = res.data.dataList;
|
|
|
+ this.totalCount = res.data.totalCount;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ filterInit(option) {
|
|
|
+ this.filterOption = option;
|
|
|
+ this.currPage = 1;
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ currentChange(currPage) {
|
|
|
+ this.currPage = currPage;
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ detailItem(item) {
|
|
|
+ this.detailId = item.id;
|
|
|
+ this.drawer = true;
|
|
|
+ },
|
|
|
+ callback(type) {
|
|
|
+ if (type === 'init') this.init();
|
|
|
+ this.visible = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ detail,
|
|
|
+ listFilter
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+</style>
|