|
|
@@ -36,6 +36,12 @@ import { hiprint } from 'vue-plugin-hiprint'
|
|
|
service: {
|
|
|
type: Object
|
|
|
},
|
|
|
+ detailService:{
|
|
|
+ type: Object
|
|
|
+ },
|
|
|
+ postName:{
|
|
|
+ type:String,
|
|
|
+ },
|
|
|
id: {
|
|
|
type: String
|
|
|
},
|
|
|
@@ -64,15 +70,19 @@ import { hiprint } from 'vue-plugin-hiprint'
|
|
|
let template = this.templateList.find(it => it.layoutId == this.currentTemplate)?.layoutData
|
|
|
|
|
|
console.log('this.service',this.service)
|
|
|
+ console.log('this.detailService',this.detailService)
|
|
|
+ let params = {}
|
|
|
+ params[this.postName] = this.id
|
|
|
let header=this.excuteNoParam(this.service, this.service.selectById,[this.id])
|
|
|
- let detail=this.excuteNoParam(this.$service.orderService, this.$service.orderService.selectOrderInfoById, [this.id])
|
|
|
+ let detail=this.excute(this.detailService, this.detailService.selectByCond, params)
|
|
|
+ // let detail=this.excuteNoParam(this.$service.orderService, this.$service.orderService.selectOrderInfoById, [this.id])
|
|
|
Promise.all([header, detail])
|
|
|
.then((results) => {
|
|
|
// 在这里执行接下来的操作
|
|
|
if(results?.[0]?.code === this.$config.SUCCESS_CODE && results?.[1]?.code === this.$config.SUCCESS_CODE){
|
|
|
let header =results?.[0]?.data
|
|
|
let detail =results?.[1]?.data
|
|
|
- this.$set(header, 'table', detail['orderItem'])
|
|
|
+ this.$set(header, 'table', detail['list'])
|
|
|
let printData = {...header}
|
|
|
this.$printUtil.print(template,printData)
|
|
|
}else {
|