Commit 7cb796b0 by crushh

update: 权限

parent fdbfd90f
......@@ -50,7 +50,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/delete.1.1.4.js"></script><!-- 删除轻弹窗 -->
<script src="//web-1251519181.file.myqcloud.com/components/input-number.1.0.12.js"></script><!-- 输入框 -->
<script src="//web-1251519181.file.myqcloud.com/components/welfare-selector.0.0.18.js"></script><!-- 福利选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.8.js"></script><!-- 账号分组组件 -->
<script src="//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.13.js"></script><!-- 账号分组组件 -->
<script src="//web-1251519181.file.myqcloud.com/components/editor.1.1.13.js"></script><!-- 富文本编辑器 -->
</body>
</html>
......@@ -102,7 +102,7 @@
</el-table-column>
<el-table-column label="操作" align="left" width="180px" fixed="right">
<template slot-scope="scope">
<dm-perm-button type="text" v-if="scope.row.useStatus != 2" @click="$router.push(`/card-package/edit?id=${scope.row.couponPackageId}`)">编辑</dm-perm-button>
<dm-perm-button type="text" v-if="scope.row.useStatus != 2 && scope.row.edit == 1" @click="$router.push(`/card-package/edit?id=${scope.row.couponPackageId}`)">编辑</dm-perm-button>
<!-- statusFlag 1正常(生效状态),0卡券张数不正常(失效状态) -->
<el-button v-if="!(scope.row.useStatus == 2 && scope.row.statusFlag == 0)" type="text" @click="$router.push(`/card-package/send-list?id=${scope.row.couponPackageId}`)">发放记录</el-button>
<el-popover popper-class="option-dropdown" trigger="hover">
......@@ -110,7 +110,7 @@
<li v-if="!(scope.row.useStatus == 2 && scope.row.statusFlag == 0)">
<el-button @click="$router.push(`/card-package/stock-list?id=${scope.row.couponPackageId}`)" type="text">库存记录</el-button>
</li>
<li :class="{ disabled: $itemPerm($itemCode.gicDeletePackage) }">
<li v-if="scope.row.edit == 1" :class="{ disabled: $itemPerm($itemCode.gicDeletePackage) }">
<dm-perm-button @click="delOne(scope.row)" :disabld="$itemPerm($itemCode.gicDeletePackage)" type="text">删除</dm-perm-button>
</li>
</ul>
......
......@@ -126,16 +126,16 @@
<li v-if="[1,2].includes(scope.row._status)">
<dm-perm-button @click="handler(9, scope.row)" type="text">库存记录</dm-perm-button>
</li>
<li v-if="[1,2].includes(scope.row._status)" :class="{ disabled: $itemPerm($itemCode.gicCardFormEdit) || scope.row.deleteFlag }">
<li v-if="[1,2].includes(scope.row._status) && scope.row.edit == 1" :class="{ disabled: $itemPerm($itemCode.gicCardFormEdit) || scope.row.deleteFlag }">
<mk-button type="text" @click="handler(3, scope.row)" :option="{ perm: $itemPerm($itemCode.gicCardFormEdit), deleteFlag: scope.row.deleteFlag, deleteRemark: scope.row.remark }">编辑</mk-button>
</li>
<li v-else :class="{ disabled: $itemPerm($itemCode.gicCardFormInfo) }">
<dm-perm-button @click="handler(5, scope.row)" :disabled="$itemPerm($itemCode.gicCardFormInfo)" type="text">详情</dm-perm-button>
</li>
<li v-if="scope.row._status == 2">
<li v-if="scope.row._status == 2 && scope.row.edit == 1">
<dm-perm-button @click="handler(10, scope.row)" type="text">禁用</dm-perm-button>
</li>
<li :class="{ disabled: $itemPerm($itemCode.gicCardFormDel) }">
<li :class="{ disabled: $itemPerm($itemCode.gicCardFormDel) }" v-if="scope.row.edit == 1">
<dm-perm-button @click="handler(4, scope.row)" :disabld="$itemPerm($itemCode.gicCardFormDel)" type="text">删除</dm-perm-button>
</li>
</ul>
......@@ -238,7 +238,7 @@ export default {
},
// val: 1投放 2报表 3编辑 4删除 5详情 6复制 7同步 8领取详情 9库存记录 10禁用
// 已无效的功能 1投放 2报表 7同步
handler(val, { couponId }) {
handler(val, { couponId, edit }) {
switch (val) {
case 1:
this.$router.push('/gic-card/group-send/add?couponId=' + couponId);
......@@ -256,7 +256,7 @@ export default {
this.$router.push('/gic-card/copy?copyId=' + couponId);
break;
case 8: // 领取记录
this.$router.push('/gic-card/member-get?id=' + couponId);
this.$router.push('/gic-card/member-get?id=' + couponId + '&edit=' + edit);
break;
case 9: // 库存记录
this.$router.push('/gic-card/stock-list?id=' + couponId);
......
......@@ -80,8 +80,8 @@
</el-table-column>
<el-table-column label="操作" align="left" width="130px" fixed="right">
<template slot-scope="scope" v-if="listParams.memberType == 0">
<el-button type="text" v-if="scope.row.statusFlag == 4" @click="orderData(scope.row)">手动核销</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.statusFlag === 4" width="280" tips="销毁后无法恢复,确认销毁?">
<el-button type="text" v-if="scope.row.statusFlag == 4 && edit == 1" @click="orderData(scope.row)">手动核销</el-button>
<dm-delete @confirm="delData(scope.row)" v-if="scope.row.statusFlag === 4 && edit == 1" width="280" tips="销毁后无法恢复,确认销毁?">
<el-button type="text">销毁</el-button>
</dm-delete>
</template>
......@@ -128,6 +128,7 @@ export default {
dateTime: [ Date.now(), Date.now() ], // 默认当天
dateTimeCopy: [ Date.now(), Date.now() ],
dateTime2: [ , ],
edit: this.$route.query.edit,
listParams: {
couponId: this.$route.query.id, // 卡券id
// search: '',
......
......@@ -156,7 +156,7 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-switch v-model="scope.row.hiddenFlag" :disabled="scope.row.statusFlag === 0 && scope.row.hiddenFlag === 1" :active-value="1" :inactive-value="0" @change="changeShow(scope.row)"></el-switch>
<el-switch v-model="scope.row.hiddenFlag" :disabled="scope.row.statusFlag === 0 && scope.row.hiddenFlag === 1 && scope.row.edit==1" :active-value="1" :inactive-value="0" @change="changeShow(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" min-width="170px" fixed="right">
......
......@@ -156,22 +156,22 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-switch v-model="scope.row.hiddenFlag" :disabled="scope.row.statusFlag === 0 && scope.row.hiddenFlag === 1" :active-value="1" :inactive-value="0" @change="changeShow(scope.row)"></el-switch>
<el-switch v-model="scope.row.hiddenFlag" :disabled="scope.row.statusFlag === 0 && scope.row.hiddenFlag === 1 && scope.row.edit === 1" :active-value="1" :inactive-value="0" @change="changeShow(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" min-width="210px" fixed="right">
<template slot-scope="scope">
<div style="font-size:0px">
<el-button type="text" @click="edit(scope.row, 2)">编辑</el-button>
<el-button type="text" @click="$router.push('/gift-manage/virtual-stock-list?id=' + scope.row.giftId)">库存记录</el-button>
<el-button type="text" v-if="scope.row.edit === 1" @click="edit(scope.row, 2)">编辑</el-button>
<el-button type="text" @click="$router.push('/gift-manage/virtual-stock-list?id=' + scope.row.giftId)">库存记录</el-button>
<!-- <dm-perm-button type="text" @click="edit(scope.row, 2)">编辑</dm-perm-button>
<dm-perm-button type="text" @click="$router.push('/gift-manage/virtual-stock-list?id=' + scope.row.giftId)">库存记录</dm-perm-button> -->
<el-dropdown style="margin-left:20px;" @command="command => handleCommand(command, scope.row)" placement="bottom-start">
<span class="el-dropdown-link" style="color:#2f54ed;cursor: pointer;"> <i class="el-icon-more"></i> </span>
<el-dropdown-menu slot="dropdown" style="width:110px;">
<el-dropdown-item command="1">查看内容</el-dropdown-item>
<el-dropdown-item command="2" v-if="scope.row.statusFlag === 0">启用</el-dropdown-item>
<el-dropdown-item command="3" v-if="scope.row.statusFlag === 1">禁用</el-dropdown-item>
<el-dropdown-item command="2" v-if="scope.row.statusFlag === 0 && scope.row.edit === 1">启用</el-dropdown-item>
<el-dropdown-item command="3" v-if="scope.row.statusFlag === 1 && scope.row.edit === 1">禁用</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</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