| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | label="精度参数模板ID" |
| | | hidden |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入精度参数模板ID'" |
| | | v-decorator="['calibrationOrderUda1', validatorRules.calibrationOrderUda1]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | |
| | | size="middle" |
| | | rowKey='id' |
| | | :columns="columns" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :dataSource="dataSource" |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | </a-table> |
| | |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import EquipmentList from './EquipmentList' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | import Vue from 'vue' |
| | | |
| | | export default { |
| | | name: "EquipmentCalibrationOrderModal", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | { |
| | | title: '#', |
| | | dataIndex:'sort', |
| | | width:100, |
| | | align:"center", |
| | | }, |
| | | width: 50, |
| | | }, |
| | | { |
| | | title: '精度参数编码', |
| | | align: 'center', |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: '精度参数名称', |
| | | align: 'center', |
| | | dataIndex: 'name' |
| | | }, |
| | | { |
| | | title: '单位', |
| | | align: 'center', |
| | | dataIndex: 'unitName' |
| | | }, |
| | | { |
| | | title: '下限值', |
| | | align: 'center', |
| | | dataIndex: 'lowerLimit' |
| | | }, |
| | | { |
| | | title: '上限值', |
| | | align: 'center', |
| | | dataIndex: 'upperLimit' |
| | | }, |
| | | { |
| | | title: '实际测定值', |
| | | align: 'center', |
| | | dataIndex: 'actualValue', |
| | | }, |
| | | { |
| | | title:'检验项目名称', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersName', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'位置', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'允差(mm)', |
| | | align:"center", |
| | | dataIndex: 'tolerance', |
| | | width:300 |
| | | }, |
| | | ], |
| | | title: "操作", |
| | | precisionParametersTemplateId:'', |
| | | visible: false, |
| | | disableSubmit: false, |
| | | codeDisable: true, |
| | |
| | | url: { |
| | | add: "/eam/calibrationOrder/addNew", |
| | | edit: "/eam/calibrationOrder/editNew", |
| | | getPrecisionParameterList: "/eam/calibrationOrder/getPrecisionParameterList", |
| | | list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId", |
| | | }, |
| | | |
| | | } |
| | |
| | | |
| | | methods: { |
| | | add() { |
| | | this.dataSource = [] |
| | | this.precisionParametersTemplateId='-1'; |
| | | this.edit({}) |
| | | |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | | this.form.resetFields(); |
| | |
| | | sendEquipmentRecord(data) { |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model }); |
| | | this.getPrecisionParameterList(record.id); |
| | | this.form.setFieldsValue({calibrationOrderUda1:record.precisionParametersTemplateId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model }); |
| | | this.precisionParametersTemplateId = record.precisionParametersTemplateId; |
| | | }, |
| | | |
| | | getPrecisionParameterList(equipmentId) { |
| | | getAction(this.url.getPrecisionParameterList, { equipmentId: equipmentId }).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result |
| | | } |
| | | }) |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | }, |
| | | watch:{ |
| | | precisionParametersTemplateId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.precisionParametersTemplateId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['precisionParametersTemplateId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |