| 
					
				 | 
			
			
				@@ -50,7 +50,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </a-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 操作按钮 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <div class="table-operator"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div class="table-operator" v-if="$hasPermissions('B_SkPrint')"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-button type="primary" @click="handlePlPrint()" class="button-error">批量打印</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <span style="margin-left: 8px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -62,7 +62,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           class="sTable fixPagination" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           ref="table" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           :style="{ height: tableHeight+80.5+'px' }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: (record.printStatus !== 'NO_PRINT'&&record.printStatus !== 'PRINT') } })}" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :row-selection="$hasPermissions('B_SkPrint')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: (record.printStatus !== 'NO_PRINT'&&record.printStatus !== 'PRINT') } })}:null" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           @rowSelection="rowSelectionFun" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           :rowKey="(record) => record.id" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -132,7 +132,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import commonModal from '@/views/common/commonModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import recordModal from './recordModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import printModel from './printModel.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { financeBookDetailList, updateFinanceBookDetail } from '@/api/financeBook' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { financeBookDetailList, updateFinanceBookDetail, getBatchLastProcessInstance } from '@/api/financeBook' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: 'ReceiptPrintList', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mixins: [commonMixin], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -221,22 +221,25 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.rowSelectionInfo = obj || null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 批量打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handlePlPrint () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    async handlePlPrint () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const rows = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows || [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const slen = rows.length 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _this.$message.warning('请在列表勾选后再进行批量操作!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const bookNos = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const bookSns = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       rows.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (bookNos.indexOf(item.bookNo) < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          bookNos.push(item.bookNo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (bookSns.indexOf(item.bookSn) < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          bookSns.push(item.bookSn) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const retArr = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      bookNos.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const rs = rows.filter(a => a.bookNo == item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log(auditInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      bookSns.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const rs = rows.filter(a => a.bookSn == item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let detailItemUseStr = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rs.map(b => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (b.detailItemUseList) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -245,22 +248,27 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        retArr.push({ detail: detailItemUseStr, subList: rs }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        retArr.push({ audit: auditInfo[item], detail: detailItemUseStr, subList: rs }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log(retArr, '------------') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.handlePrint(retArr, 1, rows) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.handlePrint(retArr, 1, rows, bookSns) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 收款打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handlePrint (row, type, list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    async handlePrint (row, type, list, bookSns) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.showTipModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let detailItemUseStr = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let auditInfo = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (type == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': [list.bookSn] }).then(res => res.data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log(auditInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (type == 0 && row.detailItemUseList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           row.detailItemUseList.map(k => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ');' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$refs.printModel.getData(type ? row : [{ detail: detailItemUseStr, subList: [row] }], type ? list : [list]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.printModel.getData(type ? row : [{ audit: auditInfo[list.bookSn], detail: detailItemUseStr, subList: [row] }], type ? list : [list]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     printOk () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -320,6 +328,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         printStatus: this.currentTab == 2 ? 'NO_PRINT' : undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.table.refresh(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.table.clearSelected() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     pageInit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 |