| | |
| | | </div> |
| | | |
| | | <el-dialog :title="titleN" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%"> |
| | | <el-form ref="form" :model="formInline" label-width="80px"> |
| | | <el-form-item label="名称"> |
| | | <el-form ref="form" :rules="rules" :model="formInline" label-width="80px"> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="formInline.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="说明"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="listCel">取 消</el-button> |
| | | <el-button type="primary" class="btns" @click="listAdd" |
| | | >确 定</el-button |
| | | > |
| | |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "名称不能为空", trigger: "change" }, |
| | | ],} |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | } |
| | | }, |
| | | coAdd(val, type) { |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | this.titleN = type; |
| | | if (type == "新增") { |
| | | this.dialogVisible = true; |
| | |
| | | } |
| | | }, |
| | | listAdd() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.titleN == "新增") { |
| | | this.form.deductionList.push(this.formInline); |
| | | this.dialogVisible = false; |
| | |
| | | this.form.deductionList[this.index].space = this.formInline.space; |
| | | this.dialogVisible = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | listDel(val) { |
| | | var i = this.form.deductionList.findIndex( |
| | |
| | | } |
| | | }); |
| | | }, |
| | | listCel(){ |
| | | this.dialogVisible = false; |
| | | }, |
| | | btnsQX() { |
| | | this.show = true; |
| | | }, |