1、我的待办页面 设备点检 分类审批弹窗功能逻辑开发并复用至我的已办、流程管理和点检工单页面
2、我的待办页面 设备周保流程 分类审批弹窗功能逻辑调整并复用至周保工单页面
3、周保工单页面以及详情列表功能bug修改
4、点检工单页面及新增弹窗功能bug修改
5、工作流我的待办页面 设备点检 分类详情弹窗样式调整为设备周保流程一致
6、工作流我的待办页面 设备周保流程 分类详情弹窗保养明细列表功能逻辑调整
| | |
| | | </div> |
| | | |
| | | <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"></eam-inspection-order-modal> |
| | | <EamInspectionOrderModalXq ref="modalFormXq" @ok="modalFormOk"></EamInspectionOrderModalXq> |
| | | |
| | | <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamInspectionOrderModal from './modules/EamInspectionOrderModal' |
| | | import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | InspectionOrderHandle, |
| | | EamInspectionOrderModal, |
| | | EamInspectionOrderModalXq |
| | | LxSearchEquipmentSelect, |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | |
| | | ], |
| | | url: { |
| | | list: '/eam/eamInspectionOrder/list', |
| | | cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", |
| | | cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', |
| | | deleteBatch: '/eam/eamInspectionOrder/deleteBatch', |
| | | exportXlsUrl: '/eam/eamInspectionOrder/exportXls', |
| | | importExcelUrl: 'eam/eamInspectionOrder/importExcel', |
| | |
| | | cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | | superFieldList: [], |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | //详æ
|
| | | handleDetail: function(record) { |
| | | this.$refs.modalFormXq.edit(record) |
| | | this.selectInspectionOrderXqData = Object.assign({}, record) |
| | | this.$refs.modalFormXq.visible = true |
| | | this.$refs.modalFormXq.title = '详æ
' |
| | | this.$refs.modalFormXq.disableSubmit = true |
| | | this.$refs.modalFormXq.getAllApproveData(record) |
| | | this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) |
| | | }, |
| | | handleInspection(id) { |
| | | if (!this.url.receiveInspectionOrder) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleOrReceive(id){ |
| | | handleOrReceive(id) { |
| | | if (!this.url.cancelInspectionOrder) { |
| | | this.$message.error("请设置url.cancelInspectionOrder!") |
| | | this.$message.error('请设置url.cancelInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.loadData(); |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | batchZf(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal"></week-maintenance-approval-modal> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | description: 'å¨ä¿å·¥å管ç页é¢', |
| | | disableMixinCreated: true, |
| | | selectWeekMaintenanceData:{}, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | |
| | | |
| | | }, |
| | | handleDetail(record) { |
| | | this.selectWeekMaintenanceData = Object.assign({}, record) |
| | | this.$refs.weekMaintenanceApprovalModal.recordDetail(record) |
| | | this.$refs.weekMaintenanceApprovalModal.title = '详æ
'; |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = true |
| | |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" v-model="model.orderNum" disabled /> |
| | | <a-form-model-item prop="standardCode" label="å·¥åå·"> |
| | | <a-input placeholder="å·¥åå·èªå¨çæ" v-model="model.orderNum" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼å·"> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" :disabled="editable" |
| | | @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect> |
| | | :maintenanceCategory="maintenanceCategory" :disabled="disabled" |
| | | @autocompleteForm="autocompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="请è¾å
¥æ ååç§°" disabled v-model="model.standardName" /> |
| | | <a-form-model-item prop="standardName" label="æ ååç§°"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" readOnly v-model="model.standardName"/> |
| | | </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="standardCode" label="æ åç¼ç "> |
| | | <a-input placeholder="请è¾å
¥æ åç¼ç " disabled v-model="model.standardCode" /> |
| | | <a-form-model-item prop="standardCode" label="æ åç¼ç "> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" readOnly v-model="model.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input-number v-model="model.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" /> |
| | | <a-form-model-item label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ç¹æ£äºº"> |
| | | <j-dict-select-tag v-model="model.operator" placeholder="è¯·éæ©ç¨æ·" dictCode="sys_user,realname,username,username!='admin' order by create_time"/> |
| | | <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-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ç¹æ£æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£æ¥æ" v-model="model.inspectionDate" @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%" /> |
| | | <a-form-model-item label="ç¹æ£æ¥æ" prop="inspectionDate"> |
| | | <j-date :placeholder="!model.maintenancePeriod?'请填åä¿å
»å¨æ':'è¯·éæ©ç¹æ£æ¥æ'" v-model="model.inspectionDate" |
| | | :disabled="!model.maintenancePeriod" |
| | | @change="expirationTimeFrom(model.inspectionDate)" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime"> |
| | | <j-date placeholder="è¯·éæ©ç¹æ£è¿ææ¶é´" v-model="model.expirationTime" disabled style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item |
| | | label="ç
§çæä»¶" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="imageFiles"> |
| | | <lx-upload :returnUrl="false" |
| | | :multiple="false" |
| | | v-model="model.imageFiles" |
| | | biz="EamMaintenanceStandard"> |
| | | </lx-upload> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´"> |
| | | <j-date placeholder="éæ©ç¹æ£æ¥æåèªå¨å¸¦åº" v-model="model.expirationTime" disabled style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark"> |
| | | <a-textarea v-model="model.remark" rows="3" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:2}" :wrapperCol="{span:21}" prop="remark"> |
| | | <a-textarea v-model="model.remark" rows="3" placeholder="请è¾å
¥å¤æ³¨"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | style="margin-top: 8px;"/> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import moment from 'dayjs' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import moment from 'dayjs' |
| | | |
| | | export default { |
| | | name: 'EamMaintenanceStandardModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | editable: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | standardName: [ |
| | | { required: true, message: '请è¾å
¥æ ååç§°!' } |
| | | ], |
| | | maintenanceCategory: [ |
| | | { required: true, message: 'è¯·éæ©ä¿å
»åç±»!' } |
| | | ], |
| | | initialDate: [ |
| | | { required: true, message: 'è¯·éæ©åå§æ¥æ!' } |
| | | ], |
| | | maintenancePeriod: [ |
| | | { required: true, message: '请è¾å
¥ä¿å
»å¨æï¼åä½ï¼å¤©!' } |
| | | ], |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: '/eam/eamInspectionOrder/add', |
| | | edit: '/eam/eamInspectionOrder/edit', |
| | | detail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detailOrder: '/eam/eamInspectionOrderDetail/queryList' |
| | | }, |
| | | maintenanceCategory: 'POINT_INSPECTION', |
| | | standardId:"", |
| | | standardType:false, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align:"center", |
| | | validateRules: [ |
| | | {required : true, unique: true, message: 'åºå·ä¸è½éå¤'} |
| | | ] |
| | | }, |
| | | { |
| | | 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: "ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼"} |
| | | ] |
| | | }, |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.model = {} |
| | | this.detail.dataSource = []; |
| | | this.visible = true |
| | | this.editable = false |
| | | this.standardType=false; |
| | | export default { |
| | | name: 'EamMaintenanceStandardModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | edit(record) { |
| | | console.log(record) |
| | | this.model = Object.assign({}, record) |
| | | this.standardId=record.standardId |
| | | this.standardType=true; |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | if (record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile) |
| | | this.model.fileList = [obj] |
| | | } else { |
| | | this.model.fieldList = [] |
| | | } |
| | | this.loadDetailOrder(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' |
| | | } |
| | | this.model.standardId=this.standardId |
| | | 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) |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | disabled: false, |
| | | validatorRules: { |
| | | // standardName: [ |
| | | // { required: true, message: '请è¾å
¥æ ååç§°!' } |
| | | // ], |
| | | inspectionDate: [ |
| | | { required: true, message: 'è¯·éæ©ç¹æ£æ¥æ!' } |
| | | ], |
| | | // maintenancePeriod: [ |
| | | // { required: true, message: '请è¾å
¥ä¿å
»å¨æï¼åä½ï¼å¤©!' } |
| | | // ], |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/eamInspectionOrder/add', |
| | | edit: '/eam/eamInspectionOrder/edit', |
| | | detail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detailOrder: '/eam/eamInspectionOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list' |
| | | }, |
| | | maintenanceCategory: 'POINT_INSPECTION', |
| | | maintenanceOperatorOptions: [], |
| | | standardId: '', |
| | | standardType: false, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | 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: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | ] |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | this.model.standardName = selectObj.standardName |
| | | this.model.maintenancePeriod=selectObj.maintenancePeriod |
| | | this.model.standardCode=selectObj.standardCode |
| | | if (!this.standardType) { |
| | | this.standardId=selectObj.id |
| | | this.loadDetail(selectObj.id) |
| | | } |
| | | }, |
| | | expirationTimeFrom(date) { |
| | | //è¿ææ¶é´æ¯åå§æ¶é´+ä¿å
»å¨æ |
| | | if (date && this.model.maintenancePeriod) { |
| | | // 转æ¢ä¸ºæ¶é´æ³åç¬¦ä¸²ï¼ææå®æ ¼å¼ï¼ |
| | | this.model.expirationTime = moment(date) |
| | | .add(this.model.maintenancePeriod, 'days') |
| | | .format('YYYY-MM-DD') |
| | | } else { |
| | | this.model.expirationTime = null; // æ¸
ç©ºæ æå¼ |
| | | } |
| | | created() { |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadDetail(standardId) { |
| | | if (standardId) { |
| | | getAction(this.url.detail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | this.standardType=false; |
| | | methods: { |
| | | add() { |
| | | this.model = {} |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.disabled = false |
| | | this.standardType = false |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.standardId = record.standardId |
| | | this.disabled = true |
| | | this.standardType = true |
| | | this.visible = true |
| | | this.detail.dataSource = [] |
| | | if (record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile) |
| | | this.model.fileList = [obj] |
| | | } else { |
| | | this.model.fieldList = [] |
| | | } |
| | | this.loadDetailOrder(record.id) |
| | | }, |
| | | |
| | | 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 = that.spinning = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | this.model.standardId = this.standardId |
| | | 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) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadDetailOrder(orderId){ |
| | | if (orderId) { |
| | | getAction(this.url.detailOrder, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.model.standardName = selectObj.standardName |
| | | this.model.maintenancePeriod = selectObj.maintenancePeriod |
| | | this.model.standardCode = selectObj.standardCode |
| | | // è¥åæ¶è®¾å¤éæ©åä¿å
»å¨æä¸ºç©ºå鿏
ç©ºç¹æ£æ¥æåç¹æ£è¿ææ¶é´ |
| | | if (!this.model.equipmentId) { |
| | | delete this.model.inspectionDate |
| | | delete this.model.expirationTime |
| | | } else { |
| | | // å¦æç¹æ£æ¥æåå¨ï¼åå¨éæ°éæ©è®¾å¤åå³ä¿å
»å¨æå¯è½åçæ¹ååéæ°è®¡ç®è¿ææ¶é´ |
| | | if (this.model.inspectionDate) this.expirationTimeFrom(this.model.inspectionDate) |
| | | } |
| | | if (!this.standardType) { |
| | | console.log('this.standardType', this.standardType) |
| | | this.standardId = selectObj.id |
| | | this.loadDetail(selectObj.id) |
| | | } |
| | | this.$nextTick(() => this.loadMaintenanceOperatorList(this.model.equipmentId)) |
| | | }, |
| | | |
| | | expirationTimeFrom(date) { |
| | | //è¿ææ¶é´æ¯åå§æ¶é´+ä¿å
»å¨æ |
| | | if (date && this.model.maintenancePeriod) { |
| | | // 转æ¢ä¸ºæ¶é´æ³åç¬¦ä¸²ï¼ææå®æ ¼å¼ï¼ |
| | | this.model.expirationTime = moment(date) |
| | | .add(this.model.maintenancePeriod, 'days') |
| | | .format('YYYY-MM-DD') |
| | | } else { |
| | | this.model.expirationTime = null // æ¸
ç©ºæ æå¼ |
| | | } |
| | | }, |
| | | |
| | | //å 载详æ
æ°æ® |
| | | loadDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | console.log('standardId', standardId) |
| | | this.spinning = true |
| | | getAction(this.url.detail, { standardId: standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | loadDetailOrder(orderId) { |
| | | if (orderId) { |
| | | this.spinning = true |
| | | getAction(this.url.detailOrder, { orderId: orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } else { |
| | | delete this.model.operator |
| | | 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 |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <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 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="设å¤ç¼ç "> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" :disabled="editable"></maintenance-equipment-select> |
| | | @autocompleteForm="autocompleteForm" |
| | | :disabled="editable"></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 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-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 :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ä¿å
»äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" |
| | | :dictOptions="maintenanceOperatorOptions" /> |
| | | <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 :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="ä¿å
»å¨æ"> |
| | | <a-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.maintenancePeriod" disabled /> |
| | | <a-form-model-item 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" /> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="detail.toolbarConfig" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | <a-spin :spinning="detail.loading"> |
| | | <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-spin> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | 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, |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: 'è¯·éæ©è®¡åä¿å
»æ¥æ!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/weekMaintenanceOrder/add', |
| | | edit: '/eam/weekMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/weekMaintenanceOrderDetail/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: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | 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'] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | this.loadMaintenanceOperatorList(); |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(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) |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | 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, |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: 'è¯·éæ©è®¡åä¿å
»æ¥æ!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/weekMaintenanceOrder/add', |
| | | edit: '/eam/weekMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/weekMaintenanceOrderDetail/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: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | }).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.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId); |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | if (standardId) { |
| | | getAction(this.url.standardDetail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | subItemName: item.subItemName, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //æ åéæ©åå |
| | | 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 |
| | | } |
| | | 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 |
| | | })) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(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) |
| | | } |
| | | }).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.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | this.spinning = true |
| | | getAction(this.url.standardDetail, { standardId: standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | subItemName: item.subItemName, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | //æ åéæ©åå |
| | | 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 |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç±»"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" |
| | | dictCode="flow_type"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" |
| | | v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" |
| | | v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <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> |
| | |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq> |
| | | |
| | | <DispatchFileXq ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq> |
| | | |
| | | <InspectionOrderXq ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq> |
| | | |
| | | <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue' |
| | | import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue' |
| | | import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderXq, |
| | | DispatchFileXq, |
| | | AssignFileStreamXq: AssignFileStreamXq, |
| | | JDictSelectTag, |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ç¹æ®å符管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:200, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: "center", |
| | | dataIndex: 'category_dictText', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: "center", |
| | | dataIndex: 'procDefName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: "center", |
| | | dataIndex: 'description', |
| | | width:300 |
| | | }, |
| | | { |
| | | title: 'æµç¨å起人åç§°', |
| | | align: "center", |
| | | dataIndex: 'startUserName', |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: 'ä»»å¡åç§°', |
| | | align: "center", |
| | | dataIndex: 'taskName', |
| | | width:250 |
| | | }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'finishTime', |
| | | width:300 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/assign/flow/finishedList", |
| | | }, |
| | | dictOptions:{}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData:{}, |
| | | selectInspectionOrderXqData:{} |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | JDictSelectTag |
| | | }, |
| | | }, |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'drApproval': |
| | | this.handDrDetial(item) |
| | | break |
| | | case 'ggApproval': |
| | | this.handDispatchFileDetial(item) |
| | | break |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | data() { |
| | | return { |
| | | description: '设å¤ç¹æ®å符管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 200, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: 'center', |
| | | dataIndex: 'procDefName', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'æµç¨å起人åç§°', |
| | | align: 'center', |
| | | dataIndex: 'startUserName', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: 'ä»»å¡åç§°', |
| | | align: 'center', |
| | | dataIndex: 'taskName', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: 'æä½æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'finishTime', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/finishedList' |
| | | }, |
| | | dictOptions: {}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData: {}, |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | created() { |
| | | }, |
| | | handDrDetial(item) { |
| | | this.selectShenpiData = item |
| | | this.$refs.modalFormApproval.clearTableSource() |
| | | this.$refs.modalFormApproval.getAllApproveData(item) |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | handDispatchFileDetial(item){ |
| | | console.log('item----->', item) |
| | | this.selectDispatchFileXqData = item |
| | | this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectDispatchFileXqData.procInstId=item.procInsId |
| | | this.selectDispatchFileXqData.processInstanceId=item.procInsId |
| | | this.selectDispatchFileXqData.title=item.description |
| | | this.$refs.modalFormDispatchFileXq.clearTableSource() |
| | | this.$refs.modalFormDispatchFileXq.getAllApproveData(item) |
| | | }, |
| | | handInspectionOrder(item) { |
| | | console.log('item----->', item) |
| | | this.selectInspectionOrderXqData = item |
| | | this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectInspectionOrderXqData.procInstId=item.procInsId |
| | | this.selectInspectionOrderXqData.processInstanceId=item.procInsId |
| | | this.selectInspectionOrderXqData.title=item.description |
| | | this.$refs.modalFormInspectionOrderXq.clearTableSource() |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | | case 'WEEK_MAINTENANCE': |
| | | this.handleWeekMaintenance(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | } |
| | | }, |
| | | |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | |
| | | handleWeekMaintenance() { |
| | | |
| | | }, |
| | | |
| | | handInspectionOrder(record) { |
| | | console.log('record----->', record) |
| | | this.selectInspectionOrderXqData = Object.assign({}, record) |
| | | const { todoUsers_dictText, procInsId, description, taskName } = this.selectInspectionOrderXqData |
| | | this.selectInspectionOrderXqData.assignee_dictText = todoUsers_dictText |
| | | this.selectInspectionOrderXqData.procInstId = procInsId |
| | | this.selectInspectionOrderXqData.processInstanceId = procInsId |
| | | this.selectInspectionOrderXqData.title = description |
| | | this.$refs.modalFormInspectionOrderXq.visible = true |
| | | this.$refs.modalFormInspectionOrderXq.title = taskName |
| | | this.$refs.modalFormInspectionOrderXq.disableSubmit = true |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData({ |
| | | ...record, |
| | | procInstId: procInsId, |
| | | processInstanceId: procInsId |
| | | }) |
| | | this.$refs.modalFormInspectionOrderXq.getBasicInformation(record) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <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="æµç¨åç±»"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç±»"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©æµç¨åç±»" v-model="queryParam.category" |
| | | dictCode="flow_type"></j-dict-select-tag> |
| | | </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.flowName"></a-input> |
| | |
| | | <a-input placeholder="请è¾å
¥ç®è¦æè¿°" v-model="queryParam.title"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
| | | <a-form-item label="æä½æ¶é´"> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" |
| | | v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" |
| | | v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <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> |
| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handelDetial(record,text)">详æ
</a> |
| | | <a @click="handelDetail(record,text)">详æ
</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <AssignFileStreamXq ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamXq> |
| | | |
| | | <DispatchFileXq ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData"></DispatchFileXq> |
| | | |
| | | <InspectionOrderXq ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"></InspectionOrderXq> |
| | | <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import AssignFileStreamXq from '@views/flowable/workflow/assignFileStream/AssignFileStreamXq.vue' |
| | | import DispatchFileXq from '@views/flowable/workflow/dispatchFile/DispatchFileXq.vue' |
| | | import InspectionOrderXq from '@views/flowable/workflow/InspectionOrder/InspectionOrderXq.vue' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | DispatchFileXq, |
| | | AssignFileStreamXq: AssignFileStreamXq, |
| | | JDictSelectTag, |
| | | InspectionOrderXq |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤ç¹æ®å符管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: "center", |
| | | dataIndex: 'category_dictText', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title:'æµç¨åç§°', |
| | | align:"center", |
| | | dataIndex: 'flowName' |
| | | }, |
| | | { |
| | | title:'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align:"center", |
| | | dataIndex: 'title' |
| | | }, |
| | | { |
| | | title:'ç³è¯·äºº', |
| | | align:"center", |
| | | dataIndex: 'proposer_dictText' |
| | | }, |
| | | { |
| | | title: 'å驱èç¹', |
| | | align: "center", |
| | | dataIndex: 'preNode', |
| | | }, |
| | | { |
| | | title:'å½åèç¹', |
| | | align:"center", |
| | | dataIndex: 'taskName' |
| | | }, |
| | | { |
| | | title:'æµç¨å¼å§æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'startTime' |
| | | }, |
| | | { |
| | | title:'æµç¨ç»ææ¶é´', |
| | | align:"center", |
| | | dataIndex: 'endTime' |
| | | }, |
| | | { |
| | | title:'å¤çæ¶é¿', |
| | | align:"center", |
| | | dataIndex: 'duration' |
| | | }, |
| | | { |
| | | title:'å½åä»»å¡äºº', |
| | | align:"center", |
| | | dataIndex: 'todoUsers_dictText' |
| | | }, |
| | | { |
| | | title:'å¤çè¿ç人', |
| | | align:"center", |
| | | dataIndex: 'doneUsers_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/assign/flow/list", |
| | | }, |
| | | dictOptions:{}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData:{}, |
| | | selectInspectionOrderXqData:{} |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | export default { |
| | | name: 'FlowLedger', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | JDictSelectTag |
| | | }, |
| | | }, |
| | | methods: { |
| | | handelDetial(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'drApproval': |
| | | item.description=item.title |
| | | this.handDrDetial(item) |
| | | break |
| | | case 'ggApproval': |
| | | item.description=item.title |
| | | this.handDispatchFileDetial(item) |
| | | break |
| | | case 'sbdjApproval': |
| | | item.description=item.title |
| | | this.handInspectionOrderDetial(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | data() { |
| | | return { |
| | | description: 'æµç¨ç®¡ç', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | | align: 'center', |
| | | dataIndex: 'flowName' |
| | | }, |
| | | { |
| | | title: 'æµç¨ä¸å¡ç®è¦æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'title' |
| | | }, |
| | | { |
| | | title: 'ç³è¯·äºº', |
| | | align: 'center', |
| | | dataIndex: 'proposer_dictText' |
| | | }, |
| | | { |
| | | title: 'å驱èç¹', |
| | | align: 'center', |
| | | dataIndex: 'preNode' |
| | | }, |
| | | { |
| | | title: 'å½åèç¹', |
| | | align: 'center', |
| | | dataIndex: 'taskName' |
| | | }, |
| | | { |
| | | title: 'æµç¨å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'startTime' |
| | | }, |
| | | { |
| | | title: 'æµç¨ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'endTime' |
| | | }, |
| | | { |
| | | title: 'å¤çæ¶é¿', |
| | | align: 'center', |
| | | dataIndex: 'duration' |
| | | }, |
| | | { |
| | | title: 'å½åä»»å¡äºº', |
| | | align: 'center', |
| | | dataIndex: 'todoUsers_dictText' |
| | | }, |
| | | { |
| | | title: 'å¤çè¿ç人', |
| | | align: 'center', |
| | | dataIndex: 'doneUsers_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/assign/flow/list' |
| | | }, |
| | | dictOptions: {}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData: {}, |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | created() { |
| | | }, |
| | | handDrDetial(item) { |
| | | this.selectShenpiData = item |
| | | this.selectShenpiData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectShenpiData.createTime=item.startTime |
| | | this.selectShenpiData.procInstId=item.processInstanceId |
| | | this.$refs.modalFormApproval.clearTableSource() |
| | | this.$refs.modalFormApproval.getAllApproveData(item) |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | handDispatchFileDetial(item){ |
| | | this.selectDispatchFileXqData = item |
| | | this.selectDispatchFileXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectDispatchFileXqData.createTime=item.startTime |
| | | this.selectDispatchFileXqData.procInstId=item.processInstanceId |
| | | this.$refs.modalFormDispatchFileXq.clearTableSource() |
| | | this.$refs.modalFormDispatchFileXq.getAllApproveData(item) |
| | | }, |
| | | handInspectionOrderDetial(item){ |
| | | this.selectInspectionOrderXqData = item |
| | | this.selectInspectionOrderXqData.assignee_dictText=item.todoUsers_dictText |
| | | this.selectInspectionOrderXqData.createTime=item.startTime |
| | | this.selectInspectionOrderXqData.procInstId=item.processInstanceId |
| | | this.$refs.modalFormInspectionOrderXq.clearTableSource() |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) |
| | | methods: { |
| | | handelDetail(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | | console.log('index----->', index) |
| | | let approcesstype = this.splitAprocessType(item.category) |
| | | console.log('approcesstype--->', approcesstype) |
| | | switch (approcesstype) { |
| | | case 'sbdjApproval': |
| | | item.description = item.title |
| | | this.handInspectionOrderDetail(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | } |
| | | }, |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | |
| | | handInspectionOrderDetail(item) { |
| | | this.selectInspectionOrderXqData = item |
| | | this.selectInspectionOrderXqData.assignee_dictText = item.todoUsers_dictText |
| | | this.selectInspectionOrderXqData.createTime = item.startTime |
| | | this.selectInspectionOrderXqData.procInstId = item.processInstanceId |
| | | this.$refs.modalFormInspectionOrderXq.visible = true |
| | | this.$refs.modalFormInspectionOrderXq.disableSubmit = true |
| | | this.$refs.modalFormInspectionOrderXq.getAllApproveData(item) |
| | | this.$refs.modalFormInspectionOrderXq.getBasicInformation(item) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handelDetail(record,text)">æ¥ç详æ
</a> |
| | | <a @click="handelDetail(record,text)">æ§è¡/审æ¹</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <AssignFileStreamHandle ref="modalFormApproval" :selectShenpiData="selectShenpiData"></AssignFileStreamHandle> |
| | | <DispatchFileHandle ref="modalFormDispatchFileXq" :selectShenpiData="selectDispatchFileXqData" |
| | | @searchReset="searchReset"></DispatchFileHandle> |
| | | <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" |
| | | @ok="modalFormOk"></DispatchFileBachHandleStyle> |
| | | <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" |
| | | @searchReset="searchReset"></InspectionOrderHandle> |
| | | <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" |
| | | @searchReset="searchReset"></InspectionOrderHandleBzz> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" @searchReset="searchReset"></week-maintenance-approval-modal> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData" |
| | | @searchReset="searchReset"></week-maintenance-approval-modal> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" @searchReset="searchReset" |
| | | :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal> |
| | | </a-card> |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
| | | import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' |
| | | import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' |
| | | import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' |
| | | import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' |
| | | import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' |
| | | import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' |
| | | import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue' |
| | | |
| | | import { getAction } from '@api/manage' |
| | | |
| | |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | AssignFileStreamHandle, |
| | | JDictSelectTag, |
| | | DispatchFileHandle, |
| | | DispatchFileBachHandleStyle, |
| | | WeekMaintenanceApprovalModal, |
| | | RepairOrderApprovalModal, |
| | | InspectionOrderHandle, |
| | | InspectionOrderHandleBzz |
| | | InspectionOrderHandle |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | isSameNode: '/assign/flow/isSameNode' |
| | | }, |
| | | dictOptions: {}, |
| | | selectShenpiData: {}, |
| | | selectDispatchFileXqData: {}, |
| | | selectInspectionOrderData: {}, |
| | | selectInspectionOrderDataBzz: {}, |
| | | selectWeekMaintenanceData: {}, |
| | | selectBachData: {}, |
| | | selectRepairOrderData: {}, |
| | | //ä¸å¡ä¿¡æ¯ID |
| | |
| | | let processType = this.splitAprocessType(item.category) |
| | | console.log('processType--->', processType) |
| | | switch (processType) { |
| | | case 'drApproval': |
| | | this.handDrDetail(item) |
| | | break |
| | | case 'ggApproval': |
| | | this.handDispatchFileDetail(item) |
| | | break |
| | | case 'sbdjApproval': |
| | | this.handInspectionOrder(item) |
| | | break |
| | |
| | | let result = parts[0] |
| | | return result |
| | | }, |
| | | handDrDetail(record) { |
| | | this.selectShenpiData = Object.assign({}, record) |
| | | this.$refs.modalFormApproval.visible = true |
| | | this.$refs.modalFormApproval.getAllApproveData(record) |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | handDispatchFileDetail(item) { |
| | | console.log('item----->', item) |
| | | this.selectDispatchFileXqData = item |
| | | this.$refs.modalFormDispatchFileXq.clearTableSource() |
| | | this.$refs.modalFormDispatchFileXq.getAllApproveData(item) |
| | | }, |
| | | |
| | | handInspectionOrder(record) { |
| | | console.log('record----->', record) |
| | | const tableRecord = Object.assign({}, record) |
| | | if (record.taskDefKey === 'Confirmed_completed') { |
| | | this.selectInspectionOrderDataBzz = tableRecord |
| | | this.$refs.modalFormInspectionOrderBzz.getAllApproveData(record) |
| | | } else { |
| | | this.selectInspectionOrderData = tableRecord |
| | | this.$refs.modalFormInspectionOrder.visible = true |
| | | this.$refs.modalFormInspectionOrder.getAllApproveData(record) |
| | | this.$refs.modalFormInspectionOrder.getBasicInformation(record) |
| | | } |
| | | this.selectInspectionOrderData = Object.assign({}, record) |
| | | this.$refs.modalFormInspectionOrder.visible = true |
| | | this.$refs.modalFormInspectionOrder.title = record.name |
| | | this.$refs.modalFormInspectionOrder.getAllApproveData(record) |
| | | this.$refs.modalFormInspectionOrder.getBasicInformation(record) |
| | | }, |
| | | |
| | | batchHandle() { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleWeekMaintenance(item) { |
| | | if (item && item.dataId) { |
| | | this.selectWeekMaintenanceData = Object.assign({}, item) |
| | | this.$refs.weekMaintenanceApprovalModal.handleDetail(item) |
| | | this.$refs.weekMaintenanceApprovalModal.title = item.name |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = false |
| | |
| | | <template> |
| | | <a-modal |
| | | :width="1000" |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }" |
| | | @ok="submitForm" |
| | | @cancel="handCancel" |
| | | @cancel="handleCancel" |
| | | :mask-closable="false" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <b>{{ selectShenpiData.title }}</b> |
| | | <br> |
| | | <br> |
| | | <a-tag color="blue"> |
| | | å½åå¤ç人 {{ selectShenpiData.assignee_dictText }} |
| | | </a-tag> |
| | | <a-tag color="blue"> |
| | | ä»»å¡å建æ¶é´ {{ selectShenpiData.createTime }} |
| | | </a-tag> |
| | | <br> |
| | | <br> |
| | | <a-button @click="fetchAndShowBmp" class="btn-custom" :loading="showBmpButtonLoading">æµç¨å¾</a-button> |
| | | <div v-if="imageSrc&&isDisplayBmp"> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </div> |
| | | <!--<hr class="shallow-hr">--> |
| | | </div> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç¹æ£åºç¡ä¿¡æ¯</a-divider> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <a-tabs default-active-key='1'> |
| | | <a-tab-pane key='1' tab='åºæ¬ä¿¡æ¯'> |
| | | <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol"> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="å·¥åå·"> |
| | | <a-input readOnly v-model="tableRowRecord.orderNum"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId" |
| | | :maintenanceCategory="'POINT_INSPECTION'" disabled |
| | | @autocompleteForm="autoCompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="å·¥åå·"> |
| | | <a-input readOnly v-model="tableRowRecord.orderNum"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="设å¤ç¼å·"> |
| | | <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId" |
| | | :maintenanceCategory="'POINT_INSPECTION'" disabled |
| | | @autocompleteForm="autoCompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ ååç§°"> |
| | | <a-input readOnly v-model="tableRowRecord.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ ååç§°"> |
| | | <a-input readOnly v-model="tableRowRecord.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ åç¼ç "> |
| | | <a-input readOnly v-model="tableRowRecord.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ä¿å
»å¨æ"> |
| | | <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£äºº"> |
| | | <a-input v-model="tableRowRecord.operator" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£æ¥æ" prop="inspectionDate"> |
| | | <a-input v-model="tableRowRecord.inspectionDate" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´"> |
| | | <a-input v-model="tableRowRecord.expirationTime" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:3}" :wrapperCol="{span:20}"> |
| | | <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-tab-pane> |
| | | <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-tabs> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="æ åç¼ç "> |
| | | <a-input readOnly v-model="tableRowRecord.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£æ¥æ"> |
| | | <a-input v-model="tableRowRecord.inspectionDate" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£è¿ææ¶é´"> |
| | | <a-input v-model="tableRowRecord.expirationTime" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-tabs default-active-key='1'> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ä¿å
»å¨æ"> |
| | | <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label="ç¹æ£äºº"> |
| | | <a-input v-model="tableRowRecord.operator" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="span*3"> |
| | | <a-form-model-item label="夿³¨" :labelCol="{span:2}" :wrapperCol="{span:21}"> |
| | | <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-form-model-item prop="imageFilesResult" label="ç¹æ£å¾ç" :labelCol="{span:2}" :wrapperCol="{span:21}"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'" |
| | | v-model="tableRowRecord.imageFiles"/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> |
| | | ä¿å
»é¡¹ä¿¡æ¯ |
| | | </a-divider> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | |
| | | > |
| | | <template v-slot:inspectionResult="props"> |
| | | <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'" |
| | | placeholder="è¯·éæ©ç¹æ£ç»æ" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%"/> |
| | |
| | | |
| | | <template v-slot:exceptionDescription="props"> |
| | | <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" |
| | | :disabled="!props.row.inspectionResult||props.row.inspectionResult==='1'"/> |
| | | :placeholder="props.row.inspectionResult==='2'?'请è¾å
¥å¼å¸¸æè¿°':''" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'||!props.row.inspectionResult||props.row.inspectionResult==='1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="!props.row.inspectionResult||props.row.inspectionResult==='1'" |
| | | :placeholder="props.row.inspectionResult==='2'?'è¯·éæ©å¼å¸¸æ¯å¦ä¿ä¿®':''" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='UNDER_INSPECTION'||!props.row.inspectionResult||props.row.inspectionResult==='1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <a-button v-if="selectedRowKeys.length>0" slot="tabBarExtraContent" type="primary" |
| | | @click="handleSelectAllInspectionResult">æ¹éç¹æ£æ£å¸¸ |
| | | <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-button |
| | | v-if="selectedRowKeys.length>0&&!disableSubmit&&tableRowRecord.inspectionStatus==='UNDER_INSPECTION'&&hasInspectionDateArrived&&activeTabKey==='1'" |
| | | slot="tabBarExtraContent" type="primary" |
| | | @click="handleSelectAllInspectionResult">æ¹éç¹æ£æ£å¸¸ |
| | | </a-button> |
| | | |
| | | <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">--> |
| | |
| | | <!--</a-button>--> |
| | | <!--</a-dropdown>--> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </a-card> |
| | | </a-modal> |
| | | |
| | | <template v-if="isDisplayConfirm"> |
| | | <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 prop="confirmDealType" label="å¤çç±»å"> |
| | | <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected' |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'" |
| | | placeholder="è¯·éæ©å¤çç±»å"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="confirmComment" label="å¤çæè§"> |
| | | <a-textarea placeholder="请è¾å
¥å¤çæè§" |
| | | :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'" |
| | | v-model="tableRowRecord.confirmComment"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </template> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'InspectionOrderHandle', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object, |
| | | required: true |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | span: 12, |
| | | span: 8, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream: {}, |
| | | hitaskDataSource: [], |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: 'è¯·éæ©å¤çç±»å' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥å¤çæè§' } |
| | | ] |
| | | }, |
| | | imageSrc: null, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | width: '5%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | width: '15%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '30%', |
| | | width: '15%', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | |
| | | key: 'inspectionResult', |
| | | type: JVXETypes.slot, |
| | | slotName: 'inspectionResult', |
| | | width: '20%', |
| | | align: 'center' |
| | | width: '15%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '${title}ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | slotName: 'exceptionDescription', |
| | | width: '30%', |
| | | align: 'center' |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æ¯å¦æ¥ä¿®', |
| | |
| | | type: JVXETypes.slot, |
| | | slotName: 'reportFlag', |
| | | width: '20%', |
| | | align: 'center' |
| | | align: 'center', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | isDisplayBmp: false, |
| | | showBmpButtonLoading: false, |
| | | selectedRowKeys: [] |
| | | selectedRowKeys: [], |
| | | disableSubmit: false, |
| | | activeTabKey: '1', |
| | | title: '' |
| | | } |
| | | }, |
| | | computed: { |
| | | hasInspectionDateArrived() { |
| | | return moment(this.tableRowRecord.inspectionDate).diff(moment(), 'hours') <= 0 |
| | | }, |
| | | isDisplayConfirm() { |
| | | return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.inspectionStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | getAllApproveData(record) { |
| | | const param = { 'procInstId': record.procInstId } |
| | | getAction(this.url.queryHisTaskList, param) |
| | | .then(res => { |
| | | this.hitaskDataSource = res.result |
| | | }) |
| | | if (record.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = record |
| | | const param = { procInstId } |
| | | const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } |
| | | const that = this |
| | | |
| | | getAction(this.url.queryHisTaskList, param) |
| | | .then(res => { |
| | | that.hitaskDataSource = res.result |
| | | }) |
| | | |
| | | downFile(this.url.diagramView, imageParam, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | that.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param record å¾
åè®°å½ä¿¡æ¯ |
| | | */ |
| | | getBasicInformation(record) { |
| | | this.activeTabKey = '1' |
| | | this.tableRowRecord = {} |
| | | this.detail.dataSource = [] |
| | | this.spinning = true |
| | |
| | | .then((res => { |
| | | if (res.success) { |
| | | that.tableRowRecord = res.result[0] |
| | | if (!this.hasInspectionDateArrived && !this.disableSubmit) this.title += `ï¼æªå°ç¹æ£æ¥æä¸è½æåç¹æ£ï¼` |
| | | that.detail.dataSource = res.result[0].tableDetailList |
| | | console.log('that.tableRowRecord----->', that.tableRowRecord) |
| | | } |
| | | })) |
| | | }, |
| | | |
| | | // è·åå¹¶å±å¼æµç¨å¾ |
| | | fetchAndShowBmp() { |
| | | this.isDisplayBmp = !this.isDisplayBmp |
| | | if (!this.imageSrc) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey } = this.selectShenpiData |
| | | let param = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } |
| | | this.showBmpButtonLoading = true |
| | | const that = this |
| | | downFile(this.url.diagramView, param, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | this.showBmpButtonLoading = false |
| | | }) |
| | | async submitForm() { |
| | | let errMap = await this.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | console.log('err', errMap) |
| | | return |
| | | } |
| | | }, |
| | | |
| | | submitForm() { |
| | | const flowTaskVo = {} |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() |
| | | const that = this |
| | | this.confirmLoading = true |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | // httpAction(this.url.approve, flowTaskVo, 'post') |
| | | // .then((res) => { |
| | | // if (res.success) { |
| | | // that.$message.success(res.message) |
| | | // //å·æ°è¡¨æ ¼ |
| | | // that.$emit('searchReset') |
| | | // that.handleCancel() |
| | | // } else { |
| | | // that.$message.warning(res.message) |
| | | // } |
| | | // }) |
| | | // .finally(() => { |
| | | // that.confirmLoading = false |
| | | // }) |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | this.confirmLoading = this.spinning = true |
| | | const flowTaskVo = {} |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType |
| | | flowTaskVo.confirmComment = this.tableRowRecord.confirmComment |
| | | flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData() |
| | | const that = this |
| | | console.log('表åæäº¤æ°æ®', flowTaskVo) |
| | | httpAction(this.url.approve, flowTaskVo, 'post') |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | //å·æ°è¡¨æ ¼ |
| | | that.$emit('searchReset') |
| | | that.handleCancel() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = this.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | autoCompleteForm({ standardName, maintenancePeriod, standardCode }) { |
| | |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.inspectionResult !== '1') { |
| | | console.log('dataItem', dataItem) |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.inspectionResult = '1' |
| | |
| | | if (record.reportFlag) delete record.reportFlag |
| | | }, |
| | | |
| | | handCancel() { |
| | | customValidator({ cellValue, row }, callback) { |
| | | if (row.inspectionResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '${title}ä¸è½ä¸ºç©ºï¼') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | } |
| | |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | centered |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <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-input placeholder="å·¥åå·ç³»ç»èªå¨çæ" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | |
| | | </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-input placeholder="éæ©è®¾å¤åèªå¨å¸¦åº" v-model="model.standardName" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <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%" /> |
| | | 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" /> |
| | | :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-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-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" disabled/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | |
| | | :isMultiple="true" |
| | | file-type="image" |
| | | :disabled="confirmDisable" |
| | | v-model="model.imageFilesResult" /> |
| | | 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> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="ä¿å
»é¡¹æç»"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | |
| | | placeholder="è¯·éæ©ä¿å
ȍȾ" |
| | | :disabled="disableSubmit || confirmDisable" |
| | | @change="handleInspectionResultSelectChange($event,props.row)" |
| | | style="width: 100%" /> |
| | | style="width: 100%"/> |
| | | </template> |
| | | |
| | | <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'" /> |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | |
| | | <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%" /> |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="!disableSubmit" 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-tab-pane> |
| | | <a-button v-if="!disableSubmit || selectedRowKeys.length > 0" slot="tabBarExtraContent" type="primary" |
| | | @click="handleSelectAllInspectionResult">ä¿å
»æ£å¸¸ |
| | | <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-tab-pane> |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/>--> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">ä¿å
»æ£å¸¸ |
| | | </a-button> |
| | | </a-tabs> |
| | | </a-row> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmDealType" label="确认类å"> |
| | | <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected' placeholder="è¯·éæ©å¤çç±»å" :disabled="disableSubmit || initialAcceptanceDisable" /> |
| | | <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected' |
| | | placeholder="è¯·éæ©å¤çç±»å" :disabled="disableSubmit || initialAcceptanceDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmComment" label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.confirmComment" :disabled="disableSubmit || initialAcceptanceDisable" /> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.confirmComment" |
| | | :disabled="disableSubmit || initialAcceptanceDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceComment" label="åéªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.initialAcceptanceComment" :disabled="disableSubmit || finalAcceptanceDisable" /> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceComment" |
| | | label="åéªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.initialAcceptanceComment" |
| | | :disabled="disableSubmit || finalAcceptanceDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult" label="åéªæ¶éä»¶"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult" |
| | | label="åéªæ¶éä»¶"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | :disabled="disableSubmit || finalAcceptanceDisable" |
| | | v-model="model.initialAcceptanceFilesResult" /> |
| | | v-model="model.initialAcceptanceFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceComment" label="ç»éªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.finalAcceptanceComment" :disabled="disableSubmit || completionDisable" /> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceComment" |
| | | label="ç»éªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.finalAcceptanceComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult" label="ç»éªæ¶éä»¶"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult" |
| | | label="ç»éªæ¶éä»¶"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | :disabled="disableSubmit || completionDisable" |
| | | v-model="model.finalAcceptanceFilesResult" /> |
| | | v-model="model.finalAcceptanceFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | import { downFile, getAction, httpAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | |
| | | export default { |
| | | name: 'WeekMaintenanceApprovalModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | //ç¶ææ§å¶ |
| | | //ä¿å
»ä¸ ä¸å¯ç¼è¾ |
| | | // confirmDisable: false, |
| | | // initialAcceptanceDisable: false, |
| | | // finalAcceptanceDisable: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | 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, |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: 'è¯·éæ©éè¿æé©³å!' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥ç¡®è®¤æè§!' } |
| | | ], |
| | | initialAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥åéªæ¶æè§!' } |
| | | ], |
| | | finalAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥ç»éªæ¶æè§!' } |
| | | ], |
| | | }, |
| | | url: { |
| | | queryById: '/eam/weekMaintenanceOrder/queryById', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | approval: '/eam/weekMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | }, |
| | | disableSubmit: false, |
| | | taskData: [], |
| | | isDisplayBmp: false, |
| | | showBmpButtonLoading: false, |
| | | selectedRowKeys: [], |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '5%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
ȍȾ', |
| | | key: 'maintenanceResult', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'maintenanceResult', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»ç»æä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | width: '20%', |
| | | align: 'center', |
| | | slotName: 'exceptionDescription', |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'reportFlag', |
| | | export default { |
| | | name: 'WeekMaintenanceApprovalModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | | props: { |
| | | selectShenpiData: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | //ç¶ææ§å¶ |
| | | //ä¿å
»ä¸ ä¸å¯ç¼è¾ |
| | | // confirmDisable: false, |
| | | // initialAcceptanceDisable: false, |
| | | // finalAcceptanceDisable: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | 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, |
| | | imageSrc: null, |
| | | activeTabKey: '1', |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: 'è¯·éæ©éè¿æé©³å!' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥ç¡®è®¤æè§!' } |
| | | ], |
| | | initialAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥åéªæ¶æè§!' } |
| | | ], |
| | | finalAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥ç»éªæ¶æè§!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | queryById: '/eam/weekMaintenanceOrder/queryById', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | approval: '/eam/weekMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | diagramView: '/assign/flow/diagramView' |
| | | }, |
| | | disableSubmit: false, |
| | | taskData: [], |
| | | isDisplayBmp: false, |
| | | showBmpButtonLoading: false, |
| | | selectedRowKeys: [], |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: '5%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
ȍȾ', |
| | | key: 'maintenanceResult', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'maintenanceResult', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»ç»æä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å¼å¸¸æè¿°', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | width: '20%', |
| | | align: 'center', |
| | | slotName: 'exceptionDescription', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æ¥ä¿®', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'reportFlag', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['clearSelection'] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['clearSelection'] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | confirmDisable: function(){ |
| | | return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus); |
| | | }, |
| | | initialAcceptanceDisable: function() { |
| | | return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus); |
| | | created() { |
| | | }, |
| | | finalAcceptanceDisable: function() { |
| | | return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus); |
| | | computed: { |
| | | confirmDisable: function() { |
| | | return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | initialAcceptanceDisable: function() { |
| | | return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | finalAcceptanceDisable: function() { |
| | | return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | completionDisable: function() { |
| | | return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus) |
| | | } |
| | | }, |
| | | completionDisable: function() { |
| | | return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus); |
| | | } |
| | | }, |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.loading = true |
| | | this.visible = true |
| | | this.detail.dataSource = [] |
| | | let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId: item.procInstId }); |
| | | this.taskData = [...taskDataList.result]; |
| | | 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]; |
| | | } |
| | | if(this.model.initialAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.initialAcceptanceFiles); |
| | | this.model.initialAcceptanceFilesResult = [...obj]; |
| | | } |
| | | if(this.model.finalAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.finalAcceptanceFiles); |
| | | this.model.finalAcceptanceFilesResult = [...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) |
| | | this.loading = false |
| | | }, |
| | | recordDetail(record) { |
| | | this.loading = true |
| | | this.visible = true |
| | | this.detail.dataSource = [] |
| | | this.model = Object.assign({}, record) |
| | | if(this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles); |
| | | this.model.imageFilesResult = [...obj]; |
| | | } |
| | | if(this.model.initialAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.initialAcceptanceFiles); |
| | | this.model.initialAcceptanceFilesResult = [...obj]; |
| | | } |
| | | if(this.model.finalAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.finalAcceptanceFiles); |
| | | this.model.finalAcceptanceFilesResult = [...obj]; |
| | | } |
| | | this.loadDetail(record.id) |
| | | this.loading = false |
| | | }, |
| | | 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(); |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.initParams() |
| | | this.model = {} |
| | | if (item.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item |
| | | |
| | | let checkMsg = null; |
| | | tableData.some(row => { |
| | | if(!row.maintenanceResult) { |
| | | checkMsg = 'ä¿å
»ç»æä¸è½ä¸ºç©ºï¼'; |
| | | return true; |
| | | } |
| | | if(row.maintenanceResult === '2' && (!row.exceptionDescription || !row.reportFlag)) { |
| | | checkMsg = 'ä¿å
»ç»æä¸ºå¼å¸¸ï¼éè¦å¡«åå¼å¸¸åå 忝妿¥ä¿®ï¼'; |
| | | return true; |
| | | } |
| | | }) |
| | | if(checkMsg) { |
| | | that.$message.warning(checkMsg); |
| | | return; |
| | | } |
| | | let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId }) |
| | | this.taskData = [...taskDataList.result] |
| | | |
| | | that.model.tableDetailList = [...tableData] |
| | | |
| | | that.confirmLoading = true |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | |
| | | 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 = false |
| | | }) |
| | | } else { |
| | | return false |
| | | 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({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | 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] |
| | | 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] |
| | | } |
| | | if (this.model.initialAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.initialAcceptanceFiles) |
| | | this.model.initialAcceptanceFilesResult = [...obj] |
| | | } |
| | | if (this.model.finalAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.finalAcceptanceFiles) |
| | | this.model.finalAcceptanceFilesResult = [...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) |
| | | }, |
| | | |
| | | recordDetail(record) { |
| | | this.initParams() |
| | | this.model = Object.assign({}, record) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | if (this.model.initialAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.initialAcceptanceFiles) |
| | | this.model.initialAcceptanceFilesResult = [...obj] |
| | | } |
| | | if (this.model.finalAcceptanceFiles) { |
| | | let obj = JSON.parse(this.model.finalAcceptanceFiles) |
| | | this.model.finalAcceptanceFilesResult = [...obj] |
| | | } |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.activeTabKey = '1' |
| | | this.spinning = true |
| | | }, |
| | | |
| | | 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() |
| | | |
| | | that.model.tableDetailList = [...tableData] |
| | | |
| | | that.confirmLoading = spinnning = true |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | |
| | | 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 = spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | 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 |
| | | })) |
| | | }, |
| | | |
| | | 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) |
| | | } |
| | | }) |
| | | }, |
| | | handleInspectionResultSelectChange(value, record) { |
| | | if (record.exceptionDescription) delete record.exceptionDescription |
| | | if (record.reportFlag) delete record.reportFlag |
| | | }, |
| | | // æ¹ééæ©ææç¹æ£ç»æ |
| | | handleSelectAllInspectionResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.maintenanceResult !== '1') { |
| | | console.log('dataItem', dataItem) |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.maintenanceResult = '1' |
| | | 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 |
| | | }) |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | /** |
| | | * è¡¨æ ¼å¤éæ¡åçæ¹åæ¶è§¦å |
| | | * @param {selectedRowIds} è¡¨æ ¼ä¸å·²éæ©çIDå表 |
| | | */ |
| | | handleTableSelectRowChange({ selectedRowIds }) { |
| | | this.selectedRowKeys = selectedRowIds |
| | | }, |
| | | }, |
| | | |
| | | 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() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | if (dataItem && dataItem.maintenanceResult !== '1') { |
| | | console.log('dataItem', dataItem) |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.maintenanceResult = '1' |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å¤éæ¡åçæ¹åæ¶è§¦å |
| | | * @param {selectedRowIds} è¡¨æ ¼ä¸å·²éæ©çIDå表 |
| | | */ |
| | | handleTableSelectRowChange({ selectedRowIds }) { |
| | | this.selectedRowKeys = selectedRowIds |
| | | }, |
| | | |
| | | customValidator({ cellValue, row }, callback) { |
| | | if (row.maintenanceResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '${title}ä¸è½ä¸ºç©ºï¼') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | } else { |
| | | callback(true) |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |