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

商品

parent 12e38e9f
......@@ -37,14 +37,16 @@
<em>{{$t('admin.admin_status')}}</em>
<el-select filterable v-model="msg.Status">
<el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option>
<el-option label="展示" :value="0"></el-option>
<el-option label="不展示" :value="1"></el-option>
<el-option label="待完善" :value="1"></el-option>
<el-option label="上架" :value="2"></el-option>
<el-option label="下架" :value="3"></el-option>
<el-option label="取消" :value="4"></el-option>
</el-select>
</span>
</li>
<li>
<input type="button" @click="getList" class="hollowFixedBtn" :value="$t('pub.searchBtn')">
<input type="button" @click="addIntegralMall('addIntegralMall', '', $t('MarketingActi.addComm'))" class="normalBtn" :value="$t('pub.addBtn')">
<input type="button" @click="addIntegralMall('BuyingAdd')" class="normalBtn" :value="$t('pub.addBtn')">
</li>
</ul>
</div>
......@@ -69,21 +71,27 @@
<td>{{item.Name}}</td>
<td>{{item.CategoryName}}</td>
<td>{{item.SellTypeName}}</td>
<td>{{item.price}}{{item.priceUnit === 1 ? '人民币' : '积分'}}</td>
<td>{{item.marketPrice}}</td>
<td>{{item.quota === 0 ? '不限购' : `限购${item.quota}次`}}</td>
<td>{{item.logistic}}</td>
<td>{{getHotName(item.ishot)}}</td>
<td>{{item.state === 1 ? '上架' : item.state === 0 ? '下架' : '删除'}}</td>
<td>{{item.CostPrice}}</td>
<td>{{item.SellPrice}}</td>
<td>{{item.LeaderRebate}}</td>
<td>{{item.CompanyRebate}}</td>
<td>{{item.ClientRebate}}</td>
<td>{{item.WeiTuRebate}}</td>
<td>
<el-button-group>
<el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top">
<el-button
type="primary"
icon="el-icon-edit"
circle
@click="addIntegralMall('addIntegralMall', item, '修改商品')"
></el-button>
<el-button type="primary" size="mini" icon="el-icon-edit" @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-tooltip>
<el-tooltip class="item" effect="dark" content="下架" placement="top">
<el-button type="warning" size="mini" class="iconfont icon-xiajia1"></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-tooltip>
</el-button-group>
</td>
</tr>
</table>
......@@ -111,7 +119,6 @@ export default {
loading:false,
dataList:[],
GoodsTypeList: [],
GoodsSeriesList: [],
total:0,
CommodityTypeList: [],
};
......@@ -119,7 +126,6 @@ export default {
mounted() {
this.getList();
this.getGoodsSeries();
this.getCommodityTypeList();
this.getGoodsTypeManager();
},
......@@ -131,33 +137,8 @@ export default {
this.msg.pageIndex=val;
this.getList();
},
getHotName: function (id) {
for(let i = 0; i < this.GoodsSeriesList.length; i++ ) {
if (this.GoodsSeriesList[i].id === id) {
return this.GoodsSeriesList[i].name
}
}
return '无'
},
getGoodsSeries() {
this.loading = true;
this.apiJavaPost(
"/api/IntegralManager/getGoodsSeries",
{},
res => {
this.loading = false;
if (res.data.resultCode === 1) {
this.GoodsSeriesList = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
addIntegralMall: function( path, obj, tab){
localStorage.editIntegralMall = JSON.stringify(obj);
this.$router.push({ name: path,query:{blank: 'y', tab: tab} })
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 => {
......
......@@ -119,7 +119,7 @@
<el-tooltip
class="item"
effect="dark"
:content="$t('active.ld_editInfo')"
content="修改"
placement="top"
>
<el-button
......@@ -129,6 +129,9 @@
@click="outerVisible=true,dialogTitle='修改商品类型',updateData(item)"
></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-button @click="Delete(item)" type="danger" class='zidingyiFz' icon="el-icon-delete" circle ></el-button>
</el-tooltip>
</td>
</tr>
</table>
......@@ -194,12 +197,6 @@
</div>
</div>
</el-form-item>
<el-form-item label="是否展示" prop="state">
<el-select filterable v-model="addMsg.Status">
<el-option label="展示" :value="0"></el-option>
<el-option label="不展示" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<button
......@@ -269,27 +266,18 @@ export default {
},
// 删除
Delete(item) {
this.$confirm("是否删除"+ item.name+"? 删除后不可恢复", "提示", {
this.$confirm("是否删除"+ item.Name+"? 删除后不可恢复", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apiJavaPost(
"/api/IntegralManager/goodsTypeManager",
{ reqType: 'delete', id: item.id },
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
},
err => {}
);
this.updateData(item, 2)
this.addAward()
})
.catch(() => {});
.catch(() => {
this.resetInfo()
});
},
//上传图片
uploadTypeImgBtn(file){
......@@ -386,15 +374,17 @@ export default {
);
},
//修改信息
updateData(item) {
this.outerVisible = true;
updateData(item, t) {
if (!t) {
this.outerVisible = true;
}
this.addMsg.IsShowIndex = item.IsShowIndex;
this.addMsg.Name = item.Name;
this.addMsg.ParentId = item.ParentId;
this.addMsg.Sort = item.Sort;
this.addMsg.Image = item.Image;
this.addMsg.Id = item.Id;
this.addMsg.Status = item.Status
this.addMsg.Status = t ? 1 : item.Status
},
//重置信息
resetInfo() {
......
......@@ -112,7 +112,7 @@ export default {
Vue.prototype.domainManager = function () {
let domainUrl = '';
domainUrl = "http://192.168.2.214:8082";
// domainUrl = "http://192.168.2.65:8025"; // 吴春
domainUrl = "http://192.168.2.16:8083"; // 吴春
let locationName = window.location.hostname;
let javaUrldo="";
......
......@@ -3953,15 +3953,23 @@ export default {
{
path: '/BuyingType',
name: 'BuyingType',
component: resolve => require(['@/components/activity/BuyingType'], resolve),
component: resolve => require(['@/components/Buying/BuyingType'], resolve),
meta: {
title: '代购商品类型'
}
},
{
path: '/BuyingAdd',
name: 'BuyingAdd',
component: resolve => require(['@/components/Buying/BuyingAdd'], resolve),
meta: {
title: '新增代购商品'
}
},
{
path: '/BuyingList',
name: 'BuyingList',
component: resolve => require(['@/components/activity/BuyingList'], resolve),
component: resolve => require(['@/components/Buying/BuyingList'], resolve),
meta: {
title: '代购商品列表'
}
......
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