Commit df166eca by crushh

update: 按钮权限

parent f637e42d
<template>
<el-form :model="giftForm" :rules="rules">
<el-form-item label="上架规则" prop="ruleTitle" v-if="isNew">
<el-button type="small" @click="openRelating">
{{ giftForm.ruleTitle }}
</el-button>
</el-form-item>
<el-form-item label="上架时间" prop="releaseType">
<el-radio-group v-model="giftForm.releaseType">
<el-radio :label="1">
立即上架
</el-radio>
<el-radio :label="2">
自定义上架时间段
</el-radio>
</el-radio-group>
<el-date-picker
v-model="giftForm.limitTimeBegin"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
/>
</el-form-item>
<el-form-item label="显示状态" prop="proShowStatus">
<el-radio-group v-model="giftForm.proShowStatus">
<el-radio :label="1">
上架状态就显示
</el-radio>
<el-radio :label="2">
兑换状态下显示
</el-radio>
</el-radio-group>
<div v-if="giftForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="giftForm.isNewGuestVisible" :true-label="1" :false-label="0">
非会员可见
</el-checkbox>
<span class="tips">开启后,未开卡客户在积分商城也可见该礼品(前提是该礼品的“适用会员”包含最低会员卡等级)</span>
</div>
</el-form-item>
<!-- 老数据兼容 -->
<el-form-item
label="展现门店"
required
style="position:relative"
>
<el-tooltip
class="tips-content"
effect="dark"
popper-class="store-tips"
placement="top-start"
>
<div slot="content" style="line-height:18px">
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff" />
</el-tooltip>
<vue-gic-store-linkage
v-if="setting.useNewStoreWidget === 0&&setting.creatorId"
style="margin-left:10px"
:creatorId="setting.creatorId"
:disabled="true"
:msg="giftForm.sendChildData"
ref="selectTree"
/>
<vue-gic-store-card
v-if="setting.useNewStoreWidget === 1"
style="margin-left:10px"
class="pt10"
ref="storeCard"
:uuid.sync="setting.uuid"
scenes
/>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
</el-form>
</template>
<script>
export default {
props: {
form: Object,
configuration: Object,
isNew: {
type: Boolean,
default: false,
},
},
data () {
return {
giftForm: {}, // 表单的值
setting: {}, // 各种组件的配置
};
},
watch: {
form (val) {
if (val) {
this.giftForm = JSON.parse(JSON.stringify(val));
}
},
configuration (val) {
if (val) {
this.setting = JSON.parse(JSON.stringify(val));
}
},
},
};
</script>
<style>
</style>
...@@ -6,6 +6,7 @@ import VueClipboard from 'vue-clipboard2'; ...@@ -6,6 +6,7 @@ import VueClipboard from 'vue-clipboard2';
import main from '../views/main'; import main from '../views/main';
import gift from '../views/goods/gift/gift'; import gift from '../views/goods/gift/gift';
import giftInfo from '../views/goods/gift/info'; import giftInfo from '../views/goods/gift/info';
import giftDetail from '../views/goods/gift/detail';
import coupon from '../views/goods/coupon/coupon'; import coupon from '../views/goods/coupon/coupon';
import soldStatistics from '../views/goods/soldStatistics/statistics'; import soldStatistics from '../views/goods/soldStatistics/statistics';
import flashSale from '../views/activities/flashSale/list'; import flashSale from '../views/activities/flashSale/list';
...@@ -54,7 +55,7 @@ const router = new Router({ ...@@ -54,7 +55,7 @@ const router = new Router({
{ {
path: '/giftDetail', path: '/giftDetail',
name: 'giftDetail', name: 'giftDetail',
component: giftInfo, component: giftDetail,
}, },
{ {
path: '/coupon', path: '/coupon',
......
...@@ -346,7 +346,8 @@ ...@@ -346,7 +346,8 @@
<el-button <el-button
type="text" type="text"
v-if="!scope.row.ruleTitle" v-if="!scope.row.ruleTitle"
@click="relating(scope.row)" @click="relating(scope.row) && $getButtonLimit($buttonCode.couponRelating)"
:limit-code="$buttonCode.couponRelating"
> >
关联 关联
</el-button> </el-button>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -361,8 +361,9 @@ ...@@ -361,8 +361,9 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
v-if="!scope.row.ruleTitle" v-if="!scope.row.ruleTitle && $getButtonLimit($buttonCode.giftRelating)"
@click="relating(scope.row)" @click="relating(scope.row)"
:limit-code="$buttonCode.giftRelating"
> >
关联 关联
</el-button> </el-button>
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
size="small" size="small"
:disabled="tableDate.length>=20" :disabled="tableDate.length>=20"
@click="$router.push('/addRule')" @click="$router.push('/addRule')"
v-if="$getButtonLimit($buttonCode.ruleListAdd)"
:limit-code="$buttonCode.ruleListAdd"
> >
新建上架规则({{ tableDate.length }}/20) 新建上架规则({{ tableDate.length }}/20)
</el-button> </el-button>
...@@ -90,24 +92,32 @@ ...@@ -90,24 +92,32 @@
<el-button <el-button
type="text" type="text"
@click="relatingDetail(row.integralMallProRuleId,'选择')" @click="relatingDetail(row.integralMallProRuleId,'选择')"
v-if="$getButtonLimit($buttonCode.ruleListRelate)"
:limit-code="$buttonCode.ruleListRelate"
> >
关联商品 关联商品
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="$router.push('/editRule/' + row.integralMallProRuleId)" @click="$router.push('/editRule/' + row.integralMallProRuleId)"
v-if="$getButtonLimit($buttonCode.ruleListEdit)"
:limit-code="$buttonCode.ruleListEdit"
> >
编辑 编辑
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="$router.push('/copyRule/' + row.integralMallProRuleId)" @click="$router.push('/copyRule/' + row.integralMallProRuleId)"
v-if="$getButtonLimit($buttonCode.ruleListCopy)"
:limit-code="$buttonCode.ruleListCopy"
> >
复制 复制
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="delRelating(row.integralMallProRuleId)" @click="delRelating(row.integralMallProRuleId)"
v-if="$getButtonLimit($buttonCode.ruleListDel)"
:limit-code="$buttonCode.ruleListDel"
> >
删除 删除
</el-button> </el-button>
...@@ -169,9 +179,10 @@ ...@@ -169,9 +179,10 @@
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
v-if="type=='查看'" v-if="type=='查看'&&$getButtonLimit($buttonCode.ruleListDelGoods)"
:disabled="!multipleSelection.length" :disabled="!multipleSelection.length"
slot="reference" slot="reference"
:limit-code="$buttonCode.ruleListDelGoods"
> >
批量移除 批量移除
</el-button> </el-button>
......
...@@ -108,6 +108,8 @@ ...@@ -108,6 +108,8 @@
plain plain
@click="multipleClose" @click="multipleClose"
style="margin:0 10px 0 0" style="margin:0 10px 0 0"
v-if="$getButtonLimit($buttonCode.deliverSetBatchDeActive)"
:limit-code="$buttonCode.deliverSetBatchDeActive"
> >
<i style="margin-right:5px" />批量失效 <i style="margin-right:5px" />批量失效
</el-button> </el-button>
...@@ -182,7 +184,12 @@ ...@@ -182,7 +184,12 @@
删除 删除
</el-button> </el-button>
</el-popover> </el-popover>
<el-button type="text" @click="open(scope.row)" v-if="scope.row.isValid !== 1"> <el-button
type="text"
@click="open(scope.row)"
v-if="scope.row.isValid !== 1&&$getButtonLimit($buttonCode.deliverSetActive)"
:limit-code="$buttonCode.deliverSetActive"
>
启用 启用
</el-button> </el-button>
</div> </div>
......
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