|
|
@@ -17,7 +17,6 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12" label-width="100px">
|
|
|
<el-form-item label="父级节点" prop="parentId">
|
|
|
-
|
|
|
<selectTree
|
|
|
ref="tree"
|
|
|
class="form-ipt"
|
|
|
@@ -59,7 +58,11 @@
|
|
|
|
|
|
<el-col :span="12" label-width="100px">
|
|
|
<el-form-item label="编码" prop="code">
|
|
|
- <el-input placeholder="" @click.native="handleProduct()" v-model="attributeData.code"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder=""
|
|
|
+ @click.native="handleProduct()"
|
|
|
+ v-model="attributeData.code"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
@@ -158,7 +161,6 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
</el-form>
|
|
|
<div class="btns">
|
|
|
<el-button type="primary" size="small" @click="save">保存</el-button>
|
|
|
@@ -198,7 +200,6 @@
|
|
|
},
|
|
|
|
|
|
rules: {
|
|
|
-
|
|
|
code: [{ required: true, message: '请选择编码', trigger: 'change' }],
|
|
|
|
|
|
name: [{ required: true, message: '请选择名称', trigger: 'change' }]
|
|
|
@@ -233,20 +234,16 @@
|
|
|
|
|
|
methods: {
|
|
|
getTreeValue(data) {
|
|
|
- this.category = {
|
|
|
- }
|
|
|
+ this.category = {};
|
|
|
this.$set(this.attributeData, 'code', null);
|
|
|
this.$set(this.attributeData, 'name', null);
|
|
|
- if(data) {
|
|
|
+ if (data) {
|
|
|
this.attributeData.parentId = data.id;
|
|
|
- this.attributeData.level = +data.level + 1;
|
|
|
+ this.attributeData.level = +data.level + 1;
|
|
|
} else {
|
|
|
- this.attributeData.parentId = null
|
|
|
- this.attributeData.level = null
|
|
|
+ this.attributeData.parentId = null;
|
|
|
+ this.attributeData.level = null;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
save() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
@@ -273,7 +270,7 @@
|
|
|
},
|
|
|
|
|
|
handleProduct() {
|
|
|
- this.$refs.standardOutputRefs.open(this.attributeData.parentId ? 1 : 9 );
|
|
|
+ this.$refs.standardOutputRefs.open(this.attributeData.parentId ? 1 : 9);
|
|
|
},
|
|
|
chooseStandardList(type, data) {
|
|
|
if (type == 9 || type == 1) {
|