|
@@ -30,14 +30,14 @@ import { addPrint } from './print-data'
|
|
import { detailArr } from './print-data'
|
|
import { detailArr } from './print-data'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: 'PrintPreview',
|
|
|
|
|
|
+ name: 'PrintPreview',
|
|
props: {
|
|
props: {
|
|
addPrint: {
|
|
addPrint: {
|
|
type: Function,
|
|
type: Function,
|
|
default: null
|
|
default: null
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
visible: false,
|
|
visible: false,
|
|
@@ -81,7 +81,6 @@ export default {
|
|
}, 500)
|
|
}, 500)
|
|
},
|
|
},
|
|
print() {
|
|
print() {
|
|
-
|
|
|
|
try {
|
|
try {
|
|
if (typeof this.addPrint === 'function') {
|
|
if (typeof this.addPrint === 'function') {
|
|
this.addPrint('getDtailPrintDis').then(() => {
|
|
this.addPrint('getDtailPrintDis').then(() => {
|
|
@@ -96,27 +95,31 @@ export default {
|
|
// // this.$successMsg('更新成功')
|
|
// // this.$successMsg('更新成功')
|
|
// }, 1000)
|
|
// }, 1000)
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- console.error('更新发货汇总列表')
|
|
|
|
|
|
+ this.hideModal()
|
|
this.$emit('refreshList')
|
|
this.$emit('refreshList')
|
|
}, 1000)
|
|
}, 1000)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
)
|
|
)
|
|
-
|
|
|
|
- }).catch(err=>{
|
|
|
|
- this.$errorMsg('刷新重试打印')
|
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$confirm('系统提示:单被商家取消预约,请刷新页面,重新选择打印', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ showCancelButton: false,
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.hideModal()
|
|
|
|
+ this.$emit('refreshList')
|
|
|
|
+ })
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- throw new Error('加载失败,刷新重试')
|
|
|
|
|
|
+ console.log(333)
|
|
|
|
+ // throw new Error('加载失败,刷新重试')
|
|
}
|
|
}
|
|
} catch (e) {
|
|
} catch (e) {
|
|
this.$errorMsg(e)
|
|
this.$errorMsg(e)
|
|
// '调用打印次数接口失败'
|
|
// '调用打印次数接口失败'
|
|
}
|
|
}
|
|
-
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.hideModal()
|
|
|
|
- }, 2000)
|
|
|
|
}
|
|
}
|
|
// toPdf() {
|
|
// toPdf() {
|
|
// downloadPDF(this.$refs.printDom);
|
|
// downloadPDF(this.$refs.printDom);
|