Browse Source

打印参数缓存 2022-05-15 sxm

master
[li_she] 4 years ago
parent
commit
e5563c1f44
  1. 18
      src/views/modules/labelPrint/outer-box-label-roll.vue
  2. 30
      src/views/modules/labelPrint/outer-box-label.vue

18
src/views/modules/labelPrint/outer-box-label-roll.vue

@ -417,8 +417,8 @@ export default {
// //
param:[] param:[]
}, },
//
tempParamList:[],
//
printParamList: [],
// //
reportParamList: [], reportParamList: [],
buttons: { buttons: {
@ -557,7 +557,7 @@ export default {
} }
this.orderInfo.reportFileList = this.selectReportFileList this.orderInfo.reportFileList = this.selectReportFileList
this.orderInfo.param = this.reportParamList this.orderInfo.param = this.reportParamList
this.tempParamList = this.reportParamList
this.printParamList = JSON.parse(JSON.stringify(this.reportParamList))
ouBoxPrintLabel(this.orderInfo).then(({data}) =>{ ouBoxPrintLabel(this.orderInfo).then(({data}) =>{
if (data.code === 0 ){ if (data.code === 0 ){
this.$message.success(data.msg) this.$message.success(data.msg)
@ -644,12 +644,18 @@ export default {
}, },
// //
searchReportParameters(val) { searchReportParameters(val) {
let printParamList = JSON.parse(JSON.stringify(this.printParamList))
getReportParameters(val.reportId).then(({data}) => { getReportParameters(val.reportId).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.reportParamList = data.data this.reportParamList = data.data
this.tempParamList
for (let item of this.tempParamList) {
if (printParamList){
for (let item1 of printParamList) {
for (let item2 of this.reportParamList) {
if (item1.parametername === item2.parametername){
item2.optionvalue = item1.optionvalue
}
}
}
} }
} }
}) })

30
src/views/modules/labelPrint/outer-box-label.vue

@ -415,10 +415,12 @@ export default {
// //
reportFileList: [], reportFileList: [],
// //
param:[]
param: []
}, },
// //
reportParamList: [], reportParamList: [],
//
printParamList: [],
buttons: { buttons: {
settingLanguageList: '按语言设置', settingLanguageList: '按语言设置',
edit: '编辑', edit: '编辑',
@ -555,10 +557,11 @@ export default {
} }
this.orderInfo.reportFileList = this.selectReportFileList this.orderInfo.reportFileList = this.selectReportFileList
this.orderInfo.param = this.reportParamList this.orderInfo.param = this.reportParamList
ouBoxPrintLabel(this.orderInfo).then(({data}) =>{
if (data.code === 0 ){
this.$message.success(data.msg)
}else {
this.printParamList = JSON.parse(JSON.stringify(this.reportParamList))
ouBoxPrintLabel(this.orderInfo).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg) this.$message.warning(data.msg)
} }
}) })
@ -569,7 +572,7 @@ export default {
getBoxLabelSO(this.orderNo).then(({data}) => { getBoxLabelSO(this.orderNo).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.orderInfo.customerId = data.data.customerId ? data.data.customerId : '*' this.orderInfo.customerId = data.data.customerId ? data.data.customerId : '*'
this.orderInfo.totalQty = data.data.sumQty
this.orderInfo.totalQty = data.data.sumQty
this.orderInfo.perBoxQty = data.data.boxQty this.orderInfo.perBoxQty = data.data.boxQty
this.orderInfo.orderNo = this.orderNo this.orderInfo.orderNo = this.orderNo
let query = { let query = {
@ -639,11 +642,24 @@ export default {
}) })
}, },
//
//
searchReportParameters(val) { searchReportParameters(val) {
let printParamList = JSON.parse(JSON.stringify(this.printParamList))
//
getReportParameters(val.reportId).then(({data}) => { getReportParameters(val.reportId).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
//
this.reportParamList = data.data this.reportParamList = data.data
if (printParamList){
for (let item1 of printParamList) {
for (let item2 of this.reportParamList) {
if (item1.parametername === item2.parametername){
item2.optionvalue = item1.optionvalue
}
}
}
}
} }
}) })
}, },

Loading…
Cancel
Save