Commit aaf48288 authored by dragondean@qq.com's avatar dragondean@qq.com

订单等Bug

parent 34ca7ccf
...@@ -182,6 +182,7 @@ export default { ...@@ -182,6 +182,7 @@ export default {
const imgWidth = canvas.width const imgWidth = canvas.width
const imgHeight = canvas.height const imgHeight = canvas.height
console.log(imgHeight, imgWidth)
let _w = 595.28; let _w = 595.28;
let _h = 595.28/imgWidth*imgHeight; let _h = 595.28/imgWidth*imgHeight;
if(_h>841.89){ if(_h>841.89){
...@@ -194,12 +195,13 @@ export default { ...@@ -194,12 +195,13 @@ export default {
return Promise.reject() */ return Promise.reject() */
let form = new FormData() let form = new FormData()
let file = this.selfNo + '-' + this.currRow.tidanNo + '.pdf' let file = this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'})) form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'}))
form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/ form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/
/* let blob = new Blob([doc.output('arraybuffer')], {type: "application/pdf"}) /* let blob = new Blob([doc.output('arraybuffer')], {type: "application/pdf"})
FileSaver.saveAs(blob, file); FileSaver.saveAs(blob, file);
return */ return */
return uploadFile(form) return uploadFile(form)
}).then(res => { }).then(res => {
return this.submit(res.data) return this.submit(res.data)
......
...@@ -852,6 +852,12 @@ export default { ...@@ -852,6 +852,12 @@ export default {
} }
}) })
},
// 送货上门变化后需要判断当前选择的收货方式,如果选择了送货上门但是当前不支持送货上门则需要重置
homeDeliveryService(enable){
if(!enable && this.form.harvestMethod != 1){
this.form.harvestMethod = 1
}
} }
}, },
activated(){ activated(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment