<template>
|
<a-card
|
:bordered='false'
|
title='技术状态鉴定管理'
|
>
|
<!-- 查询区域 -->
|
<div class='table-page-search-wrapper'>
|
<a-form
|
layout='inline'
|
@keyup.enter.native='searchQuery'
|
>
|
<a-row :gutter='24'>
|
<a-col
|
:md='6'
|
:sm='8'
|
>
|
<a-form-item label='工单编码'>
|
<a-input
|
placeholder='请输入工单编码'
|
v-model='queryParam.num'
|
></a-input>
|
</a-form-item>
|
</a-col>
|
<!-- <a-col
|
:md="6"
|
:sm="8"
|
>
|
<a-form-item label="点检方法名称">
|
<j-input
|
placeholder="请输入点检方法名称"
|
v-model="queryParam.name"
|
></j-input>
|
</a-form-item>
|
</a-col> -->
|
<a-col
|
:md='6'
|
:sm='8'
|
>
|
<span
|
style='float: left;overflow: hidden;'
|
class='table-page-search-submitButtons'
|
>
|
<a-button
|
type='primary'
|
@click='searchQuery'
|
icon='search'
|
>查询</a-button>
|
<a-button
|
type='primary'
|
@click='searchReset'
|
icon='reload'
|
style='margin-left: 8px'
|
>重置</a-button>
|
</span>
|
</a-col>
|
</a-row>
|
</a-form>
|
</div>
|
<!-- 查询区域-END -->
|
|
<!-- 操作按钮区域 -->
|
<div class='table-operator'>
|
<a-button
|
@click='handleAdd'
|
type='primary'
|
icon='plus'
|
>新增
|
</a-button>
|
</div>
|
|
<!-- 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(700px + 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-if="record.status === '1'"
|
@click='handleAddOrderReport(record)'
|
>结果录入</a>
|
<a-divider
|
v-if="record.status === '1'"
|
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='mainId'></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>
|
</a-card>
|
</template>
|
|
<script>
|
|
import '@/assets/less/TableExpand.less'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import EquipmentCalibrationOrderModal from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal'
|
import EquipmentCalibrationOrderExeDrawer from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer'
|
import { getAction, postAction, requestPut } from '@/api/manage'
|
import EquipmentPrecisionParametersList from './modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList'
|
import EquipmentCalibrationOrderReportList
|
from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList'
|
import FinalModal from './modules/equipmentCalibrationOrder/FinalModal.vue'
|
import EquipmentCalibrationOrderReportModal
|
from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal'
|
|
export default {
|
name: 'EquipmentCalibrationOrder',
|
mixins: [JeecgListMixin],
|
components: {
|
EquipmentCalibrationOrderModal,
|
EquipmentCalibrationOrderExeDrawer,
|
EquipmentPrecisionParametersList,
|
EquipmentCalibrationOrderReportList,
|
EquipmentCalibrationOrderReportModal,
|
FinalModal
|
},
|
data() {
|
return {
|
description: '技术状态鉴定管理',
|
ipagination: {
|
current: 1,
|
pageSize: 5,
|
pageSizeOptions: ['5', '10', '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: '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: 'status_dictText'
|
},
|
{
|
title: '判定结果',
|
align: 'center',
|
dataIndex: 'calibrationResult_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: 'issueTime'
|
// },
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align: 'center',
|
fixed: 'right',
|
width: 120,
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: '/eam/calibrationOrder/listNew',
|
delete: '/eam/calibrationOrder/delete',
|
edit: '/eam/calibrationOrder/editStatus'
|
},
|
mainId: ''
|
}
|
},
|
|
computed: {
|
importExcelUrl: function() {
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
}
|
},
|
|
methods: {
|
|
onSelectChange(selectedRowKeys, selectionRows) {
|
if (selectedRowKeys.length == 1) {
|
this.mainId = selectedRowKeys[0]
|
} else {
|
this.mainId = '-1'
|
}
|
this.selectedRowKeys = selectedRowKeys
|
this.selectionRows = selectionRows
|
},
|
|
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.mainId = ''
|
},
|
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>
|