From e544c55714cd15f5cc7232bcd7995b0b2985f268 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 27 十二月 2023 14:40:21 +0800
Subject: [PATCH] modified: src/views/plan/masterproductionschedule/index.vue
---
src/views/quality/Packaging_ledger/index.vue | 92 +++++++++++++++++++++++++---------------------
1 files changed, 50 insertions(+), 42 deletions(-)
diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index 76c49df..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"
@@ -150,7 +152,7 @@
<el-row>
<el-col :span="10" :offset="3">鍖呰鍙拌处浜岀淮鐮侊細</el-col>
<el-col :span="10">
- <vueQr :text="JSON.stringify(item)" :size="110" :margin="1"></vueQr>
+ <vueQr :text=str+item.packageBoxId :size="110" :margin="1"></vueQr>
</el-col>
</el-row>
</el-card>
@@ -171,9 +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=",
qrData:[],
diaPrintTab: false,
multipleSelection: [],
@@ -269,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: '鎿嶄綔',
@@ -310,6 +289,45 @@
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
+ })
+ }
+ 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){
@@ -348,6 +366,7 @@
},
handleSelectionChange(val){
this.multipleSelection = val
+ console.log(this.multipleSelection[0].id,"鏁版嵁");
let lastRow = val[val.length - 1]
this.handleCurrentChange(lastRow)
},
@@ -361,19 +380,8 @@
let obj = {
packageNo: item.packageNo,
contractNo: item.contractNo,
- boxInfo: []
+ packageBoxId:item.id
}
- list({packageBoxId:item.id}).then((res) =>{
- res.data.data.forEach(ele=>{
- obj.boxInfo.push({
- product: ele.product,
- productNo: ele.productNo,
- specs: ele.specs,
- unit: ele.unit,
- number: ele.number
- })
- })
- })
this.qrData.push(obj)
})
},
@@ -428,7 +436,7 @@
el.packageBoxId =this.goid
});
console.log(this.testStandardParams);
- return
+ // return
saveList(this.testStandardParams).then((res) =>{
if(res.status===200){
this.$message.success('淇濆瓨鎴愬姛')
--
Gitblit v1.9.3