¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered='false' :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form layout='inline' @keyup.enter.native='searchQuery'> |
| | | <a-row :gutter='24'> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class='table-operator' v-if="repairOrderSelectionRows.length == 1 && repairOrderSelectionRows[0].auditStatus == 'notSubmitted'"> |
| | | <a-button @click='handleAdd' type='primary' icon='plus' >æ°å¢</a-button> |
| | | <a-dropdown v-if='selectedRowKeys.length > 0'> |
| | | <a-menu slot='overlay'> |
| | | <a-menu-item key='1' @click='batchDel'> |
| | | <a-icon type='delete' /> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style='margin-left: 8px'> æ¹éæä½ |
| | | <a-icon type='down' /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <!-- <div class='ant-alert ant-alert-info' style='margin-bottom: 16px;'> |
| | | <i class='anticon anticon-info-circle ant-alert-icon'></i> 已鿩 <a |
| | | style='font-weight: 600'>{{ selectedRowKeys.length }}</a>项 |
| | | <a style='margin-left: 24px' @click='onClearSelected'>æ¸
空</a> |
| | | </div> --> |
| | | |
| | | <a-table |
| | | ref='table' |
| | | size='middle' |
| | | bordered |
| | | rowKey='id' |
| | | :scroll='{x:true}' |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | @change='handleTableChange'> |
| | | |
| | | |
| | | <span slot='action' slot-scope='text, record'> |
| | | <a @click='handleEdit(record)'>ç¼è¾</a> |
| | | <a-divider type='vertical' /> |
| | | <a-popconfirm title='ç¡®å®å é¤å?' @confirm='() => handleDelete(record.id)'> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <repair-order-actual-hours-report-model |
| | | ref='modalForm' |
| | | @ok='modalFormOk' |
| | | :reportAfterRepairId = "this.mainId" |
| | | > |
| | | </repair-order-actual-hours-report-model> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import RepairOrderActualHoursReportModel |
| | | from '../repairOrderFinishedReport/modules/RepairOrderActualHoursReportModel.vue' |
| | | |
| | | export default { |
| | | name: 'RepairOrderActualWorkHoursList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | RepairOrderActualHoursReportModel |
| | | }, |
| | | props: { |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | }, |
| | | }, |
| | | watch: { |
| | | mainId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | console.log(val) |
| | | if (!this.mainId) { |
| | | |
| | | this.clearList() |
| | | } else { |
| | | |
| | | this.queryParam['reportAfterRepairId'] = val |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '维修工å管ç页é¢', |
| | | disableMixinCreated: true, |
| | | repairOrderSelectionRows:[], |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '人åç¼ç ', |
| | | dataIndex: 'userNum', |
| | | align: 'center', |
| | | |
| | | }, |
| | | { |
| | | title: '人ååç§°', |
| | | dataIndex: 'realName', |
| | | align: 'center', |
| | | |
| | | }, |
| | | // { |
| | | // title: 'æå±çç»', |
| | | // dataIndex: 'teamName', |
| | | // align: 'center', |
| | | |
| | | // }, |
| | | { |
| | | title: 'å®é
å·¥æ¶', |
| | | dataIndex: 'actualHour', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/reportAfterRepair/listRepairOrderActualWorkHoursByMainId', |
| | | delete: '/eam/repairOrder/deleteRepairOrderActualWorkHours', |
| | | deleteBatch: '/eam/repairOrder/deleteBatchRepairOrderActualWorkHours', |
| | | exportXlsUrl: '/eam/repairOrder/exportRepairOrderActualWorkHours', |
| | | importUrl: '/eam/repairOrder/importRepairOrderActualWorkHours' |
| | | }, |
| | | dictOptions: {} |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('repairOrderSelectionRows', (data) => { |
| | | this.repairOrderSelectionRows = data |
| | | }) |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | handleAdd: function() { |
| | | this.$refs.modalForm.add(this.repairOrderSelectionRows) |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |