mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 06:30:49 +00:00
商品列表、组合商品的新增、编辑添加权限控制
This commit is contained in:
parent
3410958449
commit
c62829b1ad
@ -23,12 +23,12 @@
|
||||
:on-error="uploadError" style="display:inline-block;margin: 0 15px 0 0;">
|
||||
<el-button type="warning" icon="el-icon-upload2">组合商品导入</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" plain @click="addGoodsCombination" icon="el-icon-plus">新增组合商品</el-button>
|
||||
<el-button type="primary" plain @click="addGoodsCombination" icon="el-icon-plus" v-if="is_admin">新增组合商品</el-button>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="loading" ref="multipleTable" :data="tableData" class="table" tooltip-effect="dark" border
|
||||
style="width: 100%" row-key="id" :tree-props="{ children: 'children' }">
|
||||
<el-table-column label="商品信息" width="400">
|
||||
<el-table-column label="商品信息" width="400" class-name="flex">
|
||||
<template slot-scope="scope">
|
||||
<div class="commodityimg">
|
||||
<img :src="scope.row.img_url" class="Img" />
|
||||
@ -40,8 +40,8 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" label="组合数量"></el-table-column>
|
||||
<el-table-column label="剩余库存">
|
||||
<el-table-column prop="num" label="组合数量" align="center"></el-table-column>
|
||||
<el-table-column label="剩余库存" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.children">{{ scope.row.stock }}</span>
|
||||
</template>
|
||||
@ -65,9 +65,9 @@
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column sortable prop="total_orders_num" label="累计订单"></el-table-column> -->
|
||||
<el-table-column sortable prop="sale_stock" label="可售库存"></el-table-column>
|
||||
<el-table-column prop="status" label="状态"></el-table-column>
|
||||
<el-table-column label="操作" width="130">
|
||||
<el-table-column sortable prop="sale_stock" label="可售库存" align="center"></el-table-column>
|
||||
<el-table-column prop="status" label="状态" align="center"></el-table-column>
|
||||
<el-table-column label="操作" width="130" align="center" v-if="is_admin">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleEdit(scope.row.id)">编辑</el-button>
|
||||
<!-- <el-button type="text" @click="handleDelete(scope.row.id)">删除</el-button> -->
|
||||
@ -148,6 +148,7 @@
|
||||
}]
|
||||
},
|
||||
skus: [],
|
||||
is_admin: false,
|
||||
remoteLoading: false
|
||||
}
|
||||
},
|
||||
@ -170,6 +171,7 @@
|
||||
this.Paginationdata = res.data.meta
|
||||
this.currentPage = res.data.meta.current_page
|
||||
this.per_page = parseInt(res.data.meta.per_page)
|
||||
this.is_admin = res.data.manage && res.data.manage.is_admin
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
@ -293,11 +295,6 @@
|
||||
float: right;
|
||||
}
|
||||
|
||||
::v-deep .cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.commodityimg {
|
||||
width: 59px;
|
||||
height: 59px;
|
||||
@ -306,12 +303,14 @@
|
||||
display: block;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.Img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
::v-deep .flex .cell{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .btn11 {
|
||||
padding: 0;
|
||||
width: 14px;
|
||||
|
||||
@ -554,7 +554,7 @@
|
||||
chooseList: [],
|
||||
showUpdate: false,
|
||||
commitLoading: false,
|
||||
is_admin: localStorage.getItem('roleName') == '超级管理员' || localStorage.getItem('roleName') == '系统管理员',
|
||||
is_admin: false,
|
||||
showAdd: false,
|
||||
showEdit: false,
|
||||
curId: 0
|
||||
@ -599,6 +599,7 @@
|
||||
this.sku_code = {
|
||||
sku_code: this.shopsData
|
||||
}
|
||||
this.is_admin = res.data.manage && res.data.manage.is_admin
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
<el-button type="primary" @click="handleChoose">筛选</el-button>
|
||||
<el-button plain @click="handleReChoose">重置筛选</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-button type="primary" @click="print">打印</el-button> -->
|
||||
<el-button type="primary" @click="print">打印</el-button>
|
||||
<el-button v-if="form.goods_sku_num === 2" type="primary">配货单导出</el-button>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user