Commit 969ce4bc by zhangquan

添加状态

1 parent 1509fda3
......@@ -61,8 +61,7 @@ export default {
pageSizes: [10, 20, 30, 40, 50],
dialogSearchForm: {
brandName: '',
goodsName: '',
status: 2
goodsName: ''
},
dialogFormData: [
{
......@@ -138,8 +137,7 @@ export default {
handleRest() {
this.dialogSearchForm = {
brandName: '',
goodsName: '',
status: 2
goodsName: ''
}
this.handleOk()
},
......
......@@ -25,6 +25,12 @@
<!-- {{ scope.scope.appearance == 2 ? scope.scope.productName + (scope.scope.denomination || '') : scope.scope.productName }} -->
{{ scope.scope.goodsName }}
</div>
<div class="good_status" slot="goodStatus" slot-scope="scope">
<span class="circle" :style="{ 'background-color': scope.scope.status == 2 ? '#5850FF' : '#999999' }"></span>
<span>
{{ scope.scope.status == 2 ? '生效中' : '已失效' }}
</span>
</div>
<div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -79,7 +85,8 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
tableColumns: [
{
label: '品牌',
prop: 'brandName'
prop: 'brandName',
width: 150,
},
{
label: '商品名称',
......@@ -88,18 +95,24 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
},
{
label: '数量',
prop: 'couponAmount'
prop: 'couponAmount',
width: 150
},
{
label: '状态',
width: 150,
addHtml: 'goodStatus'
},
{
label: '券面额/元',
width: 110,
width: 150,
formatter: cell => {
return cell.denomination ? Number((Number(cell.denomination) / 100).toFixed(2)) : 0
}
},
{
label: '有效期/天',
width: 110,
width: 150,
prop: 'effectiveDays'
}
]
......@@ -321,6 +334,16 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
vertical-align: text-bottom;
}
}
.good_status {
.circle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
vertical-align: middle;
margin-right: 4px;
}
}
}
}
</style>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!