Commit 367e8ac5 by 张权

单个操作项不改,disable无效

1 parent 4d8fe9d3
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
<img class="equity-icon" :src="scope.scope.equityIcon" /> <img class="equity-icon" :src="scope.scope.equityIcon" />
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="汽车权益编辑" type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</GLButton> <!-- <GLButton fn="汽车权益编辑" type="text" class="tableBtn" @click="editEquity(scope.scope, 1)">编辑</GLButton>
<GLButton fn="汽车权益上/下架" type="text" class="tableBtn" @click="updateShelves(scope.scope, 'car')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton> <GLButton fn="汽车权益上/下架" type="text" class="tableBtn" @click="updateShelves(scope.scope, 'car')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton>
<el-button type="text" class="tableBtn" @click="setTop(scope.scope.id, 'car')">置顶</el-button> <el-button type="text" class="tableBtn" @click="setTop(scope.scope.id, 'car')">置顶</el-button> -->
<GLTableButton :buttonList="carButtonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
<span style="margin-left: 8px; margin-top: 18px">添加分类</span> <span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button> </el-button>
</div> </div>
<GLButton fn = '添加门店权益' type="primary" size="small" @click="addEquity(2)" style="margin-top: 20px"> <GLButton fn="添加门店权益" type="primary" size="small" @click="addEquity(2)" style="margin-top: 20px">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加门店权益</span> <span style="margin-left: 8px">添加门店权益</span>
</GLButton> </GLButton>
...@@ -55,10 +56,11 @@ ...@@ -55,10 +56,11 @@
<img class="equity-icon" :src="scope.scope.equityIcon" /> <img class="equity-icon" :src="scope.scope.equityIcon" />
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton> <!-- <GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton>
<GLButton fn="商品权益上/下架" type="text" @click="updateShelves(scope.scope, 'goods')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton> <GLButton fn="商品权益上/下架" type="text" @click="updateShelves(scope.scope, 'goods')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton>
<el-button type="text" @click="setTop(scope.scope.id, 'goods')">置顶</el-button> <el-button type="text" @click="setTop(scope.scope.id, 'goods')">置顶</el-button>
<el-button type="text" @click="deletEquity(scope.scope.id)" :disabled="scope.scope.status == 0 ? false : true">删除</el-button> <el-button type="text" @click="deletEquity(scope.scope.id)" :disabled="scope.scope.status == 0 ? false : true">删除</el-button> -->
<GLTableButton :buttonList="goodsButtonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -69,13 +71,108 @@ ...@@ -69,13 +71,108 @@
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import { goodsMixin, carMixin } from '@/mixins' import { goodsMixin, carMixin } from '@/mixins'
export default { export default {
name: '', name: '',
mixins: [carMixin, goodsMixin], mixins: [carMixin, goodsMixin],
data() { data() {
return { return {
goodsButtonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn:'商品权益编辑'
},
listeners: {
click: row => this.editEquity(row.scope, 2)
}
},
{
type: 'GLButton',
name: row => {
return row.scope.status == 0 ? '上架' : '下架'
},
attrs: {
type: 'text',
fn:'商品权益上/下架'
},
listeners: {
click: row => this.updateShelves(row.scope, 'goods')
}
},
{
type: 'el-button',
name: row => {
return '置顶'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.setTop(row.scope.id, 'goods')
}
},
{
type: 'el-button',
name: row => {
return '删除256'
},
attrs: {
type: 'text',
disabled:(row,condition)=>{
return row.scope.status == 0
}
},
listeners: {
click: row => this.deletEquity(row.scope.id)
}
}
],
carButtonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn:'汽车权益编辑'
},
listeners: {
click: row => this.editEquity(row.scope, 1)
}
},
{
type: 'GLButton',
name: row => {
return row.scope.status == 0 ? '上架' : '下架'
},
attrs: {
type: 'text',
fn:'商品权益上/下架'
},
listeners: {
click: row => this.updateShelves(row.scope, 'car')
}
},
{
type: 'el-button',
name: row => {
return '置顶'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.setTop(row.scope.id, 'car')
}
}
],
getCardListApi: this.$apis.carEquityManageApi.getCarList, getCardListApi: this.$apis.carEquityManageApi.getCarList,
getGoodListApi: this.$apis.goodsEquityManageApi.getGoodsList, getGoodListApi: this.$apis.goodsEquityManageApi.getGoodsList,
tableTotal: '', tableTotal: '',
......
...@@ -149,7 +149,8 @@ export default { ...@@ -149,7 +149,8 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品信息', label: '商品信息',
width: '100', width: '200',
line:1,
align: 'left', align: 'left',
addHtml: 'goodsMsg' addHtml: 'goodsMsg'
}, },
......
...@@ -41,9 +41,10 @@ ...@@ -41,9 +41,10 @@
<p class="cursor-pointer" style="color:#5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p> <p class="cursor-pointer" style="color:#5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p>
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="权益卡管理编辑" type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton> <!-- <GLButton fn="权益卡管理编辑" type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton>
<el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button> <el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button>
<el-button type="text" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button> <el-button type="text" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button> -->
<GLTableButton :buttonList="recordButtonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -210,6 +211,48 @@ export default { ...@@ -210,6 +211,48 @@ export default {
url: '', url: '',
qrCode: '' qrCode: ''
}, },
recordButtonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '权益卡管理编辑'
},
listeners: {
click: row => this.edit(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '推广'
},
attrs: {
type: 'text',
disabled: (row, condition) => {
return false
}
},
listeners: {
click: row => this.extension(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '复制'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.copy(row.scope)
}
}
],
product: [ product: [
{ {
id: 'firstImg', id: 'firstImg',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!