¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="df_sb mt20"> |
| | | <div class="tabs"> |
| | | <div class="tab" :class="{ active: billType === 0 }" @click="tabsClick(0)">é¾ææ¶æ¬¾è´¦å</div> |
| | | <div class="tab" :class="{ active: billType === 1 }" @click="tabsClick(1)">龿仿¬¾è´¦å</div> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button @click="$refs.call.open('æ¹éå¬ç¼´')">æ¹éå¬ç¼´</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe> |
| | | <el-table-column prop="customerName" label="客æ·åç§°" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column label="æ¿é´" min-width="170" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; flex-direction: column;" v-if="row.roomPathName"> |
| | | <span v-for="(item, index) in row.roomPathName.split(';')" :key="index">{{item}}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="contractCode" label="ååç¼å·" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column label="ç»æ¸
ç¶æ" min-width="100" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.payStatus === 0">å¾
æ¶æ¬¾</span> |
| | | <span v-if="row.payStatus === 1">å·²ç»æ¸
</span> |
| | | <span v-if="row.payStatus === 2">é¨åç»æ¸
</span> |
| | | <span v-if="row.payStatus === 3">å¾
仿¬¾</span> |
| | | <span v-if="row.payStatus === 4">å¾
鿬¾</span> |
| | | <span v-if="row.payStatus === 5">å·²å
³é</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="totleFee" label="è´¦åéé¢" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="receivableFee" :label="`åº${billType === 0 ? 'æ¶' : 'ä»'}éé¢`" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="actReceivableFee" :label="`å®${billType === 0 ? 'æ¶' : 'ä»'}éé¢`" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column :label="`éæ¶/ä»éé¢`" min-width="100" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | {{Math.abs(row.needReceivableFee)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="è´¹ç¨ç±»å" min-width="100" show-overflow-tooltip> |
| | | <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 label="è®¡è´¹å¨æ" min-width="200" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | {{ row.startDate }} ~ {{ row.endDate }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="planPayDate" :label="`åº${billType === 0 ? 'æ¶' : 'ä»'}æ¥æ`" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column label="è´¦åæ¥æº" min-width="100" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type === 0">ååè´¦å</span> |
| | | <span v-if="row.type === 1">èªå»ºè´¦å</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="çä¿¡åéç¶æ" min-width="100" fixed="right" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status === 0">å¼å¯</span> |
| | | <span v-if="row.status === 1" style="color: red;">å
³é</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é®ä»¶åéç¶æ" min-width="100" fixed="right" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status === 0">å¼å¯</span> |
| | | <span v-if="row.status === 1" style="color: red;">å
³é</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="120" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleDetail(row)" icon="el-icon-edit" v-permissions="['business:category:update']">æ¥ç详æ
</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="mt20"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | <Edit ref="EditRef" @success="getList" /> |
| | | <Detail ref="DetailRef" @success="getList" /> |
| | | <BullEditFu ref="BullEditFu" @success="getList" /> |
| | | <Call ref="call" @success="getList" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import Edit from './components/bullEdit.vue' |
| | | import BullEditFu from './components/bullEditFu.vue' |
| | | import Detail from './components/bullDetail.vue' |
| | | import Call from './components/call.vue' |
| | | import { fetchList } from '@/api/bill' |
| | | export default { |
| | | components: { |
| | | Pagination, |
| | | QueryForm, |
| | | Edit, |
| | | Detail, |
| | | BullEditFu, |
| | | Call |
| | | }, |
| | | data () { |
| | | return { |
| | | loading: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | billType: 0, |
| | | filters: { |
| | | status: 0 |
| | | }, |
| | | list: [], |
| | | total: 0, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | filed: 'customerName', |
| | | type: 'input', |
| | | label: '客æ·åç§°' |
| | | }, |
| | | { |
| | | filed: 'payStatus', |
| | | type: 'select', |
| | | label: 'ç»æ¸
ç¶æ', |
| | | options: [ |
| | | { value: 0, label: 'å¾
æ¶æ¬¾' }, |
| | | { value: 1, label: 'å·²ç»æ¸
' }, |
| | | { value: 2, label: 'é¨åç»æ¸
' }, |
| | | { value: 3, label: 'å¾
仿¬¾' }, |
| | | { value: 4, label: 'å¾
鿬¾' } |
| | | ] |
| | | }, |
| | | { |
| | | filed: 'selDate', |
| | | type: 'daterange', |
| | | label: 'åºæ¶/仿¥æ' |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | addOpen () { |
| | | if (this.billType === 0) { |
| | | this.$refs.EditRef.open('åå»ºæ¶æ¬¾è´¦å') |
| | | } else { |
| | | this.$refs.BullEditFu.open('åå»ºä»æ¬¾è´¦å') |
| | | } |
| | | }, |
| | | getList (page) { |
| | | const { pagination, filters } = this |
| | | let form = JSON.parse(JSON.stringify(filters)) |
| | | if (form && form.selDate && form.selDate.length > 0) { |
| | | form.planPayDateStart = form.payDate[0] |
| | | form.planPayDateEnd = form.payDate[1] |
| | | } |
| | | this.loading = true |
| | | fetchList({ |
| | | model: { |
| | | ...filters, |
| | | billType: this.billType |
| | | }, |
| | | capacity: pagination.pageSize, |
| | | page: page || pagination.page |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | | this.list.forEach(item => { |
| | | item.statusName = item.status === 1 ? 'æå' : item.status === 2 ? 'æ¥åº' : 'æ£å¸¸' |
| | | }) |
| | | this.pagination.total = res.total || 0 |
| | | }, () => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | tabsClick (val) { |
| | | this.billType = val |
| | | this.getList() |
| | | }, |
| | | handleDetail (row) { |
| | | this.$refs.DetailRef.open('è´¦å详æ
', row.id) |
| | | }, |
| | | clear () { |
| | | this.filters = {} |
| | | this.pagination.pageSize = 10 |
| | | this.pagination.page = 1 |
| | | this.getList() |
| | | }, |
| | | handleSizeChange (capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '@/assets/style/variables.scss'; |
| | | |
| | | .tabs { |
| | | display: flex; |
| | | margin-bottom: 20px; |
| | | justify-content: center; |
| | | |
| | | .tab { |
| | | height: 58px; |
| | | line-height: 58px; |
| | | font-size: 16px; |
| | | color: #666666; |
| | | margin: 0 30px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .active { |
| | | font-weight: 500; |
| | | color: $primary-color; |
| | | border-bottom: 2px solid $primary-color; |
| | | } |
| | | } |
| | | </style> |