From 2788beeb20d8056da56f31662b4257824b385788 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 04 一月 2024 09:56:21 +0800 Subject: [PATCH] 包装台账修改 --- src/views/quality/Packaging_ledger/index.vue | 95 ++++++++++++++++++++++++++++++----------------- 1 files changed, 60 insertions(+), 35 deletions(-) diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue index ecc41fc..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,14 +145,14 @@ <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> <el-row> <el-col :span="10" :offset="3">鍖呰鍙拌处浜岀淮鐮侊細</el-col> <el-col :span="10"> - <vueQr :text=str :size="110" :margin="1"></vueQr> + <vueQr :text=str+item.packageBoxId :size="110" :margin="1"></vueQr> </el-col> </el-row> </el-card> @@ -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", + 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; @@ -349,6 +373,7 @@ }, handleSelectionChange(val){ this.multipleSelection = val + console.log(this.multipleSelection[0].id,"鏁版嵁"); let lastRow = val[val.length - 1] this.handleCurrentChange(lastRow) }, @@ -450,4 +475,4 @@ }, }, } -</script> \ No newline at end of file +</script> -- Gitblit v1.9.3