| | |
| | | <template> |
| | | <GlobalWindow title="关联设备" :visible.sync="visible" width="920px" :show-confirm="false"> |
| | | <div v-if="readonly" class="readonly-tip">设备由租赁合同自动关联,仅支持查看</div> |
| | | <div class="merchant-info"> |
| | | <div class="merchant-info__item"> |
| | | <span class="merchant-info__label">客户类型</span> |
| | |
| | | </div> |
| | | <el-tabs v-model="activeTab" class="device-tabs"> |
| | | <el-tab-pane label="关联电表" name="electrical"> |
| | | <YwCustomerElectricalTab :customer-id="customer.id" :active="activeTab === 'electrical'" @success="$emit('success')"/> |
| | | <YwCustomerElectricalTab :customer-id="customer.id" :active="activeTab === 'electrical'" :readonly="readonly"/> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="关联空调" name="conditioner"> |
| | | <YwCustomerConditionerTab :customer-id="customer.id" :active="activeTab === 'conditioner'" @success="$emit('success')"/> |
| | | <YwCustomerConditionerTab :customer-id="customer.id" :active="activeTab === 'conditioner'" :readonly="readonly"/> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </GlobalWindow> |
| | |
| | | export default { |
| | | name: 'YwCustomerDeviceWindow', |
| | | components: { GlobalWindow, YwCustomerElectricalTab, YwCustomerConditionerTab }, |
| | | props: { |
| | | /** 只读查看(合同自动关联,不可手动增删) */ |
| | | readonly: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | visible: false, |
| | |
| | | .device-tabs { |
| | | margin-top: 4px; |
| | | } |
| | | .readonly-tip { |
| | | margin-bottom: 12px; |
| | | padding: 8px 12px; |
| | | font-size: 13px; |
| | | color: #909399; |
| | | background: #fdf6ec; |
| | | border-radius: 4px; |
| | | } |
| | | </style> |