| | |
| | | @change="handleImportExcel"> |
| | | <a-button v-has="'standard:pointInspection'" type="primary" icon="import">ç¹æ£æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button v-has="'standard:pointInspectionDownload'" type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)"> |
| | | <a-button v-has="'standard:pointInspectionDownload'" type="primary" icon="download" |
| | | @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)"> |
| | | ç¹æ£æ 忍¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="secondMaintenanceImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button v-has="'standard:secondMaintenance'" type="primary" icon="import">äºä¿æ å导å
¥</a-button> |
| | | <a-button v-has="'standard:secondMaintenance'" type="primary" icon="import">äºä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button v-has="'standard:secondMaintenanceDownload'" type="primary" icon="download" |
| | | <a-button v-has="'standard:secondMaintenanceDownload'" type="primary" icon="download" |
| | | @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">äºä¿æ 忍¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | |
| | | @change="handleImportExcel"> |
| | | <a-button v-has="'standard:ThirdMaintenance'" type="primary" icon="import">ä¸ä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button v-has="'standard:ThirdMaintenanceDownload'" type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)"> |
| | | <a-button v-has="'standard:ThirdMaintenanceDownload'" type="primary" icon="download" |
| | | @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)"> |
| | | ä¸ä¿æ 忍¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | |
| | | </div> |
| | | |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" |
| | | :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-has="'standard:upgrade'" v-if="record.standardStatus === 'START'" @click.stop="handleUpgrade(record)">åç</a> |
| | | <a v-has="'standard:upgrade'" v-if="record.standardStatus === 'START'" |
| | | @click.stop="handleUpgrade(record)">åç</a> |
| | | |
| | | <template v-if="record.standardStatus === 'WAIT_SUBMIT'"> |
| | | <a v-has="'standard:edit'" @click.stop="handleEdit(record)">ç¼è¾</a> |
| | |
| | | <a-divider v-has="'standard:saveFlow'" type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a v-has="'standard:del'" @click.stop="event=>event.stopPropagation()">å é¤</a> |
| | | <a v-has="'standard:del'" @click.stop="event=>event.stopPropagation()">å é¤</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | |
| | |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | |
| | | style="width: 100%" |
| | | :filterOption="false" |
| | | @change="handleAsyncChange" |
| | | allowClear |
| | | :allowClear="allowClear" |
| | | :notFoundContent="loading ? undefined : null" |
| | | mode="default" |
| | | > |
| | |
| | | default: 20, |
| | | required: false |
| | | }, |
| | | allowClear:{ |
| | | type:Boolean, |
| | | default:()=>true, |
| | | required:false |
| | | } |
| | | }, |
| | | data() { |
| | | this.loadData = debounce(this.loadData, 800)//æ¶æ |
| | |
| | | |
| | | handleAbolish(id) { |
| | | var that = this |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | this.loading = true |
| | | getAction(that.url.cancelInspectionOrder, { id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | batchZf(type) { |
| | |
| | | |
| | | <!-- ä¿å
»æ¥æ--> |
| | | <template v-slot:maintenanceDate="props"> |
| | | <a-date-picker v-model="props.row.maintenanceDate" value-format="YYYY-MM-DD"/> |
| | | <a-date-picker v-model="props.row.maintenanceDate" value-format="YYYY-MM-DD" :allow-clear="false"/> |
| | | </template> |
| | | |
| | | <!-- æä½--> |
| | |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥åç¼å·"> |
| | | <a-input placeholder="请è¾å
¥å·¥åç¼å·" v-model="queryParam.repairCode"></a-input> |
| | | <a-form-item label="ç»ä¸ç¼ç "> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <!--<a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"/>--> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | <a-form-item label="å·¥åå·"> |
| | | <a-input placeholder="请è¾å
¥å·¥åå·" v-model="queryParam.repairCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ®ç¶æ"> |
| | | <a-select placeholder="è¯·éæ©åæ®ç¶æ" v-model="queryParam.repairStatus" allow-clear> |
| | | <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }} |
| | | </a-select-option> |
| | | </a-select> |
| | | <a-form-item label="ç»´ä¿®ç¶æ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç»´ä¿®ç¶æ" v-model="queryParam.repairStatus" |
| | | dict-code="repair_status"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <!--<a @click="handleToggleSearch" style="margin-left: 8px">--> |
| | | <!--{{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }}--> |
| | | <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> |
| | | <!--</a>--> |
| | | </span> |
| | | </a-col> |
| | | |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus">é¢å</a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('维修工å')">导åº</a-button>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange" |
| | | :scroll="{x:'max-content'}" |
| | | > |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" |
| | | :scroll="{x:'max-content'}"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleFillIn(record)">å¡«æ¥</a> |
| | | <a-divider type="vertical"/> |
| | | <a-popconfirm title="ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record.id)"> |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical"/> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/> |
| | | <!--维修工åå¡«æ¥çªå£--> |
| | | <eam-repair-order-modal ref="modalForm" @ok="modalFormOk"/> |
| | | |
| | | <!--维修工å审æ¹çªå£--> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import ReceiveFaultModal from './modules/EamRepairOrderList/ReceiveFaultModal' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' |
| | | import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal' |
| | | import EamRepairOrderModal from './modules/EamRepairOrderList/EamRepairOrderModal' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'EamRepairOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamRepairOrderModal, |
| | | RepairOrderApprovalModal, |
| | | LxSearchEquipmentSelect, |
| | | ReceiveFaultModal |
| | | LxSearchEquipmentSelect |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: 'å·¥åç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'repairCode', |
| | | width: 120, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | width: 120, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | width: 200, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'repairStatus_dictText', |
| | | fixed: 'left', |
| | | width: 100 |
| | | dataIndex: 'equipmentModel', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®è´è´£äºº', |
| | | title: 'ç»´ä¿®ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'repairer', |
| | | width: 100 |
| | | dataIndex: 'repairStatus_dictText', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | align: 'center', |
| | | dataIndex: 'repairCode' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®å¼å§æ¶é´', |
| | |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '维修确认', |
| | | align: 'center', |
| | | dataIndex: 'repairConfirm_dictText' |
| | | }, |
| | | { |
| | | title: '维修确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'repairConfirmTime', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æ
éåå ', |
| | | align: 'center', |
| | | dataIndex: 'faultReason' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®ç»ææè¿°', |
| | | title: 'æ
éåæ', |
| | | align: 'center', |
| | | dataIndex: 'repairDescription' |
| | | // width: 300 |
| | | dataIndex: 'faultAnalysis' |
| | | }, |
| | | { |
| | | title: 'ææ
è¿ç¨', |
| | | align: 'center', |
| | | dataIndex: 'faultProcess' |
| | | }, |
| | | { |
| | | title: 'é¢é²æªæ½', |
| | | align: 'center', |
| | | dataIndex: 'faultPrevent' |
| | | }, |
| | | { |
| | | title: 'æä½å·¥', |
| | | align: 'center', |
| | | dataIndex: 'confirmer_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½å·¥ç¡®è®¤æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | width: 200 |
| | | } |
| | | // { |
| | | // title: 'ç»´ä¿®å¾ç', |
| | | // align: 'center', |
| | | // dataIndex: 'imageFiles', |
| | | // width: 100 |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦å§å¤', |
| | | // align: 'center', |
| | | // dataIndex: 'outsourcedFlag', |
| | | // width: 100 |
| | | // }, |
| | | // { |
| | | // title: 'å§å¤ç»´ä¿®æè¿°', |
| | | // align: 'center', |
| | | // dataIndex: 'outsourcedRepairDecription', |
| | | // width: 300 |
| | | // }, |
| | | // { |
| | | // title: 'å§å¤ç»´ä¿®å¼å§æ¶é´', |
| | | // align: 'center', |
| | | // dataIndex: 'outsourcedStartTime', |
| | | // width: 200 |
| | | // }, |
| | | // { |
| | | // title: 'å§å¤ç»´ä¿®ç»ææ¶é´', |
| | | // align: 'center', |
| | | // dataIndex: 'outsourcedEndTime', |
| | | // width: 200 |
| | | // }, |
| | | // { |
| | | // title: 'å§å¤è´è´£äºº', |
| | | // align: 'center', |
| | | // dataIndex: 'outsourcedPerson', |
| | | // width: 100 |
| | | // }, |
| | | ], |
| | | report_repair_status_list: [], |
| | | selectRepairOrderData: {}, |
| | | url: { |
| | | list: '/eam/eamRepairOrder/list', |
| | | submit: '/eam/eamRepairOrder/submit', |
| | | delete: '/eam/eamRepairOrder/delete', |
| | | deleteBatch: '/eam/eamRepairOrder/deleteBatch', |
| | | exportXlsUrl: 'eam/eamRepairOrder/exportXls' |
| | | deleteBatch: '/eam/eamRepairOrder/deleteBatch' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | created() { |
| | | if (!this.isDisplayOperation) { |
| | | return |
| | | } |
| | | this.initDictData('report_repair_status') |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 100, |
| | | scopedSlots: { customRender: 'action' } |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' }, |
| | | fixed: 'right' |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·åæ°æ®åå
¸å¼ |
| | | * @param dictCode æ°æ®åå
¸å¯¹åºè®°å½ç¼ç |
| | | * ç¹å»å¡«æ¥æ¶è§¦å |
| | | * @param record |
| | | */ |
| | | initDictData(dictCode) { |
| | | // //ä¼å
ä»ç¼åä¸è¯»ååå
¸é
ç½® |
| | | if (getDictItemsFromCache(dictCode)) { |
| | | this[dictCode + '_list'] = getDictItemsFromCache(dictCode) |
| | | return |
| | | } |
| | | //æ ¹æ®åå
¸Code, åå§ååå
¸æ°ç» |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | this[dictCode + '_list'] = res.result |
| | | return |
| | | } |
| | | }) |
| | | handleFillIn(record) { |
| | | this.$refs.modalForm.title = 'å¡«æ¥' |
| | | this.$refs.modalForm.handleFillIn(record) |
| | | }, |
| | | |
| | | // å¼å¯é¢åæ
éä¿ä¿®åå¼¹çª |
| | | handleOpenReceiveFaultModal() { |
| | | this.$refs.receiveFaultModalRef.visible = true |
| | | /** |
| | | * ç¹å»æäº¤æ¶è§¦å |
| | | * @param id |
| | | */ |
| | | handleSubmit(id) { |
| | | this.loading = true |
| | | getAction(this.url.submit, { id }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.loadData() |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | this.$refs.repairOrderApprovalModal.visible = true |
| | | this.$refs.repairOrderApprovalModal.title = '详æ
' |
| | | this.$refs.repairOrderApprovalModal.disableSubmit = true |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(record) |
| | | this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id }) |
| | | this.$refs.repairOrderApprovalModal.recordDetail(record) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | | </script> |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <!--<a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"/>--> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | <a-col :xl="5" :lg="6" :md="8" :sm="12"> |
| | | <a-form-item label="ç»ä¸ç¼ç "> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="isDisplayOperation"> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="12"> |
| | | <a-form-item label="æ¥ä¿®ç¶æ"> |
| | | <a-select placeholder="è¯·éæ©æ¥ä¿®ç¶æ" v-model="queryParam.reportStatus" allow-clear> |
| | | <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }} |
| | | </a-select-option> |
| | | </a-select> |
| | | <j-dict-select-tag dict-code="report_repair_status" placeholder="è¯·éæ©æ¥ä¿®ç¶æ" |
| | | v-model="queryParam.reportStatus"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ
éæè¿°"> |
| | | <a-input placeholder="请è¾å
¥æ
éæè¿°" v-model="queryParam.faultDescription" allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="5" :lg="6" :md="8" :sm="12"> |
| | | <a-form-item label="æ
éæ¶é´"> |
| | | <a-range-picker showTime v-model="faultTimeRange" value-format="YYYY-MM-DD HH:mm:ss" |
| | | @change="handleTimeRangeChange" |
| | | <a-range-picker v-model="queryParam.dates" value-format="YYYY-MM-DD" @change="handleTimeRangeChange" |
| | | style="width: 100%"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="12"> |
| | | <a-form-item label="æ¯å¦åæº"> |
| | | <a-radio-group v-model="queryParam.breakdownFlag"> |
| | | <a-radio v-for="item in breakdown_flag_list" :value="item.value">{{ item.label }}</a-radio> |
| | | </a-radio-group> |
| | | <j-dict-select-tag type="radio" v-model="queryParam.breakdownFlag" dict-code="yn"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <!-- <a @click="handleToggleSearch" style="margin-left: 8px">--> |
| | | <!-- {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }}--> |
| | | <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> |
| | | <!-- </a>--> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus" >æ°å¢</a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('æ
éæ¥ä¿®')">导åº</a-button>--> |
| | | <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> |
| | | <!--@change="handleImportExcel">--> |
| | | <!--<a-button type="primary" icon="import">导å
¥</a-button>--> |
| | | <!--</a-upload>--> |
| | | <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 style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio',getCheckboxProps:getCheckboxProps}" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="imageFiles" slot-scope="text, record" v-if="text"> |
| | | <a @click="handlePreviewImages(record)">é¢è§</a> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio',getCheckboxProps:getCheckboxProps}" |
| | | @change="handleTableChange"> |
| | | <!--ç»ä¸ç¼ç --> |
| | | <template slot="equipmentCode" slot-scope="text,record"> |
| | | <a href="#" @click="navigateTo('EamRepairOrderList')">{{text}}</a> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record" v-if="record.reportStatus=='WAIT_REPAIR'"> |
| | | <!--æ¯å¦å å·¥--> |
| | | <template slot="isProcessed" slot-scope="text,record"> |
| | | <a href="#" @click="navigateTo('EamReportProductHazardsList')" :disabled="!Boolean(+text)">{{record.isProcessed_dictText}}</a> |
| | | </template> |
| | | |
| | | <!--æ¯å¦åæº--> |
| | | <template slot="breakdownFlag" slot-scope="text"> |
| | | <a-switch checked-children="æ¯" un-checked-children="å¦" :checked="Boolean(+text)" disabled/> |
| | | </template> |
| | | |
| | | <!--设å¤äºæ
--> |
| | | <template slot="isAccidentsRegister" slot-scope="text,record"> |
| | | <a href="#" @click="navigateTo('EamReportAccidentsRegisterList')" :disabled="!Boolean(+text)">{{record.isAccidentsRegister_dictText}}</a> |
| | | </template> |
| | | |
| | | <!--åå¨å ç´ --> |
| | | <template slot="variableFactors" slot-scope="text"> |
| | | <a-switch checked-children="æ¯" un-checked-children="å¦" :checked="Boolean(+text)" disabled/> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click="handleAssign(record)" >ææ´¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleDelete(record.id)" > |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleAbolish(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamReportRepair-modal ref="modalForm" :breakdownFlagList="breakdown_flag_list" :faultReasonList="faultReasonList" |
| | | @ok="modalFormOk"/> |
| | | <!-- å¾çé¢è§å¼¹çª --> |
| | | <images-preview-modal ref="imagesPreviewModalRef" :imageListUrl="currentImageListUrl"/> |
| | | <!--ææ´¾æ¥ä¿®å¼¹çª--> |
| | | <assign-repair-report-modal ref="assignRepairReportModalRef" @ok="modalFormOk"/> |
| | | <eamReportRepair-modal ref="modalForm" @ok="modalFormOk"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamReportRepairModal from './modules/EamReportRepairList/EamReportRepairModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import ImagesPreviewModal from '@views/eam/repair/modules/ImagesPreviewModal.vue' |
| | | import { getAction } from '@/api/manage' |
| | | import AssignRepairReportModal from './modules/EamReportRepairList/AssignRepairReportModal' |
| | | |
| | | |
| | | export default { |
| | | name: 'EamReportRepairList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | AssignRepairReportModal, |
| | | ImagesPreviewModal, |
| | | LxSearchEquipmentSelect, |
| | | EamReportRepairModal |
| | | }, |
| | |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | width: 200 |
| | | fixed: 'left', |
| | | scopedSlots: { customRender: 'equipmentCode' } |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | width: 200 |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'æ¥ä¿®ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'reportStatus_dictText', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'æ
éç®ç§°', |
| | | align: 'center', |
| | | dataIndex: 'faultName', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'æ
éåç±»', |
| | | align: 'center', |
| | | dataIndex: 'faultType_dictText', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'æ
éæè¿°', |
| | | align: 'center', |
| | | dataIndex: 'faultDescription', |
| | | width: 200 |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'æ
éå¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'faultStartTime', |
| | | width: 200 |
| | | dataIndex: 'faultStartTime' |
| | | }, |
| | | { |
| | | title: 'æ
éç°è±¡', |
| | | align: 'center', |
| | | dataIndex: 'faultDescription' |
| | | }, |
| | | { |
| | | title: 'æ¯å¦åæº', |
| | | align: 'center', |
| | | dataIndex: 'breakdownFlag_dictText', |
| | | width: 100 |
| | | dataIndex: 'breakdownFlag', |
| | | scopedSlots: { customRender: 'breakdownFlag' } |
| | | }, |
| | | { |
| | | title: 'æ¥ä¿®å¾ç', |
| | | title: 'æ¯å¦å å·¥', |
| | | align: 'center', |
| | | dataIndex: 'imageFiles', |
| | | scopedSlots: { customRender: 'imageFiles' }, |
| | | width: 100 |
| | | dataIndex: 'isProcessed', |
| | | scopedSlots: { customRender: 'isProcessed' } |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | title: 'æ¹æ¬¡å·', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title: 'å å·¥é¶ä»¶å·', |
| | | align: 'center', |
| | | dataIndex: 'processingPart' |
| | | }, |
| | | { |
| | | title: 'ä»¶æ°', |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title: '设å¤äºæ
', |
| | | align: 'center', |
| | | dataIndex: 'isAccidentsRegister', |
| | | scopedSlots: { customRender: 'isAccidentsRegister' } |
| | | }, |
| | | { |
| | | title: 'åºåä»¶å·', |
| | | align: 'center', |
| | | dataIndex: 'scrapPartNumber' |
| | | }, |
| | | { |
| | | title: 'åºåä»¶æ°', |
| | | align: 'center', |
| | | dataIndex: 'scrapPartQuantity' |
| | | }, |
| | | { |
| | | title: 'åºåä»·å¼', |
| | | align: 'center', |
| | | dataIndex: 'scrapPartValue' |
| | | }, |
| | | { |
| | | title: 'åå¨å ç´ ', |
| | | align: 'center', |
| | | dataIndex: 'variableFactors', |
| | | scopedSlots: { customRender: 'variableFactors' } |
| | | }, |
| | | { |
| | | title: 'åå¨å ç´ å
容', |
| | | align: 'center', |
| | | dataIndex: 'variableFactorsValue_dictText' |
| | | }, |
| | | { |
| | | title: 'äºæ
ç°è±¡', |
| | | align: 'center', |
| | | dataIndex: 'accidentPhenomenon' |
| | | }, |
| | | { |
| | | title: 'éåæªæ½', |
| | | align: 'center', |
| | | dataIndex: 'measure' |
| | | }, |
| | | { |
| | | title: 'é æç»æ', |
| | | align: 'center', |
| | | dataIndex: 'causingResults' |
| | | } |
| | | ], |
| | | breakdown_flag_list: [], |
| | | report_repair_status_list: [], |
| | | faultTimeRange: [], |
| | | faultReasonList: [], |
| | | currentImageListUrl: '', |
| | | url: { |
| | | list: '/eam/eamReportRepair/list', |
| | | delete: '/eam/eamReportRepair/abolish', |
| | | deleteBatch: '/eam/eamReportRepair/abolishBatch', |
| | | exportXlsUrl: 'eam/eamReportRepair/exportXls', |
| | | importExcelUrl: 'eam/eamReportRepair/importExcel', |
| | | faultReasonList: '/eam/equipmentFaultReason/list' |
| | | abolish: '/eam/eamReportRepair/abolish', |
| | | abolishBatch: '/eam/eamReportRepair/abolishBatch' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | created() { |
| | | this.initDictData('breakdown_flag') |
| | | this.initDictData('report_repair_status') |
| | | if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) |
| | | else { |
| | | const operationColumn = { |
| | |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 200 |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.getFaultReasonListByApi() |
| | | } |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·åæ°æ®åå
¸å¼ |
| | | * @param dictCode æ°æ®åå
¸å¯¹åºè®°å½ç¼ç |
| | | */ |
| | | initDictData(dictCode) { |
| | | // //ä¼å
ä»ç¼åä¸è¯»ååå
¸é
ç½® |
| | | if (getDictItemsFromCache(dictCode)) { |
| | | this[dictCode + '_list'] = getDictItemsFromCache(dictCode) |
| | | return |
| | | } |
| | | //æ ¹æ®åå
¸Code, åå§ååå
¸æ°ç» |
| | | ajaxGetDictItems(dictCode, null).then((res) => { |
| | | if (res.success) { |
| | | this[dictCode + '_list'] = res.result |
| | | return |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // è°ç¨æ¥å£è·åæ
éåå å表 |
| | | getFaultReasonListByApi() { |
| | | const that = this |
| | | getAction(this.url.faultReasonList) |
| | | .then(res => { |
| | | console.log('res', res) |
| | | that.faultReasonList = res.result.records |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ
éæ¶é´éæ©å¨ååæ¶è§¦å |
| | | * @param valueArray |
| | |
| | | handleTimeRangeChange(valueArray) { |
| | | this.queryParam.startTime = valueArray[0] |
| | | this.queryParam.endTime = valueArray[1] |
| | | }, |
| | | |
| | | /** |
| | | * é¢è§å¾ç |
| | | * @param imageFiles è¡¨æ ¼è¡å¾çå°å |
| | | */ |
| | | handlePreviewImages({ imageFiles }) { |
| | | this.currentImageListUrl = imageFiles |
| | | this.$refs.imagesPreviewModalRef.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * ææ´¾æ¥ä¿®å |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleAssign(record) { |
| | | this.$refs.assignRepairReportModalRef.visible = true |
| | | this.$refs.assignRepairReportModalRef.model = Object.assign({}, { id: record.id }) |
| | | }, |
| | | |
| | | getCheckboxProps(record) { |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä½åºæ¶è§¦å |
| | | * @param id |
| | | */ |
| | | handleAbolish(id) { |
| | | var that = this |
| | | this.loading = true |
| | | getAction(that.url.abolish, { id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // è·³è½¬é¡µé¢ |
| | | navigateTo(href) { |
| | | this.$router.push('/eam/repair/' + href) |
| | | }, |
| | | |
| | | searchReset() { |
| | | if (this.isDisplayOperation) this.queryParam = {} |
| | | else this.queryParam = Object.assign({}, this.propsQueryParam) |
| | | this.faultTimeRange = [] |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk" |
| | | @cancel="handleCancel" cancelText="å
³é" centered> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ç»´ä¿®å¼å§æ¶é´" prop="actualStartTime" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker show-time v-model="model.actualStartTime" :allowClear="false" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | style="width:100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææ¶é´" prop="actualEndTime" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-date-picker show-time v-model="model.actualEndTime" :allowClear="false" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | style="width:100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ
éåå "> |
| | | <a-textarea placeholder="请è¾å
¥æ
éåå " v-model="model.faultReason"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ
éåæ"> |
| | | <a-textarea placeholder="请è¾å
¥æ
éåæ" v-model="model.faultAnalysis"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ææ
è¿ç¨"> |
| | | <a-textarea placeholder="请è¾å
¥ææ
è¿ç¨" v-model="model.faultProcess"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="é¢é²æªæ½"> |
| | | <a-textarea placeholder="请è¾å
¥é¢é²æªæ½" v-model="model.faultPrevent"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <j-vxe-table ref="editableDetailTable" rowNumber rowSelection bordered alwaysEdit toolbar |
| | | :toolbarConfig="detail.toolbarConfig" keep-source :height="300" |
| | | :dataSource="detail.dataSource" :columns="detail.columns"> |
| | | |
| | | </j-vxe-table> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { postAction, getAction } from '@/api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | |
| | | export default { |
| | | name: 'EamRepairOrderModal', |
| | | components: { LxSearchEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | customSpan: 12, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | validatorRules: { |
| | | actualStartTime: [{ required: true, message: 'è¯·éæ©ç»´ä¿®å¼å§æ¶é´', trigger: 'change' }], |
| | | actualEndTime: [{ required: true, message: 'è¯·éæ©ç»´ä¿®ç»ææ¶é´', trigger: 'change' }] |
| | | }, |
| | | detail: { |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: '维修人', |
| | | key: 'repairUser', |
| | | align: 'center', |
| | | placeholder: '请è¾å
¥${title}', |
| | | type: JVXETypes.input, |
| | | validateRules: [{ required: true, message: '请è¾å
¥${title}' }] |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æ¯ä¸»ç»´ä¿®äºº', |
| | | key: 'repairPrimary', |
| | | align: 'center', |
| | | type: JVXETypes.select, |
| | | placeholder: 'è¯·éæ©${title}', |
| | | dictCode: 'yn', |
| | | validateRules: [{ required: true, message: 'è¯·éæ©${title}' }] |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®æ¶é¿', |
| | | key: 'repairDuration', |
| | | align: 'center', |
| | | placeholder: '请è¾å
¥${title}', |
| | | type: JVXETypes.inputNumber, |
| | | validateRules: [{ required: true, message: '请è¾å
¥${title}' }] |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | key: 'remark', |
| | | align: 'center', |
| | | type: JVXETypes.textarea, |
| | | placeholder: '请è¾å
¥${title}' |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | }, |
| | | url: { |
| | | report: '/eam/eamRepairOrder/report', |
| | | detail: '/eam/eamRepairPerson/list' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleFillIn(record) { |
| | | this.visible = true |
| | | this.model = Object.assign({}, record) |
| | | this.getRepairDetailByApi(record.id) |
| | | }, |
| | | |
| | | getRepairDetailByApi(repairId) { |
| | | this.spinning = true |
| | | this.detail.dataSource = [] |
| | | getAction(this.url.detail, { repairId }) |
| | | .then(res => { |
| | | if (res.success) this.detail.dataSource = res.result |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const errMap = await this.$refs.editableDetailTable.validateTable() |
| | | if (errMap) return |
| | | |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | |
| | | that.model.eamRepairPersonList = that.$refs.editableDetailTable.getTableData() |
| | | |
| | | postAction(that.url.report, that.model) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | fullscreen |
| | | :visible="visible" |
| | | centered |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <j-modal :title="title" fullscreen :visible="visible" :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="disableSubmit"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼å·"> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¯å¦å å·¥"> |
| | | <j-dict-select-tag dict-code="is_processed" type="radio" v-model="model.isProcessed" |
| | | @change="handleRadioChange($event,'faultStartTime,breakdownFlag,' + |
| | | 'faultDescription,batchNumber,processingPart,quantity')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ
éå¼å§æ¶é´"> |
| | | <a-date-picker :disabled="!Boolean(+model.isProcessed)" v-model="model.faultStartTime" value-format="YYYY-MM-DD" style="width:100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¯å¦åæº"> |
| | | <j-dict-select-tag :disabled="!Boolean(+model.isProcessed)" dict-code="yn" placeholder="è¯·éæ©æ¯å¦åæº" v-model="model.breakdownFlag"/> |
| | | <a-form-model-item prop="equipmentId" label="ç»ä¸ç¼ç "> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="model.equipmentId" :allowClear="false"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ
éç°è±¡"> |
| | | <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥æ
éç°è±¡" v-model="model.faultDescription"/> |
| | | <a-form-model-item label="æ¯å¦åæº"> |
| | | <j-dict-select-tag type="radio" dict-code="yn" placeholder="è¯·éæ©æ¯å¦åæº" v-model="model.breakdownFlag"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¹æ¬¡å·"> |
| | | <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥æ¹æ¬¡å·" v-model="model.batchNumber"/> |
| | | <a-form-model-item label="æ
éå¼å§æ¶é´" prop="faultStartTime"> |
| | | <a-date-picker v-model="model.faultStartTime" :allowClear="false" value-format="YYYY-MM-DD" |
| | | style="width:100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ
éç°è±¡" prop="faultDescription" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-textarea placeholder="请è¾å
¥æ
éç°è±¡" v-model="model.faultDescription"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¯å¦å å·¥"> |
| | | <j-dict-select-tag dict-code="yn" type="radio" v-model="model.isProcessed" |
| | | @change="handleRadioChange($event,'batchNumber,processingPart,quantity')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="å å·¥é¶ä»¶å·"> |
| | | <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥å å·¥é¶ä»¶å·" v-model="model.processingPart"/> |
| | | <a-form-model-item label="æ¹æ¬¡å·" prop="batchNumber"> |
| | | <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥æ¹æ¬¡å·" v-model="model.batchNumber"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ä»¶æ°"> |
| | | <a-input-number :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥ä»¶æ°" v-model="model.quantity" :min="0" style="width: 100%"/> |
| | | <a-form-model-item label="å å·¥é¶ä»¶å·" prop="processingPart"> |
| | | <a-input :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥å å·¥é¶ä»¶å·" |
| | | v-model="model.processingPart"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="ä»¶æ°" prop="quantity"> |
| | | <a-input-number :disabled="!Boolean(+model.isProcessed)" placeholder="请è¾å
¥ä»¶æ°" v-model="model.quantity" |
| | | :min="0" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="设å¤äºæ
"> |
| | | <j-dict-select-tag dict-code="yn" placeholder="è¯·éæ©è®¾å¤äºæ
" v-model="model.isAccidentsRegister"/> |
| | | <j-dict-select-tag dict-code="yn" type="radio" placeholder="è¯·éæ©è®¾å¤äºæ
" |
| | | v-model="model.isAccidentsRegister" @change="handleRadioChange($event,'scrapPartNumber,scrapPartQuantity,' + |
| | | 'scrapPartValue,operationCertificate,powerOffRestart,batchFirstPiece,variableFactors,variableFactorsValue,'+ |
| | | 'executeNc,accidentPhenomenon,measure,causingResults')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="åºåä»¶å·"> |
| | | <a-input placeholder="请è¾å
¥åºåä»¶å·" v-model="model.scrapPartNumber"/> |
| | | <a-form-model-item label="åºåä»¶å·" prop="scrapPartNumber"> |
| | | <a-input placeholder="请è¾å
¥åºåä»¶å·" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | v-model="model.scrapPartNumber"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="åºåä»¶æ°"> |
| | | <a-input-number placeholder="请è¾å
¥åºåä»¶æ°" v-model="model.scrapPartQuantity" :min="0" style="width: 100%"/> |
| | | <a-form-model-item label="åºåä»¶æ°" prop="scrapPartQuantity"> |
| | | <a-input-number placeholder="请è¾å
¥åºåä»¶æ°" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | v-model="model.scrapPartQuantity" :min="0" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="åºåä»·å¼"> |
| | | <a-input placeholder="请è¾å
¥åºåä»·å¼" v-model="model.scrapPartValue"/> |
| | | <a-form-model-item label="åºåä»·å¼" prop="scrapPartValue"> |
| | | <a-input-number placeholder="请è¾å
¥åºåä»·å¼" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | v-model="model.scrapPartValue" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¯å¦æè®¾å¤æä½è¯"> |
| | | <j-dict-select-tag dict-code="yn" placeholder="è¯·éæ©æ¯å¦æè®¾å¤æä½è¯" v-model="model.operationCertificate"/> |
| | | <j-dict-select-tag dict-code="yn" type="radio" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | placeholder="è¯·éæ©æ¯å¦æè®¾å¤æä½è¯" |
| | | v-model="model.operationCertificate"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¯å¦æçµéå¯"> |
| | | <j-dict-select-tag dict-code="yn" placeholder="è¯·éæ©æ¯å¦æçµéå¯" v-model="model.powerOffRestart"/> |
| | | <j-dict-select-tag dict-code="yn" type="radio" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | placeholder="è¯·éæ©æ¯å¦æçµéå¯" v-model="model.powerOffRestart"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ¯å¦ä¸ºæ¹æ¬¡é¦ä»¶"> |
| | | <j-dict-select-tag dict-code="yn" placeholder="è¯·éæ©æ¯å¦ä¸ºæ¹æ¬¡é¦ä»¶" v-model="model.batchFirstPiece"/> |
| | | <j-dict-select-tag dict-code="yn" type="radio" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | placeholder="è¯·éæ©æ¯å¦ä¸ºæ¹æ¬¡é¦ä»¶" |
| | | v-model="model.batchFirstPiece"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="åå¨å ç´ "> |
| | | <j-dict-select-tag dict-code="yn" placeholder="è¯·éæ©åå¨å ç´ " v-model="model.variableFactors"/> |
| | | <a-form-model-item label="åå¨å ç´ " prop="variableFactors"> |
| | | <j-dict-select-tag type="radio" dict-code="yn" :disabled="!Boolean(+model.isAccidentsRegister)" |
| | | placeholder="è¯·éæ©åå¨å ç´ " v-model="model.variableFactors" |
| | | @change="handleRadioChange($event,'variableFactorsValue')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="åå¨å ç´ å
容"> |
| | | <j-dict-select-tag dict-code="variable_factors_value" placeholder="è¯·éæ©åå¨å ç´ å
容" v-model="model.variableFactorsValue"/> |
| | | <a-form-model-item label="åå¨å ç´ å
容" prop="variableFactorsValue"> |
| | | <j-dict-select-tag dict-code="variable_factors_value" :disabled="!Boolean(+model.variableFactors)" |
| | | placeholder="è¯·éæ©åå¨å ç´ å
容" |
| | | v-model="model.variableFactorsValue"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="æ§è¡ç¨åº"> |
| | | <a-input placeholder="请è¾å
¥æ§è¡ç¨åº" v-model="model.executeNc"/> |
| | | <a-input placeholder="请è¾å
¥æ§è¡ç¨åº" v-model="model.executeNc" |
| | | :disabled="!Boolean(+model.isAccidentsRegister)"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="äºæ
ç°è±¡"> |
| | | <a-input placeholder="请è¾å
¥äºæ
ç°è±¡" v-model="model.accidentPhenomenon"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="éåæªæ½"> |
| | | <a-input placeholder="请è¾å
¥éåæªæ½" v-model="model.measure"/> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="äºæ
ç°è±¡" prop="accidentPhenomenon" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-textarea placeholder="请è¾å
¥äºæ
ç°è±¡" v-model="model.accidentPhenomenon" |
| | | :disabled="!Boolean(+model.isAccidentsRegister)"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="é æç»æ"> |
| | | <a-input placeholder="请è¾å
¥é æç»æ" v-model="model.causingResults"/> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="éåæªæ½" prop="measure" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea placeholder="请è¾å
¥éåæªæ½" v-model="model.measure" |
| | | :disabled="!Boolean(+model.isAccidentsRegister)"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="customSpan"> |
| | | <a-form-model-item label="夿³¨"> |
| | | <a-input placeholder="请è¾å
¥å¤æ³¨" v-model="model.measure"/> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="é æç»æ" prop="causingResults" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-textarea placeholder="请è¾å
¥é æç»æ" v-model="model.causingResults" |
| | | :disabled="!Boolean(+model.isAccidentsRegister)"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | </a-spin> |
| | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'EamReportRepairModal', |
| | | components: { LxSearchEquipmentSelect }, |
| | | props: { |
| | | breakdownFlagList: { |
| | | type: Array |
| | | }, |
| | | faultReasonList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | faultStartTime: [ |
| | | { required: true, message: 'è¯·éæ©æ
éå¼å§æ¶é´' } |
| | | ], |
| | | breakdownFlag: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦åæº' } |
| | | ], |
| | | equipmentId: [ |
| | | { required: true, message: '请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢' } |
| | | ], |
| | | faultName: [ |
| | | { required: true, message: 'è¯·éæ©æ
éç®ç§°' } |
| | | ], |
| | | faultDescription: [ |
| | | { required: true, message: '请è¾å
¥æ
éæè¿°' } |
| | | ] |
| | | equipmentId: [{ required: true, message: '请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢', trigger: 'change' }], |
| | | faultStartTime: [{ required: true, message: 'è¯·éæ©æ
éå¼å§æ¶é´', trigger: 'change' }], |
| | | faultDescription: [{ required: true, message: '请è¾å
¥æ
éç°è±¡', trigger: 'change' }], |
| | | batchNumber: [{ |
| | | validator: this.isProcessedRelatedValidator, |
| | | message: '请è¾å
¥æ¹æ¬¡å·', |
| | | trigger: 'change' |
| | | }], |
| | | processingPart: [{ |
| | | validator: this.isProcessedRelatedValidator, |
| | | message: '请è¾å
¥å å·¥é¶ä»¶å·', |
| | | trigger: 'change' |
| | | }], |
| | | quantity: [{ |
| | | validator: this.isProcessedRelatedValidator, |
| | | message: '请è¾å
¥ä»¶æ°', |
| | | trigger: 'change' |
| | | }], |
| | | scrapPartNumber: [{ |
| | | validator: this.isAccidentsRegisterRelatedValidator, |
| | | message: '请è¾å
¥åºåä»¶å·', |
| | | trigger: 'change' |
| | | }], |
| | | scrapPartQuantity: [{ |
| | | validator: this.isAccidentsRegisterRelatedValidator, |
| | | message: '请è¾å
¥åºåä»¶æ°', |
| | | trigger: 'change' |
| | | }], |
| | | scrapPartValue: [{ |
| | | validator: this.isAccidentsRegisterRelatedValidator, |
| | | message: '请è¾å
¥åºåä»·å¼', |
| | | trigger: 'change' |
| | | }], |
| | | variableFactors: [{ |
| | | validator: this.isAccidentsRegisterRelatedValidator, |
| | | message: 'è¯·éæ©åå¨å ç´ ', |
| | | trigger: 'change' |
| | | }], |
| | | variableFactorsValue: [{ |
| | | validator: this.variableFactorsValueValidator, |
| | | message: 'è¯·éæ©åå¨å ç´ å
容', |
| | | trigger: 'change' |
| | | }], |
| | | accidentPhenomenon: [{ |
| | | validator: this.isAccidentsRegisterRelatedValidator, |
| | | message: '请è¾å
¥äºæ
ç°è±¡', |
| | | trigger: 'change' |
| | | }], |
| | | measure: [{ validator: this.isAccidentsRegisterRelatedValidator, message: '请è¾å
¥éåæªæ½', trigger: 'change' }], |
| | | causingResults: [{ |
| | | validator: this.isAccidentsRegisterRelatedValidator, |
| | | message: '请è¾å
¥é æç»æ', |
| | | trigger: 'change' |
| | | }] |
| | | }, |
| | | url: { |
| | | add: '/eam/eamReportRepair/add', |
| | |
| | | this.editable = true |
| | | //åå§åé»è®¤å¼ |
| | | this.model = { |
| | | isProcessed: 0, |
| | | breakdownFlag: '1', |
| | | isProcessed: '0', |
| | | isAccidentsRegister: '0' |
| | | } |
| | | this.visible = true |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record, { imageFilesResult: record.imageFiles && this.isJSON(record.imageFiles) ? JSON.parse(record.imageFiles) : null }) |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | |
| | | handleFaultNameChange(value) { |
| | | const faultReasonItem = this.faultReasonList.find(item => item.faultName === value) |
| | | this.model.faultType = faultReasonItem.faultCategory |
| | | this.model.faultType_dictText = faultReasonItem.faultCategory_dictText |
| | | this.model.faultDescription = faultReasonItem.faultDescription |
| | | }, |
| | | |
| | | handleOk() { |
| | |
| | | httpUrl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | httpAction(httpUrl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | httpAction(httpUrl, this.model, method) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 夿æ¯ä¸æ¯JSONå符串 |
| | | isJSON(str) { |
| | | try { |
| | | JSON.parse(str) |
| | | return true // 妿è¿é没ææåºå¼å¸¸ï¼è¯´ææ¯JSONæ ¼å¼çå符串 |
| | | } catch (e) { |
| | | return false // 妿æåºå¼å¸¸ï¼è¯´æä¸æ¯JSONæ ¼å¼çå符串 |
| | | } |
| | | }, |
| | | |
| | | /**\ |
| | |
| | | if (key.includes(',')) { |
| | | const keys = key.split(',') |
| | | keys.forEach(key => { |
| | | if (value === '0') delete this.model[key] |
| | | if (value != '1') delete this.model[key] |
| | | this.$refs.form.clearValidate(key) |
| | | }) |
| | | }else { |
| | | if (value === '0') delete this.model[key] |
| | | } else { |
| | | if (value != '1') delete this.model[key] |
| | | this.$refs.form.clearValidate(key) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¦ç¨æ¥æ |
| | | * @params current 被ç¦ç¨çæ¶é´ |
| | | * æ ¹æ®æ¯å¦å 工忮µæ ¡éªç¸å
³å段 |
| | | * @param rule |
| | | * @param value ç¸å
³åæ®µå¼ |
| | | * @param callback ç»æåè°å½æ° |
| | | */ |
| | | disabledDate(current) { |
| | | // Can not select days after today |
| | | return current > moment().endOf('day') |
| | | }, |
| | | |
| | | /** |
| | | * ç¦ç¨æ¥æä¸çæ¶é´ |
| | | * @returns {{disabledHours: (function(): Array), disabledMinutes: (function(): Array)}} |
| | | */ |
| | | disabledTime() { |
| | | function range(start, end) { |
| | | const result = [] |
| | | for (let i = start; i < end; i++) { |
| | | result.push(i) |
| | | isProcessedRelatedValidator(rule, value, callback) { |
| | | if (this.model.isProcessed == '1') { |
| | | if (!value) { |
| | | callback(new Error()) |
| | | } else { |
| | | callback() |
| | | } |
| | | return result |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | |
| | | return { |
| | | disabledHours: () => range(moment().hour() + 1, 24), |
| | | disabledMinutes: () => range(moment().minute() + 1, 60), |
| | | disabledSeconds: () => range(moment().second() + 1, 60) |
| | | /** |
| | | * æ ¹æ®è®¾å¤äºæ
åæ®µæ ¡éªç¸å
³å段 |
| | | * @param rule |
| | | * @param value ç¸å
³åæ®µå¼ |
| | | * @param callback ç»æåè°å½æ° |
| | | */ |
| | | isAccidentsRegisterRelatedValidator(rule, value, callback) { |
| | | if (this.model.isAccidentsRegister == '1') { |
| | | if (!value) { |
| | | callback(new Error()) |
| | | } else { |
| | | callback() |
| | | } |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * åå¨å ç´ å
å®¹æ ¡éª |
| | | * @param rule |
| | | * @param value åå¨å ç´ å
容忮µå¼ |
| | | * @param callback ç»æåè°å½æ° |
| | | */ |
| | | variableFactorsValueValidator(rule, value, callback) { |
| | | if (this.model.variableFactors == '1') { |
| | | if (!value) { |
| | | callback(new Error()) |
| | | } else { |
| | | callback() |
| | | } |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <technical-status-evaluation-order-change-approval-modal ref="evaluationOrderChangeApprovalModal" |
| | | :selectShenpiData="selectedRowData" |
| | | @modalFormOk="modalFormOk"/> |
| | | |
| | | <!--维修工å--> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectedRowData" |
| | | @modalFormOk="modalFormOk"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ThirdMaintenanceApprovalModal from './thirdMaintenance/ThirdMaintenanceApprovalModal' |
| | | import TechnicalStatusEvaluationOrderChangeApprovalModal |
| | | from './TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal' |
| | | import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal' |
| | | |
| | | export default { |
| | | name: 'FlowTodo', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | RepairOrderApprovalModal, |
| | | TechnicalStatusEvaluationOrderChangeApprovalModal, |
| | | ThirdMaintenanceApprovalModal, |
| | | SecondMaintenanceApprovalModal, |
| | |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(record) |
| | | break |
| | | case 'eam_repair': |
| | | this.handleRepairOrder(record) |
| | | break |
| | | case 'second_maintenance': |
| | | this.handleSecondMaintenance(record) |
| | | break |
| | |
| | | break |
| | | case 'EVALUATION_ORDER_CHANGE_PROCESS': |
| | | this.handleEvaluationOrderChange(record) |
| | | break |
| | | case 'eam_repair_order': |
| | | this.handleRepairOrder(record) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | |
| | | * @param record |
| | | */ |
| | | handleRepairOrder(record) { |
| | | this.selectRepairOrderData = Object.assign({}, record) |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.repairOrderApprovalModal.visible = true |
| | | this.$refs.repairOrderApprovalModal.title = record.name |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(record) |
| | | this.$refs.repairOrderApprovalModal.getBasicInformation(record) |
| | | this.$refs.repairOrderApprovalModal.handleDetail(record) |
| | | }, |
| | | |
| | | batchHandle() { |
| | |
| | | <template> |
| | | <j-modal |
| | | :width="1200" |
| | | :visible="visible" |
| | | :title="title" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handCancel" |
| | | @ok="submitForm" |
| | | :mask-closable="false" |
| | | :confirmLoading="confirmLoading" |
| | | centered |
| | | > |
| | | <j-modal :width="1200" :visible="visible" :title="title" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handCancel" @ok="submitForm" :mask-closable="false" :confirmLoading="confirmLoading" fullscreen> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model='tableRowRecord' :rules='validatorRules' :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol'> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">æ¥ä¿®åºç¡ä¿¡æ¯</a-divider> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong"> |
| | | <a-row :gutter="24" id="outer-row"> |
| | | <a-col :span="8" class="scroll-col"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="åºç¡ä¿¡æ¯"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç»´ä¿®å¼å§æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.actualStartTime" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-model="model.actualEndTime" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ
éåå "> |
| | | <a-textarea v-model="model.faultReason" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="æ
éåæ"> |
| | | <a-textarea v-model="model.faultAnalysis" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ææ
è¿ç¨"> |
| | | <a-textarea v-model="model.faultProcess" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="é¢é²æªæ½"> |
| | | <a-textarea v-model="model.faultPrevent" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-row> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='å·¥åç¼å·'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairCode'/> |
| | | </a-form-model-item> |
| | | <!--维修人æç»--> |
| | | <a-col class="scroll-col" :span="10"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="维修人æç»"> |
| | | <j-vxe-table ref="editableDetailTable" rowNumber bordered keep-source :dataSource="detail.dataSource" |
| | | :columns="detail.columns"/> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='设å¤ç¼å·'> |
| | | <lx-search-equipment-select disabled v-model='tableRowRecord.equipmentId'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='ç»´ä¿®è´è´£äºº'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairer'/> |
| | | </a-form-model-item> |
| | | |
| | | <!--å³ä¾§å®¡æ¹å--> |
| | | <a-col :span="6" class="scroll-col"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="æä½å·¥ç¡®è®¤"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmResult" label="确认类å"> |
| | | <j-dict-select-tag type='radio' v-model='model.confirmResult' dictCode='approve_reject' |
| | | placeholder="è¯·éæ©ç¡®è®¤ç±»å" |
| | | :disabled="disableSubmit || model.repairStatus!='PENDING_CONFIRMATION'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.confirmComment" |
| | | :disabled="disableSubmit || model.repairStatus!='PENDING_CONFIRMATION'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="threeColSpan"> |
| | | <a-form-model-item label="æ
éå¼å§æ¶é´"> |
| | | <a-input :readOnly='inputReadOnly' v-model="tableRowRecord.faultStartTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="threeColSpan"> |
| | | <a-form-model-item label="æ¯å¦åæº"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.breakdownFlag' dictCode='breakdown_flag' |
| | | disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='threeColSpan*3'> |
| | | <a-form-model-item label='æ¥ä¿®å¾ç' :labelCol='labelColLong' :wrapperCol='wrapperColLong'> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" disabled :number="3" |
| | | v-model="tableRowRecord.reportImageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ç»´ä¿®å¤ç"> |
| | | |
| | | <div v-if="repairConfirm"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">维修确认</a-divider> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirm" label="æ¯å¦å
é¨å¯ç»´ä¿®"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.repairConfirm' dictCode='yn' |
| | | placeholder="è¯·éæ©" :disabled="disableSubmit || tableRowRecord.repairStatus !== 'WAIT_INTERNAL_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmComment" label="维修确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="tableRowRecord.repairConfirmComment" |
| | | :readOnly="disableSubmit || tableRowRecord.repairStatus !== 'WAIT_INTERNAL_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="underInternalRepair && tableRowRecord.repairConfirm === '1'"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">ç»´ä¿®ç»æ</a-divider> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ
éåå " prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.faultReason" rows="4" |
| | | placeholder="请è¾å
¥æ
éåå "/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææè¿°" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.repairDescription" |
| | | placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®å¾ç" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="leaderConfirm && tableRowRecord.repairConfirm === '0'"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">é¢å¯¼ç¡®è®¤</a-divider> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leaderConfirm" label="æ¯å¦åæå¤é¨ç»´ä¿®"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.leaderConfirm' dictCode='approved_rejected' |
| | | placeholder="è¯·éæ©" :disabled="disableSubmit || tableRowRecord.repairStatus!=='WAIT_LEADER_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leaderConfirmComment" label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="tableRowRecord.leaderConfirmComment" |
| | | :readOnly="disableSubmit || tableRowRecord.repairStatus!=='WAIT_LEADER_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="underInternalRepair && tableRowRecord.leaderConfirm === '2'"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">ç»´ä¿®ç»æ</a-divider> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ
éåå " prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.faultReason" rows="4" |
| | | placeholder="请è¾å
¥æ
éåå "/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææè¿°" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.repairDescription" |
| | | placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®å¾ç" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="externalConfirm && tableRowRecord.leaderConfirm === '1'"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">æºå¨å确认</a-divider> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="externalConfirm" label="æºå¨åæ¯å¦å¯ç»´ä¿®"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.externalConfirm' dictCode='yn' |
| | | placeholder="è¯·éæ©" :disabled="disableSubmit||tableRowRecord.repairStatus!=='WAIT_EXTERNAL_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="externalConfirmComment" label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="tableRowRecord.externalConfirmComment" |
| | | :readOnly="disableSubmit || tableRowRecord.repairStatus!=='WAIT_EXTERNAL_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="underExternalRepair && tableRowRecord.externalConfirm === '1'"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">æºå¨åç»´ä¿®ç»æ</a-divider> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ
éåå " prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_EXTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.faultReason" rows="4" |
| | | placeholder="请è¾å
¥æ
éåå "/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææè¿°" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_EXTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.repairDescription" |
| | | placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®å¾ç" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_EXTERNAL_REPAIR'" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="underOutsideRepair && tableRowRecord.externalConfirm === '0'"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">å§å¤ç»´ä¿®ç»æ</a-divider> |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="æ
éåå " prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_OUTSIDE_REPAIR'" |
| | | v-model="tableRowRecord.faultReason" rows="4" |
| | | placeholder="请è¾å
¥æ
éåå "/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®ç»ææè¿°" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_OUTSIDE_REPAIR'" |
| | | v-model="tableRowRecord.repairDescription" |
| | | placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="ç»´ä¿®å¾ç" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_OUTSIDE_REPAIR'" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="operatorConfirm"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">æä½å·¥ç¡®è®¤</a-divider> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="confirmComment" label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="tableRowRecord.confirmComment" |
| | | :readOnly="disableSubmit || tableRowRecord.repairStatus!=='WAIT_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨èç¹'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> |
| | | <div> |
| | | <h3 style="font-weight: bold;">{{item.taskName}}</h3> |
| | | <div>å¤ç人ï¼{{item.assignee_dictText}}</div> |
| | | <div v-if="index !==0">å¤çæ¶é¿ï¼{{item.duration}}</div> |
| | | <div v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{item.sequenceFlowName}}</div> |
| | | <div v-if="item.description">å¤çæè§ï¼{{item.description}}</div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import { getAction, downFile, httpAction } from '@api/manage' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | |
| | | export default { |
| | | name: 'RepairOrderApprovalModal', |
| | |
| | | data() { |
| | | return { |
| | | title: '', |
| | | threeColSpan: 8, |
| | | twoColSpan: 12, |
| | | inputReadOnly: true, |
| | | disableSubmit: false, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | hitaskDataSource: [], |
| | | model: {}, |
| | | imageSrc: null, |
| | | activeTabKey: '1', |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | sm: { span: 10 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | sm: { span: 14 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 20 } |
| | | sm: { span: 19 } |
| | | }, |
| | | validatorRules: { |
| | | repairConfirm: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦å
é¨å¯ç»´ä¿®ï¼' } |
| | | validatorRules: { confirmResult: [{ required: true, message: 'è¯·éæ©ç¡®è®¤ç±»å' }] }, |
| | | detail: { |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: '维修人', |
| | | key: 'repairUser', |
| | | align: 'center', |
| | | type: JVXETypes.normal |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æ¯ä¸»ç»´ä¿®äºº', |
| | | key: 'repairPrimary_dictText', |
| | | align: 'center', |
| | | type: JVXETypes.normal |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®æ¶é¿', |
| | | key: 'repairDuration', |
| | | align: 'center', |
| | | type: JVXETypes.normal |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | key: 'remark', |
| | | align: 'center', |
| | | type: JVXETypes.normal |
| | | } |
| | | ], |
| | | repairConfirmComment: [ |
| | | { required: true, message: '请è¾å
¥ç»´ä¿®ç¡®è®¤æè§' } |
| | | ], |
| | | leaderConfirm: [ |
| | | { required: true, message: 'è¯·éæ©æ¯å¦åæå¤é¨ç»´ä¿®ï¼' } |
| | | ], |
| | | leaderConfirmComment: [ |
| | | { required: true, message: '请è¾å
¥é¢å¯¼ç¡®è®¤æè§' } |
| | | ], |
| | | externalConfirm: [ |
| | | { required: true, message: 'è¯·éæ©æºå¨åæ¯å¦å¯ç»´ä¿®ï¼' } |
| | | ], |
| | | externalConfirmComment: [ |
| | | { required: true, message: '请è¾å
¥æºå¨å确认æè§' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥æä½å·¥ç¡®è®¤æè§' } |
| | | ], |
| | | faultReason: [ |
| | | { required: true, message: '请è¾å
¥æ
éåå ' } |
| | | ], |
| | | repairDescription: [ |
| | | { required: true, message: '请è¾å
¥ç»´ä¿®ç»ææè¿°' } |
| | | ] |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | }, |
| | | approveData: {}, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryBomDataById: '/eam/eamRepairOrder/queryById', |
| | | queryById: '/eam/eamRepairOrder/queryByReportId', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | approve: '/eam/eamRepairOrder/perform' |
| | | approve: '/eam/eamRepairOrder/perform', |
| | | detail: '/eam/eamRepairPerson/list' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | repairConfirm() { |
| | | return ['WAIT_INTERNAL_CONFIRM', 'UNDER_INTERNAL_REPAIR', 'WAIT_LEADER_CONFIRM', 'WAIT_EXTERNAL_CONFIRM', 'UNDER_EXTERNAL_REPAIR', 'UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | underInternalRepair() { |
| | | return ['UNDER_INTERNAL_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | leaderConfirm() { |
| | | return ['UNDER_INTERNAL_REPAIR', 'WAIT_LEADER_CONFIRM', 'WAIT_EXTERNAL_CONFIRM', 'UNDER_EXTERNAL_REPAIR', 'UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | externalConfirm() { |
| | | return ['WAIT_EXTERNAL_CONFIRM', 'UNDER_EXTERNAL_REPAIR', 'UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | underExternalRepair() { |
| | | return ['UNDER_EXTERNAL_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | underOutsideRepair() { |
| | | return ['UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | operatorConfirm() { |
| | | return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.model.repairStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·åæµç¨èç¹åæµç¨å¾ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | * 主页é¢ç¹å»æ§è¡å®¡æ¹æ¶è§¦å |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | getAllApproveData(record) { |
| | | if (!record.procInstId) return |
| | | console.log('record----->', record) |
| | | const { procInstId, processDefinitionId, processInstanceId, processDefinitionKey } = record |
| | | const param = { procInstId } |
| | | const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } |
| | | async handleDetail(record) { |
| | | this.spinning = true |
| | | this.activeTabKey = '1' |
| | | this.model = {} |
| | | this.getBasicInformationByApi(record) |
| | | this.getFlowChartImageByApi(record) |
| | | this.loadDetail(record.dataId) |
| | | }, |
| | | |
| | | /** |
| | | * 主页é¢ç¹å»è¯¦æ
æ¶è§¦å |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | recordDetail(record) { |
| | | this.spinning = true |
| | | this.activeTabKey = '1' |
| | | this.model = Object.assign({}, record) |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | /** |
| | | * è·ååºç¡ä¿¡æ¯ |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | getBasicInformationByApi(record) { |
| | | const that = this |
| | | |
| | | getAction(this.url.queryHisTaskList, param) |
| | | getAction(this.url.queryById, { id: record.dataId }) |
| | | .then(res => { |
| | | that.hitaskDataSource = res.result |
| | | if (res.success) { |
| | | that.model = Object.assign({}, res.result[0]) |
| | | that.model.dataId = record.dataId |
| | | that.model.taskId = record.id |
| | | that.model.userId = record.assignee |
| | | that.model.instanceId = record.procInstId |
| | | } |
| | | else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | downFile(this.url.diagramView, imageParam, 'get') |
| | | /** |
| | | * è·åæµç¨å¾ |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | getFlowChartImageByApi(record) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey } = record |
| | | |
| | | downFile(this.url.diagramView, { |
| | | processDefinitionId, |
| | | processInstanceId, |
| | | TaskDefinitionKey: processDefinitionKey |
| | | }, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | that.imageSrc = urlObject |
| | | this.imageSrc = window.URL.createObjectURL(new Blob([res])) |
| | | })) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | description: err.message |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * è·åå¾
åè®°å½çåºæ¬ä¿¡æ¯ |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | * è·å维修人æç» |
| | | * @param repairId |
| | | */ |
| | | getBasicInformation(record) { |
| | | this.spinning = true |
| | | const that = this |
| | | const param = { id: record.dataId } |
| | | this.tableRowRecord = {} |
| | | this.activeTabKey = '1' |
| | | getAction(this.url.queryBomDataById, param) |
| | | .then((res => { |
| | | if (res.success) { |
| | | that.tableRowRecord = Object.assign({}, res.result, { |
| | | isUseSpare: res.result.isUseSpare === null ? 0 : res.result.isUseSpare, |
| | | imageFiles: JSON.parse(res.result.imageFiles), |
| | | reportImageFiles: JSON.parse(res.result.reportImageFiles) |
| | | }) |
| | | console.log('this.tableRowRecord----->', that.tableRowRecord) |
| | | } |
| | | })) |
| | | loadDetail(repairId) { |
| | | getAction(this.url.detail, { repairId }) |
| | | .then(res => { |
| | | if (res.success) this.detail.dataSource = res.result |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | |
| | | submitForm() { |
| | | const that = this |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | const { confirmComment, externalConfirm, externalConfirmComment, repairConfirm, repairConfirmComment, leaderConfirm, leaderConfirmComment, faultReason, repairDescription, imageFiles, equipmentId } = that.tableRowRecord |
| | | const { dataId, id, procInstId, taskDefKey, variables } = that.selectShenpiData |
| | | |
| | | const flowTaskVo = {} |
| | | flowTaskVo.repairConfirm = repairConfirm |
| | | flowTaskVo.repairConfirmComment = repairConfirmComment |
| | | flowTaskVo.leaderConfirm = leaderConfirm |
| | | flowTaskVo.leaderConfirmComment = leaderConfirmComment |
| | | flowTaskVo.externalConfirm = externalConfirm |
| | | flowTaskVo.externalConfirmComment = externalConfirmComment |
| | | flowTaskVo.confirmComment = confirmComment |
| | | |
| | | flowTaskVo.faultReason = faultReason |
| | | flowTaskVo.repairDescription = repairDescription |
| | | flowTaskVo.imageFilesResult = imageFiles |
| | | flowTaskVo.equipmentId = equipmentId |
| | | flowTaskVo.id = dataId |
| | | flowTaskVo.dataId = dataId |
| | | flowTaskVo.taskId = id |
| | | flowTaskVo.instanceId = procInstId |
| | | flowTaskVo.targetKey = taskDefKey |
| | | flowTaskVo.values = variables |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | httpAction(this.url.approve, flowTaskVo, 'post') |
| | | httpAction(this.url.approve, that.model, 'post') |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.handCancel() |
| | | that.$emit('searchReset') |
| | | that.$emit('modalFormOk') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-spin-nested-loading { |
| | | height: 100%; |
| | | |
| | | .ant-spin-container { |
| | | height: 100%; |
| | | |
| | | .ant-form { |
| | | height: 100%; |
| | | |
| | | #outer-row { |
| | | height: 100%; |
| | | |
| | | .scroll-col { |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |