“linengliang”
2023-12-18 08bb85ea6e67dcef3c378fa73db060d4e279e7d6
三级保养
已修改2个文件
118 ■■■■ 文件已修改
src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/maintenancePlan/StandardSelect.vue 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue
@@ -70,7 +70,7 @@
            <a-button
              type='primary'
              @click='standardSelect'
              :disabled="formDisabled"
              :disabled="formDisabled||model.type===null||model.type===undefined||model.type===''"
              icon="plus"
            >设备-保养标准
            </a-button>
@@ -79,7 +79,8 @@
      </a-tab-pane>
    </a-tabs>
    <standard-select
      @selectionRows='selectionRows'
      @selectionEquipmentRows='selectionRows'
      :maintenanceType="model.type"
      ref='standardSelectModel'
    ></standard-select>
  </a-spin>
src/views/eam/modules/maintenancePlan/StandardSelect.vue
@@ -8,7 +8,7 @@
    @cancel="close"
    style="top:50px"
    cancelText="关闭"
    :width="1050"
    :width="1500"
  >
    <a-card :bordered="false">
      <div class="table-page-search-wrapper">
@@ -21,14 +21,24 @@
              :md="8"
              :sm="6"
            >
              <a-form-item label="检验项目名称">
              <a-form-item label="统一编码">
                <a-input
                  placeholder="请输入检验项目名称"
                  placeholder="请输入统一编码"
                  v-model="queryParam.num"
                />
              </a-form-item>
            </a-col>
            <a-col
              :md="8"
              :sm="6"
            >
              <a-form-item label="设备名称">
                <a-input
                  placeholder="设备名称"
                  v-model="queryParam.name"
                />
              </a-form-item>
            </a-col>
            <a-col :md="3">
              <span
                style="float: left;overflow: hidden;"
@@ -77,6 +87,11 @@
  mixins: [JeecgListMixin],
  components: {},
  props: {
    maintenanceType:{
      type:String,
      default:'',
      required:true
    }
  },
  data() {
@@ -86,49 +101,61 @@
      columns: [
        {
          title: '#',
          dataIndex: '',
          dataIndex: 'id',
          key: 'rowIndex',
          width: 50,
          align: 'center',
          customRender: function (t, r, index) {
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '标准编码',
          align: 'center',
          dataIndex: 'num',
        },
        {
          title: '使用部门',
          align: 'center',
          dataIndex: 'useDepartName',
        },
        {
          title: '统一编码',
          align: 'center',
          dataIndex: 'equipmentNum',
          dataIndex: 'num',
          width:200
        },
        {
          title: '设备名称',
          align: 'center',
          dataIndex: 'equipmentName',
          dataIndex: 'name',
          width:200
        },
        {
          title: '设备型号',
          align: 'center',
          dataIndex: 'equipmentModel',
          dataIndex: 'model',
          width:200
        },
        {
          title: '版本',
          title: '设备规格',
          align: 'center',
          dataIndex: 'version',
          dataIndex: 'specification',
          width:200
        },
        {
          title: '版本状态',
          title: 'ABC标识',
          align: "center",
          dataIndex: 'equipmentImportanceId',
          width:100
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
          width:100
        },
        {
          title: '设备状态',
          align: 'center',
          dataIndex: 'versionStatusName',
          dataIndex: 'equipmentStatus_dictText',
          width:100
        },
        {
          title: '技术状态',
          align: 'center',
          dataIndex: 'technologyStatus_dictText',
          width:100
        },
      ],
      selectedRowKeys: [],
@@ -156,7 +183,8 @@
      visible: false,
      loading: false,
      url: {
        list: '/eam/maintenanceStandard/getMaintenanceStandardList',
        list: '/eam/equipment/getEquipmentList',
        getStandards:'/eam/equipmentMaintenancePlan/getStandards'
      },
    }
  },
@@ -190,8 +218,9 @@
      }
      let that = this
      this.loading = true
      this.queryParam.versionStatus = '2'
      this.queryParam.type = 'daily'
      // this.queryParam.versionStatus = '2'
      // this.queryParam.type = 'daily'
      this.queryParam.isLine = 'no';
      let params = this.getQueryParams()//查询条件
      await getAction(this.url.list, params).then((res) => {
        if (res.success) {
@@ -251,12 +280,34 @@
        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc';
      }
      this.ipagination = pagination;
      this.loadData();
      this.loadData();
    },
    handleSubmit() {
      this.$emit('selectionRows', this.selectionRows);
      this.searchReset(0)
      this.close();
      this.loading = true
      let that = this;
      var ids = '';
      if(this.selectionRows.length==0){
        that.$message.warning("请选择保养设备");
        this.loading=false;
        return false;
      }
      for(var i = 0;i<this.selectionRows.length;i++){
          ids = ids+this.selectionRows[i].id+',';
      }
      getAction(this.url.getStandards,{ids:ids,maintenanceType:this.maintenanceType}).then(res=>{
        if(res.success){
          if(res.result.records.length!==that.selectionRows.length){
            that.$message.warning(res.result.message);
          }
          that.$emit('selectionEquipmentRows', res.result.records);
          that.searchReset(0)
          that.close();
        }
      }).finally(res=>{
        this.loading=false;
      })
    },
    onSelectChange(selectionRows) {
      this.selectionRows = selectionRows;