|
@@ -67,6 +67,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="height: 192upx;"></view>
|
|
<view style="height: 192upx;"></view>
|
|
|
|
+ <!-- 审核 -->
|
|
<view class="order-content" v-if="isactive === 1">
|
|
<view class="order-content" v-if="isactive === 1">
|
|
<view class="order-list" v-for="(item, index) in shoplist" :key="index">
|
|
<view class="order-list" v-for="(item, index) in shoplist" :key="index">
|
|
<view class="order-title">
|
|
<view class="order-title">
|
|
@@ -99,6 +100,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 已上架 -->
|
|
<view class="order-content" v-if="isactive === 2">
|
|
<view class="order-content" v-if="isactive === 2">
|
|
<view class="order-list" v-for="(item, index) in shoplist" :key="index">
|
|
<view class="order-list" v-for="(item, index) in shoplist" :key="index">
|
|
<view class="order-title">
|
|
<view class="order-title">
|
|
@@ -131,6 +133,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 已下架 -->
|
|
<view class="order-content" v-if="isactive === 3">
|
|
<view class="order-content" v-if="isactive === 3">
|
|
<view class="order-list" v-for="(item, index) in shoplist" :key="index">
|
|
<view class="order-list" v-for="(item, index) in shoplist" :key="index">
|
|
<view class="order-title">
|
|
<view class="order-title">
|
|
@@ -143,23 +146,17 @@
|
|
<view class="center">
|
|
<view class="center">
|
|
<view class="shop-detail door">所属店铺:{{ item.shopName }}</view>
|
|
<view class="shop-detail door">所属店铺:{{ item.shopName }}</view>
|
|
<view class="shop-detail type">类型:{{ item.typeName }}</view>
|
|
<view class="shop-detail type">类型:{{ item.typeName }}</view>
|
|
- <view class="shop-detail putaway"
|
|
|
|
- >上下架状态:{{ item.upDown | putaway }}</view
|
|
|
|
- >
|
|
|
|
- <view class="shop-detail status"
|
|
|
|
- >状态:{{ item.status | state }}</view
|
|
|
|
- >
|
|
|
|
|
|
+ <view class="shop-detail putaway">上下架状态:{{ item.upDown | putaway }}</view>
|
|
|
|
+ <view class="shop-detail status">状态:{{ item.status | state }}</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="right"
|
|
|
|
- >¥<text class="price">{{ item.price }}</text></view
|
|
|
|
- >
|
|
|
|
|
|
+ <view class="right">¥<text class="price">{{ item.price }}</text></view>
|
|
</view>
|
|
</view>
|
|
<view class="operate">
|
|
<view class="operate">
|
|
<view class="btn stick" id="one" @tap="sticktop($event)">置顶</view>
|
|
<view class="btn stick" id="one" @tap="sticktop($event)">置顶</view>
|
|
- <view class="btn sold" @tap="shopPutUp">上架</view>
|
|
|
|
|
|
+ <view class="btn sold" @tap="shopPutUp(item.id)">上架</view>
|
|
<view class="btn compile" @tap="topage">编辑</view>
|
|
<view class="btn compile" @tap="topage">编辑</view>
|
|
- <view class="btn delete">删除</view>
|
|
|
|
|
|
+ <view class="btn delete" @tap="deleteshop(item.id)">删除</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -244,6 +241,12 @@ export default {
|
|
addShop() {
|
|
addShop() {
|
|
this.$mRouter.push({ route: '/pages/shop/shopdetail' });
|
|
this.$mRouter.push({ route: '/pages/shop/shopdetail' });
|
|
},
|
|
},
|
|
|
|
+ // 删除商品
|
|
|
|
+ async deleteshop (id) {
|
|
|
|
+ await this.$http.delete('/goods/del/'+id).then(async (res)=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 根据名字搜索
|
|
// 根据名字搜索
|
|
searchByname() {
|
|
searchByname() {
|
|
this.more = 'loading';
|
|
this.more = 'loading';
|
|
@@ -323,9 +326,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
delete this.params.upDown;
|
|
delete this.params.upDown;
|
|
}
|
|
}
|
|
-
|
|
|
|
await this.$http.get('/goods/list', this.params).then((res) => {
|
|
await this.$http.get('/goods/list', this.params).then((res) => {
|
|
- console.log(res);
|
|
|
|
if (res.data.list.length > 0) {
|
|
if (res.data.list.length > 0) {
|
|
this.shoplist = res.data.list;
|
|
this.shoplist = res.data.list;
|
|
console.log(this.shoplist);
|
|
console.log(this.shoplist);
|
|
@@ -367,18 +368,24 @@ export default {
|
|
},
|
|
},
|
|
// 下架
|
|
// 下架
|
|
shopPutDown(id) {
|
|
shopPutDown(id) {
|
|
- console.log(this.params.upDown);
|
|
|
|
this.changeShopStatus(id,this.params.upDown)
|
|
this.changeShopStatus(id,this.params.upDown)
|
|
},
|
|
},
|
|
// 上架
|
|
// 上架
|
|
- shopPutUp() {
|
|
|
|
- console.log(2);
|
|
|
|
|
|
+ shopPutUp(id) {
|
|
|
|
+ this.changeShopStatus(id,this.params.upDown)
|
|
},
|
|
},
|
|
// 修改商品状态
|
|
// 修改商品状态
|
|
async changeShopStatus(ids,upordown,state) {
|
|
async changeShopStatus(ids,upordown,state) {
|
|
|
|
+ let upstate = 0
|
|
|
|
+ if (upordown === '1') {
|
|
|
|
+ upstate = 0
|
|
|
|
+ } else {
|
|
|
|
+ upstate = 1
|
|
|
|
+ }
|
|
|
|
+
|
|
let data = {
|
|
let data = {
|
|
id: ids,
|
|
id: ids,
|
|
- upDown: upordown,
|
|
|
|
|
|
+ upDown: upstate,
|
|
status: state
|
|
status: state
|
|
}
|
|
}
|
|
if (state) {
|
|
if (state) {
|
|
@@ -386,8 +393,11 @@ export default {
|
|
} else {
|
|
} else {
|
|
delete data.status
|
|
delete data.status
|
|
}
|
|
}
|
|
- await this.$http.post('/goods/changeStatusOrUpDown',data).then( async(res)=>{
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ await this.$http.postBody('/goods/changeStatusOrUpDown',data).then( async(res)=>{
|
|
|
|
+ if (res.code === 200 && res.msg === 'OK') {
|
|
|
|
+ this.getTicketShopList()
|
|
|
|
+ this.$mHelper.toast('操作成功')
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|