|
@@ -1,9 +1,10 @@
|
|
|
<template>
|
|
|
<div style="margin-top: 50px">
|
|
|
<el-form :model="value" :rules="rules" ref="productInfoForm" label-width="120px" style="width: 600px" size="small">
|
|
|
- <el-form-item label="商品分类:" prop="productCategoryId,productBigCategoryId">
|
|
|
+ <el-form-item label="商品分类:" prop="productCategoryId">
|
|
|
<el-cascader
|
|
|
v-model="selectProductCateValue"
|
|
|
+ :placeholder="cascaderPlaceholder"
|
|
|
:options="productCateOptions">
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
@@ -50,6 +51,7 @@
|
|
|
:autoSize="true"
|
|
|
v-model="value.description"
|
|
|
type="textarea"
|
|
|
+ :rows="5"
|
|
|
placeholder="请输入内容"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="商品货号:">
|
|
@@ -103,6 +105,7 @@
|
|
|
productCateOptions: [],
|
|
|
brandOptions: [],
|
|
|
originOptions:[],
|
|
|
+ cascaderPlaceholder:'',
|
|
|
rules: {
|
|
|
name: [
|
|
|
{required: true, message: '请输入商品名称', trigger: 'blur'},
|
|
@@ -123,6 +126,7 @@
|
|
|
this.getProductCateList();
|
|
|
this.getBrandList();
|
|
|
this.getOriginList();
|
|
|
+ console.log('selectProductCateValue',this.selectProductCateValue);
|
|
|
},
|
|
|
computed:{
|
|
|
//商品的编号
|
|
@@ -146,13 +150,16 @@
|
|
|
this.value.productBigCategoryName= this.getBigCateNameById(this.value.productBigCategoryId);
|
|
|
|
|
|
this.value.productCategoryId = newValue[1];
|
|
|
- this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
|
|
|
+ this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
|
|
|
+ this.cascaderPlaceholder = this.value.productBigCategoryName + " / " + this.value.productCategoryName ;
|
|
|
} else {
|
|
|
this.value.productCategoryId = null;
|
|
|
this.value.productCategoryName=null;
|
|
|
this.value.productBigCategoryId = null;
|
|
|
this.value.productBigCategoryName = null;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -261,5 +268,6 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style>
|
|
|
+.el-cascader input::-webkit-input-placeholder {color:#717171!important;}
|
|
|
</style>
|