| | |
| | | :span="model.maintenanceStatus&&model.maintenanceStatus!='WAIT_MAINTENANCE'&&model.maintenanceStatus!='UNDER_MAINTENANCE'?10:16"> |
| | | <a-tabs :active-key="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane :key="1" tab="操作工" |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='operator_task'|| |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey==='operator_task'|| |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')"> |
| | | <j-vxe-table ref="editableDetailTable1" :rowNumber="false" rowSelection bordered |
| | | alwaysEdit keep-source |
| | |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="维修工" |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='maintenance_task'|| |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey==='maintenance_task'|| |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')"> |
| | | <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered |
| | | alwaysEdit kee-source |
| | |
| | | v-if="activeTabKey!=='3'" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | (activeTabKey=='1'&&selectedOperatorMaintenanceRowKeys.length == 0)|| |
| | | (activeTabKey=='2'&&selectedRepairerMaintenanceRowKeys.length == 0)" |
| | | (activeTabKey==='1'&&selectedOperatorMaintenanceRowKeys.length === 0)|| |
| | | (activeTabKey==='2'&&selectedRepairerMaintenanceRowKeys.length === 0)" |
| | | slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">批量保养正常 |
| | | </a-button> |
| | |
| | | }, |
| | | computed: { |
| | | displayAdminConfirmFlag() { |
| | | return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE', 'REJECTED'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | displayInspectorConfirmFlag() { |
| | | return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE', 'REJECTED'].includes(this.model.maintenanceStatus) && this.model.manageUserResult === '1' |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | * 主页面点击执行审批时触发 |
| | | * @param record 主页面列表行记录 |
| | | */ |
| | | async handleDetail(record) { |
| | | async handleApprove(record) { |
| | | this.spinning = true |
| | | this.model = {} |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | |
| | | * 主页面点击详情时触发 |
| | | * @param record 主页面列表行记录 |
| | | */ |
| | | recordDetail(record) { |
| | | handleDetail(record) { |
| | | this.spinning = true |
| | | this.activeTabKey = 1 |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | |
| | | that.confirmLoading = that.spinning = true |
| | | |
| | | // 仅在保养中状态传递表格列表 |
| | | if (this.model.maintenanceStatus == 'UNDER_MAINTENANCE') { |
| | | if (this.model.maintenanceStatus === 'UNDER_MAINTENANCE') { |
| | | for (let index = 1; index <= 2; index++) { |
| | | if (that.$refs['editableDetailTable' + index]) { |
| | | this.model.tableDetailList = that.$refs['editableDetailTable' + index].getTableData() |
| | |
| | | handleTabToFirstTable() { |
| | | this.$nextTick(() => { |
| | | console.log('taskDefKey', this.selectShenpiData.taskDefKey) |
| | | if ((this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey == 'operator_task') || !this.selectShenpiData.taskDefKey) this.activeTabKey = 1 |
| | | else if (this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey == 'maintenance_task') this.activeTabKey = 2 |
| | | if ((this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey === 'operator_task') || !this.selectShenpiData.taskDefKey) this.activeTabKey = 1 |
| | | else if (this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey === 'maintenance_task') this.activeTabKey = 2 |
| | | }) |
| | | }, |
| | | |
| | |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory == 'OPERATOR_MAINTENANCE') |
| | | this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory == 'REPAIRER_MAINTENANCE') |
| | | this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory === 'OPERATOR_MAINTENANCE') |
| | | this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory === 'REPAIRER_MAINTENANCE') |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // 批量选择所有点检结果 |
| | | handleSelectAllInspectionResult() { |
| | | let selectedRowKeys, prefix |
| | | if (this.activeTabKey == 1) { |
| | | if (this.activeTabKey === 1) { |
| | | selectedRowKeys = this.selectedOperatorMaintenanceRowKeys |
| | | prefix = 'operator' |
| | | } |
| | | else if (this.activeTabKey == 2) { |
| | | else if (this.activeTabKey === 2) { |
| | | selectedRowKeys = this.selectedRepairerMaintenanceRowKeys |
| | | prefix = 'repairer' |
| | | } |
| | | else selectedRowKeys = [] |
| | | if (selectedRowKeys.length == 0) return |
| | | if (selectedRowKeys.length === 0) return |
| | | |
| | | selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail[prefix + 'MaintenanceList'].find(item => item.id === key) |