diff --git a/src/common/utils/storage.js b/src/common/utils/storage.js index 515d413a..963984a1 100644 --- a/src/common/utils/storage.js +++ b/src/common/utils/storage.js @@ -10,7 +10,22 @@ const setStorage = (key,value)=>{ // 清除全部本地存储 const clearStorage = ()=>{ - uni.clearStorageSync(); + const overPackageRecordPointParams = '' + if( uni.getStorageSync('overPackageRecordPointParams')){ + overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') + } + const overPackageJobDetailPointParams = '' + if( uni.getStorageSync('overPackageJobDetailPointParams')){ + overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') + } + uni.clearStorageSync(); + if(overPackageRecordPointParams){ + uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams) + } + if(overPackageJobDetailPointParams){ + uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams) + } + } // 清除指定key本地存储 diff --git a/src/mycomponents/print/print.vue b/src/mycomponents/print/print.vue index 562bb0cb..0e7b326c 100644 --- a/src/mycomponents/print/print.vue +++ b/src/mycomponents/print/print.vue @@ -86,10 +86,10 @@ }, methods: { setDefaultData(printDeafult,templateDeafult){ - this.templateName =printDeafult.name - this.printCode =printDeafult.code - this.templateName =templateDeafult.name - this.templateCode =templateDeafult.code + this.printName =printDeafult?.label || '请选择打印机' + this.printCode =printDeafult?.value || '' + this.templateName =templateDeafult?.label || '请选择打印模板' + this.templateCode =templateDeafult?.value || '' }, showErrorMessage(message, type) { @@ -97,39 +97,44 @@ this.$refs.comMessage.showErrorMessage(message, res => {}) }) }, - showSelectPrint(){ - this.showPrintSelect =true + async showSelectPrint(){ uni.showLoading({ title:"加载中", mask:true }) - getPrintList().then(res=>{ - this.printList =[] + await getPrintList().then(res=>{ + this.printList =res.data + uni.hideLoading() }).catch(error=>{ }) + this.showPrintSelect =true }, - confirmSelectPrint(){ - this.printCode ="" - this.$emit("printCode",this.printCode) + confirmSelectPrint(e){ + console.log(e) + this.printCode =e[0].value + this.printName =e[0].label + this.$emit("printCode",e[0]) }, - showSelectTemplate(){ - this.showTemplateSelect =true + async showSelectTemplate(){ uni.showLoading({ title:"加载中", mask:true }) - getPrintTemplateList().then(res=>{ - this.templateList =[] + await getPrintTemplateList().then(res=>{ + this.templateList =res.data + uni.hideLoading() }).catch(error=>{ }) + this.showTemplateSelect =true }, - confirmSelectTemplate(){ - this.templateCode ="" - this.$emit("templateCode",this.templateCode) + confirmSelectTemplate(e){ + this.templateCode =e[0].value + this.templateName =e[0].label + this.$emit("templateCode",e[0]) } } } diff --git a/src/pages/package/job/overPackageJobDetail.vue b/src/pages/package/job/overPackageJobDetail.vue index 953c56f5..285592d8 100644 --- a/src/pages/package/job/overPackageJobDetail.vue +++ b/src/pages/package/job/overPackageJobDetail.vue @@ -1,5 +1,8 @@