Commit c8d4f6b3 authored by 华国豪's avatar 华国豪 🙄

1

parent 86a4fb8f
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品分类" > <el-form-item label="商品分类" >
<el-select filterable v-model="CategoryId" @change="getGoodsTypeManager(2)"> <el-select filterable v-model="addMsg.ParentCategoryId" @change="getGoodsTypeManager(2)">
<el-option <el-option
v-for="item in GoodsTypeList" v-for="item in GoodsTypeList"
:label="item.Name" :value="item.Id" :key="item.Id" :label="item.Name" :value="item.Id" :key="item.Id"
...@@ -379,6 +379,7 @@ export default { ...@@ -379,6 +379,7 @@ export default {
CompanyRebate: 0, CompanyRebate: 0,
ClientRebate: 0, ClientRebate: 0,
WeiTuRebate: '', WeiTuRebate: '',
ParentCategoryId: ""
}, },
MenberList: [], MenberList: [],
GoodsTypeList: [], GoodsTypeList: [],
...@@ -427,6 +428,7 @@ export default { ...@@ -427,6 +428,7 @@ export default {
if (r.data.resultCode === 1) { if (r.data.resultCode === 1) {
this.addMsg = r.data.data this.addMsg = r.data.data
this.DiningImageArray = this.addMsg.FlowImgList this.DiningImageArray = this.addMsg.FlowImgList
this.getGoodsTypeManager(2)
this.$forceUpdate() this.$forceUpdate()
} }
}, null) }, null)
...@@ -554,7 +556,7 @@ export default { ...@@ -554,7 +556,7 @@ export default {
); );
}, },
getGoodsTypeManager(t) { getGoodsTypeManager(t) {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.CategoryId : 0},res => { this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.addMsg.ParentCategoryId : 0},res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
if(t) { if(t) {
this.GoodsTypeList2 = res.data.data; this.GoodsTypeList2 = res.data.data;
......
...@@ -32,14 +32,10 @@ ...@@ -32,14 +32,10 @@
<li> <li>
<span> <span>
<em>商品分类</em> <em>商品分类</em>
<el-select filterable v-model="msg.CategoryId" @change="getGoodsTypeManager(2)"> <el-select filterable v-model="msg.CategoryId">
<el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option>
<el-option v-for="item in GoodsTypeList" :label="item.Name" :value="item.Id" :key="item.Id"></el-option> <el-option v-for="item in GoodsTypeList" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
</el-select> </el-select>
<el-select filterable v-model="CategoryId">
<el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option>
<el-option v-for="item in GoodsTypeList2" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
</el-select>
</span> </span>
</li> </li>
<li> <li>
...@@ -137,8 +133,6 @@ export default { ...@@ -137,8 +133,6 @@ export default {
GoodsTypeList: [], GoodsTypeList: [],
total:0, total:0,
CommodityTypeList: [], CommodityTypeList: [],
GoodsTypeList2: [],
CategoryId: ''
}; };
}, },
...@@ -170,13 +164,9 @@ export default { ...@@ -170,13 +164,9 @@ export default {
addIntegralMall: function( path, proId, tab){ addIntegralMall: function( path, proId, tab){
this.$router.push({ name: path,query:{blank: 'y', proId: proId, tab: tab} }) this.$router.push({ name: path,query:{blank: 'y', proId: proId, tab: tab} })
}, },
getGoodsTypeManager(t) { getGoodsTypeManager() {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.CategoryId : 0},res => { this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: -1},res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
if(t) {
this.GoodsTypeList2 = res.data.data;
return
}
this.GoodsTypeList = res.data.data; this.GoodsTypeList = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -202,9 +192,6 @@ export default { ...@@ -202,9 +192,6 @@ export default {
//获取数据 //获取数据
getList() { getList() {
this.loading = true; this.loading = true;
if (this.CategoryId!== '') {
this.msg.CategoryId = this.CategoryId
}
this.apipost("Shop_post_GetPageList", this.msg, res => { this.apipost("Shop_post_GetPageList", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment