From 9f4934c8fa28eab31231f56d6237ffca7b01016f Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 05 三月 2025 10:39:10 +0800 Subject: [PATCH] art: 所有设备 台账 技术状态鉴定 根据设备id查询技术状态鉴定,并过滤掉已完成的技术状态鉴定 --- src/views/eam/modules/equipmentNew/EquipmentCalibrationOrderComponent.vue | 505 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/views/eam/EquipmentListOfAll.vue | 3 2 files changed, 508 insertions(+), 0 deletions(-) diff --git a/src/views/eam/EquipmentListOfAll.vue b/src/views/eam/EquipmentListOfAll.vue index 8d32312..c553327 100644 --- a/src/views/eam/EquipmentListOfAll.vue +++ b/src/views/eam/EquipmentListOfAll.vue @@ -774,6 +774,7 @@ tab="鎶�鏈姸鎬侀壌瀹�" key="14" > + <equipment-calibration-order-component :mainId="selectedMainId"></equipment-calibration-order-component> </a-tab-pane> </a-tabs> <equipment-modal @@ -835,6 +836,7 @@ import DailyMaintenanceOrderListComponent from './modules/equipmentNew/DailyMaintenanceOrderListComponent.vue' import Daily3MaintenanceOrderListComponent from './modules/equipmentNew/Daily3MaintenanceOrderListComponent.vue' import RepairOrderListComponent from './modules/equipmentNew/RepairOrderListComponent.vue' +import EquipmentCalibrationOrderComponent from './modules/equipmentNew/EquipmentCalibrationOrderComponent.vue' export default { name: "EquipmentList", @@ -865,6 +867,7 @@ DailyMaintenanceOrderListComponent, Daily3MaintenanceOrderListComponent, RepairOrderListComponent, + EquipmentCalibrationOrderComponent, }, data() { return { diff --git a/src/views/eam/modules/equipmentNew/EquipmentCalibrationOrderComponent.vue b/src/views/eam/modules/equipmentNew/EquipmentCalibrationOrderComponent.vue new file mode 100644 index 0000000..715f561 --- /dev/null +++ b/src/views/eam/modules/equipmentNew/EquipmentCalibrationOrderComponent.vue @@ -0,0 +1,505 @@ +<template> + <a-card + :bordered='false' + title='' + > + <!-- table鍖哄煙-begin --> + <div> + <div + class='ant-alert ant-alert-info' + style='margin-bottom: 16px;' + > + <i class='anticon anticon-info-circle ant-alert-icon'></i> 宸查�夋嫨 <a style='font-weight: 600'>{{ selectedRowKeys.length }}</a>椤� + <a + style='margin-left: 24px' + @click='onClearSelected' + >娓呯┖</a> + </div> + + <a-table + ref='table' + size='middle' + :scroll="{ x: 'calc(1000px + 50%)', y: 900 }" + bordered + rowKey='id' + :columns='columns' + :dataSource='dataSource' + :pagination='ipagination' + :loading='loading' + class='j-table-force-nowrap' + @change='handleTableChange' + :customRow='clickThenSelect' + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" + > + + <span + slot='action' + slot-scope='text, record' + > + <a + v-show="record.status === '1' || record.status === '3'" + @click='handleAddOrderReport(record)' + v-has="'calibrationOrder:write'" + >缁撴灉褰曞叆</a> + + <a-divider + v-show="record.status === '1' || record.status === '3'" + type='vertical' + /> + <a + v-show="record.status === '2' && record.equipmentImportance != 'D'" + @click='handleTechnologyStatus(record)' + v-has="'calibrationOrder:audit'" + >缁撴灉瀹℃牳</a> + + <a-divider + v-show="record.status === '2' && record.equipmentImportance != 'D'" + type='vertical' + /> + <a + v-show="record.status === '2' && record.equipmentImportance == 'D'" + @click='handleTechnologyStatusAuthenticate(record)' + v-has="'calibrationOrder:authenticate'" + >D绫绘妧鏈姸鎬侀壌瀹�</a> + + <a-divider + v-show="record.status === '2' && record.equipmentImportance == 'D'" + type='vertical' + /> + <a @click='handleDetail(record)'>璇︽儏</a> + <!-- <a-popconfirm--> + <!-- title='纭畾涓嬪彂宸ュ崟鍚�?'--> + <!-- @confirm='() => handleOrderIssue(record)'--> + <!-- >--> + <!-- <a v-if="record.status === '1'">涓嬪彂</a>--> + <!-- </a-popconfirm>--> + <!-- <a-divider--> + <!-- v-if="record.status === '1'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '1'"--> + <!-- @click='handleEdit(record)'--> + <!-- >缂栬緫</a>--> + <!-- <a-divider--> + <!-- v-if="record.status === '1'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '2' "--> + <!-- @click='handleOrderExe(record)'--> + <!-- >鎵ц</a>--> + <!-- <a-divider--> + <!-- v-if="record.status === '2'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '4'"--> + <!-- @click='handleOrderExe(record)'--> + <!-- >鏌ョ湅</a>--> + <!-- <a-divider--> + <!-- v-if="record.status === '4'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a-popconfirm--> + <!-- title='纭畾鎾ゅ洖宸ュ崟鍚�?'--> + <!-- @confirm="() => handleOrderReset(record,'1')"--> + <!-- >--> + <!-- <a v-if="record.status === '2'">鎾ゅ洖</a>--> + <!-- </a-popconfirm>--> + <!-- <a-divider--> + <!-- v-if="record.status === '2'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a-popconfirm--> + <!-- title='纭畾鎾ゅ洖宸ュ崟鍚�?'--> + <!-- @confirm="() => handleOrderReset(record,'2')"--> + <!-- >--> + <!-- <a v-if="record.status === '4'">鎾ゅ洖</a>--> + <!-- </a-popconfirm>--> + <!-- <a-divider--> + <!-- v-if="record.status === '4'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '4'"--> + <!-- @click='handleFinal(record)'--> + <!-- >褰曞叆缁撴灉</a>--> + <!-- <!– v-if="record.status === '5'" –>--> + <!-- <a-divider--> + <!-- v-if="record.status === '4'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- --> + <!-- <a-dropdown>--> + <!-- <a @click='handleDetail(record)'>璇︽儏</a>--> + <!-- <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a>--> + <!-- <a-menu slot='overlay'>--> + <!-- <a-menu-item>--> + <!-- <a @click='handleDetail(record)'>璇︽儏</a>--> + <!-- </a-menu-item>--> + <!-- <a-menu-item>--> + <!-- <a-popconfirm--> + <!-- title='纭畾鍒犻櫎鍚�?'--> + <!-- @confirm='() => handleDelete(record.id)'--> + <!-- >--> + <!-- <a v-if="record.status === '1'">鍒犻櫎</a>--> + <!-- </a-popconfirm>--> + <!-- </a-menu-item>--> + <!-- </a-menu>--> + <!-- </a-dropdown>--> + </span> + + <!-- <span + slot='num' + slot-scope='text, record' + > + <a + v-if="record.status === '3' || record.status === '2' " + class='lot' + @click='handleOrderExe(record)' + >{{ record.num }}</a> + + <span v-else>{{ record.num }}</span> + </span> --> + </a-table> + <a-tabs defaultActiveKey='2'> + <!-- <a-tab-pane --> + <!-- key="1"--> + <!-- tab="妫�楠岄」"--> + <!-- >--> + <!-- <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list>--> + <!-- </a-tab-pane>--> + + <a-tab-pane + key='2' + tab='妫�瀹氭姤鍛�' + > + <equipment-calibration-order-report-list + ref='EquipmentCalibrationOrderReportList' + :calibrationOrderId='calibrationOrderMainId' + ></equipment-calibration-order-report-list> + </a-tab-pane> + + </a-tabs> + </div> + + <equipment-calibration-order-modal + ref='modalForm' + @ok='modalFormOk' + ></equipment-calibration-order-modal> + + <equipment-calibration-order-exe-drawer + ref='EquipmentCalibrationOrderExeDrawer' + @ok='modalFormOk' + ></equipment-calibration-order-exe-drawer> + <final-modal + ref='finalModal' + @ok='modalFormOk' + ></final-modal> + + <equipment-calibration-order-report-modal + ref='equipmentCalibrationOrderReportModal' + @ok='modalFormOk' + ></equipment-calibration-order-report-modal> + + <equipment-technology-status-modal + ref="EquipmentTechnologyStatusModal" + @ok="modalFormOk" + ></equipment-technology-status-modal> + + <technology-status-authenticate-modal + ref="TechnologyStatusAuthenticateModal" + @ok="modalFormOk" + ></technology-status-authenticate-modal> + </a-card> +</template> + +<script> + +import '@/assets/less/TableExpand.less' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EquipmentCalibrationOrderModal from '@/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal' +import EquipmentCalibrationOrderExeDrawer from '@/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer' +import { getAction, postAction, requestPut } from '@/api/manage' +import EquipmentPrecisionParametersList from '@/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList' +import EquipmentCalibrationOrderReportList + from '@/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList' +import FinalModal from '@/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue' +import EquipmentCalibrationOrderReportModal + from '@/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal' +import EquipmentTechnologyStatusModal from '@/views/eam/modules/equipmentCalibrationOrder/EquipmentTechnologyStatusModal' +import TechnologyStatusAuthenticateModal from '@/views/eam/modules/equipmentCalibrationOrder/TechnologyStatusAuthenticateModal' +import { interceptorFunc } from 'vxe-table' + +export default { + name: 'EquipmentCalibrationOrder', + mixins: [JeecgListMixin], + components: { + EquipmentCalibrationOrderModal, + EquipmentCalibrationOrderExeDrawer, + EquipmentPrecisionParametersList, + EquipmentCalibrationOrderReportList, + EquipmentCalibrationOrderReportModal, + FinalModal, + EquipmentTechnologyStatusModal, + TechnologyStatusAuthenticateModal + }, + props:{ + mainId:{ + type:String, + default:'', + required:false + } + }, + watch:{ + mainId:{ + immediate: true, + handler(val) { + if(!this.mainId){ + this.queryParam['equipmentId'] = 'NAN' + this.loadData(1); + }else{ + this.queryParam['equipmentId'] = val + this.queryParam['statusEnums'] = '4' + this.loadData(1); + } + } + } + }, + data() { + return { + description: '鎶�鏈姸鎬侀壌瀹氱鐞�', + disableMixinCreated: true, + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + dictOptions: {}, + /* 鍒嗛〉鍙傛暟 */ + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + + { + title: '宸ュ崟鍙�', + align: 'center', + dataIndex: 'num' + // scopedSlots: { customRender: 'num' } + }, + { + title: '鐘舵��', + align: 'center', + dataIndex: 'status_dictText' + }, + { + title: '鍒ゅ畾缁撴灉', + align: 'center', + dataIndex: 'calibrationResult_dictText' + }, + // { + // title: '妫�瀹氭柟寮�', + // align: 'center', + // dataIndex: 'calibrationType_dictText' + // }, + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'equipmentNum' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName' + }, + { + title: '鍨嬪彿', + align: 'center', + dataIndex: 'equipmentModel' + }, + { + title: '瑙勬牸', + align: 'center', + dataIndex: 'equipmentSpecification' + }, + // { + // title: '鍒ゅ畾渚濇嵁', + // align: 'center', + // dataIndex: 'managementMode_dictText' + // }, + + // { + // title: '鍒涘缓浜�', + // align: 'center', + // dataIndex: 'createBy' + // }, + { + title: '鍒涘缓鏃ユ湡', + align: 'center', + dataIndex: 'createTime' + }, + // { + // title: '妫�瀹氫汉', + // align: 'center', + // dataIndex: 'calibrationUserId_dictText' + // }, + { + title: '瀹屾垚鏃堕棿', + align: 'center', + dataIndex: 'calibrationTime' + }, + { + title: '瀹℃牳鎰忚', + align: 'center', + dataIndex: 'remark' + }, + // { + // title: '涓嬪彂鏃堕棿', + // align: 'center', + // dataIndex: 'issueTime' + // }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + width: 200, + fixed: 'right', + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: '/eam/calibrationOrder/listNew', + delete: '/eam/calibrationOrder/delete', + edit: '/eam/calibrationOrder/editStatus' + }, + calibrationOrderMainId: '' + } + }, + + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, + created() { + //浠庤矾鐢变腑鑾峰彇鏌ヨ鏉′欢 + // if (this.$route.query) { + // this.queryParam.equipmentId = this.$route.query.equipmentId; + // //鏌ヨ鏉′欢鎸夋椂闂村�掑簭 + // this.queryParam.sort = 'createTime'; + // this.queryParam.order = 'desc'; + // } + // this.loadData() + this.initDictConfig(); + }, + + methods: { + + onSelectChange(selectedRowKeys, selectionRows) { + if (selectedRowKeys.length == 1) { + this.calibrationOrderMainId = selectedRowKeys[0] + } else { + this.calibrationOrderMainId = '-1' + } + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows + }, + + handleTechnologyStatus(record) { + this.$refs.EquipmentTechnologyStatusModal.edit(record); + this.$refs.EquipmentTechnologyStatusModal.title = "瀹℃牳"; + this.$refs.EquipmentTechnologyStatusModal.disableSubmit = false; + }, + + handleTechnologyStatusAuthenticate: function (record) { + this.$refs.TechnologyStatusAuthenticateModal.edit(record); + this.$refs.TechnologyStatusAuthenticateModal.title = "鎶�鏈姸鎬佺紪杈�"; + this.$refs.TechnologyStatusAuthenticateModal.disableSubmit = false; + + }, + + handleOrderExe(record) { + this.$refs.EquipmentCalibrationOrderExeDrawer.visible = true + this.$refs.EquipmentCalibrationOrderExeDrawer.title = '妫�瀹氬伐鍗曟墽琛�' + this.$refs.EquipmentCalibrationOrderExeDrawer.handleShow(record) + if (record.status === '4') { + this.$refs.EquipmentCalibrationOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸� + this.$refs.EquipmentCalibrationOrderExeDrawer.revocationDistable = true//鎾ら攢鎸夐挳 + this.$refs.EquipmentCalibrationOrderExeDrawer.SWbuttonDistable = true//鎻愪氦鎸夐挳 + } else if (record.status === '2') { + this.$refs.EquipmentCalibrationOrderExeDrawer.buttonDistable = false//淇濆瓨銆佹殏瀛樸�佹姤宸� + this.$refs.EquipmentCalibrationOrderExeDrawer.revocationDistable = true//鎾ら攢鎸夐挳 + this.$refs.EquipmentCalibrationOrderExeDrawer.SWbuttonDistable = false//鎻愪氦鎸夐挳 + } + + }, + + handleOrderIssue(record) { + const that = this + requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { + if (res.success) { + that.$message.success('宸ュ崟涓嬪彂鎴愬姛锛�') + that.loadData() + } else { + that.$message.warning('宸ュ崟涓嬪彂澶辫触锛�') + } + }) + }, + //鎾ゅ洖 + handleOrderReset(record, status) { + const that = this + requestPut(that.url.edit, { id: record.id, status: status }).then((res) => { + if (res.success) { + that.$message.success('宸ュ崟鎾ゅ洖鎴愬姛锛�') + that.loadData() + } else { + that.$message.warning('宸ュ崟鎾ゅ洖澶辫触锛�') + } + }) + }, + onClearSelected() { + this.selectedRowKeys = [] + this.selectionRows = [] + this.calibrationOrderMainId = '' + }, + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(','), [record]) + } + } + } + }, + // 鐩存帴涓婁紶閴村畾鎶ュ憡 + handleAddOrderReport: function (record) { + this.$refs.equipmentCalibrationOrderReportModal.add(record.id) + this.$refs.equipmentCalibrationOrderReportModal.title = '涓婁紶妫�瀹氭姤鍛�' + this.$refs.equipmentCalibrationOrderReportModal.disableSubmit = false + }, + handleFinal(record) { + this.$refs.finalModal.edit(record) + }, + + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file -- Gitblit v1.9.3