qushaowei
2023-10-24 9d3b355061393f9dd031c1d8aaf124564d9c0d19
src/views/eam/modules/specialtyMaintenanceStandard/SpecialtyMaintenanceStandardModal.vue
@@ -82,13 +82,13 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="对象部门"
              label="使用部门"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :placeholder="disableSubmit?'':'请选择对象部门'"
                :placeholder="disableSubmit?'':'请选择使用部门'"
                :triggerChange="true"
                :disabled="true"
                dictCode="sys_depart,depart_name,id"
@@ -351,24 +351,24 @@
          dataIndex: 'standard',
          width: 100,
        },
        {
          title: '方法',
          align: 'center',
          dataIndex: 'maintenanceMethodName',
          width: 100,
        },
        {
          title: '工具',
          align: 'center',
          dataIndex: 'maintenanceTool',
          width: 100,
        },
        {
          title: '维保专业',
          align: 'center',
          dataIndex: 'maintenanceSpecialtyName',
          width: 100,
        },
        // {
        //   title: '方法',
        //   align: 'center',
        //   dataIndex: 'maintenanceMethodName',
        //   width: 100,
        // },
        // {
        //   title: '工具',
        //   align: 'center',
        //   dataIndex: 'maintenanceTool',
        //   width: 100,
        // },
        // {
        //   title: '维保专业',
        //   align: 'center',
        //   dataIndex: 'maintenanceSpecialtyName',
        //   width: 100,
        // },
        {
          title: '安全要求',
          align: 'center',
@@ -482,7 +482,8 @@
        getMaintenanceMode: "/eam/maintenanceStandardDetail/getMaintenanceMode",
        realDelete: "/eam/maintenanceStandardDetail/realDelete",
        revise: '/eam/maintenanceStandard/revise',
        getReviseVersion: "/eam/maintenanceStandard/getReviseVersion"
        getReviseVersion: "/eam/maintenanceStandard/getReviseVersion",
        getNum: '/eam/sysIdentity/getNumNew'
      },
      dataSource: [],
@@ -551,6 +552,7 @@
    add() {
      this.edit({ maintenanceStandardDetaillist: [] })
      this.getSeq()
    },
@@ -615,31 +617,31 @@
            return
          }
          for (var i = 0; i < that.dataSource.length; i++) {
            if (that.dataSource[i].maintenanceRequire == null || that.dataSource[i].maintenanceRequire == undefined || that.dataSource[i].maintenanceRequire == '') {
              this.$message.error("第" + (i + 1) + "行安全要求为空,请填写")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].photo == null || that.dataSource[i].photo == undefined || that.dataSource[i].photo == '') {
              this.$message.error("第" + (i + 1) + "行示意图为空,请上传")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].location == null || that.dataSource[i].location == undefined || that.dataSource[i].location == '') {
              this.$message.error("第" + (i + 1) + "行部位为空,请填写")
              that.confirmLoading = false
              return false;
            }
            // if (that.dataSource[i].maintenanceRequire == null || that.dataSource[i].maintenanceRequire == undefined || that.dataSource[i].maintenanceRequire == '') {
            //   this.$message.error("第" + (i + 1) + "行安全要求为空,请填写")
            //   that.confirmLoading = false
            //   return false;
            // }
            // if (that.dataSource[i].photo == null || that.dataSource[i].photo == undefined || that.dataSource[i].photo == '') {
            //   this.$message.error("第" + (i + 1) + "行示意图为空,请上传")
            //   that.confirmLoading = false
            //   return false;
            // }
            // if (that.dataSource[i].location == null || that.dataSource[i].location == undefined || that.dataSource[i].location == '') {
            //   this.$message.error("第" + (i + 1) + "行部位为空,请填写")
            //   that.confirmLoading = false
            //   return false;
            // }
            if (that.dataSource[i].maintenanceCycleId == null || that.dataSource[i].maintenanceCycleId == undefined) {
              this.$message.error("第" + (i + 1) + "行周期为空,请选择")
              that.confirmLoading = false
              return false;
            }
            if (that.dataSource[i].maintenanceMode == null || that.dataSource[i].maintenanceMode == undefined || that.dataSource[i].maintenanceMode == '') {
              this.$message.error("第" + (i + 1) + "行维保方式为空,请选择")
              that.confirmLoading = false
              return false;
            }
            // if (that.dataSource[i].maintenanceMode == null || that.dataSource[i].maintenanceMode == undefined || that.dataSource[i].maintenanceMode == '') {
            //   this.$message.error("第" + (i + 1) + "行维保方式为空,请选择")
            //   that.confirmLoading = false
            //   return false;
            // }
@@ -691,6 +693,14 @@
      })
    },
    getSeq() {
      getAction(this.url.getNum, { type: 'SpecialtyMaintenanceStandard', length: 4 }).then(res => {
        if (res.success) {
          this.form.setFieldsValue({ "num": res.result })
        }
      })
    },
    getMaintenanceCycle() {
      getAction(this.url.getMaintenanceCycle).then((res) => {
        if (res.success) {