| 
					
				 | 
			
			
				@@ -277,6 +277,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <chooseProductModal 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ref="partQuery" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :showModal="openChooseProduct" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :checkedList = "checkedProductList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @viewRecord="hanldSalesRecord"  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @close="openChooseProduct=false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       @add="insterProduct" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -306,7 +307,7 @@ import productSalesRecordModal from './productSalesRecordModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { stockByProductSn } from '@/api/stock' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { queryByCustomerSn } from '@/api/shelf' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { salesDetailList, salesDetailInsert, salesDetailInsertBatch, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll, salesDetailInsertImport } from '@/api/salesDetail' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { salesDetailList, salesDetailInsert, salesDetailInsertBatch, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll, salesDetailInsertImport, queryCheckedList } from '@/api/salesDetail' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import outInDetialModal from './outInDetialModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import chooseShelfProduct from './chooseShelfProduct.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import PrintPanel from '@/views/common/printPanel.vue' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -335,6 +336,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       openSettleModal: false, // 打开收款弹框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       enableFundAccount: false, // 是否开启资金账户管理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       showShelfModal: false, // 货架产品弹框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      checkedProductList: [], // 已选所有产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       delLoading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       detailData: { discountAmount: 0, id: null, salesBillSn: '' }, // 订单基础数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       dataSource: [], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -352,7 +354,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.disabled = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.productForm.salesBillSn = this.$route.params.sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        console.log(111) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getChoosedList({salesBillSn: this.$route.params.sn}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return salesDetailList(Object.assign(parameter, this.productForm)).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           let data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (res.status == 200) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -424,11 +426,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(e.key == 3){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.showShelfModal=true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(e.key == 2){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(e.key == 2){ // 清空列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.delSalerOrder() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(e.key == 1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.delJijian() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(e.key == 1){ // 删除急件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.delSalerOrder(1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 打印预览/快捷打印 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -468,6 +470,12 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.openSalesRecordModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.salseRecord.getDetail(this.detailData.buyerSn, row.productSn, row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 查询已选所以产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getChoosedList(params){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      queryCheckedList(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.checkedProductList = res.data || [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 更新产品列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     updateData (priceType) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 价格类型变更 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -597,68 +605,23 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 删除急件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    delJijian(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 清空已选产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    delSalerOrder (oosFlag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        content: '确认要删除所有急件吗?删除后不可恢复。', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        content: oosFlag==1?'确认要删除所有急件吗?删除后不可恢复。':'确认要清空已选产品列表吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         closable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesDel({ id: _this.orderId }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.handleBack() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 删除销售单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    delSalerOrder () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        content: '确认要清空已选产品列表吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        closable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesDel({ id: _this.orderId }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.handleBack() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 删除已选产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    delSalerDetailAll () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        content: '确认要整单删除吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        closable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.delLoading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesDetailDelAll({ salesBillSn: _this.detailData.salesBillSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          let params = { id: _this.orderId, oosFlag: oosFlag==1 ? 1 : undefined } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(params,oosFlag==1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesDel(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               _this.getOrderDetail(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.productForm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                productName: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                productCode: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                orderBy: 'sales_bill_detail.CREATE_DATE desc' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _this.$message.info(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _this.delLoading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -808,6 +771,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               vm.resetForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               vm.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              vm.checkedProductList = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 查询关联的客户货架信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (vm.detailData && vm.detailData.buyerSn) { 
			 |