Commit 58438599 by lixiaomin

修改商品权限

parent 8a5e57b2
......@@ -15,7 +15,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:category:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
......@@ -59,9 +59,9 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:category:remove']">删除</el-button>
<el-button v-show="scope.row.state == 2" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'1')"
v-hasPermi="['system:material:edit']">启用</el-button>
v-hasPermi="['system:category:restart']">启用</el-button>
<el-button v-show="scope.row.state == 1" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'2')"
v-hasPermi="['system:material:edit']">停用</el-button>
v-hasPermi="['system:category:stop']">停用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -78,7 +78,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:category:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
......@@ -115,7 +115,7 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:goods:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
......@@ -18,7 +18,7 @@
<SelectCategory v-model="queryParams.category" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:goods:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
......@@ -65,14 +65,15 @@
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleUpdateState(scope.row)"
v-if="authBtn(['1'], scope.row.state)" >已完成编程</el-button>
v-if="authBtn(['1'], scope.row.state)" v-hasPermi="['system:goods:finish']">已完成编程</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-if="authBtn(['1', '2', '3', '4'], scope.row.state)">删除</el-button>
v-if="authBtn(['1', '2', '3', '4'], scope.row.state)" v-hasPermi="['system:goods:remove']">删除</el-button>
<el-button size="mini" type="text" v-if="authBtn(['2', '4'], scope.row.state)"
@click="putShopOffShop(scope.row.id, true)">上架</el-button>
@click="putShopOffShop(scope.row.id, true)" v-hasPermi="['system:goods:up']">上架</el-button>
<el-button size="mini" type="text" v-if="authBtn(['3'], scope.row.state)"
@click="putShopOffShop(scope.row.id)">下架</el-button>
<el-button size="mini" type="text" v-if="authBtn(['5'], scope.row.state)" @click="restGoods(scope.row)">恢复
@click="putShopOffShop(scope.row.id)" v-hasPermi="['system:goods:down']">下架</el-button>
<el-button size="mini" type="text" v-if="authBtn(['5'], scope.row.state)" @click="restGoods(scope.row)"
v-hasPermi="['system:goods:recover']">恢复
</el-button>
</template>
</el-table-column>
......
......@@ -16,7 +16,7 @@
<!-- <el-input v-model="queryParams.materialCode" placeholder="状态" clearable @keyup.enter.native="handleQuery" /> -->
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:material:query']">搜索
</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置</el-button>
......@@ -65,9 +65,9 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:material:remove']">删除</el-button>
<el-button v-show="scope.row.state == 2" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'1')"
v-hasPermi="['system:material:edit']">启用</el-button>
v-hasPermi="['system:material:restart']">启用</el-button>
<el-button v-show="scope.row.state == 1" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'2')"
v-hasPermi="['system:material:edit']">停用</el-button>
v-hasPermi="['system:material:stop']">停用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -88,7 +88,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:material:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
......@@ -15,7 +15,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:spec:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
......@@ -51,9 +51,9 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:spec:remove']">删除</el-button>
<el-button v-show="scope.row.state == 2" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'1')"
v-hasPermi="['system:material:edit']">启用</el-button>
v-hasPermi="['system:spec:restart']">启用</el-button>
<el-button v-show="scope.row.state == 1" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'2')"
v-hasPermi="['system:material:edit']">停用</el-button>
v-hasPermi="['system:spec:stop']">停用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -79,7 +79,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:spec:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
......@@ -20,7 +20,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-hasPermi="['system:menu:query']">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
......@@ -267,7 +267,7 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:menu:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
......@@ -53,6 +53,7 @@
</el-form-item>
<el-form-item>
<el-button
v-hasPermi="['system:role:query']"
type="primary"
icon="el-icon-search"
size="mini"
......@@ -94,8 +95,8 @@
>
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">删除</el-button>
<el-button size="mini" v-if="scope.row.status != 0" type="text" icon="el-icon-update" @click="handleStatusChange(scope.row)" v-hasPermi="['system:role:update']">启用</el-button>
<el-button size="mini" v-if="scope.row.status == 0" type="text" icon="el-icon-update" @click="handleStatusChange(scope.row)" v-hasPermi="['system:role:update']">停用</el-button>
<el-button size="mini" v-if="scope.row.status != 0" type="text" icon="el-icon-update" @click="handleStatusChange(scope.row)" v-hasPermi="['system:role:restart']">启用</el-button>
<el-button size="mini" v-if="scope.row.status == 0" type="text" icon="el-icon-update" @click="handleStatusChange(scope.row)" v-hasPermi="['system:role:stop']">停用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -135,7 +136,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:role:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
......@@ -38,6 +38,7 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
v-hasPermi="['system:user:query']"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
......@@ -88,9 +89,9 @@
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:user:remove']">删除</el-button >
<el-button v-show="scope.row.status == '1'" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'0')"
v-hasPermi="['system:material:edit']">启用</el-button>
v-hasPermi="['system:user:restart']">启用</el-button>
<el-button v-show="scope.row.status == '0'" size="mini" type="text" icon="el-icon-edit" @click="handleStatus(scope.row,'1')"
v-hasPermi="['system:material:edit']">停用</el-button>
v-hasPermi="['system:user:stop']">停用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -130,7 +131,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm" v-hasPermi="['system:user:edit']">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......
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