From 39607cc49e13f4d69d2d1ddf69f8e769eea714bc Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期五, 29 十二月 2023 16:50:57 +0800
Subject: [PATCH] modified: src/api/warehouse/pallettransports.js modified: src/views/warehouse/pallettransports/index.vue
---
src/views/quality/Packaging_ledger/index.vue | 75 +++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 29 deletions(-)
diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index b4f78d4..718fb62 100644
--- a/src/views/quality/Packaging_ledger/index.vue
+++ b/src/views/quality/Packaging_ledger/index.vue
@@ -33,6 +33,7 @@
</el-col>
<el-col :span="2">
<el-button
+ v-if="permissions.quality_packaging_ledger_info_save"
style="float: right; padding: 3px 0"
type="text"
@click="addpreserve"
@@ -41,7 +42,7 @@
</el-col>
<el-col :span="2">
<el-button
- v-if="!isCheck"
+ v-if="!isCheck && permissions.quality_packaging_ledger_info_add"
style="float: right; padding: 3px 0"
type="text"
@click="relateOperationParam()"
@@ -110,6 +111,7 @@
width="80"
></el-table-column>
<el-table-column
+ v-if="permissions.quality_packaging_ledger_info_operate"
fixed="right"
label="鎿嶄綔"
align="center"
@@ -171,10 +173,11 @@
import packfromadd from './pack-fromadd.vue'
import vueQr from 'vue-qr'
import PrintJS from 'print-js'
+import { mapGetters } from 'vuex'
export default {
data(){
return {
- str:"http://192.168.2.213:8080/#/pack?id=50",
+ str:"http://192.168.2.213:8080/#/pack?id=",
qrData:[],
diaPrintTab: false,
multipleSelection: [],
@@ -270,33 +273,8 @@
searchInfoType: 'datetimerange',
},
],
- toolbar: [
- {
- text: '鏂板',
- type: 'primary',
- fun: this.addOrUpdateHandle
- },
- {
- text: '鏍囩鎵撳嵃',
- type: 'primary',
- fun: this.printLabel
- },
- ],
- operator: [
- {
- text: '妫�楠�',
- icon: 'el-icon-position',
- type: 'text',
- size: 'small',
- fun: this.check
- },{
- text: '鍒犻櫎',
- icon: 'el-icon-delete',
- type: 'text',
- size: 'small',
- fun: this.deleteHandle
- }
- ],
+ toolbar: [],
+ operator: null,
operatorConfig: {
fixed: 'right',
label: '鎿嶄綔',
@@ -312,6 +290,45 @@
packfromadd,
vueQr
},
+ created(){
+ if(this.permissions.quality_packaging_ledger_add){
+ this.table.toolbar.push({
+ text: '鏂板',
+ type: 'primary',
+ fun: this.addOrUpdateHandle
+ })
+ }
+ if(this.permissions.quality_packaging_ledger_labelprint){
+ this.table.toolbar.push({
+ text: '鏍囩鎵撳嵃',
+ type: 'primary',
+ fun: this.printLabel
+ })
+ }
+ let arr = []
+ if(this.permissions.quality_packaging_ledger_inspect){
+ arr.push({
+ text: '妫�楠�',
+ icon: 'el-icon-position',
+ type: 'text',
+ size: 'small',
+ fun: this.check
+ })
+ }
+ if(this.permissions.quality_packaging_ledger_del){
+ arr.push({
+ text: '鍒犻櫎',
+ icon: 'el-icon-delete',
+ type: 'text',
+ size: 'small',
+ fun: this.deleteHandle
+ })
+ }
+ this.table.operator = arr.length>0 ? arr : null
+ },
+ computed:{
+ ...mapGetters(['permissions'])
+ },
watch: {
diaPrintTab(newVal){
if(!newVal){
--
Gitblit v1.9.3