提交 df9bfebd authored 作者: 陆's avatar

分类导航管理(标题自动配置)

上级 f44b68d9
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<i-form ref="formValidate" :model="tbCfClassification" :rules="ruleValidate" :label-width="80"> <i-form ref="formValidate" :model="tbCfClassification" :rules="ruleValidate" :label-width="80">
<Form-item label="标题" prop="classTitle" style="width:800px"> <Form-item label="标题" prop="classTitle" style="width:800px">
<i-input v-model="tbCfClassification.classTitle" placeholder="标题"/> <i-input v-model="tbCfClassification.classTitle" placeholder="标题" disabled/>
</Form-item> </Form-item>
<!--<Form-item label="商品一级分类" prop="goodtypeId"> <!--<Form-item label="商品一级分类" prop="goodtypeId">
<i-input v-model="tbCfClassification.goodtypeId" placeholder="商品一级分类"/> <i-input v-model="tbCfClassification.goodtypeId" placeholder="商品一级分类"/>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</i-select> </i-select>
</Form-item> </Form-item>
<Form-item label="三级商品分类" prop="categoryIdThree" style="width:800px"> <Form-item label="三级商品分类" prop="categoryIdThree" style="width:800px">
<i-select placeholder="请选择" v-model="categoryIdThree"> <i-select placeholder="请选择" v-model="categoryIdThree" @on-change="changeGoodstype3">
<i-option v-for="(el,i) in Goodstype2" :key='i' <i-option v-for="(el,i) in Goodstype2" :key='i'
:value="el.descripitionId">{{el.descripitionName}} :value="el.descripitionId">{{el.descripitionName}}
</i-option> </i-option>
......
...@@ -110,7 +110,13 @@ let vm = new Vue({ ...@@ -110,7 +110,13 @@ let vm = new Vue({
} else { } else {
url = "../tbcfstationitem/queryByItemType?typeId=" + this.tbCfClassification.goodtypeId; url = "../tbcfstationitem/queryByItemType?typeId=" + this.tbCfClassification.goodtypeId;
} }
console.log('url', url) var list = vm.Goodstype
for (var i = 0; i<list.length;i++){
if (list[i].goodstypeId == vm.tbCfClassification.goodtypeId){
vm.tbCfClassification.classTitle = list[i].goodstypeTitle
}
}
console.log('url', e)
let that = this; let that = this;
Ajax.request({ Ajax.request({
url: url, url: url,
...@@ -138,6 +144,12 @@ let vm = new Vue({ ...@@ -138,6 +144,12 @@ let vm = new Vue({
} else { } else {
url = "../tbcfstationitem/queryByItemTypeTwo?typeTwoId=" + this.categoryIdTwo; url = "../tbcfstationitem/queryByItemTypeTwo?typeTwoId=" + this.categoryIdTwo;
} }
var list = vm.Goodstype1
for (var i = 0; i<list.length;i++){
if (list[i].goodstwotypeId == vm.categoryIdTwo){
vm.tbCfClassification.classTitle = list[i].goodstwotypeTitle
}
}
let that = this; let that = this;
Ajax.request({ Ajax.request({
url: url, url: url,
...@@ -155,6 +167,14 @@ let vm = new Vue({ ...@@ -155,6 +167,14 @@ let vm = new Vue({
} }
}); });
}, },
changeGoodstype3(e) {
var list = vm.Goodstype2
for (var i = 0; i<list.length;i++){
if (list[i].descripitionId == vm.categoryIdThree){
vm.tbCfClassification.classTitle = list[i].descripitionName
}
}
},
del: function (event) { del: function (event) {
let ids = getSelectedRows("#jqGrid"); let ids = getSelectedRows("#jqGrid");
if (ids == null) { if (ids == null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论