|
@@ -113,13 +113,13 @@
|
|
|
<el-table-column align='center' width="180px" label="操作" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- 组合商品没有进货清单按钮 -->
|
|
|
- <el-button v-if="!scope.row.complementGoodsIdList" type="text">进货清单</el-button>
|
|
|
- <el-popconfirm title="你是否上架该商品?" @onConfirm="onUpdate(scope.row)" v-if="scope.row.status == 0" v-permission="'goods/update'">
|
|
|
+ <el-button v-if="!scope.row.complementGoodsIdList" @click="onPurchaseList(scope.row)" type="text">进货清单</el-button>
|
|
|
+ <el-popconfirm title="你是否上架该商品?" @onConfirm="onUpdate(scope.row)" v-if="scope.row.status == 0" v-permission="'goods/updateGoodsStatus'">
|
|
|
<el-button slot="reference" type="text">上架</el-button>
|
|
|
</el-popconfirm>
|
|
|
<el-button v-if="scope.row.status == 0" v-permission="'/shopOperation'" @click="onShopOperation('update', scope.row)"
|
|
|
type="text">修改</el-button>
|
|
|
- <el-popconfirm title="你是否下架该商品?" @onConfirm="onUpdate(scope.row)" v-if="scope.row.status == 1" v-permission="'goods/update'">
|
|
|
+ <el-popconfirm title="你是否下架该商品?" @onConfirm="onUpdate(scope.row)" v-if="scope.row.status == 1" v-permission="'goods/updateGoodsStatus'">
|
|
|
<el-button slot="reference" type="text">下架</el-button>
|
|
|
</el-popconfirm>
|
|
|
<!-- <el-button v-if="scope.row.status == 0"
|
|
@@ -217,7 +217,8 @@
|
|
|
goodsQuery,
|
|
|
goodsAdd,
|
|
|
goodsUpdate,
|
|
|
- goodsDelete
|
|
|
+ goodsDelete,
|
|
|
+ updateGoodsStatus
|
|
|
} from '@/api/businessManager'
|
|
|
import cleanDeep from 'clean-deep'
|
|
|
import store from '@/store'
|
|
@@ -467,13 +468,24 @@
|
|
|
})
|
|
|
},
|
|
|
onUpdate(row) {
|
|
|
- goodsUpdate({
|
|
|
- id: row.id,
|
|
|
+ updateGoodsStatus({
|
|
|
+ goodsId: row.id,
|
|
|
status: row.status ? 0 : 1
|
|
|
}).then(res => {
|
|
|
this.messageTips(row.status ? '下架' : '上架', res)
|
|
|
})
|
|
|
},
|
|
|
+ onPurchaseList(row) {
|
|
|
+ let pageInfo = JSON.stringify(this.pageInfo)
|
|
|
+ let search = JSON.stringify(this.searchForm)
|
|
|
+ this.$router.push({
|
|
|
+ path: '/shopManager/purchaseLlist',
|
|
|
+ query: {
|
|
|
+ pageInfo,
|
|
|
+ search
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
onDelete(row) {
|
|
|
this.$confirm('您确定删除该商品吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -546,10 +558,12 @@
|
|
|
params.id = row.id
|
|
|
}
|
|
|
let pageInfo = JSON.stringify(this.pageInfo)
|
|
|
+ let searchForm = JSON.stringify(this.searchForm)
|
|
|
let paramInfo = JSON.stringify(params)
|
|
|
this.$router.push({
|
|
|
path: '/shopManager/shopOperation',
|
|
|
query: {
|
|
|
+ searchForm,
|
|
|
paramInfo,
|
|
|
pageInfo
|
|
|
}
|