<template>
|
<GlobalWindow :title="'充值 - ' + (customer.name || '')" :visible.sync="visible" width="820px" :show-confirm="false">
|
<el-tabs v-model="activeTab">
|
<el-tab-pane label="电表充值" name="electrical">
|
<YwCustomerElectricalRechargePanel
|
v-if="activeTab === 'electrical'"
|
:customer="customer"
|
@success="onSuccess"
|
/>
|
</el-tab-pane>
|
<el-tab-pane label="空调充值" name="conditioner">
|
<YwCustomerConditionerRechargePanel
|
v-if="activeTab === 'conditioner'"
|
:customer="customer"
|
@success="onSuccess"
|
/>
|
</el-tab-pane>
|
</el-tabs>
|
</GlobalWindow>
|
</template>
|
|
<script>
|
import GlobalWindow from '@/components/common/GlobalWindow'
|
import YwCustomerElectricalRechargePanel from './YwCustomerElectricalRechargePanel'
|
import YwCustomerConditionerRechargePanel from './YwCustomerConditionerRechargePanel'
|
|
export default {
|
name: 'YwCustomerRechargeWindow',
|
components: { GlobalWindow, YwCustomerElectricalRechargePanel, YwCustomerConditionerRechargePanel },
|
data () {
|
return {
|
visible: false,
|
activeTab: 'electrical',
|
customer: {}
|
}
|
},
|
methods: {
|
open (row, tab) {
|
this.customer = { id: row.id, name: row.name }
|
this.activeTab = tab || 'electrical'
|
this.visible = true
|
},
|
onSuccess () {
|
this.$emit('success')
|
}
|
}
|
}
|
</script>
|