|  | @@ -78,19 +78,11 @@
 | 
											
												
													
														|  |        </div>
 |  |        </div>
 | 
											
												
													
														|  |        <div class="btn-box">
 |  |        <div class="btn-box">
 | 
											
												
													
														|  |          <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
 |  |          <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
 | 
											
												
													
														|  | -        <a-button :loading="spinning" type="primary" @click="handlePrint()">收款打印</a-button>
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <a-button v-if="detail&&detail.keepType =='RELATION_BOOK'" :loading="spinning" type="primary" @click="handlePlPrint()">收款打印</a-button>
 | 
											
												
													
														|  |        </div>
 |  |        </div>
 | 
											
												
													
														|  |      </a-spin>
 |  |      </a-spin>
 | 
											
												
													
														|  |      <!-- 收款打印 -->
 |  |      <!-- 收款打印 -->
 | 
											
												
													
														|  | -    <commonModal
 |  | 
 | 
											
												
													
														|  | -      modalTit="收款打印预览"
 |  | 
 | 
											
												
													
														|  | -      bodyPadding="10px"
 |  | 
 | 
											
												
													
														|  | -      width="1024px"
 |  | 
 | 
											
												
													
														|  | -      :showFooter="false"
 |  | 
 | 
											
												
													
														|  | -      :openModal="showTipModal"
 |  | 
 | 
											
												
													
														|  | -      @cancel="canselPrintView">
 |  | 
 | 
											
												
													
														|  | -      <printModel ref="printModel" @cancel="showTipModal=false"></printModel>
 |  | 
 | 
											
												
													
														|  | -    </commonModal>
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <printModel ref="printModel" @cancel="canselPrintView"></printModel>
 | 
											
												
													
														|  |      <!-- 查看财务收款详情 -->
 |  |      <!-- 查看财务收款详情 -->
 | 
											
												
													
														|  |      <commonModal
 |  |      <commonModal
 | 
											
												
													
														|  |        modalTit="财务收款详情"
 |  |        modalTit="财务收款详情"
 | 
											
										
											
												
													
														|  | @@ -118,7 +110,8 @@ import commonModal from '@/views/common/commonModal.vue'
 | 
											
												
													
														|  |  import printModel from '../receiptPrint/printModel.vue'
 |  |  import printModel from '../receiptPrint/printModel.vue'
 | 
											
												
													
														|  |  import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
 |  |  import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
 | 
											
												
													
														|  |  import collectDetailModal from './detailModal.vue'
 |  |  import collectDetailModal from './detailModal.vue'
 | 
											
												
													
														|  | -import { settleReceiptFindBySn, settleReceiptBookBatch } from '@/api/settleReceipt.js'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { settleReceiptFindBySn } from '@/api/settleReceipt.js'
 | 
											
												
													
														|  | 
 |  | +import { getBatchLastProcessInstance } from '@/api/financeBook'
 | 
											
												
													
														|  |  export default {
 |  |  export default {
 | 
											
												
													
														|  |    name: 'VoucherModal',
 |  |    name: 'VoucherModal',
 | 
											
												
													
														|  |    components: { STable, VSelect, commonModal, printModel, detailModal, collectDetailModal },
 |  |    components: { STable, VSelect, commonModal, printModel, detailModal, collectDetailModal },
 | 
											
										
											
												
													
														|  | @@ -190,16 +183,65 @@ export default {
 | 
											
												
													
														|  |          this.spinning = false
 |  |          this.spinning = false
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | 
 |  | +    // 获取审核信息
 | 
											
												
													
														|  | 
 |  | +    getAuditInfo (auditList) {
 | 
											
												
													
														|  | 
 |  | +      let auditStr = ''
 | 
											
												
													
														|  | 
 |  | +      if (auditList && auditList.taskVOList) {
 | 
											
												
													
														|  | 
 |  | +        const auditLists = auditList.taskVOList.filter(item => item.userType == '审批人')
 | 
											
												
													
														|  | 
 |  | +        auditLists.map((a, i) => {
 | 
											
												
													
														|  | 
 |  | +          auditStr = auditStr + a.userName + '(' + a.state + ')' + (i == auditLists.length - 1 ? '。' : ';')
 | 
											
												
													
														|  | 
 |  | +        })
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +      return auditStr
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    // 批量打印
 | 
											
												
													
														|  | 
 |  | +    async handlePlPrint () {
 | 
											
												
													
														|  | 
 |  | +      this.spinning = true
 | 
											
												
													
														|  | 
 |  | +      const rows = [] 
 | 
											
												
													
														|  | 
 |  | +      const bookSns = []
 | 
											
												
													
														|  | 
 |  | +      this.tableData.map(item => {
 | 
											
												
													
														|  | 
 |  | +        if(item.financeBookDetailList){
 | 
											
												
													
														|  | 
 |  | +          rows.push(item.financeBookDetailList[0])
 | 
											
												
													
														|  | 
 |  | +          const booksn = item.financeBookDetailList[0].bookSn
 | 
											
												
													
														|  | 
 |  | +          if (bookSns.indexOf(booksn) < 0) {
 | 
											
												
													
														|  | 
 |  | +            bookSns.push(booksn)
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +      })
 | 
											
												
													
														|  | 
 |  | +      const retArr = []
 | 
											
												
													
														|  | 
 |  | +      const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
 | 
											
												
													
														|  | 
 |  | +      console.log(bookSns,auditInfo)
 | 
											
												
													
														|  | 
 |  | +      bookSns.map(item => {
 | 
											
												
													
														|  | 
 |  | +        // 授信明细
 | 
											
												
													
														|  | 
 |  | +        const rs = rows.filter(a => a.bookSn == item)
 | 
											
												
													
														|  | 
 |  | +        let detailItemUseStr = ''
 | 
											
												
													
														|  | 
 |  | +        rs.map(b => {
 | 
											
												
													
														|  | 
 |  | +          if (b.detailItemUseList) {
 | 
											
												
													
														|  | 
 |  | +            b.detailItemUseList.map((k, i) => {
 | 
											
												
													
														|  | 
 |  | +              detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ')' + (i == b.detailItemUseList.length - 1 ? '。' : ';')
 | 
											
												
													
														|  | 
 |  | +            })
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +        })
 | 
											
												
													
														|  | 
 |  | +        // 审核信息
 | 
											
												
													
														|  | 
 |  | +        const auditStr = this.getAuditInfo(auditInfo[item])
 | 
											
												
													
														|  | 
 |  | +        retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
 | 
											
												
													
														|  | 
 |  | +      })
 | 
											
												
													
														|  | 
 |  | +      console.log(retArr, '------------')
 | 
											
												
													
														|  | 
 |  | +      this.handlePrint(retArr, rows)
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |      // 收款打印
 |  |      // 收款打印
 | 
											
												
													
														|  | -    handlePrint () {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    async handlePrint (row, list) {
 | 
											
												
													
														|  | 
 |  | +      this.spinning = true
 | 
											
												
													
														|  |        this.showTipModal = true
 |  |        this.showTipModal = true
 | 
											
												
													
														|  |        this.$nextTick(() => {
 |  |        this.$nextTick(() => {
 | 
											
												
													
														|  | -        this.$refs.printModel.getData(this.detail, true)
 |  | 
 | 
											
												
													
														|  | 
 |  | +        // 审核信息
 | 
											
												
													
														|  | 
 |  | +        this.$refs.printModel.getData(row, list)
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      canselPrintView () {
 |  |      canselPrintView () {
 | 
											
												
													
														|  |        this.showTipModal = false
 |  |        this.showTipModal = false
 | 
											
												
													
														|  | -      this.$refs.printModel.handleCommonCancel()
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.spinning = false
 | 
											
												
													
														|  | 
 |  | +      this.$refs.printModel.clearData()
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      // 取消
 |  |      // 取消
 | 
											
												
													
														|  |      handleCommonCancel () {
 |  |      handleCommonCancel () {
 | 
											
										
											
												
													
														|  | @@ -212,7 +254,7 @@ export default {
 | 
											
												
													
														|  |        const snList = []
 |  |        const snList = []
 | 
											
												
													
														|  |        snList.push(this.handlePlData.accountReceiptSn)
 |  |        snList.push(this.handlePlData.accountReceiptSn)
 | 
											
												
													
														|  |        this.showCollectDetail = true
 |  |        this.showCollectDetail = true
 | 
											
												
													
														|  | -      this.$nextTick(()=>{
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.$nextTick(() => {
 | 
											
												
													
														|  |          this.$refs.collectDetailModal.setData([this.handlePlData], snList)
 |  |          this.$refs.collectDetailModal.setData([this.handlePlData], snList)
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  |      },
 |  |      },
 |