Commit 9f05babd authored by 华国豪's avatar 华国豪 🙄

1

parent f39469d6
...@@ -217,13 +217,19 @@ ...@@ -217,13 +217,19 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品分类" prop="CategoryId"> <el-form-item label="商品分类" >
<el-select filterable v-model="addMsg.CategoryId"> <el-select filterable v-model="CategoryId" @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"
></el-option> ></el-option>
</el-select> </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>
<el-form-item label="成本价" prop="CostPrice"> <el-form-item label="成本价" prop="CostPrice">
<el-input v-model="addMsg.CostPrice" class="w217"/> <el-input v-model="addMsg.CostPrice" class="w217"/>
...@@ -408,6 +414,8 @@ export default { ...@@ -408,6 +414,8 @@ export default {
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"', defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
GoodsSeriesList: [], GoodsSeriesList: [],
CommodityExplainList: [], CommodityExplainList: [],
GoodsTypeList2: [],
CategoryId: ''
}; };
}, },
components: { components: {
...@@ -462,8 +470,7 @@ export default { ...@@ -462,8 +470,7 @@ export default {
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let fileName = file.file.name; let fileName = file.file.name;
var path = "/Upload/DMC/"; var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
//统一图片处理 //统一图片处理
if (this.DiningImageArray.length === 5) { if (this.DiningImageArray.length === 5) {
...@@ -530,6 +537,7 @@ export default { ...@@ -530,6 +537,7 @@ export default {
}); });
}, },
addIntegralMall: function() { addIntegralMall: function() {
if (this.addMsg.CategoryId == '') return this.$message.error('请选择商品分类')
this.addMsg.FlowImgList = this.DiningImageArray this.addMsg.FlowImgList = this.DiningImageArray
this.apipost("Shop_post_SetCommodityInfo", this.addMsg, this.apipost("Shop_post_SetCommodityInfo", this.addMsg,
res => { res => {
...@@ -545,9 +553,13 @@ export default { ...@@ -545,9 +553,13 @@ export default {
null null
); );
}, },
getGoodsTypeManager() { getGoodsTypeManager(t) {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => { this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.CategoryId : 0},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);
......
...@@ -2,10 +2,16 @@ ...@@ -2,10 +2,16 @@
.height_auto.el-select .el-input{ .height_auto.el-select .el-input{
height: auto height: auto
} }
.BuyingList .el-button-group .el-button{
padding: 6px !important;
}
.BuyingList .el-button-group .el-button.iconfont{
font-size: 12px !important;
}
</style> </style>
<template> <template>
<div class="flexOne"> <div class="flexOne BuyingList">
<div class="query-box"> <div class="query-box">
<ul class="user_time_picker"> <ul class="user_time_picker">
<li> <li>
...@@ -26,10 +32,14 @@ ...@@ -26,10 +32,14 @@
<li> <li>
<span> <span>
<em>商品分类</em> <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 :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>
...@@ -64,6 +74,8 @@ ...@@ -64,6 +74,8 @@
<th>公司返佣</th> <th>公司返佣</th>
<th>同行返佣</th> <th>同行返佣</th>
<th>微途返佣</th> <th>微途返佣</th>
<th>操作人</th>
<th>操作时间</th>
<th>{{$t('system.table_operation')}}</th> <th>{{$t('system.table_operation')}}</th>
</tr> </tr>
<tr v-for="item in dataList"> <tr v-for="item in dataList">
...@@ -77,19 +89,21 @@ ...@@ -77,19 +89,21 @@
<td>{{item.CompanyRebate}}</td> <td>{{item.CompanyRebate}}</td>
<td>{{item.ClientRebate}}</td> <td>{{item.ClientRebate}}</td>
<td>{{item.WeiTuRebate}}</td> <td>{{item.WeiTuRebate}}</td>
<td> <td>{{item.UpdateBy}}</td>
<el-button-group> <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-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>
<el-tooltip class="item" effect="dark" content="上架" placement="top"> <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>
<el-tooltip class="item" effect="dark" content="下架" placement="top"> <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>
<el-tooltip class="item" effect="dark" content="取消" placement="top"> <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-tooltip>
</el-button-group> </el-button-group>
</td> </td>
...@@ -121,6 +135,8 @@ export default { ...@@ -121,6 +135,8 @@ export default {
GoodsTypeList: [], GoodsTypeList: [],
total:0, total:0,
CommodityTypeList: [], CommodityTypeList: [],
GoodsTypeList2: [],
CategoryId: ''
}; };
}, },
...@@ -133,6 +149,18 @@ export default { ...@@ -133,6 +149,18 @@ export default {
}, },
methods: { 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){ handleCurrentChange(val){
this.msg.pageIndex=val; this.msg.pageIndex=val;
this.getList(); this.getList();
...@@ -140,9 +168,13 @@ export default { ...@@ -140,9 +168,13 @@ 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() { getGoodsTypeManager(t) {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => { this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: t ? this.CategoryId : 0},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);
...@@ -168,6 +200,9 @@ export default { ...@@ -168,6 +200,9 @@ 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