|
@@ -0,0 +1,179 @@
|
|
|
+<template>
|
|
|
+ <div class="divide-accounts-manage">
|
|
|
+ <div class="search">
|
|
|
+ <div class="left" />
|
|
|
+ <div class="right">
|
|
|
+ <div>
|
|
|
+ <el-input v-model="search.businessNo" style="width: 250px" placeholder="请输入业务编号" clearable />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="search.status" placeholder="请选择状态" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in constant.InvoiceStatus"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-input v-model="search.fastSearch" style="width: 300px" placeholder="请输入项目名称/主企业名称/核心企业名称" clearable />
|
|
|
+ </div>
|
|
|
+ <div class="leftBtn">
|
|
|
+ <el-button type="primary" @click="fetchData('search')">查询</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <cy-comm-table
|
|
|
+ ref="commTable"
|
|
|
+ v-loading="loading"
|
|
|
+ style="margin-top: 10px;"
|
|
|
+ :columns="columns"
|
|
|
+ :data="tableData"
|
|
|
+ :count="total"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import { getInvoicesManagementList } from '@/api/mySettlement/invoicesManagement'
|
|
|
+import { formatMoney } from '@/utils/index'
|
|
|
+export default {
|
|
|
+ name: 'DivideAccountsManage',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ tableData: [],
|
|
|
+ search: {
|
|
|
+ businessNo: '',
|
|
|
+ status: '',
|
|
|
+ fastSearch: ''
|
|
|
+ },
|
|
|
+ total: 0,
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ label: '序号',
|
|
|
+ index: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '分账单号',
|
|
|
+ prop: 'businessNumber',
|
|
|
+ showTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '核心企业名称',
|
|
|
+ showTooltip: true,
|
|
|
+ prop: 'businessName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '入账金额(元)',
|
|
|
+ prop: 'openAmount',
|
|
|
+ showTooltip: true,
|
|
|
+ render: (h, row) => {
|
|
|
+ return <div>{ formatMoney(row.openAmount) }</div>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目名称',
|
|
|
+ prop: 'taskName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '保理合同编号',
|
|
|
+ prop: 'taskName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '支用批次',
|
|
|
+ prop: 'taskName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status.name',
|
|
|
+ showTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ render: (h, row) => {
|
|
|
+ const btnList = [
|
|
|
+ {
|
|
|
+ msg: '查看',
|
|
|
+ icon: 'iconfont icon-orange icon-a-Group957',
|
|
|
+ power: 'projectNumber:delete',
|
|
|
+ category: 'see'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ const options = btnList.map(item => {
|
|
|
+ return (
|
|
|
+ this.tablePower({ item, row }) &&
|
|
|
+ <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
|
|
|
+ <span class='table-icon-box'>
|
|
|
+ <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row) }}></i>
|
|
|
+ </span>
|
|
|
+ </el-tooltip>
|
|
|
+ )
|
|
|
+ })
|
|
|
+ return <div>{ options }</div>
|
|
|
+ },
|
|
|
+ width: 80
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['constant']),
|
|
|
+ tablePower() {
|
|
|
+ return ({ item, row }) => {
|
|
|
+ const { rowPower } = item
|
|
|
+ if (rowPower) {
|
|
|
+ if (rowPower.includes(row.taskName)) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // this.fetchData()
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.$store.dispatch('getConstant', ['InvoiceStatus'])
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fetchData(type) {
|
|
|
+ this.loading = true
|
|
|
+ const params = {
|
|
|
+ ...this.search,
|
|
|
+ page: this.page,
|
|
|
+ rows: this.size
|
|
|
+ }
|
|
|
+ getInvoicesManagementList(params).then(({ data }) => {
|
|
|
+ this.tableData = data.rows
|
|
|
+ this.total = data.records
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handlerOperate(type, row) {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'MySettlementInvoicesManagementApplyInvoicing',
|
|
|
+ params: { id: 'children' },
|
|
|
+ query: {
|
|
|
+ module: '发票管理',
|
|
|
+ id: row.id,
|
|
|
+ taskId: row.taskId,
|
|
|
+ type,
|
|
|
+ status: row.status.code
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.divide-accounts-manage {
|
|
|
+
|
|
|
+}
|
|
|
+</style>
|