| 
					
				 | 
			
			
				@@ -5,7 +5,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <!-- 自定义的二级文字标题 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template slot="subTitle"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <span style="margin: 0 15px;color: #666;">调往对象:{{ $route.params.name || '--' }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <!-- 操作区,位于 title 行的行尾 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template v-if="$hasPermissions('B_transferOut_print')" slot="extra"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -13,6 +12,21 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-button key="1" type="primary" id="allocateBillEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-page-header> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-card size="small" :bordered="false" class="allocateBillEdit-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-collapse :activeKey="['1']"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-collapse-panel key="1" header="基础信息"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-descriptions :column="3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-descriptions-item label="调拨类型"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <AllocateType id="allocateEdit-allocateTypeSn" style="width: 200px;" @change="changeAllocateType" v-model="basicInfoData.allocateTypeSn"></AllocateType> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </a-descriptions-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </a-descriptions> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </a-collapse-panel> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </a-collapse> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </a-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <!-- 选择产品 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <a-card size="small" :bordered="false" class="allocateBillEdit-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <a-collapse :activeKey="['1']"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -180,9 +194,11 @@ import { STable, VSelect } from '@/components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import ImportGuideModal from './importGuideModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { queryStockProductPage } from '@/api/stock' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { productPriceInfo } from '@/api/product' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert } from '@/api/allocateBill' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import AllocateType from '@/views/common/allocateType.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { allocateBillSave, allocateBillDetailList, allocateBillDetailCount, allocateBillDetail, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert } from '@/api/allocateBill' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  components: { STable, VSelect, ImportGuideModal }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  components: { STable, VSelect, ImportGuideModal, AllocateType }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       spinning: false, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -224,8 +240,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.chooseDisabled = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const params = Object.assign(parameter, this.chooseQueryParam, { allocateSn: this.$route.params.sn }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return allocateBillDetailList(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          //  合计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.getDetailCount(params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           const data = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           const no = (data.pageNo - 1) * data.pageSize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           for (var i = 0; i < data.list.length; i++) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -239,6 +253,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       productTotal: null, //  合计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      basicInfoData: null, // 基本信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       openGuideModal: false //  导入产品引导 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -278,6 +293,33 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 修改调拨类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    changeAllocateType (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        content: '确定要更改调拨类型吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const params = _this.basicInfoData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          allocateBillSave({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            id: params.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            allocateSn: params.allocateSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            targetType: params.targetType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            targetSn: params.targetSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            targetName: params.targetName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            allocateTypeSn: params.allocateTypeSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            remark: params.remark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  重置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     resetSearchForm () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.productCode = '' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -397,9 +439,19 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 基本信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getDetail () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      allocateBillDetail({ sn: this.$route.params.sn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.basicInfoData = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.basicInfoData = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 合计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getDetailCount (params) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      allocateBillDetailCount(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getDetailCount () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      allocateBillDetailCount({ allocateSn: this.$route.params.sn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.productTotal = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -472,6 +524,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     pageInit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.getDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.getDetailCount() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.resetSearchForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.chooseResetSearchForm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |