员工权限校验
This commit is contained in:
parent
2c54a2a1d1
commit
489baa80d8
|
|
@ -68,6 +68,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { formatDecimal } from '@/utils'
|
import { formatDecimal } from '@/utils'
|
||||||
import { tbConCheck, tbConCheckGet } from '@/api/invoicing'
|
import { tbConCheck, tbConCheckGet } from '@/api/invoicing'
|
||||||
|
import { hasPermission } from '@/utils/limits.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -149,7 +151,9 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
show(obj) {
|
async show(obj) {
|
||||||
|
let res = await hasPermission('允许耗材盘点');
|
||||||
|
if ( !res) { return; }
|
||||||
this.form.remark = ''
|
this.form.remark = ''
|
||||||
this.form.stocktakinNum = 0
|
this.form.stocktakinNum = 0
|
||||||
this.form.lpNum = 0
|
this.form.lpNum = 0
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
||||||
<el-button @click="$router.push({ name: 'operation_in' })">入库</el-button>
|
<el-button @click="routerGo('operation_in')">入库</el-button>
|
||||||
<el-button @click="$router.push({ name: 'operation_out' })">出库</el-button>
|
<el-button @click="routerGo('operation_out')">出库</el-button>
|
||||||
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
|
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
|
||||||
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
|
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
|
||||||
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button>
|
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button>
|
||||||
|
|
@ -592,6 +592,7 @@ import { tbConsInfodownload, tbConsInfoinputStock } from '@/api/invoicing'
|
||||||
import { downloadFile } from "@/utils";
|
import { downloadFile } from "@/utils";
|
||||||
import UploadExcel from '@/components/UploadExcel'
|
import UploadExcel from '@/components/UploadExcel'
|
||||||
import consRecordDetail from "../components/cons_record_detail";
|
import consRecordDetail from "../components/cons_record_detail";
|
||||||
|
import { hasPermission } from '@/utils/limits.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { AddConsTakin, UploadExcel, consRecordDetail },
|
components: { AddConsTakin, UploadExcel, consRecordDetail },
|
||||||
|
|
@ -723,6 +724,14 @@ export default {
|
||||||
this.getTableDatatype();
|
this.getTableDatatype();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async routerGo (name) {
|
||||||
|
let text;
|
||||||
|
if ( name == 'operation_in') { text = "允许耗材入库"}
|
||||||
|
if ( name == 'operation_out') { text = "允许耗材出库"}
|
||||||
|
let res = await hasPermission(text);
|
||||||
|
if ( !res) { return; }
|
||||||
|
this.$router.push({ name: name})
|
||||||
|
},
|
||||||
lookDetail(row) {
|
lookDetail(row) {
|
||||||
this.$refs.recodeDetail.open({
|
this.$refs.recodeDetail.open({
|
||||||
"consId": row.consId,
|
"consId": row.consId,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue