多体系建设信息化条统-前端
zhouwx
2026-02-04 8321dd43d9c1760450817f2f664ab5d73941a4b4
src/views/work/procurementPlatform/materialMng/components/editDialog.vue
@@ -9,7 +9,7 @@
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
        <el-form-item v-if="state.isAdmin" label="企业:" prop="companyId">
        <el-form-item v-if="state.isAdmin" label="单位:" prop="companyId">
          <el-select v-model="state.form.companyId" placeholder="请选择" :disabled="state.title =='查看'" clearable style="width: 100%">
            <el-option
                v-for="item in state.companyList"
@@ -21,6 +21,9 @@
        </el-form-item>
        <el-form-item label="材料名称:" prop="materialName">
          <el-input v-model.trim="state.form.materialName" :readonly="state.title =='查看'" placeholder="材料名称"></el-input>
        </el-form-item>
        <el-form-item label="批次:" prop="materialBatch">
          <el-input v-model.trim="state.form.materialBatch" :readonly="state.title =='查看'" placeholder="批次"></el-input>
        </el-form-item>
        <el-form-item label="规格:" prop="specification">
          <el-input v-model.trim="state.form.specification" :readonly="state.title =='查看'" placeholder="规格"></el-input>
@@ -60,12 +63,14 @@
    companyId: null,
    materialName: '',
    specification: '',
    materialBatch:'',
    materialUnit: '',
    inventory: ''
  },
  formRules:{
    companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }],
    materialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
    materialBatch: [{ required: true, message: '请输入批次', trigger: 'blur' }],
    specification: [{ required: true, message: '请输入规格', trigger: 'blur' }],
    materialUnit: [{ required: true, message: '请输入单位', trigger: 'blur' }],
    inventory: [{ required: true, message: '请输入库存量', trigger: 'blur' }]
@@ -102,6 +107,7 @@
      data = {
        companyId: state.form.companyId,
        materialName: state.form.materialName,
        materialBatch:state.form.materialBatch,
        specification: state.form.specification,
        materialUnit: state.form.materialUnit,
        inventory: state.form.inventory
@@ -128,6 +134,7 @@
    companyId: null,
    materialName: '',
    specification: '',
    materialBatch:'',
    materialUnit: '',
    inventory: ''
  }