| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :rowSelection="rowSelection" |
| | | :customRow="clickThenSelect" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" |
| | | > |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | |
| | | v-if="record.status === '4'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | |
| | | @click="handleFinal(record)" |
| | | >å½å
¥ç»æ</a> |
| | | <!-- v-if="record.status === '5'" --> |
| | | <a-divider |
| | | type="vertical" |
| | | /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | |
| | | </span> |
| | | </a-table> |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | key="1" |
| | | forceRender |
| | | tab="æ£éªé¡¹" |
| | | > |
| | | <span slot="tab"> |
| | | <a-badge>ç²¾åº¦åæ° </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin:10px" |
| | | > |
| | | <equipment-precision-parameters-list ref="PrecisionParametersList"></equipment-precision-parameters-list> |
| | | </div> |
| | | <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | key="2" |
| | | forceRender |
| | | tab="æ£å®æ¥å" |
| | | > |
| | | <span slot="tab"> |
| | | <a-badge>æ£å®æ¥å </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin:10px" |
| | | > |
| | | <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList"></equipment-calibration-order-report-list> |
| | | </div> |
| | | <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList" :calibrationOrderId="mainId"></equipment-calibration-order-report-list> |
| | | </a-tab-pane> |
| | | |
| | | </a-tabs> |
| | |
| | | ref="EquipmentCalibrationOrderExeDrawer" |
| | | @ok="modalFormOk" |
| | | ></equipment-calibration-order-exe-drawer> |
| | | <final-modal ref="finalModal" @ok="modalFormOk"></final-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | 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' |
| | | |
| | | |
| | | export default { |
| | | name: 'EquipmentCalibrationOrder', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EquipmentCalibrationOrderModal, |
| | | EquipmentCalibrationOrderExeDrawer, |
| | | EquipmentPrecisionParametersList, |
| | | EquipmentCalibrationOrderReportList, |
| | | 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 |
| | | 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: 'å¤å®ç»æ', |
| | | align: "center", |
| | | dataIndex: 'calibrationResult' |
| | | dataIndex: 'calibrationOrderUda6_dictText' |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | |
| | | delete: "/eam/calibrationOrder/delete", |
| | | edit: "/eam/calibrationOrder/editStatus", |
| | | }, |
| | | mainId:'', |
| | | } |
| | | }, |
| | | |
| | |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.onSelectChange(selectedRowKeys, selectedRows); |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = selectedRowKeys[0] |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = selectedRowKeys[0] |
| | | this.mainId = selectedRowKeys[0]; |
| | | } else { |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | this.mainId = '-1'; |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | |
| | | } |
| | | }) |
| | | }, |
| | | searchQuery() { |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | this.loadData(1); |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.mainId='' |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | this.loadData(1); |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | modalFormOk() { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData() |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | }, |
| | | |
| | | handleFinal(record){ |
| | | this.$refs.finalModal.edit(record); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | title:'å建æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | }, |
| | | width:200, |
| | | }, |
| | | { |
| | |
| | | title:'ä¿®æ¹æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'updateTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | }, |
| | | width:200, |
| | | }, |
| | | { |
| | |
| | | <div :key="col.dataIndex"> |
| | | <a-input-number |
| | | :value="text" |
| | | v-if="col.dataIndex == 'calibrationItemResult'" |
| | | v-if="col.dataIndex == 'actualValue'" |
| | | :min="0" |
| | | :max="20000000" |
| | | @change="(e)=>handleChange(e, record.key, col, index,record)" |
| | |
| | | sm: { span: 16 }, |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | width: 60, |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | 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: 'calibrationItemResult', |
| | | scopedSlots: { customRender: 'calibrationItemResult' }, |
| | | width: 160, |
| | | }, |
| | | // { |
| | | // title: 'å¤å®ç»æ', |
| | | // align: 'center', |
| | | // dataIndex: 'judgmentResultName', |
| | | // class: "notshow" |
| | | // }, |
| | | { |
| | | title: 'å¤å®ç»æ', |
| | | align: 'center', |
| | | dataIndex: 'judgmentResult', |
| | | }, |
| | | { |
| | | title: '#', |
| | | dataIndex:'sort', |
| | | width:100, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title:'æ£éªé¡¹ç®åç§°', |
| | | align:"center", |
| | | dataIndex: 'name', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'ä½ç½®', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'å
å·®ï¼mmï¼', |
| | | align:"center", |
| | | dataIndex: 'tolerance', |
| | | width:300 |
| | | }, |
| | | { |
| | | title:'宿µå¼', |
| | | align:"center", |
| | | dataIndex: 'actualValue', |
| | | scopedSlots: { customRender: 'actualValue' }, |
| | | width:300 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/calibrationOrderDetail/getCalibrationOrderDetailList", |
| | | list: "/eam/calibrationOrder/listByMainId", |
| | | report: "/eam/calibrationOrder/report", |
| | | save: "/eam/calibrationOrderDetail/save", |
| | | }, |
| | |
| | | } |
| | | |
| | | } |
| | | if(column.dataIndex == 'actualValue'){ |
| | | target[column.dataIndex] = value; |
| | | } |
| | | //æ¾ç¤ºå¸¦è¿æ¥çæ°æ® |
| | | that.dataSource = temp; |
| | | } |
| | |
| | | let formData = Object.assign(this.model); |
| | | for (let i = 0; i < that.dataSource.length; i++) { |
| | | let o = this.dataSource[i] |
| | | if (o.calibrationItemResult == null || o.calibrationItemResult == '') { |
| | | that.$message.warning('请è¾å
¥æ£å®ç»æï¼') |
| | | if (o.actualValue == null || o.actualValue == '') { |
| | | that.$message.warning('请è¾å
¥åºå·ä¸º'+o.sort+'æ£éªé¡¹ç宿µå¼') |
| | | that.confirmLoading = false; |
| | | return |
| | | } |
| | |
| | | /> |
| | | </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> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | description: 'æ£å®æ¥å', |
| | | disableMixinCreated:true, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | |
| | | urlDownload: window._CONFIG['staticDomainURL'], |
| | | download: '/sys/upload/downloadFile', |
| | | }, |
| | | // partRoute: {}, |
| | | // equipmentSelectionRows: [], |
| | | calibrationOrderId: '', |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | calibrationOrderId() { |
| | | this.queryParam = {}; |
| | | this.queryParam.calibrationOrderId = this.calibrationOrderId; |
| | | this.loadData(1); |
| | | }, |
| | | props:{ |
| | | calibrationOrderId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | calibrationOrderId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.calibrationOrderId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['calibrationOrderId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | // mounted() { |
| | | // this.$bus.$on('equipmentSelectionRows', (data) => { |
| | | // this.equipmentSelectionRows = data |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination=false |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | > |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | | |
| | |
| | | Tooltip, |
| | | JEllipsis, |
| | | }, |
| | | props:{ |
| | | calibrationOrderId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | calibrationOrderId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.calibrationOrderId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['calibrationOrderId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ç²¾åº¦åæ°', |
| | | disableMixinCreated:true, |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç²¾åº¦åæ°ç¼ç ', |
| | | dataIndex: 'num', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'ç²¾åº¦åæ°åç§°', |
| | | dataIndex: 'name', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '计éåä½', |
| | | dataIndex: 'unitName', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'ä¸éå¼', |
| | | dataIndex: 'upperLimit', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'ä¸éå¼', |
| | | dataIndex: 'lowerLimit', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'æ£å®ç»æ', |
| | | dataIndex: 'calibrationItemResult', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'å¤å®ç»æ', |
| | | dataIndex: 'judgmentResult', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '#', |
| | | dataIndex:'sort', |
| | | width:100, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title:'æ£éªé¡¹ç®åç§°', |
| | | align:"center", |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'ä½ç½®', |
| | | align:"center", |
| | | dataIndex: 'precisionParametersUda1', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'å
å·®ï¼mmï¼', |
| | | align:"center", |
| | | dataIndex: 'tolerance', |
| | | width:200 |
| | | }, |
| | | { |
| | | title:'宿µå¼', |
| | | align:"center", |
| | | dataIndex: 'actualValue', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/calibrationOrderDetail/getCalibrationOrderDetailList", |
| | | list: "/eam/calibrationOrder/listByMainId", |
| | | }, |
| | | calibrationOrderId: '', |
| | | } |
| | | }, |
| | | watch: { |
| | | calibrationOrderId() { |
| | | this.queryParam = {}; |
| | | this.queryParam.calibrationOrderId = this.calibrationOrderId; |
| | | this.loadData(1); |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | if (this.calibrationOrderId == '') { |
| | | params.calibrationOrderId = '-1'; |
| | | } |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | /deep/ .frozenRowClass { |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :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-form-item |
| | | label="å·¥åå·" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥å·¥åå·ç¼ç '" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="æ£å®æ¹å¼" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©æ£å®æ¹å¼'" |
| | | :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-form-item |
| | | label="设å¤" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | placeholder="è¯·éæ©è®¾å¤" |
| | | enter-button |
| | | @search="onEquipmentList()" |
| | | :read-only="true" |
| | | v-decorator="['equipmentName', validatorRules.equipmentName]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="夿便®" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©å¤æä¾æ®'" |
| | | :triggerChange="true" |
| | | dictCode="management_mode" |
| | | v-decorator="['managementMode', validatorRules.managementMode]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="12" hidden> |
| | | <a-form-item |
| | | label="设å¤Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è®¾å¤ç¼ç /åç§°/åå·'" |
| | | v-decorator="['equipmentId', validatorRules.equipmentId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="æ£å®ç»æ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :placeholder="'请è¾å
¥æ£å®ç»æ'" |
| | | dictCode="technology_status" |
| | | v-decorator="['calibrationOrderUda6', validatorRules.calibrationOrderUda6]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥å¤æ³¨'" |
| | | v-decorator="['remark', validatorRules.remark]" |
| | | /> |
| | | </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> |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel()" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | |
| | | <a-button |
| | | @click="handleOk()" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | >ç¡®å®</a-button> |
| | | </template> |
| | | |
| | | <equipment-list |
| | | ref="EquipmentList" |
| | | @sendEquipmentRecord='sendEquipmentRecord' |
| | | ></equipment-list> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | 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, |
| | | EquipmentList |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex:'sort', |
| | | width:100, |
| | | align:"center", |
| | | }, |
| | | { |
| | | 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:true, |
| | | codeDisable: true, |
| | | dataSource: [], |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥å·¥åç¼ç !' }, |
| | | ] |
| | | }, |
| | | calibrationType: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©æ£å®æ¹å¼!' }, |
| | | ] |
| | | }, |
| | | managementMode: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©å¤å®ä¾æ®!' }, |
| | | ] |
| | | }, |
| | | equipmentName: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©è®¾å¤!' }, |
| | | ] |
| | | }, |
| | | calibrationOrderUda6: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æ£å®ç»æ!' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/eam/calibrationOrder/addNew", |
| | | edit: "/eam/calibrationOrder/saveFinal", |
| | | list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId", |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.precisionParametersTemplateId='-1'; |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | 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; |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'equipmentId', 'calibrationType', 'managementMode')); |
| | | }); |
| | | if (record.id) { |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | } |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }); |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | onEquipmentList() { |
| | | 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; |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
| | |
| | | :triggerChange="true" |
| | | :dictCode="'mom_eam_equipment_category,name,id,equipment_category_uda1 = '+'\''+caytegoryParam+'\''" |
| | | v-model="model.equipmentCategoryId" |
| | | @change="categoryChange" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <!-- <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="产线" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="workCenterId" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="formDisabled" |
| | | placeholder="è¯·éæ©äº§çº¿" |
| | | :triggerChange="true" |
| | | dictCode="mom_base_work_center,name,id,del_flag!='1'" |
| | | v-model="model.workCenterId" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> --> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="èµäº§å¶é å" |
| | |
| | | dictCode="mom_base_constructor,name,id,status!='0' and del_flag!='1'" |
| | | v-model="model.constructorId" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="ææ¯ç¶æé´å®å¨æ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="checkPeriod" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©ææ¯ç¶æé´å®å¨æ " |
| | | :triggerChange="true" |
| | | dictCode="check_period" |
| | | :disabled="true" |
| | | v-model="model.checkPeriod" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="䏿¬¡ææ¯é´å®æ¶é´" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="nextTechnologyStatusQualificationTime" |
| | | > |
| | | <j-date |
| | | :disabled="formDisabled" |
| | | style="width: 100%;" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | class="query-group-cust" |
| | | v-model="model.nextTechnologyStatusQualificationTime" |
| | | ></j-date> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 }, |
| | | sm: { span: 10 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | sm: { span: 14 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | |
| | | add: "/eam/equipment/add", |
| | | edit: "/eam/equipment/edit", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getCategoryFlag:"/eam/equipmentCategory/queryById" |
| | | }, |
| | | treeData: [], |
| | | needSpecific: false, |
| | |
| | | } |
| | | }) |
| | | } |
| | | //æ¹åææ¯ç¶æé´å®å¨æ |
| | | if(this.model.equipmentCategoryId!==null&&this.model.equipmentCategoryId!=''){ |
| | | var value = this.model.equipmentCategoryId; |
| | | getAction(this.url.getCategoryFlag,{id:value}).then(res=>{ |
| | | if(res.result.equipmentCategoryUda1!=='weldingMachine'&&res.result.equipmentCategoryUda11!=='filesCarousel'&&res.result.equipmentCategoryUda1!=='tester'){ |
| | | if(val==='A'){ |
| | | this.model.checkPeriod=365*3+''; |
| | | } |
| | | if(val==='B'||val==='C'||val==='D'){ |
| | | this.model.checkPeriod=365*4+''; |
| | | } |
| | | } |
| | | this.model = Object.assign({},this.model); |
| | | }) |
| | | } |
| | | }, |
| | | categoryChange(value){ |
| | | getAction(this.url.getCategoryFlag,{id:value}).then(res=>{ |
| | | if(res.result.equipmentCategoryUda1==='weldingMachine'){ |
| | | this.model.checkPeriod=365*3+''; |
| | | }else if(res.result.equipmentCategoryUda1==='filesCarousel'){ |
| | | this.model.checkPeriod=365*4+''; |
| | | }else if(res.result.equipmentCategoryUda1==='tester'){ |
| | | this.model.checkPeriod=365*1+''; |
| | | } |
| | | this.model = Object.assign({},this.model); |
| | | }) |
| | | } |
| | | }, |
| | | computed: { |