<!--
  @description: 服务费收款开票
  @Modifier: sunxinman/haofengxian
  @routerPath: /fee/serviceCollectFee
  @date: 2020/04/08-09:40
-->
<template>
  <div>
    <table-crud
      ref="tableCrud"
      :menu="true"
      :search-form="searchForm"
      search-label-width="110px"
      @on-load="loadData"
    >
      <template v-slot:header>
        服务费收款开票
      </template>
      <template v-slot:search="search">
        <!-- 标段（包）编号 -->
        <el-form-item ref="packNo" label="标段（包）编号" prop="packNo">
          <el-input
            v-model.trim="searchForm.packNo"
            placeholder="标段（包）编号"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 项目编号 -->
        <el-form-item ref="tenderNo" label="项目编号" prop="tenderNo">
          <el-input
            v-model.trim="searchForm.tenderNo"
            placeholder="项目编号"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 收取对象 -->
        <el-form-item label="收取对象" prop="paymentParty">
          <el-select v-model="searchForm.paymentParty" placeholder="请选择" style="width:228px">
            <el-option
              v-for="(item,index) in collectionObjList"
              :key="index"
              :label="item.typename"
              :value="item.typecode"
            />
          </el-select>
        </el-form-item>
        <!-- 标段（包）名称 -->
        <el-form-item ref="packName" label="标段（包）名称" prop="packName">
          <el-input
            v-model.trim="searchForm.packName"
            placeholder="标段（包）名称"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 项目名称 -->
        <el-form-item ref="tenderName" label="项目名称" prop="tenderName">
          <el-input
            v-model.trim="searchForm.tenderName"
            placeholder="项目名称"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!--收取方式-->
        <el-form-item ref="paymentMethod" label="收取方式" prop="paymentMethod">
          <el-select v-model="searchForm.paymentMethod" placeholder="请选择" style="width:228px">
            <el-option
              v-for="(item,index) in collectionWayList"
              :key="index"
              :label="item.typename"
              :value="item.typecode"
            />
          </el-select>
        </el-form-item>
        <!-- 付费单位 -->
        <el-form-item ref="supplierName" label="付费单位" prop="supplierName">
          <el-input
            v-model.trim="searchForm.supplierName"
            placeholder="付费单位"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 业务部门 -->
        <el-form-item ref="tenderDepart" label="业务部门" prop="tenderDepart">
          <el-input
            v-model.trim="searchForm.tenderDepart"
            placeholder="业务部门"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 项目经理 -->
        <el-form-item ref="tenderManager" label="项目经理" prop="tenderManager">
          <el-input
            v-model.trim="searchForm.tenderManager"
            placeholder="项目经理"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 发票编号 -->
        <el-form-item ref="invoiceNum" label="发票编号">
          <el-input
            v-model.trim="searchForm.invoiceNum"
            placeholder="发票编号"
            style="width:228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <!-- 开票金额（元） -->
        <el-form-item ref="invoiceAmount" label="开票金额（元）" prop="invoiceAmount">
          <p>
            <el-input
              v-model.trim="searchForm.invoiceAmount"
              @keyup.enter.native="search.onSearch"
            />
            ~
            <el-input
              v-model.trim="searchForm.invoiceMaxAmount"
              @keyup.enter.native="search.onSearch"
            />
          </p>
        </el-form-item>
        <!-- 中标金额（元） -->
        <el-form-item ref="winMinPrice" label="中标金额（元）">
          <p>
            <el-input
              v-model.trim="searchForm.winMinPrice"
              @keyup.enter.native="search.onSearch"
            />
            ~
            <el-input
              v-model.trim="searchForm.winMaxPrice"
              @keyup.enter.native="search.onSearch"
            />
          </p>
        </el-form-item>
        <!--项目类型-->
        <el-form-item ref="industryName" label="项目类型">
          <el-select v-model="searchForm.industryName" placeholder="请选择" style="width:228px">
            <el-option
              v-for="(item,index) in industryList"
              :key="index"
              :label="item.typename"
              :value="item.typecode"
            />
          </el-select>
        </el-form-item>
        <!--发票类型-->
        <el-form-item ref="invoiceType" label="发票类型">
          <el-select v-model="searchForm.invoiceType" placeholder="请选择" style="width:228px">
            <el-option
              v-for="(item,index) in invoiceTypeList"
              :key="index"
              :label="item.typename"
              :value="item.typecode"
            />
          </el-select>
        </el-form-item>
        <!--开票状态-->
        <el-form-item ref="auditStatus" label="开票状态" prop="auditStatus">
          <el-select v-model="searchForm.auditStatus" placeholder="请选择" style="width:228px">
            <el-option
              v-for="(item,index) in invoiceStatusList"
              :key="index"
              :label="item.typename"
              :value="item.typecode"
            />
          </el-select>
        </el-form-item>
        <!--邮寄状态-->
        <el-form-item ref="postStatus" label="邮寄状态" prop="postStatus">
          <el-select v-model="searchForm.postStatus" placeholder="请选择" style="width:228px">
            <el-option
              v-for="(item,index) in postStatusList"
              :key="index"
              :label="item.typename"
              :value="item.typecode"
            />
          </el-select>
        </el-form-item>
        <!--开票时间-->
        <el-form-item label="开票时间">
          <el-date-picker
            v-model="searchForm.invoiceDate"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            style="width:228px"
            @change="handleinvoiceDate"
          />
        </el-form-item>
        <!--审批时间-->
        <el-form-item label="审批时间">
          <el-date-picker
            v-model="searchForm.auditDate"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            style="width:228px"
            @change="handleAuditDate"
          />
        </el-form-item>
      </template>
      <template v-slot:menuLeft>
        <el-row class="mb10 table-alert-info">
          <el-col>
            <el-button type="primary" @click="batchAccount">
              批量记账
            </el-button>
            <el-button type="primary" @click="batchInvoice">
              批量开票
            </el-button>
            <el-button @click="exportInvoiceDetails">
              导出开票明细
            </el-button>
            <el-button @click="importInfo('00')">
              导入开票明细
            </el-button>
            <el-button @click="exportMailAddressInfo">
              导出邮寄地址
            </el-button>
            <el-button @click="importInfo('01')">
              导入邮寄信息
            </el-button>
            <a :href="mailAddressInfoTemFileUrl" download="邮寄信息模板.xlsx" style="margin: 0 10px">
              <el-button @click="exportMailAddressInfoTemplate">
                导出邮寄信息模板
              </el-button>
            </a>
            <!--     <el-button>打印开票审批表</el-button>
                                    <el-button>打印中标通知书</el-button>-->
          </el-col>
          <el-col>
            <el-link :underline="false">
              单页开票金额<span class="sum_color">{{ serviceInvoiceStatistics.pageInvoiceAmount }}</span>元
            </el-link>
            <el-link :underline="false">
              单页开票不含税金额<span class="sum_color">{{ serviceInvoiceStatistics.pageExcludTaxAmount }}</span>元
            </el-link>
            <el-link :underline="false">
              单页开票税额<span class="sum_color">{{ serviceInvoiceStatistics.pageTaxAmount }}</span>元
            </el-link>
            <el-link :underline="false">
              总开票金额<span class="sum_color">{{ serviceInvoiceStatistics.totalInvoiceAmount }}</span>元
            </el-link>
            <el-link :underline="false">
              总页开票不含税金额<span class="sum_color">{{ serviceInvoiceStatistics.totalExcludTaxAmount }}</span>元
            </el-link>
            <el-link :underline="false">
              总页开票税额<span class="sum_color">{{ serviceInvoiceStatistics.totalTaxAmount }}</span>元
            </el-link>
          </el-col>
          <el-col>
            <el-link :underline="false">
              已选中<span class="sum_color">{{ checkedTr.length }}</span>条
            </el-link>
            <el-link :underline="false">
              已选中开票金额<span class="sum_color">{{ moneyFormat(selectInvoiceAmount) }}</span>元
            </el-link>
            <el-link :underline="false">
              已选中不含税金额<span class="sum_color">{{ moneyFormat(selectExcludTaxAmount) }}</span>元
            </el-link>
            <el-link :underline="false">
              已选中税额<span class="sum_color">{{ moneyFormat(selectTaxAmount) }}</span>元
            </el-link>
          </el-col>
        </el-row>
      </template>
      <template v-slot:GXTable>
        <el-table
          ref="serviceCollectFeeTable"
          v-loading="loading"
          :data="tableData"
          :row-key="getRowKeys"
          row-class-name="row-line-height-cell16"
          size="mini"
          @selection-change="selectionChange"
        >
          <el-table-column
            :reserve-selection="true"
            disabled="true"
            type="selection"
            fixed="left"
            width="60px"
            align="center"
          />
          <el-table-column
            type="index"
            label="序号"
            fixed="left"
            width="60px"
            align="center"
          />
          <!-- 招标项目编号/名称  -->
          <el-table-column

            fixed="left"
            label="招标项目编号/名称"
            min-width="260"
          >
            <template slot-scope="scope">
              <p>{{ scope.row.tenderNo }}</p>
              <p>{{ scope.row.tenderName }}</p>
            </template>
          </el-table-column>
          <!-- 标段（包）编号/名称 -->
          <el-table-column

            header-align="center"
            label="标段（包）编号/名称"
            fixed="left"
            min-width="260"
          >
            <template slot-scope="scope">
              <p>{{ scope.row.packNo }}</p>
              <p>{{ scope.row.packName }}</p>
            </template>
          </el-table-column>
          <!-- 招标代理服务费收取对象 -->
          <el-table-column
            :formatter="formatPaymentParty"
            header-align="center"
            prop="paymentParty"
            label="招标代理服务费收取对象"
            align="center"
            width="220"
          />
          <!-- 招标代理服务费收取方式-->
          <el-table-column
            :formatter="formatPaymentMethod"
            header-align="center"
            label="招标代理服务费收取方式"
            prop="paymentMethod"
            min-width="200"
          />
          <!-- 付费单位 -->
          <el-table-column

            header-align="center"
            label="付费单位"
            prop="supplierName"
            min-width="200"
          />
          <!-- 开票金额（元） -->
          <el-table-column
            header-align="center"
            label="开票金额（元）"
            prop="invoiceAmount"
            align="right"
            width="120"
          />
          <!-- 不含税金额（元） -->
          <el-table-column
            header-align="center"
            label="不含税金额（元）"
            prop="excludTaxAmount"
            align="right"
            width="150"
          />
          <!-- 税率（%） -->
          <el-table-column
            header-align="center"
            label="税率（%）"
            prop="taxRate"
            align="right"
            width="90"
          />
          <!-- 税额（元） -->
          <el-table-column
            header-align="center"
            label="税额（元）"
            prop="taxAmount"
            align="right"
            width="90"
          />
          <!-- 业务部门 -->
          <el-table-column
            header-align="center"
            label="业务部门"
            prop="tenderDepart"
            min-width="150"
          />
          <!-- 项目经理 -->
          <el-table-column
            header-align="center"
            label="项目经理"
            prop="tenderManager"
            min-width="160"
          />
          <!-- 发票编号 -->
          <el-table-column
            header-align="center"
            label="发票编号"
            prop="invoiceNum"
            min-width="160"
          />
          <!-- 开票金额（元） -->
          <el-table-column
            header-align="center"
            label="开票金额（元）"
            prop="invoiceAmount"
            align="right"
            min-width="160"
          />
          <!-- 中标金额（元） -->
          <el-table-column
            header-align="center"
            label="中标金额（元）"
            prop="winPrice"
            align="right"
            min-width="160"
          />
          <!-- 项目类型 -->
          <el-table-column
            :formatter="formatprojectClassification"
            align="center"
            label="项目类型"
            prop="industryName"
            min-width="160"
          />
          <!-- 发票类型 -->
          <el-table-column
            :formatter="formatInvoiceType"
            align="center"
            label="发票类型"
            prop="invoiceType"
            min-width="160"
          />
          <!-- 开票时间 -->
          <el-table-column
            align="center"
            label="开票时间"
            prop="createTime"
            min-width="160"
          />
          <el-table-column
            :formatter="formatAuditStatus"
            align="center"
            label="开票状态"
            prop="auditStatus"
            min-width="120"
          />
          <el-table-column
            :formatter="formatPostStatus"
            align="center"
            label="邮寄状态"
            prop="postStatus"
            min-width="110"
          />
          <!-- 审批时间 -->
          <el-table-column
            header-align="center"
            label="审批时间"
            prop="senTime"
            min-width="160"
          />
          <!-- 备注 -->
          <el-table-column
            header-align="center"
            label="备注"
            prop="remark"
            min-width="160"
          />
          <!-- 操作 -->
          <el-table-column
            header-align="center"
            label="操作"
            fixed="right"
            width="200"
          >
            <template slot-scope="scope">
              <!--待开票-03 开票失败-05-->
              <el-link
                v-if="scope.row.auditStatus==='03' || scope.row.auditStatus==='05'"
                type="primary"
                @click.stop="invoice(scope.row)"
              >
                [开票]
              </el-link>
              <el-link
                v-if="scope.row.auditStatus!=='03' && scope.row.auditStatus!=='05'"
                type="primary"
                @click.stop="printInvoice(scope.row)"
              >
                [打印发票]
              </el-link>
              <el-link
                type="primary"
                @click.stop="editRemark(scope.row)"
              >
                [备注]
              </el-link>
              <el-link
                type="primary"
                @click.stop="viewDetail(scope.row)"
              >
                [查看]
              </el-link>
            </template>
          </el-table-column>
        </el-table>
      </template>
    </table-crud>
    <!--导入邮寄信息-->
    <importServiceCollectFee ref="importInfo" />
  </div>
</template>
<script>
/* 接口*/
import {
  queryWinServiceInvoiceList, queryWinServiceInvoiceStatistics, invoiceTenderFeeWinService, printWinServiceInvoice,
  queryMailAddressInfoExport, queryWinServiceInvoiceListExport, editWinserviceRenark, batchBookkeepingTenderFeeWinService
} from '@/api/fee/servicefee'
import { queryTenderProjectClassification } from '@/api/bidding/biddingProject'// 招标项目类型字典
import { getSystemConfigValueByConfigType } from '@/api/common/systemConfigCenter'
import { downLoadFileUrl } from '@/api/common/uploadCenter'
/* 公用方法*/
import { download, filterDictText } from '@assets/js/utils'// 常用方法
/* 混合开发方法-参数字段*/
import { ServiceGroupMixin } from '../../mixins/serviceFeeGroupMixin'
/* 组件*/
import importServiceCollectFee from './importServiceCollectFee-dialog'

export default {
  name: 'ServiceCollectFeeList',
  components: {
    importServiceCollectFee // 导入邮寄信息
  },
  mixins: [ServiceGroupMixin],
  data() {
    return {
      /* 字典信息-start */
      industryList: [], // 项目类型
      /* 字典信息-end */
      // 获取row的key值
      getRowKeys(row) {
        return row.winServiceId
      },
      loading: true,
      selectInvoiceAmount: 0, // 已选中开票金额
      selectExcludTaxAmount: 0, // 已选中不含税金额
      selectTaxAmount: 0, // 已选中税额
      // 搜索
      searchForm: {
        invoiceNum: '', // 发票编号
        invoiceAmount: '', // 开票金额（元）-开票最小金额
        invoiceMaxAmount: '', // 开票金额（元）-开票最大金额
        winMinPrice: '', // 中标金额（元）-中标最小金额
        winMaxPrice: '', // 中标金额（元）-中标最大金额
        auditDate: [], // 审核时间-不传给后端
        invoiceDate: [], // 开票开始时间-不传给后端
        auditStartDate: '', // 审核开始时间
        auditEndDate: '', // 审核结束时间
        invoiceStartDate: '', // 开票开始时间
        invoiceEndDate: '', // 开票结束时间
        invoiceType: '', // 发票类型
        industryName: '', // 项目类型
        buyersName: '', // 招标项目编号
        stageType: '', // 标段（包）名称
        tenderMethod: '', // 标段（包）状态
        tenderName: '', // 资格审查方式
        tenderNo: '', // 项目经理
        tenderType: ''// 业务部门
      },
      // 服务费收费开票列表统计信息
      serviceInvoiceStatistics: {
        pageExcludTaxAmount: 0, // 单页不含税开票/退款金额
        pageInvoiceAmount: 0, // 单页开票/退款金额
        pageTaxAmount: 0, // 单页税额
        totalExcludTaxAmount: 0, // 总不含税开票/退款金额
        totalInvoiceAmount: 0, // 总开票/退款金额
        totalTaxAmount: 0 // 总税额
      },
      tableData: [],
      checkedTr: [], // 表格已选数据
      mailAddressInfoTemFileUrl: '', // 导出邮寄信息url地址
      mailAddressTemFileId: '' // 邮寄信息文件id
    }
  },
  created() {
    this.exportMailAddressInfoTemplate()
    // 查询保证金邮寄信息导出模板的配置
    this.getSystemSource()
    this.initWebTypeGroup()// 字典信息-项目类型
  },
  methods: {
    // 字典信息-项目类型
    initWebTypeGroup() {
      queryTenderProjectClassification().then(res => {
        this.industryList = res.data[0].typeList
      })
    },
    // 表格字典值替换文本-项目类型
    formatprojectClassification(row, column, cellValue) {
      return filterDictText(this.industryList, cellValue)
    },
    // 开票时间
    handleinvoiceDate(val) {
      if (val) {
        this.searchForm.invoiceStartDate = this.$Moment(val[0]).format(this.momentSaveFormat)// 开始时间
        this.searchForm.invoiceEndDate = this.$Moment(val[1]).format(this.momentSaveFormat)// 结束时间
      }
    },
    // 审批时间
    handleAuditDate(val) {
      if (val) {
        this.searchForm.auditStartDate = this.$Moment(val[0]).format(this.momentSaveFormat)// 开始时间
        this.searchForm.auditEndDate = this.$Moment(val[1]).format(this.momentSaveFormat)// 结束时间
      }
    },
    // 服务费收费开票列表 - 导出开票明细
    exportInvoiceDetails() {
      const params = this.$refs.tableCrud.getQueryParams()
      queryWinServiceInvoiceListExport(params).then(res => {
        download(res, '服务费开票明细.xls')
      })
    },
    /*
     * 服务费收费开票列表 - 导入开票明细/导入邮寄信息
     * @params upType 00 开票上传 01 开票邮寄信息
    */
    importInfo(upType) {
      this.$refs.importInfo.openDialog(upType)
    },
    // 导出邮寄信息模板
    exportMailAddressInfoTemplate() {
      const data = {
        fileId: this.mailAddressTemFileId,
        fileType: 'docfee_mailAddress_Info_template'
      }
      this.mailAddressInfoTemFileUrl = downLoadFileUrl + '?fileId=' + data.fileId + '&fileType=' + data.fileType
    },
    // 服务费收费开票列表 - 导出邮寄信息明细
    exportMailAddressInfo() {
      const params = this.$refs.tableCrud.getQueryParams()
      queryMailAddressInfoExport(params).then(res => {
        download(res, '服务费邮寄信息明细.xls')
      })
    },
    // 获取数据
    loadData(params, callback) {
      queryWinServiceInvoiceList(params).then(response => {
        this.loading = false
        this.tableData = response.data.records
        callback(response.data.total)
      }).catch(() => {
        this.loading = false
      })
      // 服务费收费开票列表统计信息
      this.getWinServiceInvoiceStatistics(params)
    },
    // 服务费收费开票列表统计信息
    getWinServiceInvoiceStatistics(params) {
      queryWinServiceInvoiceStatistics(params).then(response => {
        this.serviceInvoiceStatistics = response.data
      }).catch(() => {
      })
    },
    // 调用接口-开票
    makeOutInvoice(winServiceId) {
      invoiceTenderFeeWinService(winServiceId).then(res => {
        this.$message({
          message: res.header.msg,
          type: 'success'
        })
        // 获取列表信息
        this.$refs.tableCrud.onSearchChange()
        this.$refs.serviceCollectFeeTable.clearSelection()
      }).catch(() => {

      })
    },
    // 单行服务费开票
    invoice(row) {
      this.$confirm('确定电子开票吗？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        confirmButtonClass: 'confirmBtn',
        cancelButtonClass: 'cancelBtn',
        type: 'warning'
      }).then(() => {
        this.makeOutInvoice(row.winServiceId)
      })
    },
    // 服务费批量记账
    batchAccount() {
      if (this.checkedTr.length) {
        this.$confirm('确定记账吗？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          confirmButtonClass: 'confirmBtn',
          cancelButtonClass: 'cancelBtn',
          type: 'warning'
        }).then(() => {
          // 只拿到 06 已开票 16 记账失败
          const winServiceIds = this.checkedTr.filter(row => row.auditStatus === '06' || row.auditStatus === '16').map(row => row.winServiceId).join(',')
          batchBookkeepingTenderFeeWinService({ winServiceIds }).then(res => {
            // 记账成功
            this.$refs.tableCrud.onSearchChange()
            this.$refs.serviceCollectFeeTable.clearSelection()
            this.$message({ message: '记账成功', type: 'success' })
          })
        })
      } else {
        this.$message({ message: '请选择一条记录!', type: 'warning' })
      }
    },
    // 批量开票
    batchInvoice() {
      if (this.checkedTr.length) {
        this.$confirm('确定电子开票吗？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          confirmButtonClass: 'confirmBtn',
          cancelButtonClass: 'cancelBtn',
          type: 'warning'
        }).then(() => {
          // 只拿到 待开票-03 开票失败-05
          const winServiceIds = this.checkedTr.filter(row => row.auditStatus === '03' || row.auditStatus === '05').map(row => row.winServiceId).join(',')
          this.makeOutInvoice(winServiceIds)
        })
      } else {
        this.$message({ message: '请选择一条记录!', type: 'warning' })
      }
    },
    // 查看
    viewDetail(row) {
      this.$router.push({
        path: '/fee/serviceCollectFeeDetail',
        query: {
          winServiceId: row.winServiceId
        }
      })
    },
    // 打印纸质发票
    printInvoice(row) {
      const userId = this.$store.getters.info.id
      printWinServiceInvoice(row.winServiceId, userId).then(res => {
        this.$message({
          message: res.header.msg,
          type: 'success'
        })
        // 获取列表信息
        this.$refs.tableCrud.onSearchChange()
        this.$refs.serviceCollectFeeTable.clearSelection()
      }).catch(() => {

      })
    },
    // 备注编辑
    editRemark(row) {
      this.$prompt('', '编辑备注', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputType: 'textarea',
        inputPattern: /^.{1,300}$/,
        inputErrorMessage: '备注内容不能为空,最多可输入300个字符',
        inputValue: row.remark, // 初始值
        inputPlaceholder: '最多可输入300个字符',
        confirmButtonClass: 'confirmBtn',
        cancelButtonClass: 'cancelBtn'
      }).then(({ value }) => {
        const data = {
          winServiceId: row.winServiceId, // 主键id
          remark: value // 备注内容
        }
        editWinserviceRenark(data).then(res => {
          this.$message({
            type: 'success',
            message: '编辑成功'
          })
          // 操作成功后进行赋值
          row.remark = data.remark
        })
      })
    },
    // 表格复选框已选数据
    selectionChange(val) {
      this.checkedTr = val
      this.handleDocumentPrice()
    },
    // 已选中开票金额/不含税金额/税额计算
    handleDocumentPrice() {
      let invoiceAmount = 0
      let excludTaxAmount = 0
      let taxAmount = 0
      this.checkedTr.forEach(item => {
        invoiceAmount += Number(item.invoiceAmount) // 开票金额
        excludTaxAmount += Number(item.excludTaxAmount) // 不含税金额
        taxAmount += Number(item.taxAmount) // 税额
      })
      this.selectInvoiceAmount = invoiceAmount.toFixed(2)
      this.selectExcludTaxAmount = excludTaxAmount.toFixed(2)
      this.selectTaxAmount = taxAmount.toFixed(2)
    },
    // 查询保证金邮寄信息导出模板的配置
    getSystemSource() {
      getSystemConfigValueByConfigType('docfee_mailAddress_template_file_id').then(res => {
        this.mailAddressTemFileId = res.data
      }).catch(() => {
      })
    }
  }
}
</script>
<style lang="less" scoped>

</style>
