“linengliang”
2023-10-18 83830b509d3cce2dba0be3fdbc6f4db054b78d74
鉴定
已添加1个文件
已修改7个文件
916 ■■■■ 文件已修改
src/views/eam/EquipmentCalibrationOrder.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentMaintenancePlanList.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue 370 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentNew/EquipmentModal.vue 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentCalibrationOrder.vue
@@ -92,10 +92,10 @@
        :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"
@@ -154,6 +154,14 @@
            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">
@@ -186,37 +194,20 @@
        </span>
      </a-table>
      <a-tabs
        type="card"
        defaultActiveKey="1"
      >
        <a-tab-pane
          key="1"
          forceRender
          tab="检验项"
        >
          <span slot="tab">
            <a-badge>精度参数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>检定报告&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>
@@ -231,33 +222,35 @@
      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,
@@ -269,6 +262,9 @@
        showSizeChanger: true,
        total: 0
      },
      dictOptions:{
      },
      /* åˆ†é¡µå‚æ•° */
      // è¡¨å¤´
      columns: [
        {
@@ -326,7 +322,7 @@
        {
          title: '判定结果',
          align: "center",
          dataIndex: 'calibrationResult'
          dataIndex: 'calibrationOrderUda6_dictText'
        },
        {
          title: '创建人',
@@ -367,6 +363,7 @@
        delete: "/eam/calibrationOrder/delete",
        edit: "/eam/calibrationOrder/editStatus",
      },
      mainId:'',
    }
  },
@@ -374,41 +371,14 @@
    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;
@@ -453,30 +423,23 @@
        }
      })
    },
    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>
src/views/eam/EquipmentMaintenancePlanList.vue
@@ -164,9 +164,6 @@
            title:'创建时间',
            align:"center",
            dataIndex: 'createTime',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            },
            width:200,
          },
          {
@@ -179,9 +176,6 @@
            title:'修改时间',
            align:"center",
            dataIndex: 'updateTime',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            },
            width:200,
          },
          {
src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue
@@ -146,7 +146,7 @@
                    <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)"
@@ -250,65 +250,38 @@
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          width: 60,
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
            dataIndex:'sort',
            width:100,
            align:"center",
        },
        {
          title: '精度参数编码',
          align: 'center',
          dataIndex: 'num',
        },
        {
          title: '精度参数名称',
          align: 'center',
            title:'检验项目名称',
            align:"center",
          dataIndex: 'name',
            width:300
        },
        {
          title: '计量单位',
          align: 'center',
          dataIndex: 'unitName',
            title:'位置',
            align:"center",
            dataIndex: 'precisionParametersUda1',
            width:300
        },
        {
          title: '下限值',
          align: 'center',
          dataIndex: 'lowerLimit',
            title:'允差(mm)',
            align:"center",
            dataIndex: 'tolerance',
            width:300
        },
        {
          title: '上限值',
          align: 'center',
          dataIndex: 'upperLimit',
        },
        {
          title: '测定值',
          align: 'center',
            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',
            scopedSlots: { customRender: 'actualValue' },
            width:300
        },
      ],
      url: {
        list: "/eam/calibrationOrderDetail/getCalibrationOrderDetailList",
        list: "/eam/calibrationOrder/listByMainId",
        report: "/eam/calibrationOrder/report",
        save: "/eam/calibrationOrderDetail/save",
      },
@@ -482,6 +455,9 @@
          }
        }
        if(column.dataIndex == 'actualValue'){
          target[column.dataIndex] = value;
        }
        //显示带过来的数据
        that.dataSource = temp;
      }
@@ -493,8 +469,8 @@
      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
        }
src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue
@@ -112,6 +112,21 @@
              />
            </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>
@@ -121,7 +136,10 @@
      size="middle"
      rowKey='id'
      :columns="columns"
      :pagination="ipagination"
      :loading="loading"
      :dataSource="dataSource"
      @change="handleTableChange"
    >
    </a-table>
@@ -154,10 +172,13 @@
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,
@@ -168,46 +189,31 @@
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
            dataIndex:'sort',
            width:100,
            align:"center",
        },
        {
          title: '精度参数编码',
          align: 'center',
          dataIndex: 'num'
            title:'检验项目名称',
            align:"center",
            dataIndex: 'precisionParametersName',
            width:300
        },
        {
          title: '精度参数名称',
          align: 'center',
          dataIndex: 'name'
            title:'位置',
            align:"center",
            dataIndex: 'precisionParametersUda1',
            width:300
        },
        {
          title: '单位',
          align: 'center',
          dataIndex: 'unitName'
        },
        {
          title: '下限值',
          align: 'center',
          dataIndex: 'lowerLimit'
        },
        {
          title: '上限值',
          align: 'center',
          dataIndex: 'upperLimit'
        },
        {
          title: '实际测定值',
          align: 'center',
          dataIndex: 'actualValue',
            title:'允差(mm)',
            align:"center",
            dataIndex: 'tolerance',
            width:300
        },
      ],
      title: "操作",
      precisionParametersTemplateId:'',
      visible: false,
      disableSubmit: false,
      codeDisable: true,
@@ -248,7 +254,7 @@
      url: {
        add: "/eam/calibrationOrder/addNew",
        edit: "/eam/calibrationOrder/editNew",
        getPrecisionParameterList: "/eam/calibrationOrder/getPrecisionParameterList",
        list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId",
      },
    }
@@ -256,11 +262,9 @@
  methods: {
    add() {
      this.dataSource = []
      this.precisionParametersTemplateId='-1';
      this.edit({})
    },
    edit(record) {
      let that = this;
      this.form.resetFields();
@@ -323,17 +327,28 @@
    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>
src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue
@@ -101,6 +101,7 @@
  data() {
    return {
      description: '检定报告',
      disableMixinCreated:true,
      columns: [
        {
          title: '#',
@@ -153,18 +154,28 @@
        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) => {
src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
@@ -1,16 +1,18 @@
<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}" -->
@@ -34,106 +36,98 @@
    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',
            dataIndex:'sort',
            width:100,
          align: "center",
        },
        {
          title: '精度参数名称',
            title:'检验项目名称',
            align:"center",
          dataIndex: 'name',
          align: "center",
            width:200
        },
        {
          title: '计量单位',
          dataIndex: 'unitName',
            title:'位置',
          align: "center",
            dataIndex: 'precisionParametersUda1',
            width:200
        },
        {
          title: '上限值',
          dataIndex: 'upperLimit',
            title:'允差(mm)',
          align: "center",
            dataIndex: 'tolerance',
            width:200
        },
        {
          title: '下限值',
          dataIndex: 'lowerLimit',
            title:'实测值',
          align: "center",
        },
        {
          title: '检定结果',
          dataIndex: 'calibrationItemResult',
          align: "center",
        },
        {
          title: '判定结果',
          dataIndex: 'judgmentResult',
          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: {
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      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
      })
    clearList(){
        this.dataSource=[]
        this.selectedRowKeys=[]
        this.ipagination.current = 1
    },
  },
  computed: {
      importExcelUrl(){
        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
      }
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
/deep/ .frozenRowClass {
 .frozenRowClass {
  color: #c9c9c9;
}
.success {
src/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,370 @@
<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>
src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -34,6 +34,7 @@
                :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>
@@ -360,23 +361,6 @@
          </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="资产制造商"
@@ -392,6 +376,39 @@
                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>
@@ -897,11 +914,11 @@
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 },
        sm: { span: 10 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
        sm: { span: 14 },
      },
      confirmLoading: false,
@@ -978,6 +995,7 @@
        add: "/eam/equipment/add",
        edit: "/eam/equipment/edit",
        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
        getCategoryFlag:"/eam/equipmentCategory/queryById"
      },
      treeData: [],
      needSpecific: false,
@@ -1198,6 +1216,33 @@
          }
        })
      }
      //改变技术状态鉴定周期
      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: {