| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="技术状态鉴定管理" |
| | | :bordered='false' |
| | | title='技术状态鉴定管理' |
| | | > |
| | | <!-- 查询区域 --> |
| | | <div class="table-page-search-wrapper"> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | layout='inline' |
| | | @keyup.enter.native='searchQuery' |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-row :gutter='24'> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | :md='6' |
| | | :sm='8' |
| | | > |
| | | <a-form-item label="工单编码"> |
| | | <a-form-item label='工单编码'> |
| | | <a-input |
| | | placeholder="请输入工单编码" |
| | | v-model="queryParam.num" |
| | | placeholder='请输入工单编码' |
| | | v-model='queryParam.num' |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | :md='6' |
| | | :sm='8' |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | style='float: left;overflow: hidden;' |
| | | class='table-page-search-submitButtons' |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | type='primary' |
| | | @click='searchQuery' |
| | | icon='search' |
| | | >查询</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | type='primary' |
| | | @click='searchReset' |
| | | icon='reload' |
| | | style='margin-left: 8px' |
| | | >重置</a-button> |
| | | </span> |
| | | </a-col> |
| | |
| | | <!-- 查询区域-END --> |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator"> |
| | | <div class='table-operator'> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >新增</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;" |
| | | 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>项 |
| | | <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" |
| | | style='margin-left: 24px' |
| | | @click='onClearSelected' |
| | | >清空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{ x: 'calc(2000px + 50%)', y: 900 }" |
| | | 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" |
| | | 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" |
| | | slot='action' |
| | | slot-scope='text, record' |
| | | > |
| | | <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> |
| | | @click='handleAddOrderReport(record)' |
| | | >结果录入</a> |
| | | <a-divider |
| | | v-if="record.status === '1'" |
| | | type="vertical" |
| | | 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 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> |
| | | <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" |
| | | slot='num' |
| | | slot-scope='text, record' |
| | | > |
| | | <a |
| | | v-if="record.status === '3' || record.status === '2' " |
| | | class="lot" |
| | | @click="handleOrderExe(record)" |
| | | class='lot' |
| | | @click='handleOrderExe(record)' |
| | | >{{record.num}}</a> |
| | | |
| | | <span v-else>{{record.num}}</span> |
| | | </span> |
| | | </a-table> |
| | | <a-tabs |
| | | defaultActiveKey="1" |
| | | 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="1"--> |
| | | <!-- tab="检验项"--> |
| | | <!-- >--> |
| | | <!-- <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list>--> |
| | | <!-- </a-tab-pane>--> |
| | | |
| | | <a-tab-pane |
| | | key="2" |
| | | tab="检定报告" |
| | | key='2' |
| | | tab='检定报告' |
| | | > |
| | | <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList" :calibrationOrderId="mainId"></equipment-calibration-order-report-list> |
| | | <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" |
| | | ref='modalForm' |
| | | @ok='modalFormOk' |
| | | ></equipment-calibration-order-modal> |
| | | |
| | | <equipment-calibration-order-exe-drawer |
| | | ref="EquipmentCalibrationOrderExeDrawer" |
| | | @ok="modalFormOk" |
| | | ref='EquipmentCalibrationOrderExeDrawer' |
| | | @ok='modalFormOk' |
| | | ></equipment-calibration-order-exe-drawer> |
| | | <final-modal ref="finalModal" @ok="modalFormOk"></final-modal> |
| | | <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> |
| | | |
| | |
| | | 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 EquipmentCalibrationOrderReportList |
| | | from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList' |
| | | import FinalModal from './modules/equipmentCalibrationOrder/FinalModal.vue' |
| | | |
| | | import EquipmentCalibrationOrderReportModal |
| | | from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal' |
| | | |
| | | export default { |
| | | name: 'EquipmentCalibrationOrder', |
| | |
| | | EquipmentCalibrationOrderExeDrawer, |
| | | EquipmentPrecisionParametersList, |
| | | EquipmentCalibrationOrderReportList, |
| | | EquipmentCalibrationOrderReportModal, |
| | | FinalModal |
| | | }, |
| | | data() { |
| | |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | dictOptions:{ |
| | | }, |
| | | dictOptions: {}, |
| | | /* 分页参数 */ |
| | | // 表头 |
| | | columns: [ |
| | |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', |
| | | align: "center", |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | |
| | | { |
| | | title: '工单号', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | align: 'center', |
| | | dataIndex: 'num' |
| | | // scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: '检定方式', |
| | | align: "center", |
| | | dataIndex: 'calibrationType_dictText', |
| | | align: 'center', |
| | | dataIndex: 'calibrationType_dictText' |
| | | }, |
| | | { |
| | | title: '设备编码', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum', |
| | | align: 'center', |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: "center", |
| | | dataIndex: 'equipmentName', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '型号', |
| | | align: "center", |
| | | dataIndex: 'equipmentModel', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '规格', |
| | | align: "center", |
| | | dataIndex: 'equipmentSpecification', |
| | | align: 'center', |
| | | dataIndex: 'equipmentSpecification' |
| | | }, |
| | | { |
| | | title: '判定依据', |
| | | align: "center", |
| | | dataIndex: 'managementMode_dictText', |
| | | align: 'center', |
| | | dataIndex: 'managementMode_dictText' |
| | | }, |
| | | |
| | | { |
| | | title: '状态', |
| | | align: 'center', |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: '判定结果', |
| | | align: "center", |
| | | dataIndex: 'calibrationOrderUda6_dictText' |
| | | 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: 'createBy' |
| | | // }, |
| | | // { |
| | | // title: '创建日期', |
| | | // align: 'center', |
| | | // dataIndex: 'createTime' |
| | | // }, |
| | | // { |
| | | // title: '检定人', |
| | | // align: 'center', |
| | | // dataIndex: 'calibrationUserId_dictText' |
| | | // }, |
| | | { |
| | | title: '完成时间', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'calibrationTime' |
| | | }, |
| | | { |
| | | title: '下发时间', |
| | | align: "center", |
| | | dataIndex: 'issueTime' |
| | | }, |
| | | // { |
| | | // title: '下发时间', |
| | | // align: 'center', |
| | | // dataIndex: 'issueTime' |
| | | // }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 300, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 120, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/calibrationOrder/listNew", |
| | | delete: "/eam/calibrationOrder/delete", |
| | | edit: "/eam/calibrationOrder/editStatus", |
| | | list: '/eam/calibrationOrder/listNew', |
| | | delete: '/eam/calibrationOrder/delete', |
| | | edit: '/eam/calibrationOrder/editStatus' |
| | | }, |
| | | mainId:'', |
| | | mainId: '' |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.mainId = selectedRowKeys[0]; |
| | | this.mainId = selectedRowKeys[0] |
| | | } else { |
| | | this.mainId = '-1'; |
| | | this.mainId = '-1' |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | |
| | | handleOrderExe(record) { |
| | |
| | | }, |
| | | |
| | | handleOrderIssue(record) { |
| | | const that = this; |
| | | const that = this |
| | | requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("工单下发成功!") |
| | | that.$message.success('工单下发成功!') |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("工单下发失败!") |
| | | that.$message.warning('工单下发失败!') |
| | | } |
| | | }) |
| | | }, |
| | | //撤回 |
| | | handleOrderReset(record, status) { |
| | | const that = this; |
| | | const that = this |
| | | requestPut(that.url.edit, { id: record.id, status: status }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("工单撤回成功!") |
| | | that.$message.success('工单撤回成功!') |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("工单撤回失败!") |
| | | that.$message.warning('工单撤回失败!') |
| | | } |
| | | }) |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.mainId='' |
| | | }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | 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); |
| | | this.$refs.finalModal.edit(record) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | @ok="handleOk" |
| | | cancelText="关闭" |
| | | @cancel="handleCancel" |
| | | :confirmLoading="confirmLoading" |
| | | :title='title' |
| | | :width='1250' |
| | | :visible='visible' |
| | | :maskClosable='false' |
| | | @ok='handleOk' |
| | | cancelText='关闭' |
| | | @cancel='handleCancel' |
| | | :confirmLoading='confirmLoading' |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-spin :spinning='confirmLoading'> |
| | | <a-form :form='form'> |
| | | <a-row :gutter='24'> |
| | | <a-col :span='12'> |
| | | <a-form-item |
| | | label="工单号" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label='工单号' |
| | | :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :disabled='codeDisable' |
| | | :placeholder="disableSubmit?'':'请输入工单号编码'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-col :span='12'> |
| | | <a-form-item |
| | | label="检定方式" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label='检定方式' |
| | | :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :disabled='disableSubmit' |
| | | :placeholder="disableSubmit?'':'请选择检定方式'" |
| | | :triggerChange="true" |
| | | dictCode="calibration_type" |
| | | :triggerChange='true' |
| | | dictCode='calibration_type' |
| | | v-decorator="['calibrationType', validatorRules.calibrationType]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-row :gutter='24'> |
| | | <a-col :span='12'> |
| | | <a-form-item |
| | | label="设备" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label='设备' |
| | | :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | placeholder="请选择设备" |
| | | :disabled='disableSubmit' |
| | | placeholder='请选择设备' |
| | | enter-button |
| | | @search="onEquipmentList()" |
| | | :read-only="true" |
| | | @search='onEquipmentList()' |
| | | :read-only='true' |
| | | v-decorator="['equipmentName', validatorRules.equipmentName]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-col :span='12'> |
| | | <a-form-item |
| | | label="判断依据" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label='判断依据' |
| | | :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :read-only='true' |
| | | :disabled='disableSubmit' |
| | | :placeholder="disableSubmit?'':'请选择判断依据'" |
| | | :triggerChange="true" |
| | | dictCode="management_mode" |
| | | :triggerChange='true' |
| | | dictCode='management_mode' |
| | | v-decorator="['managementMode', validatorRules.managementMode]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | </a-row> |
| | | <a-row |
| | | hidden |
| | | :gutter="24" |
| | | :gutter='24' |
| | | > |
| | | <a-col :span="12"> |
| | | <a-col :span='12'> |
| | | <a-form-item |
| | | label="设备Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label='设备Id' |
| | | :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :disabled='true' |
| | | :placeholder="disableSubmit?'':'请输入设备编码/名称/型号'" |
| | | v-decorator="['equipmentId', validatorRules.equipmentId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-row :gutter='24'> |
| | | <a-col :span='24'> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | label="备注" |
| | | :labelCol='{span:3}' |
| | | :wrapperCol='{span:21}' |
| | | label='备注' |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :disabled='disableSubmit' |
| | | :placeholder="disableSubmit?'':'请输入备注'" |
| | | v-decorator="['remark', validatorRules.remark]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-col :span='24'> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | label="精度参数模板ID" |
| | | :labelCol='{span:3}' |
| | | :wrapperCol='{span:21}' |
| | | label='精度参数模板ID' |
| | | hidden |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :disabled='disableSubmit' |
| | | :placeholder="disableSubmit?'':'请输入精度参数模板ID'" |
| | | v-decorator="['calibrationOrderUda1', validatorRules.calibrationOrderUda1]" |
| | | /> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <a-table |
| | | ref="table" |
| | | <a-table v-show='false' |
| | | ref='table' |
| | | bordered |
| | | size="middle" |
| | | size='middle' |
| | | rowKey='id' |
| | | :columns="columns" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :dataSource="dataSource" |
| | | @change="handleTableChange" |
| | | :columns='columns' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | :dataSource='dataSource' |
| | | @change='handleTableChange' |
| | | > |
| | | |
| | | </a-table> |
| | | <template slot="footer"> |
| | | <template slot='footer'> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel()" |
| | | @click='handleCancel()' |
| | | > |
| | | 关闭 |
| | | </a-button> |
| | | |
| | | <a-button |
| | | @click="handleOk()" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | >确定</a-button> |
| | | @click='handleOk()' |
| | | type='primary' |
| | | :loading='confirmLoading' |
| | | >确定 |
| | | </a-button> |
| | | </template> |
| | | |
| | | <equipment-list |
| | | ref="EquipmentList" |
| | | ref='EquipmentList' |
| | | @sendEquipmentRecord='sendEquipmentRecord' |
| | | ></equipment-list> |
| | | </a-modal> |
| | |
| | | import Vue from 'vue' |
| | | |
| | | export default { |
| | | name: "EquipmentCalibrationOrderModal", |
| | | name: 'EquipmentCalibrationOrderModal', |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | EquipmentList |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | columns: [ |
| | |
| | | title: '#', |
| | | dataIndex:'sort', |
| | | width:100, |
| | | align:"center", |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title:'检验项目名称', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'precisionParametersName', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'位置', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'允差(mm)', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'tolerance', |
| | | width:300 |
| | | }, |
| | | } |
| | | ], |
| | | title: "操作", |
| | | title: '操作', |
| | | precisionParametersTemplateId:'', |
| | | visible: false, |
| | | disableSubmit: false, |
| | | codeDisable: true, |
| | | dataSource: [], |
| | | model: {}, |
| | | num:"", |
| | | model: { 'management_mode': 'report', 'calibration_type': 'self' }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | sm: { span: 18 } |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请输入工单编码!' }, |
| | | { required: true, message: '请输入工单编码!' } |
| | | ] |
| | | }, |
| | | calibrationType: { |
| | | rules: [ |
| | | { required: true, message: '请选择检定方式!' }, |
| | | { required: true, message: '请选择检定方式!' } |
| | | ] |
| | | }, |
| | | managementMode: { |
| | | rules: [ |
| | | { required: true, message: '请选择判定依据!' }, |
| | | { required: true, message: '请选择判定依据!' } |
| | | ] |
| | | }, |
| | | equipmentName: { |
| | | rules: [ |
| | | { required: true, message: '请选择设备!' }, |
| | | { required: true, message: '请选择设备!' } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | url: { |
| | | add: "/eam/calibrationOrder/addNew", |
| | | edit: "/eam/calibrationOrder/editNew", |
| | | list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId", |
| | | }, |
| | | add: '/eam/calibrationOrder/addNew', |
| | | edit: '/eam/calibrationOrder/editNew', |
| | | list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | } |
| | | |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | // this.initNum() |
| | | }, |
| | | methods: { |
| | | // 初始化技术状态鉴定工单号 |
| | | // initNum(){ |
| | | // getAction(this.url.getNum, { type: 'CalibrationOrder', length: '4' }).then((res) => { |
| | | // if (res.success) { |
| | | // this.num = res.message |
| | | // } |
| | | // }) |
| | | // }, |
| | | |
| | | add() { |
| | | this.precisionParametersTemplateId='-1'; |
| | | this.edit({}) |
| | | this.precisionParametersTemplateId = '-1' |
| | | getAction(this.url.getNum, { type: 'CalibrationOrder', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.num = res.message |
| | | } |
| | | }) |
| | | // 新增时候设置鉴定类型为自检、 判定依据为报告 |
| | | this.edit({ "num":this.num,'calibrationType': 'self', 'managementMode': 'report' }) |
| | | }, |
| | | edit(record) { |
| | | let that = this; |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | let that = this |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.maintenanceCycles = record.maintenanceCycles |
| | | if (record.precisionParameterList != undefined) { |
| | | this.dataSource = record.precisionParameterList; |
| | | this.dataSource = record.precisionParameterList |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'equipmentId', 'calibrationType', 'managementMode')); |
| | | }); |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'equipmentId', 'calibrationType', 'managementMode')) |
| | | }) |
| | | if (record.id) { |
| | | this.codeDisable = true; |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.codeDisable = false |
| | | } |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | this.close() |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | const that = this |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | let obj |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData); |
| | | obj = postAction(this.url.add, formData) |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }); |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | onEquipmentList() { |
| | | this.$refs.EquipmentList.list(); |
| | | this.$refs.EquipmentList.title = "选择设备信息"; |
| | | this.$refs.EquipmentList.list() |
| | | this.$refs.EquipmentList.title = '选择设备信息' |
| | | }, |
| | | sendEquipmentRecord(data) { |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | this.form.setFieldsValue({calibrationOrderUda1:record.precisionParametersTemplateId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model }); |
| | | this.precisionParametersTemplateId = record.precisionParametersTemplateId; |
| | | this.dataSource = [] |
| | | let record = data.record |
| | | this.form.setFieldsValue({ |
| | | calibrationOrderUda1: record.precisionParametersTemplateId, |
| | | equipmentId: record.id, |
| | | equipmentName: record.num + '/' + record.name + '/' + record.model |
| | | }) |
| | | this.precisionParametersTemplateId = record.precisionParametersTemplateId |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | , |
| | | watch:{ |
| | | precisionParametersTemplateId:{ |
| | | immediate: true, |
| | |
| | | if(!this.precisionParametersTemplateId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['precisionParametersTemplateId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | this.queryParam['precisionParametersTemplateId'] = val |
| | | this.queryParam['delFlag'] = 0 |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | <style lang='less' scoped> |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | |
| | | { |
| | | title: '判定结果', |
| | | align: 'center', |
| | | dataIndex: 'judgmentResultName' |
| | | dataIndex: 'judgmentResult_dicText' |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择判定结果'" |
| | | :triggerChange="true" |
| | | dictCode="judgment_result" |
| | | dictCode="technology_status" |
| | | v-decorator="['judgmentResult', validatorRules.judgmentResult]" |
| | | /> |
| | | |