| | |
| | | :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" |
| | |
| | | </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> |
| | |
| | | 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' }] |
| | |
| | | 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 |
| | |
| | | companyId: null, |
| | | materialName: '', |
| | | specification: '', |
| | | materialBatch:'', |
| | | materialUnit: '', |
| | | inventory: '' |
| | | } |