Commit 868a9c96 by caoyanzhi

update: e袋洗-按钮权限

parent d68ef72b
......@@ -13,7 +13,7 @@
</el-select>
<el-input :disabled="!ewashDisable" v-model="listParams.searchParam" class="w200 vertical-middle" placeholder="输入卡券名称/备注" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<div class="fr">
<el-button type="primary" @click="addCard" :disabled="!ewashDisable">新增卡券</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingAddEwash)" :limit-code="$buttonCode.marketingAddEwash" type="primary" @click="addCard" :disabled="!ewashDisable">新增卡券</el-button>
</div>
</div>
<ul class="clearfix" element-loading-text="拼命加载中">
......
......@@ -56,7 +56,7 @@
<div class="card-item_foot clearfix">
<div class="fl">
<span v-if="item.auditingStatus !== -1"
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="!shelfFlag && item.useCustomCode === 0 && item.canEdit !== false" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
>剩余库存:{{ item.couponStock }} <a title="编辑库存" v-if="$getButtonLimit($buttonCode.marketingEditEwashStock) && !shelfFlag && item.useCustomCode === 0 && item.canEdit !== false" :limit-code="$buttonCode.marketingEditEwashStock" @click="preAdjustStock(item)"><i class="el-icon-edit"></i></a
></span>
</div>
<render-temp v-if="!shelfFlag" :item="item" @handler="handler"></render-temp>
......
......@@ -9,13 +9,14 @@ export default Vue.component('render-temp', {
}
},
render(h) {
const { $getButtonLimit, $buttonCode } = this;
const canEdit = this.item.canEdit !== false; // 只有canEdit === false 才证明不能使用 没有权限仅可以详情/报表
// 当前卡券是否 是长期有效||在投放有效期内
// putEffectiveMode 0:固定日期,1:长期
const canGroupSend = this.item.putEffectiveMode == 1 ? true : new Date() > new Date(this.item.putBeginDate) && new Date() < new Date(this.item.putEndDate);
const bind1 =
canEdit && canGroupSend ? (
<a title="投放" onClick={this.handler.bind(null, 1)}>
$getButtonLimit($buttonCode.marketingSendEwash) && canEdit && canGroupSend ? (
<a title="投放" limit-code={$buttonCode.marketingSendEwash} onClick={this.handler.bind(null, 1)}>
<i class="iconfont icon-daohang-" />
</a>
) : (
......@@ -26,30 +27,34 @@ export default Vue.component('render-temp', {
<i class="el-icon-tickets" />
</a>
);
const bind3 = (
<a title="编辑" onClick={this.handler.bind(null, 3)}>
const bind3 = $getButtonLimit($buttonCode.marketingEditEwash) ? (
<a title="编辑" limit-code={$buttonCode.marketingEditEwash} onClick={this.handler.bind(null, 3)}>
<i class="el-icon-edit" />
</a>
);
const bind4 = canEdit ? (
<a title="删除" onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
''
);
const bind4 =
$getButtonLimit($buttonCode.marketingDelEwash) && canEdit ? (
<a title="删除" limit-code={$buttonCode.marketingDelEwash} onClick={this.handler.bind(null, 4)}>
<i class="el-icon-delete" />
</a>
) : (
''
);
const bind5 = (
<a title="详情" onClick={this.handler.bind(null, 5)}>
<i class="el-icon-document" />
</a>
);
const bind6 = canEdit ? (
<a title="复制" onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
) : (
''
);
const bind6 =
$getButtonLimit($buttonCode.marketingCopyEwash) && canEdit ? (
<a title="复制" limit-code={$buttonCode.marketingCopyEwash} onClick={this.handler.bind(null, 6)}>
<i class="iconfont icon-wxcard-copy" />
</a>
) : (
''
);
const bind7 = canEdit ? (
<a style="position:relative;top:1px" title="领取记录" onClick={this.handler.bind(null, 7)}>
......
......@@ -3,8 +3,8 @@
<div class="clearfix pb22">
<el-input v-model="listParams.searchParam" class="w300" placeholder="输入门店名称/code进行搜索" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<div class="fr">
<el-button type="primary" @click="$router.push('/ewash/statements')" :disabled="!ewashDisable">查看账单</el-button>
<el-button type="primary" @click="handleDialogShow" :disabled="!ewashDisable">创建子账户</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingCheckEwash)" :limit-code="$buttonCode.marketingCheckEwash" type="primary" @click="$router.push('/ewash/statements')" :disabled="!ewashDisable">查看账单</el-button>
<el-button v-if="$getButtonLimit($buttonCode.marketingAddEwashAccount)" :limit-code="$buttonCode.marketingAddEwashAccount" type="primary" @click="handleDialogShow" :disabled="!ewashDisable">创建子账户</el-button>
</div>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -16,7 +16,7 @@
</el-table-column>
<el-table-column label="当前余额" align="left" width="120" prop="storeBalance">
<template slot-scope="scope">
<el-button type="text" @click="getYue(scope.row)" v-if="!scope.row.balance">获取余额</el-button>
<el-button type="text" v-if="$getButtonLimit($buttonCode.marketingEwashBalance) && !scope.row.balance" :limit-code="$buttonCode.marketingEwashBalance" @click="getYue(scope.row)">获取余额</el-button>
{{ scope.row.balance }}
</template>
</el-table-column>
......
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