renkang
2024-12-23 26b93e84d4153039ef3600355308d2a743dc3be7
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<template>
    <GlobalWindow :title="title" :withFooter="false" :visible.sync="visible" :confirm-working="isWorking" @close="close"
        @confirm="confirm">
        <div style="position: sticky; top: 0; left: 0; width: 100%; background: #ffffff;">
            <div class="home_title">
                <div class="left">
                    <span class="mr10">对方单位名称:{{info.customerName}}</span>
                    <el-tag type="success" v-if="info.status === 0">开启</el-tag>
                    <el-tag type="info" v-if="info.status === 1">关闭</el-tag>
                </div>
                <el-button type="danger" v-if="isShow(info.status, info.contractStatus)" @click="closeDW()">关闭流水</el-button>
            </div>
            <div class="line"></div>
            <div class="main">
                <div class="list" style="background: rgba(0,0,0,0); padding: 0; margin-bottom: 0;">
                    <div class="item" style="flex: 1;">
                        <div class="la">结清状态</div>
                        <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 0">待收款</div>
                        <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 1">已结清</div>
                        <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 2">部分结清</div>
                        <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 3">待付款</div>
                        <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 4">待退款</div>
                        <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 5">已关闭</div>
                    </div>
                    <div class="item" style="flex: 1;">
                        <div class="la">应{{info.revenueType === 0 ? '收' : '付'}}金额(元)</div>
                        <div class="val" style="margin-top: 10px;">{{info1.receivableFee}}</div>
                    </div>
                    <div class="item" style="flex: 1;">
                        <div class="la">实{{info.revenueType === 0 ? '收' : '付'}}金额(元)</div>
                        <div class="val" style="margin-top: 10px;">{{info1.actReceivableFee}}</div>
                    </div>
                    <div class="item" style="flex: 1;">
                        <div class="la">需{{info.revenueType === 0 ? '收' : '付'}}金额(元)</div>
                        <div class="val" style="margin-top: 10px;">{{info1.needReceivableFee}}</div>
                    </div>
                    <div class="item" style="flex: 1;">
                        <div class="la">应{{info.revenueType === 0 ? '收' : '付'}}日期</div>
                        <div class="val" style="margin-top: 10px;">{{info1.planPayDate}}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="tabs">
            <div class="tab" :class="{ active: activeTabs == 0 }" @click="tabsClick(0)">流水信息</div>
            <div class="tab" :class="{ active: activeTabs == 1 }" @click="tabsClick(1)">关联账单</div>
        </div>
        <div class="main">
            <div class="title">流水信息</div>
            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
                <div class="item">
                    <div class="la">收支类型</div>
                    <div class="val" v-if="info.revenueType === 0">收入</div>
                    <div class="val" v-if="info.revenueType === 1">支出</div>
                </div>
                <div class="item">
                    <div class="la">入账日期</div>
                    <div class="val">{{info.actPayDate}}</div>
                </div>
                <div class="item">
                    <div class="la">发生额(元)</div>
                    <div class="val">{{info.actReceivableFee}}</div>
                </div>
                <div class="item">
                    <div class="la">账单编号</div>
                    <div class="val">{{info.billCode}}</div>
                </div>
                <div class="item">
                    <div class="la">合同编号</div>
                    <div class="val">{{info.contractCode}}</div>
                </div>
                <div class="item">
                    <div class="la">创建时间</div>
                    <div class="val">{{info.createDate}}</div>
                </div>
                <div class="item">
                    <div class="la">对方公司</div>
                    <div class="val">{{info.customerName}}</div>
                </div>
                <div class="item">
                    <div class="la">经办人</div>
                    <div class="val">{{info.realname}}</div>
                </div>
                <div class="item">
                    <div class="la">流水账户</div>
                    <div class="val">{{info.accountTitle}}</div>
                </div>
                <div class="item">
                    <div class="la">备注</div>
                    <div class="val">{{info.remark}}</div>
                </div>
                <div class="item"></div>
                <div class="item"></div>
            </div>
            <div class="title">关联账单</div>
            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
                <el-table
                    :data="[info1]"
                    border
                    style="width: 100%">
                    <el-table-column
                        label="费用类型">
                        <template slot-scope="{row}">
                            <span v-if="row.costType === 0">租赁费</span>
                            <span v-if="row.costType === 1">物业费</span>
                            <span v-if="row.costType === 2">租赁押金</span>
                            <span v-if="row.costType === 3">物业押金</span>
                            <span v-if="row.costType === 4">水电费</span>
                            <span v-if="row.costType === 5">杂项费</span>
                            <span v-if="row.costType === 6">其它</span>
                            <span v-if="row.costType === 7">保证金</span>
                        </template>
                    </el-table-column>
                    <el-table-column
                        prop="receivableFee"
                        label="应收/付金额">
                    </el-table-column>
                    <el-table-column
                        prop="actReceivableFee"
                        label="实收金额">
                    </el-table-column>
                    <el-table-column
                        prop="needReceivableFee"
                        label="需收金额">
                    </el-table-column>
                    <el-table-column
                        label="计费周期">
                        <template slot-scope="{row}">
                            {{row.startDate}} ~ {{row.endDate}}
                        </template>
                    </el-table-column>
                    <el-table-column
                        prop="planPayDate"
                        label="应收/付日期">
                    </el-table-column>
                    <el-table-column
                        prop="remark"
                        label="备注">
                    </el-table-column>
                </el-table>
            </div>
            <div class="title">流水附件</div>
            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
                <el-table
                    :data="info.multifileList"
                    border
                    style="width: 100%">
                    <el-table-column
                        prop="name"
                        label="附件名称">
                    </el-table-column>
                    <el-table-column
                        prop="userName"
                        label="操作人">
                    </el-table-column>
                    <el-table-column
                        prop="createDate"
                        label="操作时间">
                    </el-table-column>
                </el-table>
            </div>
            <div class="title">操作记录</div>
            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
                <el-table
                    :data="info.editRecordDataVOList"
                    border
                    style="width: 100%">
                    <el-table-column
                        width="200"
                        prop="editUserName"
                        label="操作人">
                    </el-table-column>
                    <el-table-column
                        width="200"
                        prop="editTime"
                        label="操作时间">
                    </el-table-column>
                    <el-table-column
                        prop="editRemark"
                        label="操作内容">
                    </el-table-column>
                </el-table>
            </div>
        </div>
    </GlobalWindow>
</template>
 
<script>
  import GlobalWindow from '@/components/common/GlobalWindow'
  import BaseOpera from '@/components/base/BaseOpera'
  import { close, getById } from '@/api/ywContractRevenue'
  import { getYwContractBillById } from '@/api/contract'
  export default {
    name: 'details',
    components: {
      GlobalWindow
    },
    extends: BaseOpera,
    data() {
      return {
        id: '',
        activeTabs: '',
        info: {},
        info1: {}
      }
    },
    methods: {
      open (title, id) {
        this.title = title
        this.id = id
        this.getDetails()
      },
      getDetails () {
        getById(this.id)
          .then(res => {
            this.info = res
            this.getDetails1()
          })
      },
      getDetails1 () {
        getYwContractBillById(this.info.billId)
          .then(res => {
            this.info1 = res
            this.visible = true
          })
      },
      tabsClick(val) {
        this.activeTabs = val
      },
      isShow (status, contractStatus) {
        if (status === 1) return false
        if (contractStatus === '3' || contractStatus === '4') return false
        return true
      },
      closeDW () {
        this.$confirm('确认关闭此流水吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          close(this.info.id)
            .then(res => {
              this.getDetails()
            })
        }).catch(() => {
 
        });
      },
    }
  }
</script>
 
<style lang="scss" scoped>
    @import '@/assets/style/variables.scss';
    .home_title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        .left {
            font-weight: 500;
            font-size: 16px;
            margin-right: 10px;
            display: flex;
            align-items: center;
            
            .status {
                padding: 0 6px;
                height: 22px;
                line-height: 22px;
                border-radius: 2px;
                border: 1px solid #00BA92;
                color: #00BA92;
                font-weight: 400;
                font-size: 12px;
                color: #00BA92;
            }
        }
    }
    
    .remark {
        background: #E8EBF7;
        border-radius: 2px;
        padding: 10px 20px;
        font-size: 16px;
        margin: 20px 0
    }
    
    .tabs {
        border-bottom: 1px solid #DFE2E8;
        display: flex;
        margin-bottom: 20px;
        .tab {
            height: 58px;
            line-height: 58px;
            font-size: 16px;
            color: #666666;
            margin-right: 30px;
            cursor: pointer;
        }
        
        .active {
            font-weight: 500;
            color: $primary-color;
            border-bottom: 2px solid $primary-color;
        }
    }
    
    .line {
        width: 100%;
        margin: 15px 0;
        border-bottom: 1px dashed #eaeaea;
    }
    
    .main {
        .title {
            font-weight: 500;
            font-size: 18px;
            color: $primary-color;
            margin-bottom: 15px;
        }
        
        .list {
            display: flex;
            flex-wrap: wrap;
            /*background: #F7F7F7;*/
            border-radius: 2px;
            padding: 0 20px;
            margin-bottom: 20px;
            
            .item {
                flex: 25%;
                margin-bottom: 20px;
                
                .la {
                    color: #7f7f7f;
                    margin-bottom: 5px;
                }
            }
        }
    }
</style>