[bug] 标协同步的邮寄打印调整

This commit is contained in:
zhaoxiao
2021-11-04 18:06:35 +08:00
parent 6ba96e8151
commit 43074faf48
2 changed files with 21 additions and 6 deletions
+4 -1
View File
@@ -86,6 +86,8 @@ const aduitExpenditureContract = (param) => postAction('/contract/paySpendingCon
const archiveExpenditureContract = (param) => postAction('/contract/paySpendingContract/archive', param)
// 获取全部收入合同(通过企业id查询列表)
const getAllRevenueContract = (param) => getAction('/contract/payIncomeContract/queryByCompanyId', param)
// 打印获取邮寄联系人信息接口,传票据邮寄列表id
const getPrintPostContactByMailId = (param) => getAction('/mail/payMailBill/print', param)
export {
getWorkingGroupById,
@@ -130,5 +132,6 @@ export {
getIsAssociatedProject,
aduitExpenditureContract,
archiveExpenditureContract,
getAllRevenueContract
getAllRevenueContract,
getPrintPostContactByMailId
}
+17 -5
View File
@@ -33,6 +33,7 @@
<script>
import Vue from 'vue'
import { USER_INFO } from '../../store/mutation-types'
import { getPrintPostContactByMailId } from '../../api/incomePaymentsApi'
export default {
name: 'PrintPage',
@@ -56,13 +57,24 @@ export default {
this.userInfo = Vue.ls.get(USER_INFO)
// 从路由参数获取项目信息
this.mailDetail = JSON.parse(this.$route.query.record)
console.log(this.mailDetail)
},
mounted() {
// 打印
this.print()
// 数据中没有邮编或地址信息,调用接口
if (!this.mailDetail.contactAddress || !this.mailDetail.postalCode) {
this.getPostContactDetail(this.mailDetail.id)
}
},
methods: {
getPostContactDetail(id) {
getPrintPostContactByMailId({id: id}).then(res => {
console.log(res)
this.mailDetail.contactAddress = res.result.contactAddress
this.mailDetail.postalCode = res.result.postalCode
console.log(this.mailDetail)
this.$nextTick(() => {
// 打印
this.print()
})
})
},
/**
* 打印
*/