| | |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 新增弹窗 --> |
| | | <el-dialog title="生产记录新增" :visible.sync="dialogVisible" width="35%"> |
| | | <el-dialog title="生产记录新增" :visible.sync="dialogVisible" ref="ruleForm" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="form.type" @change="edittype" placeholder="请选择" style="width: 480px;"> |
| | | <el-select v-model="form.type" :rules="Rules" |
| | | @change="edittype" placeholder="请选择" style="width: 480px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="add">确 定</el-button> |
| | | <el-button type="primary" @click="add(form)">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | record:'', |
| | | remarks:'', |
| | | unit:'', |
| | | }, |
| | | Rules:{ |
| | | type:{required:true,message:'类型不能为空',trigger:'change'}, |
| | | work:{required:true,message:'工序不能为空',trigger:'change'}, |
| | | name:{required:true,message:'工艺不能为空',trigger:'change'}, |
| | | record:{required:true,message:'记录不能为空',trigger:'blur'}, |
| | | unit:{required:true,message:'单位不能为空',trigger:'blur'}, |
| | | }, |
| | | modifyVisible:false, |
| | | dialogVisible:false, |
| | |
| | | }) |
| | | }, |
| | | add() { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | alert('submit!'); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | this.dialogVisible = false |
| | | this.addRecord() |
| | | this.form = {}; |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | query() { |
| | | this.selectAllleft() |
| | | }, |