From 210e6ea4eab68b1c607b48870b5e3553930853fb Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 05 一月 2024 14:53:51 +0800
Subject: [PATCH] 销售订单-下载按钮修改4
---
src/views/quality/Packaging_ledger/index.vue | 92 +++++++++++++++++++++++++++++-----------------
1 files changed, 58 insertions(+), 34 deletions(-)
diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index b4f78d4..2230d2d 100644
--- a/src/views/quality/Packaging_ledger/index.vue
+++ b/src/views/quality/Packaging_ledger/index.vue
@@ -8,7 +8,7 @@
:isShowHide="true"
:prelang="prelang"
:ajaxFun="ajaxFun"
- :options="options"
+ :options="options"
@handleSelectionChange="handleSelectionChange"
ref="processconfiguration"
>
@@ -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()"
@@ -54,7 +55,7 @@
:data="testStandardParams"
id="testStandardParamTable"
ref="testStandardParam"
-
+
highlight-current-row
height="700"
style="width: 100%"
@@ -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"
@@ -143,7 +145,7 @@
<el-col :span="10" :offset="3">搴忓彿锛�</el-col>
<el-col :span="10" style="font-weight: bold;">{{ i + 1 }}</el-col>
</el-row>
- <el-row>
+ <el-row>
<el-col :span="10" :offset="3">鍖呰缂栧彿锛�</el-col>
<el-col :span="10" style="font-weight: bold;">{{ item.packageNo }}</el-col>
</el-row>
@@ -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:"https://ztms-mes.chinaztt.cn/#/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: '鎿嶄綔',
@@ -311,6 +289,52 @@
packfrom,
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,
+ show: {
+ val: [
+ '鑽夌',
+ '鏈姤妫�',
+ ],
+ key: 'state'
+ }
+ })
+ }
+ 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){
@@ -327,7 +351,7 @@
printable: 'qrCard',//椤甸潰
type: "html",//鏂囨。绫诲瀷
maxWidth:450,
- targetStyles:['*'],
+ targetStyles:['*'],
style: `@page {
margin:0;
padding: 0;
@@ -451,4 +475,4 @@
},
},
}
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3