Commit 4b0b16d7 authored by 黄奎's avatar 黄奎
parents 09274cf7 464d12bc
......@@ -200,7 +200,7 @@
</el-card>
</div>
</el-tab-pane>
<el-tab-pane label="商品分类转移" name="second">
<!-- <el-tab-pane label="分类转移" name="second">
<div class="app-transfer">
<div flex="dir:left">
<el-card shadow="never" class="transfer">
......@@ -263,6 +263,71 @@
</div>
<el-button :loading="saveBtnLoad" @click="transClass" style="margin-top:10px" size="mini" type="primary">开始转移</el-button>
</div>
</el-tab-pane> -->
<el-tab-pane label="商品批量转移" name="second">
<div class="app-transfer">
<div flex="dir:left">
<el-card shadow="never" class="transfer">
<div slot="header" class="clearfix">
<span @click="getnoChangeData(1)" :class="transChild1!='' ? 'blue' :''" class="point">分类</span>
<span v-if="transChild1!=''">/{{transChild1}}</span>
</div>
<div class="cat-body">
<div class="searchInput" style="width:240px">
<el-input style="display:inline-block;width:219px;height:30px"
placeholder="请输入搜索内容"
v-model="msg1.Name"
size="small"
clearable>
</el-input>
<span @click="getList1(1)" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<div v-for="(item,index) in transData1" :key="index" flex="dir:left box:first" style="width:100%;margin-top:16px">
<div class="app-ellipsis">
<div class="vue-line-clamp" style="word-break: break-all; -webkit-line-clamp: 1;">
<el-radio @change="radioChange_t" v-model="SetGoodsMsg.CategoryId" :label="item.Id">{{item.Name}}</el-radio>
</div>
</div>
<button @click="nextData(1,item)" v-if="item.ChildList.length>0" type="button" class="el-button cat-next el-button--text">
<i class="el-icon-arrow-right"></i>
</button>
</div>
</div>
</el-card>
<div flex="dir:left cross:center">
<el-button size="mini" class="middle" :type="transActive_t" icon="el-icon-arrow-right" circle></el-button>
</div>
<el-card shadow="never" class="transfer">
<div slot="header" class="clearfix">
<span @click="getnoChangeData(2)" :class="transChild2!='' ? 'blue' :''" class="point">分类</span>
<span v-if="transChild2!=''">/{{transChild2}}</span>
</div>
<div class="cat-body">
<div class="searchInput" style="width:240px">
<el-input style="display:inline-block;width:219px;height:30px"
placeholder="请输入搜索内容"
v-model="msg1.Name"
size="small"
clearable>
</el-input>
<span @click="getList1(2)" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<div v-for="(item,index) in transData2" :key="index" flex="dir:left box:first" style="width:100%;margin-top:16px">
<div class="app-ellipsis">
<div class="vue-line-clamp" style="word-break: break-all; -webkit-line-clamp: 1;">
<el-radio @change="radioChange_t" v-model="SetGoodsMsg.NewCategoryId" :label="item.Id">{{item.Name}}</el-radio>
</div>
</div>
<button @click="nextData(2,item)" v-if="item.ChildList.length>0" type="button" class="el-button cat-next el-button--text">
<i class="el-icon-arrow-right"></i>
</button>
</div>
</div>
</el-card>
</div>
<el-button :loading="saveBtnLoad" @click="transClass_t" style="margin-top:10px" size="mini" type="primary">开始转移</el-button>
</div>
</el-tab-pane>
<el-tab-pane label="分类样式" name="third">
......@@ -379,6 +444,7 @@ export default {
transChild1:'',
transChild2:'',
transActive:'',
transActive_t:'',
loading:false,
searchDig:false,
val:'',
......@@ -416,6 +482,10 @@ export default {
CategoryId:-1,
ParentId:-1,
},
SetGoodsMsg:{
CategoryId:-1,
NewCategoryId:-1,
},
transData1:[],
transData2:[],
noChangeData:[],
......@@ -576,6 +646,12 @@ export default {
this.transActive="primary"
}
},
radioChange_t(){
if(this.transMsg.CategoryId > 0 && this.transMsg.ParentId > 0){
this.transActive_t="primary"
}
},
// 转移分类
transClass(){
......@@ -600,6 +676,29 @@ export default {
}
})
},
// 商品批量转移转移分类
transClass_t(){
if(this.SetGoodsMsg.CategoryId<0){
this.Error("必须选择转移前的分类!");
return;
}
if(this.SetGoodsMsg.NewCategoryId<0){
this.Error("必须选择转移后的分类!");
return;
}
this.saveBtnLoad=true;
this.apipost("/api/product/SetGoodsCategoryTransfer",this.SetGoodsMsg, res => {
this.saveBtnLoad=false;
if(res.data.resultCode==1){
this.Success(res.data.message)
this.getList1();
this.SetGoodsMsg={
CategoryId:-1,
NewCategoryId:-1,
}
}
})
},
nextData(num,item){
if(num==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