MrShi
2024-03-08 d2bc6e096f0806b78ea92d4b90a21d3627d406c7
company/src/components/enterprise/entrustmentHistory.vue
@@ -20,28 +20,53 @@
                </template>
            </el-table-column>
            <el-table-column
                prop="solutionName"
                prop="createDate"
                label="申请开票时间">
            </el-table-column>
            <el-table-column
                prop="bdCode"
                label="开票状态">
                <template slot-scope="{row}">
                    <span v-if="row.status === 1">已开票</span>
                    <span v-else-if="row.status === 2">平台撤回</span>
                    <span v-else-if="row.status === 3">已冲红</span>
                    <span v-else>待处理</span>
                </template>
            </el-table-column>
<!--            <el-table-column-->
<!--                prop="price"-->
<!--                label="开票金额(元)">-->
<!--            </el-table-column>-->
            <el-table-column
                prop="applyChangeId"
                label="开票金额(元)">
            </el-table-column>
            <el-table-column
                prop="duName"
                label="接收方式">
                <template slot-scope="{row}">
                    <span v-if="row.type === 1">纸质发票</span>
                    <span v-else>电子发票</span>
                </template>
            </el-table-column>
            <el-table-column
                label="电子发票">
                <template slot-scope="{row}">
                    <el-image
                        v-if="row.imgurlFull"
                        style="width: 50px; height: 50px"
                        :src="row.imgurlFull"
                        :preview-src-list="[row.imgurlFull]">
                    </el-image>
                    <span v-else>-</span>
                </template>
            </el-table-column>
            <el-table-column
                label="操作">
                <template slot-scope="{row}">
                    <el-button type="text">申请详情</el-button>
                    <el-button type="text" @click="see(row)">申请详情</el-button>
                </template>
            </el-table-column>
        </el-table>
        <template v-slot:footer>
            <el-button @click="close">返回</el-button>
        </template>
        <directInsuranceDetails ref="directInsuranceDetails" />
        <commissionDetails ref="commissionDetails" />
    </GlobalWindow>
</template>
@@ -49,16 +74,19 @@
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { list } from '@/api/business/taxes'
    import directInsuranceDetails from '@/components/enterprise/directInsuranceDetails'
    import commissionDetails from '@/components/enterprise/commissionDetails'
    export default {
        name: 'entrustmentHistory',
        extends: BaseOpera,
        components: { GlobalWindow },
        components: { GlobalWindow, directInsuranceDetails, commissionDetails },
        data () {
            return {
                form: {
                    id: null,
                    solutionsName: '',
                    code: ''
                    code: '',
                    determine: ''
                },
                list: []
            }
@@ -72,6 +100,7 @@
        methods: {
            open (title, target) {
                this.title = title
                this.list = []
                this.visible = true
                // 编辑
                this.$nextTick(() => {
@@ -81,13 +110,38 @@
                    this.getList()
                })
            },
            see(row) {
                let info = ''
                if (row.status === 1) {
                    info = '已开票'
                } else if (row.status === 2) {
                    info = '平台撤回'
                } else if (row.status === 3) {
                    info = '已冲红'
                } else {
                    info = '待处理'
                }
                if (this.form.determine === 1) {
                    this.$refs.commissionDetails.open(`开票详情(${info})`, row)
                } else {
                    this.$refs.directInsuranceDetails.open(`开票详情(${info})`, row)
                }
            },
            getList() {
                list({ insuranceApplyId: this.form.id })
                list({ applyId: this.form.id })
                    .then(res => {
                        console.log(res)
                        this.list = res
                    })
            },
            close () {
                this.visible = false
            }
        }
    }
</script>
<style>
    .el-image-viewer__wrapper {
        z-index: 3000 !important;
    }
</style>