| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button v-has="'standard:add'" @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="inspectionImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">ç¹æ£æ å导å
¥</a-button> |
| | | <a-button v-has="'standard:pointInspection'" type="primary" icon="import">ç¹æ£æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button 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 type="primary" icon="import">äºä¿æ å导å
¥</a-button> |
| | | <a-button v-has="'standard:secondMaintenance'" type="primary" icon="import">äºä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button 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" |
| | | :action="thirdMaintenanceImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">ä¸ä¿æ å导å
¥</a-button> |
| | | <a-button v-has="'standard:ThirdMaintenance'" type="primary" icon="import">ä¸ä¿æ å导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button 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"> |
| | |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a 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 @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | <a v-has="'standard:edit'" @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider v-has="'standard:edit'" type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®åèµ·æµç¨å?" @confirm="() => startProcess(record.id)"> |
| | | <a @click.stop="event=>event.stopPropagation()">åèµ·æµç¨</a> |
| | | <a v-has="'standard:saveFlow'" @click.stop="event=>event.stopPropagation()">åèµ·æµç¨</a> |
| | | </a-popconfirm> |
| | | |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider v-has="'standard:saveFlow'" type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a @click.stop="event=>event.stopPropagation()">å é¤</a> |
| | | <a v-has="'standard:del'" @click.stop="event=>event.stopPropagation()">å é¤</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | |
| | | <template v-if="record.standardStatus != 'WAIT_SUBMIT'"> |
| | | <a-divider type="vertical" v-if="record.standardStatus=='START'"/> |
| | | <a-divider v-has="'standard:delete'" type="vertical" v-if="record.standardStatus=='START'"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a @click.stop="event=>event.stopPropagation()">å é¤</a> |
| | | <a v-has="'standard:delete'" @click.stop="event=>event.stopPropagation()">å é¤</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | </span> |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button v-has="'eam:inspection:add'" @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button v-if="selectedRowKeys.length == 1" @click="handlePrint" type="primary">æ¥ç</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchZf('ABOLISH')"> |
| | | <a-menu-item key="1" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'"> |
| | | <a-icon type="snippets"/> |
| | | ä½åº |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')"> |
| | | <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'"> |
| | | <a-icon type="form"/> |
| | | é¢å |
| | | </a-menu-item> |
| | |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleAbolish(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | |
| | | dataIndex: 'confirmTime' |
| | | }, |
| | | { |
| | | title: '确认æè§', |
| | | title: 'HFç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment' |
| | | dataIndex: 'hfCode' |
| | | } |
| | | ], |
| | | url: { |
| | |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button @click="handleBatchAdd" type="primary" icon="plus">æ¹éæ°å¢</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="handlerBatchAbolish"> |
| | | <a-icon type="delete"/> |
| | | ä½åº |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="handlerBatchCollect"> |
| | | <a-icon type="form"/> |
| | | é¢å |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" |
| | | :loading="loading" :scroll="{ x: 'max-content' }" @change="handleTableChange"> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{selectedRowKeys.length |
| | | }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handlerAbolish(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | |
| | | </template> |
| | | |
| | | <template v-else> |
| | |
| | | <!-- 表ååºå --> |
| | | <eamSecondMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"/> |
| | | |
| | | <eam-second-maintenance-batch-order-modal ref="batchModalForm" @ok="modalFormOk"/> |
| | | |
| | | <second-maintenance-approval-modal ref="secondMaintenanceApprovalModal" |
| | | :selectShenpiData="selectSecondMaintenanceData"/> |
| | | </a-card> |
| | |
| | | import SecondMaintenanceApprovalModal |
| | | from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' |
| | | import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' |
| | | import EamSecondMaintenanceBatchOrderModal from './modules/EamSecondMaintenanceBatchOrderModal' |
| | | |
| | | export default { |
| | | name: 'EamSecondMaintenanceOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamSecondMaintenanceBatchOrderModal, |
| | | LxSearchEquipmentSelect, |
| | | EamSecondMaintenanceOrderModal, |
| | | SecondMaintenanceApprovalModal |
| | |
| | | url: { |
| | | list: '/eam/secondMaintenanceOrder/list', |
| | | abolish: '/eam/secondMaintenanceOrder/abolish', |
| | | collect: '/eam/secondMaintenanceOrder/collect' |
| | | collect: '/eam/secondMaintenanceOrder/collect', |
| | | abolishBatch: '/eam/secondMaintenanceOrder/abolishBatch', |
| | | collectBatch: '/eam/secondMaintenanceOrder/collectBatch' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | onMaintenanceDateChange: function(dataArray) { |
| | | this.queryParam.maintenanceDateBegin = dataArray[0] |
| | | this.queryParam.maintenanceDateEnd = dataArray[1] |
| | | handleBatchAdd() { |
| | | this.$refs.batchModalForm.title = 'æ¹éæ°å¢' |
| | | this.$refs.batchModalForm.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»é¢åæ¶è§¦å |
| | | * @param id è¡è®°å½id |
| | |
| | | */ |
| | | handleDetail(record) { |
| | | this.selectSecondMaintenanceData = Object.assign({}, record) |
| | | this.$refs.secondMaintenanceApprovalModal.recordDetail(record) |
| | | this.$refs.secondMaintenanceApprovalModal.title = '详æ
' |
| | | this.$refs.secondMaintenanceApprovalModal.visible = true |
| | | this.$refs.secondMaintenanceApprovalModal.disableSubmit = true |
| | | this.$refs.secondMaintenanceApprovalModal.recordDetail(record) |
| | | }, |
| | | |
| | | /** |
| | |
| | | handlePrint(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1094834721929232384?id=` + record.id //ç½ç«é¾æ¥ |
| | | window.open(href, '_blank') |
| | | }, |
| | | handlerAbolish(id) { |
| | | var that = this |
| | | deleteAction(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 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handlerBatchAbolish() { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认ä½åº', |
| | | content: 'æ¯å¦ä½åºé䏿°æ®ï¼åªæå¾
ä¿å
»ç¶æçæ°æ®æå¯ä½åºæå?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | deleteAction(that.url.abolishBatch, { ids }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //æ¹éé¢å |
| | | handlerBatchCollect() { |
| | | if (!this.url.collectBatch) { |
| | | this.$message.error('请设置url.abolishBatch屿§!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | return |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认é¢å', |
| | | content: 'æ¯å¦é¢åé䏿°æ®ï¼åªæå¾
ä¿å
»ç¶æçæ°æ®æå¯é¢åæå?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | onMaintenanceDateChange: function(dataArray) { |
| | | this.queryParam.maintenanceDateBegin = dataArray[0] |
| | | this.queryParam.maintenanceDateEnd = dataArray[1] |
| | | } |
| | | } |
| | | } |
| | |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®é¢åå?" @confirm="() => handlerCollect(record.id)"> |
| | | <a>é¢å</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handlerAbolish(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <a @click="handlerAbolish(record.id)">ä½åº</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | |
| | | <template v-if="record.maintenanceStatus === 'COMPLETE'"> |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click="handlePrint(record)">æå°</a> |
| | | </template> |
| | | |
| | | <a-divider v-if="record.maintenanceStatus === 'COMPLETE'" type="vertical"/> |
| | | |
| | | <a v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">æå°</a> |
| | | </span> |
| | | </a-table> |
| | | <!-- tableåºå-end --> |
| | |
| | | title: '计åä¿å
»æ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceDate' |
| | | }, |
| | | { |
| | | title: 'éå®å·¥åæ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'freezeOrderDate' |
| | | }, |
| | | { |
| | | title: 'å·¥åè¿ææ¥æ', |
| | | align: 'center', |
| | | dataIndex: 'orderExpirationDate' |
| | | }, |
| | | { |
| | | title: 'å®é
å¼å§æ¶é´', |
| | |
| | | align: 'center', |
| | | dataIndex: 'inspectorSignatureTime' |
| | | }, |
| | | { |
| | | title: '移交åHFç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'hfCodeA' |
| | | }, |
| | | { |
| | | title: 'éªæ¶åHFç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'hfCodeB' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/thirdMaintenanceOrder/list', |
| | | abolish: '/eam/thirdMaintenanceOrder/abolish', |
| | | abolishBatch: '/eam/thirdMaintenanceOrder/abolishBatch', |
| | | collect: '/eam/thirdMaintenanceOrder/collect', |
| | | collectBatch: '/eam/thirdMaintenanceOrder/collectBatch' |
| | | collect: '/eam/thirdMaintenanceOrder/collect' |
| | | } |
| | | } |
| | | }, |
| | |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | |
| | | */ |
| | | handleDetail(record) { |
| | | this.selectThirdMaintenanceData = Object.assign({}, record) |
| | | this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) |
| | | this.$refs.thirdMaintenanceApprovalModal.title = '详æ
' |
| | | this.$refs.thirdMaintenanceApprovalModal.visible = true |
| | | this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true |
| | | this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) |
| | | }, |
| | | |
| | | onMaintenanceDateChange(dateString) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <j-vxe-table ref="editableDetailTable" rowNumber rowSelection bordered alwaysEdit toolbar @added="addNewRow" |
| | | :toolbarConfig="detail.toolbarConfig" keep-source :height="500" |
| | | :dataSource="detail.dataSource" :columns="detail.columns"/> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | |
| | | export default { |
| | | name: 'EamSecondMaintenanceBatchOrderModal', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | url: { |
| | | batchAdd: '/eam/secondMaintenanceOrder/batchAdd' |
| | | }, |
| | | detail: { |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | dataIndex: 'orderNum', |
| | | align: 'center', |
| | | type: JVXETypes.inputNumber, |
| | | disabled: true, |
| | | placeholder: 'å·¥åå·ç³»ç»èªå¨çæ' |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | dataIndex: 'equipmentId', |
| | | align: 'center', |
| | | type: JVXETypes.slot, |
| | | slotName: 'equipmentId' |
| | | }, |
| | | { |
| | | title: 'è§èåç§°', |
| | | dataIndex: 'standardName', |
| | | align: 'center', |
| | | type: JVXETypes.input, |
| | | disabled: true, |
| | | placeholder: 'éæ©è®¾å¤åèªå¨å¸¦åº' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»æ¥æ', |
| | | dataIndex: 'maintenanceDate', |
| | | align: 'center', |
| | | type: JVXETypes.date |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æ', |
| | | dataIndex: 'maintenancePeriod', |
| | | align: 'center', |
| | | type: JVXETypes.inputNumber, |
| | | defaultValue: '6' |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = { maintenancePeriod: 6 } |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | | }, |
| | | |
| | | addNewRow({ row }) { |
| | | console.log('row', row) |
| | | row.maintenancePeriod = 6 |
| | | this.$refs.editableDetailTable.updateData() |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | if (!this.model.id) this.loadStandardDetail(selectObj.id) |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | let httpUrl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpUrl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpUrl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | 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 = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row :gutter="24"> |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="orderNum" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled /> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" |
| | | :disabled="editable"></maintenance-equipment-select> |
| | | <a-form-model-item prop="equipmentId" label="ç»ä¸ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="model.equipmentId" |
| | | maintenanceCategory="THIRD_MAINTENANCE" @autocompleteForm="autocompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.standardName" disabled /> |
| | | <a-form-model-item prop="standardName" label="è§èåç§°"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.standardName" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="maintenanceDate" label="ä¿å
»æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" |
| | | style="width: 100%" /> |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <!-- <a-col :span="8">--> |
| | | <!-- <a-form-model-item prop="operator" label="ä¿å
»äºº">--> |
| | | <!-- <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" :disabled="!model.equipmentId"--> |
| | | <!-- :dictOptions="maintenanceOperatorOptions" />--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled /> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" /> |
| | | |
| | | <a-row> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹" :forceRender="true"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="detail.toolbarConfig" |
| | | keep-source |
| | | :height="300" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-row> |
| | | |
| | | <a-tabs default-active-key="1"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table ref="editableDetailTable" bordered keep-source |
| | | :height="300" :dataSource="detail.dataSource" :columns="detail.columns"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | |
| | | export default { |
| | | name: 'EamThirdMaintenanceOrderModal', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | editable: false, |
| | | maintenanceCategory: 'THIRD_MAINTENANCE', |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | activeTabKey: '1', |
| | | maintenanceOperatorOptions: [], |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: 'è¯·éæ©è®¡åä¿å
»æ¥æ!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/thirdMaintenanceOrder/add', |
| | | edit: '/eam/thirdMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | key: 'itemPart', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | }, |
| | | // precisionDetail: { |
| | | // loading: false, |
| | | // dataSource: [], |
| | | // columns: [ |
| | | // { |
| | | // title: 'ID', |
| | | // key: 'id', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'orderId', |
| | | // key: 'orderId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'equipmentId', |
| | | // key: 'equipmentId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'parameterId', |
| | | // key: 'parameterId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'æ£æµé¡¹ç®', |
| | | // key: 'parameterId_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '25%', |
| | | // align: 'center' |
| | | // }, |
| | | // { |
| | | // title: 'åæ°ç¼ç ', |
| | | // key: 'parameterCode_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '20%', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: 'å
å·®å¼', |
| | | // key: 'parameterValue', |
| | | // type: JVXETypes.normal, |
| | | // width: '30%', |
| | | // align: 'center', |
| | | // } |
| | | // ], |
| | | // toolbarConfig: { |
| | | // // prefix åç¼ï¼suffix åç¼ |
| | | // slot: ['prefix', 'suffix'], |
| | | // // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | // btn: ['add', 'remove', 'clearSelection'] |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.initParams(); |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | }, |
| | | edit(record) { |
| | | this.initParams(); |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | // this.loadPrecisionDetail(record.id) |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('æ°æ®æ ¡éªå¤±è´¥ï¼') |
| | | return |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData() |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.removeDetailList = [...removeData] |
| | | |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | export default { |
| | | name: 'EamThirdMaintenanceOrderModal', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: '请è¾å
¥ç»ä¸ç¼ç æåç§°æç´¢' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: 'è¯·éæ©è®¡åä¿å
»æ¥æ!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/thirdMaintenanceOrder/add', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList' |
| | | }, |
| | | detail: { |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: 60, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¨ä½', |
| | | key: 'itemPart', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
Ȍ
容', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'éªæ¶æ å', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | ] |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | //æ ååç§°ï¼ä¿å
»å¨æä¸å·æ°è§£å³åæ³ |
| | | //åæ³ä¸ validatorRules equipmentId è¿æ¯æé®é¢ |
| | | // const newObj = { |
| | | // standardName: selectObj.standardName, |
| | | // maintenancePeriod: selectObj.maintenancePeriod, |
| | | // standardId : selectObj.id, |
| | | // equipmentId: selectObj.equipmentId, |
| | | // }; |
| | | // this.model = Object.assign({}, newObj, this.model) |
| | | //åæ³äº |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.equipmentId) delete this.model.operator |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | this.loadPrecisionParameterList(selectObj.equipmentId) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) return |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.model.tableDetailList = that.$refs.editableDetailTable.getTableData() |
| | | that.confirmLoading = that.spinning = true |
| | | httpAction(that.url.add, that.model, 'post') |
| | | .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 |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | this.loadStandardDetail(selectObj.id) |
| | | }, |
| | | |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | this.spinning = true |
| | | getAction(this.url.standardDetail, { standardId: standardId }) |
| | | getAction(this.url.standardDetail, { standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | itemPart: item.itemPart, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | this.detail.dataSource = res.result |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } else { |
| | | return |
| | | } |
| | | const that = this |
| | | getAction(this.url.userSelect, params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator |
| | | } else { |
| | | if (that.model.operator) delete that.model.operator |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | if (that.model.operator) delete that.model.operator |
| | | }) |
| | | }, |
| | | // loadPrecisionParameterList(equipmentId) { |
| | | // this.precisionDetail.dataSource = [] |
| | | // if (equipmentId) { |
| | | // this.spinning = true |
| | | // getAction(this.url.precisionDetail, { equipmentId: equipmentId }) |
| | | // .then(res => { |
| | | // if (res.success) { |
| | | // this.precisionDetail.dataSource = res.result.map(item => ({ |
| | | // equipmentId: item.equipmentId, |
| | | // parameterId: item.parameterId, |
| | | // parameterId_dictText: item.parameterId_dictText, |
| | | // parameterCode_dictText: item.parameterCode_dictText, |
| | | // parameterValue: item.parameterValue, |
| | | // })) |
| | | // } |
| | | // }) |
| | | // .finally(() => { |
| | | // this.spinning = false |
| | | // }) |
| | | // } |
| | | // }, |
| | | // loadPrecisionDetail(orderId) { |
| | | // if (orderId) { |
| | | // getAction(this.url.precisionCheckDetail, { orderId: orderId }).then(res => { |
| | | // if (res.success) { |
| | | // this.precisionDetail.dataSource = [...res.result] |
| | | // } |
| | | // }) |
| | | // } |
| | | // }, |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | // this.precisionDetail.dataSource = [] |
| | | this.activeTabKey = '1' |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
| | | </script> |
| | |
| | | <a-row :gutter='24'> |
| | | <a-col :lg='6' :md='8' :sm='24' :xl='4'> |
| | | <a-form-item label='æµç¨åç±»'> |
| | | <j-dict-select-tag |
| | | v-model='queryParam.category' |
| | | dictCode='flow_type' |
| | | placeholder='è¯·éæ©æµç¨åç±»' |
| | | ></j-dict-select-tag> |
| | | <j-dict-select-tag v-model='queryParam.category' dictCode='flow_type' placeholder='è¯·éæ©æµç¨åç±»'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg='6' :md='8' :sm='24' :xl='4'> |
| | | <a-form-item label='å½åèç¹'> |
| | | <a-input |
| | | v-model='queryParam.name' |
| | | placeholder='请è¾å
¥å½åèç¹ç²¾ç¡®æ¥è¯¢' |
| | | ></a-input> |
| | | <a-input v-model='queryParam.name' placeholder='请è¾å
¥å½åèç¹ç²¾ç¡®æ¥è¯¢'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg='6' :md='8' :sm='24' :xl='4'> |
| | | <a-form-item label='ç®è¦æè¿°'> |
| | | <a-input |
| | | v-model='queryParam.title' |
| | | placeholder='请è¾å
¥ç®è¦æè¿°' |
| | | ></a-input> |
| | | <a-input v-model='queryParam.title' placeholder='请è¾å
¥ç®è¦æè¿°'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :lg='8' :md='12' :sm='24' :xl='8'> |
| | | <a-form-item label='任塿¶é´èå´'> |
| | | <j-date v-model='queryParam.startTime' :show-time='false' class='query-group-cust' |
| | | date-format='YYYY-MM-DD HH:mm:ss' placeholder='è¯·éæ©å¼å§æ¶é´'></j-date> |
| | | date-format='YYYY-MM-DD HH:mm:ss' placeholder='è¯·éæ©å¼å§æ¶é´'/> |
| | | <span class='query-group-split-cust'></span> |
| | | <j-date v-model='queryParam.endTime' :show-time='false' class='query-group-cust' |
| | | date-format='YYYY-MM-DD HH:mm:ss' placeholder='è¯·éæ©ç»ææ¶é´'></j-date> |
| | | date-format='YYYY-MM-DD HH:mm:ss' placeholder='è¯·éæ©ç»ææ¶é´'/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | |
| | | |
| | | <a-table ref='table' :columns='columns' :dataSource='dataSource' :loading='loading' :pagination='ipagination' |
| | | :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' |
| | | :scroll="{x:'max-content',y:465}" bordered rowKey='id' size='middle' |
| | | :scroll="{x:'max-content'}" bordered rowKey='id' size='middle' |
| | | @change='handleTableChange'> |
| | | <span slot='action' slot-scope='text, record'> |
| | | <a @click='handelDetail(record,text)'>æ§è¡/审æ¹</a> |
| | |
| | | import ThirdMaintenanceApprovalModal from './thirdMaintenance/ThirdMaintenanceApprovalModal' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | name: 'FlowTodo', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | ThirdMaintenanceApprovalModal, |
| | |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | ellipsis: true |
| | | dataIndex: 'description' |
| | | }, |
| | | { |
| | | title: 'ä¸ä¸æ¥å¤ç人', |
| | |
| | | title: 'å½åèç¹å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'createTime', |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | fixed: 'right', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 150, |
| | | fixed: 'right' |
| | | width: 100 |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/toTaskBySelf' |
| | | }, |
| | | selectedRowData: {}, |
| | | selectInspectionOrderData: {}, |
| | | selectWeekMaintenanceData: {}, |
| | | selectSecondMaintenanceData: {}, |
| | | selectThirdMaintenanceData: {}, |
| | | selectRepairOrderData: {} |
| | | selectedRowData: {} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | */ |
| | | handleTechnicalStatusEvaluation(record) { |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.technicalStatusApprovalModal.visible = true |
| | | this.$refs.technicalStatusApprovalModal.title = record.name |
| | | this.$refs.technicalStatusApprovalModal.handleDetail(record) |
| | | }, |
| | |
| | | * @param record |
| | | */ |
| | | handInspectionOrder(record) { |
| | | console.log('record----->', record) |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.inspectionOrderHandle.visible = true |
| | | this.$refs.inspectionOrderHandle.title = record.name |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | */ |
| | | async handleDetail(record) { |
| | | this.model = {} |
| | | this.visible = true |
| | | this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] |
| | | this.handleTabToFirstTable() |
| | | this.getBasicInformationByApi(record) |
| | |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | recordDetail(record) { |
| | | this.visible = true |
| | | this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] |
| | | this.model = Object.assign({}, record) |
| | | this.handleTabToFirstTable() |
| | |
| | | this.$nextTick(() => { |
| | | for (let index = 1; index <= 3; index++) { |
| | | if (this.$refs['editableDetailTable' + index]) { |
| | | console.log('index----------', index) |
| | | this.activeTabKey = index |
| | | break |
| | | } |
| | |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | async handleDetail(record) { |
| | | this.spinning = true |
| | | this.model = {} |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | | this.handleTabToFirstTable() |
| | |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | recordDetail(record) { |
| | | this.spinning = true |
| | | this.activeTabKey = 1 |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | | this.model = Object.assign({}, record) |
| | |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | getBasicInformationByApi(record) { |
| | | this.spinning = true |
| | | const that = this |
| | | getAction(this.url.queryById, { id: record.dataId }) |
| | | .then(res => { |
| | |
| | | |
| | | //è§èéæ©åå |
| | | loadDetail(orderId) { |
| | | this.spinning = true |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | centered |
| | | cancelText="å
³é"> |
| | | |
| | | <j-modal :title="title" :visible="visible" :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" fullscreen @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å
»åºç¡ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" |
| | | disabled></maintenance-equipment-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.standardName" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="ä¿å
»æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" |
| | | disabled |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ä¿å
»äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" disabled |
| | | :dictOptions="maintenanceOperatorOptions"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" disabled/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="ä¿å
»å¾ç"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | file-type="image" |
| | | :disabled="confirmDisable" |
| | | :number="3" |
| | | v-model="model.imageFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å
»é¡¹ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»" v-if="!isPrecisionCheck"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="false" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="false" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange" |
| | | > |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" |
| | | placeholder="è¯·éæ©ä¿å
ȍȾ" |
| | | :disabled="disableSubmit || confirmDisable" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%"/> |
| | | </template> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <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="å·¥åå·"> |
| | | <a-input v-model="model.orderNum" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç»ä¸ç¼ç "> |
| | | <maintenance-equipment-select v-model="model.equipmentId" maintenanceCategory="THIRD_MAINTENANCE" |
| | | @autocompleteForm="autocompleteForm" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <template v-slot:exceptionDescription="props"> |
| | | <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="è§èåç§°"> |
| | | <a-input v-model="model.standardName" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ä¿å
»æ¥æ"> |
| | | <a-input v-model="model.maintenanceDate" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | <!-- <a-tab-pane key='4' tab='精度æ£éª' v-if="!isMaintenance">--> |
| | | <!-- <j-vxe-table--> |
| | | <!-- ref="editablePrecisionDetailTable"--> |
| | | <!-- :rowNumber="true"--> |
| | | <!-- :rowSelection="true"--> |
| | | <!-- :bordered="true"--> |
| | | <!-- :alwaysEdit="true"--> |
| | | <!-- :toolbar="false"--> |
| | | <!-- :toolbarConfig="precisionDetail.toolbarConfig"--> |
| | | <!-- keep-source--> |
| | | <!-- :height="300"--> |
| | | <!-- :dataSource="precisionDetail.dataSource"--> |
| | | <!-- :columns="precisionDetail.columns"--> |
| | | <!-- style="margin-top: 8px;" >--> |
| | | <!-- <template v-slot:actualValue="props">--> |
| | | <!-- <a-input-number v-model="props.row.actualValue" :disabled="disableSubmit || confirmDisable" style="width: 100%" />--> |
| | | <!-- </template>--> |
| | | <!-- </j-vxe-table>--> |
| | | <!-- </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 taskData" :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-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="维修人"> |
| | | <a-input v-model="model.repairman_dictText" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ä¿å
»å¨æ"> |
| | | <a-input v-model="model.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="夿³¨"> |
| | | <a-textarea v-model="model.remark" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-col :span="model.maintenanceStatus&&model.maintenanceStatus!='WAIT_MAINTENANCE'?10:16" class="scroll-col"> |
| | | <a-tabs v-model="activeTabKey" @change="$refs.editableDetailTable.clearValidate()"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table ref="editableDetailTable" rowSelection bordered alwaysEdit keep-source :height="300" |
| | | :dataSource="detail.dataSource" :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange"> |
| | | <!--ä¿å
ȍȾ--> |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="third_maintenance_result" |
| | | placeholder="è¯·éæ©ä¿å
ȍȾ" |
| | | :disabled="disableSubmit || (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')" |
| | | @change="handleResultSelectChange($event,props.row,'exceptionDescription')" |
| | | style="width: 100%"/> |
| | | </template> |
| | | |
| | | <!--ä¿å
»å¼å¸¸æè¿°--> |
| | | <template v-slot:exceptionDescription="props"> |
| | | <a-textarea :rows="1" :autoSize="false" v-model="props.row.exceptionDescription" |
| | | :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!='NORMAL'?'请è¾å
¥å¼å¸¸æè¿°':''" |
| | | @blur="$refs.editableDetailTable.validateTable" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | !props.row.maintenanceResult || |
| | | props.row.maintenanceResult === 'NORMAL'"/> |
| | | </template> |
| | | |
| | | <!--ç¬¬ä¸æ¬¡éªæ¶ç»æ--> |
| | | <template v-slot:firstInspectResult="props"> |
| | | <j-dict-select-tag v-model="props.row.firstInspectResult" |
| | | placeholder="è¯·éæ©éªæ¶ç»æ" |
| | | @change="handleResultSelectChange($event,props.row,'firstInspectException')" |
| | | :disabled="disableSubmit ||(model.maintenanceStatus&&model.maintenanceStatus!='UNDER_FIRST_ACCEPTANCE')" |
| | | dictCode="check_status" style="width: 100%"/> |
| | | </template> |
| | | |
| | | <!--ç¬¬ä¸æ¬¡éªæ¶å¼å¸¸æè¿°--> |
| | | <template v-slot:firstInspectException="props"> |
| | | <a-textarea :rows="1" v-model="props.row.firstInspectException" |
| | | :placeholder="props.row.firstInspectResult&&props.row.firstInspectResult!='1'?'请è¾å
¥å¼å¸¸æè¿°':''" |
| | | @blur="$refs.editableDetailTable.validateTable" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_FIRST_ACCEPTANCE')|| |
| | | !props.row.firstInspectResult || |
| | | props.row.firstInspectResult === '1'" |
| | | dictCode="check_status" style="width: 100%;resize:none"/> |
| | | </template> |
| | | |
| | | <!--ç¬¬äºæ¬¡éªæ¶ç»æ--> |
| | | <template v-slot:secondInspectResult="props"> |
| | | <j-dict-select-tag v-model="props.row.secondInspectResult" |
| | | placeholder="è¯·éæ©éªæ¶ç»æ" |
| | | @change="handleResultSelectChange($event,props.row,'secondInspectException')" |
| | | disabled dictCode="check_status" style="width: 100%"/> |
| | | </template> |
| | | |
| | | <!--ç¬¬äºæ¬¡éªæ¶å¼å¸¸æè¿°--> |
| | | <template v-slot:secondInspectException="props"> |
| | | <a-textarea :rows="1" v-model="props.row.secondInspectException" |
| | | :placeholder="props.row.secondInspectResult&&props.row.secondInspectResult!='1'?'请è¾å
¥å¼å¸¸æè¿°':''" |
| | | @blur="$refs.editableDetailTable.validateTable" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_SECOND_ACCEPTANCE')|| |
| | | !props.row.secondInspectResult || |
| | | props.row.secondInspectResult === '1'" |
| | | dictCode="check_status" style="width: 100%;resize:none"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">ä¿å
»æ£å¸¸ |
| | | </a-button> |
| | | </a-tabs> |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <template slot="tabBarExtraContent"> |
| | | <a-space> |
| | | <a-button |
| | | v-if="activeTabKey=='1'" |
| | | :disabled="disableSubmit || (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')||selectedRowKeys.length == 0" |
| | | type="primary" @click="handleSelectAllMaintenanceResult">æ¹éä¿å
»æ£å¸¸ |
| | | </a-button> |
| | | <a-button |
| | | v-if="activeTabKey=='1'" |
| | | :disabled="disableSubmit || (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_FIRST_ACCEPTANCE')||selectedRowKeys.length == 0" |
| | | type="primary" @click="handleSelectAllFirstAcceptanceResult">æ¹ééªæ¶éè¿ |
| | | </a-button> |
| | | </a-space> |
| | | </template> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-col v-if="model.maintenanceStatus&&model.maintenanceStatus!='WAIT_MAINTENANCE'" :span="6" |
| | | class="scroll-col"> |
| | | <a-tabs v-if="displayEvaluationFlag"> |
| | | <a-tab-pane tab="ä¿å
»åææ¯ç¶æé´å®"> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" |
| | | prop="fullyFunctional" label="设å¤åè½æ¯å¦é½å
¨"> |
| | | <j-dict-select-tag type='radio' v-model='model.fullyFunctional' dictCode='yn' |
| | | @change="handleCheckRadioChange" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='WAIT_CHECK')"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" |
| | | prop="runningNormally" label="设å¤è½å¦æ£å¸¸è¿è½¬"> |
| | | <j-dict-select-tag type='radio' v-model='model.runningNormally' dictCode='yn' |
| | | @change="handleCheckRadioChange" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='WAIT_CHECK')"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item v-if="model.fullyFunctional=='0'||model.runningNormally=='0'" |
| | | :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="é®é¢æè¿°"> |
| | | <a-textarea v-model='model.problemDescription' placeholder="请æè¿°é®é¢" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='WAIT_CHECK')"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs v-if="displayOperatorFlag"> |
| | | <a-tab-pane tab="æä½äººç¡®è®¤"> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="确认类å"> |
| | | <j-dict-select-tag v-model="model.operatorSignatureResult" type="radio" disabled dict-code="yn"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="å婿ä½äºº"> |
| | | <a-input v-model="model.assistantOperator" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='OPERATOR_SIGNATURE')" |
| | | placeholder="请è¾å
¥å婿ä½äºº"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs v-if="displayRepairerFlag"> |
| | | <a-tab-pane tab="维修人确认"> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="确认类å"> |
| | | <j-dict-select-tag v-model="model.repairmanSignatureResult" type="radio" disabled dict-code="yn"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="åå©ç»´ä¿®äºº"> |
| | | <a-input v-model="model.assistantRepairman" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='REPAIRMAN_SIGNATURE')" |
| | | placeholder="请è¾å
¥åå©ç»´ä¿®äºº"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs v-if="displayRepairLeaderFlag"> |
| | | <a-tab-pane tab="维修室主任确认"> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="确认类å"> |
| | | <j-dict-select-tag v-model="model.repairManagerSignatureResult" type="radio" disabled dict-code="yn"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs v-if="displayInspectorFlag"> |
| | | <a-tab-pane tab="æ£æ¥äººç¡®è®¤"> |
| | | <a-form-model-item :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol" label="确认类å"> |
| | | <j-dict-select-tag v-model="model.inspectorSignatureResult" type="radio" disabled dict-code="yn"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-col> |
| | | </a-row> |
| | | <div v-if="confirmDisable"> |
| | | <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="model.confirmComment" |
| | | :disabled="disableSubmit || leaderConfirmDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="leaderConfirmDisable"> |
| | | <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="leaderConfirmComment" |
| | | label="é¢å¯¼æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.leaderConfirmComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import ATextarea from 'ant-design-vue/es/input/TextArea' |
| | | |
| | | export default { |
| | | name: 'ThirdMaintenanceApprovalModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | ATextarea, |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | props: { |
| | |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | //ç¶ææ§å¶ |
| | | //ä¿å
»ä¸ ä¸å¯ç¼è¾ |
| | | // confirmDisable: false, |
| | | // initialAcceptanceDisable: false, |
| | | // finalAcceptanceDisable: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'SECOND_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | sm: { span: 3 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | sm: { span: 20 } |
| | | }, |
| | | rightColLabelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 9 } |
| | | }, |
| | | rightColWrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | imageSrc: null, |
| | | activeTabKey: '1', |
| | | validatorRules: { |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥ç¡®è®¤æè§!' } |
| | | ], |
| | | leaderConfirmComment: [ |
| | | { required: true, message: '请è¾å
¥åéªæ¶æè§!' } |
| | | ], |
| | | fullyFunctional: [{ required: true, message: 'è¯·éæ©è®¾å¤åè½æ¯å¦é½å
¨' }], |
| | | runningNormally: [{ required: true, message: 'è¯·éæ©è®¾å¤è½å¦æ£å¸¸è¿è½¬' }] |
| | | }, |
| | | url: { |
| | | queryById: '/eam/thirdMaintenanceOrder/queryById', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | approval: '/eam/thirdMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | diagramView: '/assign/flow/diagramView', |
| | | // precisionCheckDetail: '/eam/precisionCheckDetail/queryList', |
| | | diagramView: '/assign/flow/diagramView' |
| | | }, |
| | | disableSubmit: false, |
| | | taskData: [], |
| | | isDisplayBmp: false, |
| | | showBmpButtonLoading: false, |
| | | selectedRowKeys: [], |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | columns: [], |
| | | defaultColumns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '5%', |
| | | width: 60, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | title: 'ä¿å
»é¨ä½', |
| | | key: 'itemPart', |
| | | type: JVXETypes.normal, |
| | | width: 120, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
Ȍ
容', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | width: 120, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | title: 'éªæ¶æ å', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | width: 120, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
ȍȾ', |
| | | key: 'maintenanceResult', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | width: 200, |
| | | slotName: 'maintenanceResult', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»ç»æä¸è½ä¸ºç©ºï¼' } |
| | | { required: true, message: 'è¯·éæ©${title}' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | title: 'ä¿å
»å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | width: '20%', |
| | | align: 'center', |
| | | width: 200, |
| | | slotName: 'exceptionDescription', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'reportFlag', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | { handler: this.maintenanceExceptionDescriptionValidator } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['clearSelection'] |
| | | } |
| | | }, |
| | | // precisionDetail: { |
| | | // loading: false, |
| | | // dataSource: [], |
| | | // columns: [ |
| | | // { |
| | | // title: 'ID', |
| | | // key: 'id', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'orderId', |
| | | // key: 'orderId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'equipmentId', |
| | | // key: 'equipmentId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'parameterId', |
| | | // key: 'parameterId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'æ£æµé¡¹ç®', |
| | | // key: 'parameterId_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '25%', |
| | | // align: 'center' |
| | | // }, |
| | | // { |
| | | // title: 'åæ°ç¼ç ', |
| | | // key: 'parameterCode_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '20%', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: 'å
å·®å¼', |
| | | // key: 'parameterValue', |
| | | // type: JVXETypes.normal, |
| | | // width: '15%', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: '宿µå¼', |
| | | // key: 'actualValue', |
| | | // type: JVXETypes.slot, |
| | | // width: '15%', |
| | | // align: 'center', |
| | | // slotName: 'actualValue', |
| | | // validateRules: [ |
| | | // { required: true, message: '请è¾å
¥å®æµå¼ï¼' } |
| | | // ] |
| | | // } |
| | | // ], |
| | | // toolbarConfig: { |
| | | // // prefix åç¼ï¼suffix åç¼ |
| | | // slot: ['prefix', 'suffix'], |
| | | // // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | // btn: ['add', 'remove', 'clearSelection'] |
| | | // } |
| | | // } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | confirmDisable: function() { |
| | | return ['WAIT_CONFIRM', 'WAIT_LEADER_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | displayEvaluationFlag() { |
| | | return this.model.maintenanceStatus && ['WAIT_CHECK', 'UNDER_MAINTENANCE', 'UNDER_FIRST_ACCEPTANCE', 'UNDER_SECOND_ACCEPTANCE', 'OPERATOR_SIGNATURE', 'REPAIRMAN_SIGNATURE', 'REPAIR_MANAGER_SIGNATURE', 'INSPECTOR_SIGNATURE', 'COMPLETE', 'CANCEL'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | leaderConfirmDisable: function() { |
| | | return ['WAIT_LEADER_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | displayFirstAcceptanceFlag() { |
| | | return this.model.maintenanceStatus && ['UNDER_FIRST_ACCEPTANCE', 'UNDER_SECOND_ACCEPTANCE', 'OPERATOR_SIGNATURE', 'REPAIRMAN_SIGNATURE', 'REPAIR_MANAGER_SIGNATURE', 'INSPECTOR_SIGNATURE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | completionDisable: function() { |
| | | return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus) |
| | | displaySecondAcceptanceFlag() { |
| | | return this.model.maintenanceStatus && ['UNDER_SECOND_ACCEPTANCE', 'OPERATOR_SIGNATURE', 'REPAIRMAN_SIGNATURE', 'REPAIR_MANAGER_SIGNATURE', 'INSPECTOR_SIGNATURE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | isMaintenance: function() { |
| | | return this.selectShenpiData && this.selectShenpiData.taskDefKey === 'maintenance_execution'; |
| | | displayOperatorFlag() { |
| | | return this.model.maintenanceStatus && ['OPERATOR_SIGNATURE', 'REPAIRMAN_SIGNATURE', 'REPAIR_MANAGER_SIGNATURE', 'INSPECTOR_SIGNATURE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | isPrecisionCheck: function() { |
| | | return this.selectShenpiData && this.selectShenpiData.taskDefKey === 'precision_check'; |
| | | displayRepairerFlag() { |
| | | return this.model.maintenanceStatus && ['REPAIRMAN_SIGNATURE', 'REPAIR_MANAGER_SIGNATURE', 'INSPECTOR_SIGNATURE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | displayRepairLeaderFlag() { |
| | | return this.model.maintenanceStatus && ['REPAIR_MANAGER_SIGNATURE', 'INSPECTOR_SIGNATURE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | displayInspectorFlag() { |
| | | return this.model.maintenanceStatus && ['INSPECTOR_SIGNATURE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.initParams() |
| | | //éæ°è®¡ç®defaultKey |
| | | if(item && item.taskDefKey === 'precision_check') { |
| | | this.activeTabKey = '4'; |
| | | } |
| | | /** |
| | | * 主页é¢ç¹å»æ§è¡å®¡æ¹æ¶è§¦å |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | async handleDetail(record) { |
| | | this.model = {} |
| | | if (item.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item |
| | | this.detail.dataSource = [] |
| | | this.getBasicInformationByApi(record) |
| | | this.getFlowChartImageByApi(record) |
| | | }, |
| | | |
| | | let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId }) |
| | | this.taskData = [...taskDataList.result] |
| | | /** |
| | | * 主页é¢ç¹å»è¯¦æ
æ¶è§¦å |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | recordDetail(record) { |
| | | this.spinning = true |
| | | this.detail.dataSource = [] |
| | | this.model = Object.assign({ |
| | | operatorSignatureResult: '1', |
| | | repairmanSignatureResult: '1', |
| | | repairManagerSignatureResult: '1', |
| | | inspectorSignatureResult: '1' |
| | | }, record) |
| | | this.handleDynamicColumns() |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | downFile(this.url.diagramView, { |
| | | processDefinitionId, |
| | | processInstanceId, |
| | | TaskDefinitionKey: processDefinitionKey |
| | | }, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | /** |
| | | * è·ååºç¡ä¿¡æ¯ |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | getBasicInformationByApi(record) { |
| | | this.spinning = true |
| | | const that = this |
| | | getAction(this.url.queryById, { id: record.dataId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.model = Object.assign({ |
| | | operatorSignatureResult: '1', |
| | | repairmanSignatureResult: '1', |
| | | repairManagerSignatureResult: '1', |
| | | inspectorSignatureResult: '1' |
| | | }, res.result) |
| | | that.model.dataId = record.dataId |
| | | that.model.taskId = record.id |
| | | that.model.userId = record.assignee |
| | | that.model.instanceId = record.procInstId |
| | | that.handleDynamicColumns() |
| | | } |
| | | else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | } |
| | | let res = await getAction(this.url.queryById, { id: item.dataId }) |
| | | this.model = Object.assign({}, res.result) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | this.model.dataId = item.dataId |
| | | this.model.taskId = item.id |
| | | this.model.userId = item.assignee |
| | | this.model.instanceId = item.procInstId |
| | | this.model.values = item.variables |
| | | await this.loadDetail(item.dataId) |
| | | // await this.loadPrecisionDetail(item.dataId); |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loadDetail(record.dataId) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | recordDetail(record) { |
| | | console.log('record', record) |
| | | this.initParams() |
| | | this.model = Object.assign({}, record) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | this.loadDetail(record.id) |
| | | this.loadPrecisionDetail(record.id); |
| | | /** |
| | | * è·åä¿å
»æç» |
| | | * @param orderId å·¥åå· |
| | | */ |
| | | loadDetail(orderId) { |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | if (this.model.maintenanceStatus && this.model.maintenanceStatus == 'UNDER_SECOND_ACCEPTANCE') { |
| | | this.detail.dataSource = res.result.map(item => { |
| | | return { |
| | | ...item, |
| | | secondInspectResult: '1' |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | this.detail.dataSource = res.result |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.activeTabKey = '1'; |
| | | if(this.selectShenpiData && this.selectShenpiData.taskDefKey === 'precision_check') { |
| | | this.activeTabKey = '4'; |
| | | } |
| | | this.spinning = true |
| | | |
| | | /** |
| | | * è·åæµç¨å¾ |
| | | * @param record 主页é¢å表è¡è®°å½ |
| | | */ |
| | | getFlowChartImageByApi(record) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey } = record |
| | | |
| | | downFile(this.url.diagramView, { |
| | | processDefinitionId, |
| | | processInstanceId, |
| | | TaskDefinitionKey: processDefinitionKey |
| | | }, 'get') |
| | | .then((res => { |
| | | this.imageSrc = window.URL.createObjectURL(new Blob([res])) |
| | | })) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const that = this |
| | | if(that.$refs.editableDetailTable) { |
| | | |
| | | if (this.model.maintenanceStatus == 'UNDER_MAINTENANCE' || this.model.maintenanceStatus == 'UNDER_FIRST_ACCEPTANCE' || this.model.maintenanceStatus == 'UNDER_SECOND_ACCEPTANCE') { |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('æ°æ®æ ¡éªå¤±è´¥ï¼') |
| | | return |
| | | if (this.activeTabKey != '1') { |
| | | this.activeTabKey = '1' |
| | | if (errMap) { |
| | | that.$refs.editableDetailTable.clearValidate() |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'ä¿å
»æéªæ¶ä¸è½ä¸ºç©º' |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | if (errMap) return |
| | | } |
| | | |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | let tableData = []; |
| | | let precisionTableData = []; |
| | | if(that.$refs.editableDetailTable) { |
| | | tableData = that.$refs.editableDetailTable.getTableData() |
| | | } |
| | | if(that.$refs.editablePrecisionDetailTable) { |
| | | precisionTableData = that.$refs.editablePrecisionDetailTable.getTableData() |
| | | } |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.precisionDetailList = [...precisionTableData] |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | that.model.tableDetailList = that.$refs.editableDetailTable.getTableData() |
| | | |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('searchReset') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | httpAction(that.url.approval, that.model, 'put') |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.$emit('modalFormOk') |
| | | that.close() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleDynamicColumns() { |
| | | let columns = [] |
| | | if (this.displayFirstAcceptanceFlag) { |
| | | columns = [ |
| | | { |
| | | title: 'ç¬¬ä¸æ¬¡éªæ¶ç»æ', |
| | | key: 'firstInspectResult', |
| | | type: JVXETypes.slot, |
| | | align: 'center', |
| | | width: 200, |
| | | slotName: 'firstInspectResult', |
| | | validateRules: [{ required: true, message: 'è¯·éæ©${title}' }] |
| | | }, |
| | | { |
| | | title: 'ç¬¬ä¸æ¬¡éªæ¶å¼å¸¸æè¿°', |
| | | key: 'firstInspectException', |
| | | type: JVXETypes.slot, |
| | | align: 'center', |
| | | width: 200, |
| | | slotName: 'firstInspectException', |
| | | validateRules: [ |
| | | { handler: this.firstAcceptanceExceptionDescriptionValidator } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | |
| | | if (this.displaySecondAcceptanceFlag) { |
| | | columns = [ |
| | | ...columns, |
| | | { |
| | | title: 'ç¬¬äºæ¬¡éªæ¶ç»æ', |
| | | key: 'secondInspectResult', |
| | | type: JVXETypes.slot, |
| | | align: 'center', |
| | | width: 200, |
| | | slotName: 'secondInspectResult', |
| | | validateRules: [{ required: true, message: 'è¯·éæ©${title}' }] |
| | | }, |
| | | { |
| | | title: 'ç¬¬äºæ¬¡éªæ¶å¼å¸¸æè¿°', |
| | | key: 'secondInspectException', |
| | | type: JVXETypes.slot, |
| | | align: 'center', |
| | | width: 200, |
| | | slotName: 'secondInspectException', |
| | | validateRules: [ |
| | | { handler: this.secondAcceptanceExceptionDescriptionValidator } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | this.detail.columns = [...this.detail.defaultColumns, ...columns] |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * ä¿å
»ãéªæ¶ç»æåçæ¹åæ¶è§¦å |
| | | * @param value æ¹ååçå¼ |
| | | * @param record è¡¨æ ¼è¡è®°å½ |
| | | * @param key å¯¹è±¡å±æ§åç§° |
| | | */ |
| | | handleResultSelectChange(value, record, key) { |
| | | if (record[key]) delete record[key] |
| | | this.$refs.editableDetailTable.validateTable() |
| | | }, |
| | | // loadPrecisionDetail(orderId) { |
| | | // if (orderId) { |
| | | // getAction(this.url.precisionCheckDetail, { orderId: orderId }).then(res => { |
| | | // if (res.success) { |
| | | // this.precisionDetail.dataSource = [...res.result] |
| | | // } |
| | | // }) |
| | | // } |
| | | // }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } |
| | | getAction(this.url.userSelect, params).then(res => { |
| | | if (res.success) { |
| | | this.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | } |
| | | }) |
| | | }, |
| | | handleInspectionResultSelectChange(value, record) { |
| | | if (record.exceptionDescription) delete record.exceptionDescription |
| | | if (record.reportFlag) delete record.reportFlag |
| | | }, |
| | | // æ¹ééæ©ææç¹æ£ç»æ |
| | | handleSelectAllInspectionResult() { |
| | | |
| | | // æ¹ééæ©ä¿å
»ç»ææ£å¸¸ |
| | | handleSelectAllMaintenanceResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.maintenanceResult !== '1') { |
| | | console.log('dataItem', dataItem) |
| | | if (dataItem && dataItem.maintenanceResult !== 'NORMAL') { |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.maintenanceResult = '1' |
| | | dataItem.maintenanceResult = 'NORMAL' |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | |
| | | // æ¹ééæ©ç¬¬ä¸æ¬¡éªæ¶ç»æéè¿ |
| | | handleSelectAllFirstAcceptanceResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.firstInspectResult !== '1') { |
| | | delete dataItem.firstInspectException |
| | | dataItem.firstInspectResult = '1' |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.$refs.editableDetailTable.clearValidate() |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | |
| | |
| | | this.selectedRowKeys = selectedRowIds |
| | | }, |
| | | |
| | | customValidator({ cellValue, row }, callback) { |
| | | // ä¿å
»åææ¯ç¶æåéåçæ¹åæ¶è§¦å |
| | | handleCheckRadioChange() { |
| | | if (this.model.fullyFunctional == '1' && this.model.runningNormally == '1') this.model.problemDescription = '' |
| | | }, |
| | | |
| | | /** |
| | | * ä¿å
»å¼å¸¸æè¿°åå
æ ¼æ ¡éª |
| | | * @param cellValue åå
æ ¼å¼ |
| | | * @param row è¡¨æ ¼è¡è®°å½ |
| | | * @param callback ç»æåè°å½æ° |
| | | */ |
| | | maintenanceExceptionDescriptionValidator({ cellValue, row }, callback) { |
| | | if (row.maintenanceResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '${title}ä¸è½ä¸ºç©ºï¼') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | callback(false, '请è¾å
¥${title}') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¬¬ä¸æ¬¡éªæ¶å¼å¸¸æè¿°åå
æ ¼æ ¡éª |
| | | * @param cellValue åå
æ ¼å¼ |
| | | * @param row è¡¨æ ¼è¡è®°å½ |
| | | * @param callback ç»æåè°å½æ° |
| | | */ |
| | | firstAcceptanceExceptionDescriptionValidator({ cellValue, row }, callback) { |
| | | if (row.firstInspectResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '请è¾å
¥${title}') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¬¬äºæ¬¡éªæ¶å¼å¸¸æè¿°åå
æ ¼æ ¡éª |
| | | * @param cellValue åå
æ ¼å¼ |
| | | * @param row è¡¨æ ¼è¡è®°å½ |
| | | * @param callback ç»æåè°å½æ° |
| | | */ |
| | | secondAcceptanceExceptionDescriptionValidator({ cellValue, row }, callback) { |
| | | if (row.secondInspectResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '请è¾å
¥${title}') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-select-dropdown-menu { |
| | | text-align: left; |
| | | } |
| | | |
| | | </style> |
| | | /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> |