| 
					
				 | 
			
			
				@@ -28,16 +28,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <a-form-item label="收货客户名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  <a-input id="salesCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入收货客户名称"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <a-input id="salesCollectionList-receiverName" v-model.trim="queryParam.receiverName" allowClear placeholder="请输入收货客户名称"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </a-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <a-col :md="6" :sm="24"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <a-form-item label="收款类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   <v-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    v-model="queryParam.settleType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ref="settleType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    id="salesCollectionList-settleType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    code="SETTLE_STYLE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    v-model="queryParam.keepType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ref="keepType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    id="salesCollectionList-keepType" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    code="KEEP_TYPE" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     placeholder="请选择收款类型" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     allowClear></v-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </a-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -132,7 +132,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ref="table" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :style="{ height: tableHeight+84.5+'px' }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        :row-selection=" showSelect?{ columnWidth: 40 }:null" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        :row-selection="showSelect?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.settleState=='FINISH' } })}:null" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         @rowSelection="rowSelectionFun" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :rowKey="(record) => record.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         :columns="columns" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -162,10 +162,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            v-if="record.settleState=='FINISH' && $hasPermissions('B_financialCollection_receipt')" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             @click="handleVoucher(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             id="financialCollectionList-voucher-btn">凭证</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <span v-if="record.settleState=='WAIT' && record.voidFlag==1">--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </s-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <!-- 销售收款弹框 --> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -176,7 +177,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         @ok="handleSaveColle" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div style="text-align: center;line-height: 24px;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <div v-if="handlePlData.length">箭冠汽配西安大兴店,共 {{ handlePlData && handlePlData.length }} 个备货单,合计 1266.45 元</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div v-if="handlePlData.length">{{ handlePlData[0].settleClientName }},共 {{ handlePlData && handlePlData.length }} 个备货单,合计 {{ totalAmount }} 元</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div style="padding: 15px 0;font-weight: bold;">请选择收款类型</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-radio-group v-model="collectionType"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -209,7 +210,7 @@ import Area from '@/views/common/area.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import commonModal from '@/views/common/commonModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import detailModal from './detailModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import voucherModal from './voucherModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { settleReceiptList, settleReceipt } from '@/api/settleReceipt' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: 'SalesCollectionList', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -230,8 +231,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         beginDateSettle: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         endDateSettle: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         settleClientName: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        receiverName: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dealerLevel: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         settleStyle: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        keepType: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         subareaSn: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         billStatus: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         settleState: undefined, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -277,20 +280,27 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     showSelect () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return this.$hasPermissions('B_financialCollection_receipt') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    totalAmount () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let ret = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.handlePlData.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ret = ret + item.totalAmount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return ret.toFixed(2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     columns () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const arr = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '创建时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '10%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '发货编号', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '客户名称', dataIndex: 'settleClientName', align: 'left', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '收货客户名称', dataIndex: 'settleClientName1', align: 'left', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '产品款数', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '产品数量', dataIndex: 'qty1', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '9%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '9%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '客户名称', dataIndex: 'settleClientName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '收货客户名称', dataIndex: 'receiverName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '产品数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '收款类型', dataIndex: 'settleStyleDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '收款类型', dataIndex: 'keepTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '收款时间', dataIndex: 'settleTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '收款方式', dataIndex: 'settleStyleDictValue1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '收款方式', dataIndex: 'settleStyleDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -330,8 +340,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.beginDateSettle = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.endDateSettle = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.settleClientName = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.receiverName = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.dealerLevel = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.settleStyle = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.keepType = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.subareaSn = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.billStatus = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.settleState = undefined 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -349,7 +361,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleBhDetail (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'salesCollection' } }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 点击批量收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handlePlColle () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const slen = _this.rowSelectionInfo.selectedRowKeys.length 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -376,26 +388,34 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleVoucher (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.showVoucher = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 点击收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleColle (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.handlePlData = [row] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.showSkModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 批量收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 批量/单个收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleSaveColle (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const snList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.handlePlData.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        snList.push(item.accountReceiptSn) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 关联收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (this.collectionType == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.showDetail = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$refs.detailModal.setData(this.handlePlData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$refs.detailModal.setData(this.handlePlData, snList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.showSkModal = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.collectionType = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 仅标记收款 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        settleReceipt({ sn: row.accountReceiptSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.showSkModal = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        settleReceiptBatch({ snList: snList }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.$refs.table.refresh() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _this.collectionType = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 |