| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button @click="handleBatchAdd" type="primary" icon="plus">批量新增</a-button> |
| | | <a-button v-has="'secondMaintenanceOrder:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchAdd" type="primary" icon="plus">批量新增</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="handlerBatchAbolish"> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchAbolish'" key="1" @click="handlerBatchAbolish"> |
| | | <a-icon type="delete"/> |
| | | 作废 |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="handlerBatchCollect"> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchCollect'" key="2" @click="handlerBatchCollect"> |
| | | <a-icon type="form"/> |
| | | 领取 |
| | | </a-menu-item> |
| | | <a-menu-item key="3" @click="handlerBatchRestore"> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchRestore'" key="3" @click="handlerBatchRestore"> |
| | | <a-icon type="reload"/> |
| | | 还原 |
| | | </a-menu-item> |
| | |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <a v-has="'secondMaintenanceOrder:edit'" @click="handleEdit(record)">编辑</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider v-has="'secondMaintenanceOrder:edit'" type="vertical"/> |
| | | |
| | | <a-popconfirm title="确定领取吗?" @confirm="() => handlerCollect(record.id)"> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:collect'" title="确定领取吗?" @confirm="() => handlerCollect(record.id)"> |
| | | <a>领取</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider v-has="'secondMaintenanceOrder:collect'" type="vertical"/> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="确定作废吗?" @confirm="() => handleAbolish(record.id)"> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:abolish'" title="确定作废吗?" @confirm="() => handlerAbolish(record.id)"> |
| | | <a>作废</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | |
| | | |
| | | <a-divider v-if="record.maintenanceStatus === 'ABOLISH'" type="vertical"/> |
| | | <a-divider v-has="'secondMaintenanceOrder:restore'" v-if="record.maintenanceStatus === 'ABOLISH'" type="vertical"/> |
| | | |
| | | <a-popconfirm v-if="record.maintenanceStatus === 'ABOLISH'" title="确定还原吗?" @confirm="() => handlerRestore(record.id)"> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:restore'" v-if="record.maintenanceStatus === 'ABOLISH'" title="确定还原吗?" @confirm="() => handlerRestore(record.id)"> |
| | | <a>还原</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider type="vertical" v-if="record.maintenanceStatus === 'COMPLETE'"/> |
| | | <a v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">打印</a> |
| | | <!-- <a-divider v-has="'secondMaintenanceOrder:print'" type="vertical" v-if="record.maintenanceStatus === 'COMPLETE'"/>--> |
| | | <!-- <a v-has="'secondMaintenanceOrder:print'" v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">打印</a>--> |
| | | </template> |
| | | </span> |
| | | </a-table> |