jiangping
2024-02-04 3c2e49d7bcc91268a75689db400d1f1698c0f8b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div style="width: 100%; display: flex; align-items: center; margin-bottom: 20px;">
            保险方案:{{form.solutionsName}} <div style="width: 20px;"></div> 保单号:{{form.code || '-'}}
        </div>
        <el-table
            :data="list"
            border
            ref="table"
            style="width: 100%">
            <el-table-column label="序号" width="80px">
                <template slot-scope="scope">
                    <span>{{scope.$index + 1}}</span>
                </template>
            </el-table-column>
            <el-table-column
                prop="createDate"
                label="申请开票时间">
            </el-table-column>
            <el-table-column
                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
                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
                        style="width: 50px; height: 50px"
                        :src="row.imgurlFull"
                        :preview-src-list="[row.imgurlFull]">
                    </el-image>
                </template>
            </el-table-column>
            <el-table-column
                label="操作">
                <template slot-scope="{row}">
                    <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>
 
<script>
    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, directInsuranceDetails, commissionDetails },
        data () {
            return {
                form: {
                    id: null,
                    solutionsName: '',
                    code: '',
                    determine: ''
                },
                list: []
            }
        },
        created () {
            this.config({
                api: '/business/dispatchUnit',
                'field.id': 'id'
            })
        },
        methods: {
            open (title, target) {
                this.title = title
                this.list = []
                this.visible = true
                // 编辑
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                    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({ applyId: this.form.id })
                    .then(res => {
                        this.list = res
                    })
            },
            close () {
                this.visible = false
            }
        }
    }
</script>
 
<style>
    .el-image-viewer__wrapper {
        z-index: 3000 !important;
    }
</style>