| 
					
				 | 
			
			
				@@ -2,7 +2,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div class="salesDetail-wrap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <a-spin :spinning="spinning" tip="Loading..."> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <template slot="subTitle"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <template slot="subTitle" v-if="!bizSn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template slot="extra"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -196,13 +196,18 @@ import { STable, VSelect } from '@/components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import printModal from './printModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import auditModal from '@/views/common/auditModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import dsModal from '@/views/salesManagement/waitDispatch/dsModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { findBySalesBillSn } from '@/api/dispatch' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { salesDetailBySn, salesDetailPrint, salesDetailExcel, salesDetailTypeExcel, salesWriteAudit, salesWriteAuditPush } from '@/api/sales' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { salesDetailAllList, salesDetailAllStockList } from '@/api/salesDetail' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: 'SalesDetail', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mixins: [commonMixin], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   components: { STable, VSelect, printModal, auditModal, dsModal }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    bizSn: { //  有值则为弹框,无值则为页面 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      type: [Number, String], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      default: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       spinning: false, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -211,7 +216,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 加载数据方法 必须为 Promise 对象 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       loadData: parameter => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.disabled = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const params = Object.assign(parameter, { salesBillSn: this.$route.params.sn }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const params = Object.assign(parameter, { salesBillSn: this.$route.params.sn || this.bizSn }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let url = salesDetailAllList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (this.detailData && this.detailData.billStatus == 'WAIT_AUDIT' && this.$hasPermissions('B_salesAudit')) { //  审核,需用到库存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           url = salesDetailAllStockList 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -331,7 +336,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getDetail () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      salesDetailBySn({ salesBillSn: this.$route.params.sn || this.bizSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.detailData = res.data || null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$refs.table.refresh(true) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -353,7 +358,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 一键审核 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleOnceAudit (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const params = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        salesBillSn: this.$route.params.sn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        salesBillSn: this.$route.params.sn || this.bizSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         billStatus: 'AUDIT_PASS', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dispatchBill: data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -371,7 +376,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     auditOrder (billStatus) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.spinningAudit = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       salesWriteAudit({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        salesBillSn: this.$route.params.sn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        salesBillSn: this.$route.params.sn || this.bizSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         billStatus: billStatus 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -379,7 +384,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.spinningAudit = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (billStatus == 'AUDIT_PASS' && !this.auditText) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.$route.params.sn, dispatchBillSn: res.data.dispatchBillSn } }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.$route.params.sn || this.bizSn, dispatchBillSn: res.data.dispatchBillSn } }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //  关闭详情跳列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.handleBack() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -396,7 +401,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 销售分类导出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (type == 'typeExport') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const params = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesBillSn: this.$route.params.sn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesBillSn: this.$route.params.sn || this.bizSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           showCostFlag: this.$hasPermissions('B_isShowCost') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _this.spinning = true 
			 |