shuishen
2026-02-10 abd285e6d013128aa57c9e30e851b2aa76d60ec5
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-01-17 16:04:08
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-02-19 16:34:09
 * @FilePath: \srs-police-affairs\src\components\siteDialog\index.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by shuishen, All Rights Reserved. 
-->
<template>
    <el-dialog class="syld-details-box site-dialog-popup business-detail-box" :title="'场所详情'" append-to-body
        :close-on-click-modal="false" :visible.sync="popupShow" center @close="popupClose">
        <div class="flex f-d-c" style="height: 100%;" v-loading="loading"
            element-loading-background="rgba(0, 0, 0, 0.5)">
            <div class="type-tab-box">
                <div class="tab-item" :class="{ 'tab-choose-item': chooseTab == 1 }" @click="tabClick(1)">
                    基本信息</div>
                <div class="tab-item" :class="{ 'tab-choose-item': chooseTab == 2 }" @click="tabClick(2)">
                    交易信息 </div>
            </div>
 
            <div class="flex-1 tab-content-box" v-if="chooseTab == 1">
                <div class="info-list">
                    <div class="info-item">
                        <div class="name">
                            场所名称:
                        </div>
                        <div class="value">
                            {{ businessDetailData.placeName }}
                        </div>
                    </div>
                    <div class="info-item">
                        <div class="name">
                            场所地址:
                        </div>
                        <div class="value">
                            {{ businessDetailData.location }}
                        </div>
                    </div>
                    <div class="info-item">
                        <div class="name">
                            负责人:
                        </div>
                        <div class="value">
                            {{ businessDetailData.principal }}
                        </div>
                    </div>
                    <div class="info-item">
                        <div class="name">
                            手机号码:
                        </div>
                        <div class="value">
                            {{ businessDetailData.principalPhone }}
                        </div>
                    </div>
                </div>
            </div>
 
            <div class="flex-1  flex f-d-c tab-content-box" v-if="chooseTab == 2">
                <el-table :data="tradeTableData" style="width: 100%" :header-cell-style="{ 'text-align': 'center' }"
                    :cell-style="{ 'text-align': 'center' }">
                    <el-table-column prop="transactionObject" :show-overflow-tooltip="true"
                        label="交易对象"></el-table-column>
                    <el-table-column prop="transactionObjectTel" :show-overflow-tooltip="true"
                        label="交易对象电话"></el-table-column>
                    <el-table-column prop="idCard" :show-overflow-tooltip="true" label="身份证号"></el-table-column>
                    <el-table-column prop="goodsNums" :show-overflow-tooltip="true" label="交易数量"></el-table-column>
                    <el-table-column prop="transactionMoney" :show-overflow-tooltip="true"
                        label="交易金额"></el-table-column>
                    <el-table-column label="操作" width="120">
                        <template slot-scope="scope">
                            <el-button @click.native.prevent="viewRow(scope.row)" type="text" size="small">
                                <span style="color: #409eff !important;">查看详情</span>
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </div>
        <Detail ref="Detail" />
    </el-dialog>
</template>
 
<script>
import {
    getFrontTypeTree,
    getTaskLabelReportingEventPage
} from "@/api/site/index.js"
import Detail from './components/detail.vue'
 
export default {
    name: 'PomDialogPopup',
 
    components: { Detail },
    data () {
        return {
            searchDate: '',
            popupShow: false,
            businessId: '',
            chooseTab: 1,
            tradeTableData: [],
            loading: false,
            businessDetailData: {},
            pages: {
                current: 1,
                size: 22,
                total: 0,
                count: 0,
            },
            refreshNum: 1,
            typeOptions: []
        }
    },
 
    created () {
        this.getFrontTypeTree()
    },
 
    methods: {
        // 打开弹窗初始化数据
        initOpen (row) {
            this.searchDate = ''
            this.businessDetailData = row
            this.chooseTab = 1
            this.popupShow = true
 
            this.pages.current = 1
            this.getTaskLabelReportingEventPage()
        },
 
        // 分页处理
        handleCurrentChange (current) {
            this.pages.current = current
        },
 
        getTaskLabelReportingEventPage () {
            this.flag = false
 
            getTaskLabelReportingEventPage({
                placeId: this.businessDetailData.id,
                current: 1,
                size: 9999,
            }).then(res => {
                const data = res.data.data
                data.records.forEach(element => {
                    element.goodsImageUrls = this.getImgUrls(element.goodsImageUrls)
                    element.imageUrls = this.getImgUrls(element.imageUrls)
                    this.typeOptions.forEach(item => {
                        if (item.key == element.frontType) {
                            element.frontName = item.title
                        }
                    })
                })
                this.tradeTableData = data.records
                this.flag = true
 
                setTimeout(() => {
                    if (this.checkFlag && this.flag) this.loading = false
                }, 500)
            })
        },
 
        // 关闭弹窗按钮
        popupClose () {
            this.popupShow = false
        },
 
        // tab切换
        tabClick (type) {
            this.chooseTab = type
        },
 
        // 查看详情
        viewRow (row) {
            this.$refs.Detail.initOpen(row)
        },
 
        // 获取阵地字典
        getFrontTypeTree () {
            getFrontTypeTree().then(res => {
                this.typeOptions = res.data.data
            })
        },
 
        // 图片转换
        getImgUrls (imageUrls) {
            if (imageUrls && imageUrls != '' && imageUrls.length > 0) {
                imageUrls = imageUrls.split(',').filter(ele => ele != '').map(ele => {
                    return 'http://10.141.11.11/place/' + ele
                    // return 'https://srgdjczzxtpt.com:2080/gminio/jczz/' + ele
                })
            }
            return imageUrls || []
        },
    },
}
</script>
 
<style lang="scss" scoped>
:deep(.el-image__error) {
    height: 120px;
}
 
.flex {
    display: flex;
}
 
.f-d-c {
    flex-direction: column;
}
 
.flex-1 {
    height: 0;
    flex: 1;
}
</style>