Commit 034d2b58 authored by 黄奎's avatar 黄奎
parents 64f503f6 9f05babd
......@@ -217,13 +217,19 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品分类" prop="CategoryId">
<el-select filterable v-model="addMsg.CategoryId">
<el-form-item label="商品分类" >
<el-select filterable v-model="CategoryId" @change="getGoodsTypeManager(2)">
<el-option
v-for="item in GoodsTypeList"
:label="item.Name" :value="item.Id" :key="item.Id"
></el-option>
</el-select>
<el-select filterable v-model="addMsg.CategoryId">
<el-option
v-for="item in GoodsTypeList2"
:label="item.Name" :value="item.Id" :key="item.Id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="成本价" prop="CostPrice">
<el-input v-model="addMsg.CostPrice" class="w217"/>
......@@ -408,6 +414,8 @@ export default {
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
GoodsSeriesList: [],
CommodityExplainList: [],
GoodsTypeList2: [],
CategoryId: ''
};
},
components: {
......@@ -462,8 +470,7 @@ export default {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
//统一图片处理
if (this.DiningImageArray.length === 5) {
......@@ -530,6 +537,7 @@ export default {
});
},
addIntegralMall: function() {
if (this.addMsg.CategoryId == '') return this.$message.error('请选择商品分类')
this.addMsg.FlowImgList = this.DiningImageArray
this.apipost("Shop_post_SetCommodityInfo", this.addMsg,
res => {
......@@ -545,9 +553,13 @@ export default {
null
);
},
getGoodsTypeManager() {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => {
getGoodsTypeManager(t) {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.CategoryId : 0},res => {
if (res.data.resultCode === 1) {
if(t) {
this.GoodsTypeList2 = res.data.data;
return
}
this.GoodsTypeList = res.data.data;
} else {
this.Error(res.data.message);
......
......@@ -2,10 +2,16 @@
.height_auto.el-select .el-input{
height: auto
}
.BuyingList .el-button-group .el-button{
padding: 6px !important;
}
.BuyingList .el-button-group .el-button.iconfont{
font-size: 12px !important;
}
</style>
<template>
<div class="flexOne">
<div class="flexOne BuyingList">
<div class="query-box">
<ul class="user_time_picker">
<li>
......@@ -26,10 +32,14 @@
<li>
<span>
<em>商品分类</em>
<el-select filterable v-model="msg.CategoryId">
<el-select filterable v-model="msg.CategoryId" @change="getGoodsTypeManager(2)">
<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-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>
</li>
<li>
......@@ -64,6 +74,8 @@
<th>公司返佣</th>
<th>同行返佣</th>
<th>微途返佣</th>
<th>操作人</th>
<th>操作时间</th>
<th>{{$t('system.table_operation')}}</th>
</tr>
<tr v-for="item in dataList">
......@@ -77,19 +89,21 @@
<td>{{item.CompanyRebate}}</td>
<td>{{item.ClientRebate}}</td>
<td>{{item.WeiTuRebate}}</td>
<td>
<el-button-group>
<td>{{item.UpdateBy}}</td>
<td>{{item.UpdateDate}}</td>
<td class="BuyingList">
<el-button-group size="mini">
<el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="addIntegralMall('BuyingAdd', item.Id, '修改商品')"></el-button>
<el-button type="primary" size="mini" class="iconfont icon-xiugai" @click="addIntegralMall('BuyingAdd', item.Id, '修改商品')"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="上架" placement="top">
<el-button type="success" size="mini" class="iconfont icon-shangjia1"></el-button>
<el-button type="success" size="mini" class="iconfont icon-shangjia1" @click="setProS(2, item.Id)" v-if="item.Status === 1"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下架" placement="top">
<el-button type="warning" size="mini" class="iconfont icon-xiajia1"></el-button>
<el-button type="warning" size="mini" class="iconfont icon-xiajia1" @click="setProS(3, item.Id)" v-if="item.Status === 2"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="取消" placement="top">
<el-button type="danger" size="mini" class="iconfont icon-quxiao1"></el-button>
<el-button type="danger" size="mini" class="iconfont icon-quxiao1" @click="setProS(4, item.Id)"></el-button>
</el-tooltip>
</el-button-group>
</td>
......@@ -121,6 +135,8 @@ export default {
GoodsTypeList: [],
total:0,
CommodityTypeList: [],
GoodsTypeList2: [],
CategoryId: ''
};
},
......@@ -133,6 +149,18 @@ export default {
},
methods: {
setProS(t, id){
this.apipost("Shop_post_GetCommodityCategoryList",{CommodityId: id, Status: t},res => {
if (res.data.resultCode === 1) {
this.$message.success(res.data.message);
this.getList()
} else {
this.Error(res.data.message);
}
},
null
);
},
handleCurrentChange(val){
this.msg.pageIndex=val;
this.getList();
......@@ -140,9 +168,13 @@ export default {
addIntegralMall: function( path, proId, tab){
this.$router.push({ name: path,query:{blank: 'y', proId: proId, tab: tab} })
},
getGoodsTypeManager() {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => {
getGoodsTypeManager(t) {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.CategoryId : 0},res => {
if (res.data.resultCode === 1) {
if(t) {
this.GoodsTypeList2 = res.data.data;
return
}
this.GoodsTypeList = res.data.data;
} else {
this.Error(res.data.message);
......@@ -168,6 +200,9 @@ export default {
//获取数据
getList() {
this.loading = true;
if (this.CategoryId!== '') {
this.msg.CategoryId = this.CategoryId
}
this.apipost("Shop_post_GetPageList", this.msg, res => {
this.loading = false;
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