Browse Source

采购收货指引单readFile报错

hella_online_20240906
zhang_li 3 months ago
parent
commit
fc47f7b681
  1. 118
      src/pages/pointPutawayJob/index.vue

118
src/pages/pointPutawayJob/index.vue

@ -138,17 +138,19 @@
},
methods: {
// #ifdef APP
//
printImage() {
// #ifdef APP
if (this.tabIndex == 1) {
testModule.doHTMLPrint(this.newHtmlContent1)
} else {
testModule.doHTMLPrint(this.newHtmlContent)
}
// #endif
},
// html
readFile(path, callback) {
// #ifdef APP
plus.io.resolveLocalFileSystemURL(path, function(entry) {
entry.file(function(file) {
var reader = new plus.io.FileReader();
@ -162,8 +164,8 @@
}, function(e) {
console.log("获取图片资源失败:" + e.message);
});
// #endif
},
// #endif
formatDate(val) {
return dateFormat(val)
},
@ -171,6 +173,7 @@
getPointPutawayJobHtml() {
this.$nextTick(async () => {
let str = ''
// #ifdef APP-PLUS
this.readFile(htmlFileUrl, (htmlContent) => {
this.newHtmlContent = htmlContent
this.data.sublist.forEach(item => {
@ -200,13 +203,14 @@
this.newHtmlContent = this.newHtmlContent.replace(
"mainBody", str); //
});
// #endif
})
},
// html
getPurchaseReceiptJobHtml() {
this.$nextTick(async () => {
let str = ''
// #ifdef APP-PLUS
this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent
this.data1.inspectDTOList.forEach(item => {
@ -270,9 +274,9 @@
})
this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str); //
console.log(333,this.newHtmlContent1)
console.log(333, this.newHtmlContent1)
});
// #endif
})
},
getTableSubList() {
@ -435,59 +439,59 @@
align-items: center;
justify-content: center;
}
.mb-kw {
border-bottom: 1px solid #dedede;
padding: 20rpx;
font-size: 30rpx;
}
.mb-kw view {
font-weight: bold;
font-size: 46rpx;
text-align: center;
}
border-bottom: 1px solid #dedede;
padding: 20rpx;
font-size: 30rpx;
}
.mb-kw view {
font-weight: bold;
font-size: 46rpx;
text-align: center;
}
.mb-bo {
display: flex;
}
.mb-bo .mb-left {
flex: 1
}
.mb-bo .mb-left .mb-text {
padding: 20rpx;
}
.mb-bo .mb-left .mb-text:nth-child(1) {
border-bottom: 1px solid #dedede;
}
.mb-bo .mb-left .mb-text view {
font-weight: bold;
font-size: 32rpx;
text-align: center;
}
.mb-bo .mb-right {
padding: 20rpx;
width: 260rpx;
border-left: 1px solid #dedede;
display: flex;
align-items: center;
}
.mb-bo .mb-right .mb-text {
width: 100%;
}
.mb-bo .mb-right .mb-text view {
font-weight: bold;
font-size: 40rpx;
text-align: center;
width: 100%;
}
display: flex;
}
.mb-bo .mb-left {
flex: 1
}
.mb-bo .mb-left .mb-text {
padding: 20rpx;
}
.mb-bo .mb-left .mb-text:nth-child(1) {
border-bottom: 1px solid #dedede;
}
.mb-bo .mb-left .mb-text view {
font-weight: bold;
font-size: 32rpx;
text-align: center;
}
</style>
.mb-bo .mb-right {
padding: 20rpx;
width: 260rpx;
border-left: 1px solid #dedede;
display: flex;
align-items: center;
}
.mb-bo .mb-right .mb-text {
width: 100%;
}
.mb-bo .mb-right .mb-text view {
font-weight: bold;
font-size: 40rpx;
text-align: center;
width: 100%;
}
</style>
Loading…
Cancel
Save