| 
					
				 | 
			
			
				@@ -110,6 +110,7 @@ import common from '../mixins/common_code' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import jihuamingxi from '../mixins/jihuamingxi' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { delayPerform, firstPerform, intervalPerform, passivePerform, queuePerform } from 'js-perform-lock' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { required, diyRequired } from '@/components/template/rules_verify.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import Collapse from '@/components/Common/collapse.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   components: { TemplatePage }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mixins: [import_mixin, operation_mixin, form_ty, storage_table, storage_goods, storage_codes, common, jihuamingxi], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -165,7 +166,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         items: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         planItems: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         codeInfoList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        isPlan: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        isPlan: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       activeName: 'goodsInfo', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       goods_material_id: '', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -302,6 +303,13 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.pageShow = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    'formData.isPlan'(newVal, oldVal) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 当isPlan值变化时执行相应操作 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (newVal) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 仅当isPlan为true时执行 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.isPlanHandleItem(newVal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -367,7 +375,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             qty: item.qty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             outQty: '', // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             partsQty: '', // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            price: '', // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            price: item.price, // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             recQty: '', // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             retQty: '', // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             seriesName: item.seriesName, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -612,6 +620,22 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.handleClose() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$refs.pageRef.refreshList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 计划单遍历商品信息注入数量和采购单价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    isPlanHandleItem(val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (val && this.formData.planItems && this.formData.planItems.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // planItems非空时遍历 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.formData.items.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          item.qty = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          item.price = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.formData.planItems.forEach(planItem => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (item.goodsMaterialId === planItem.goodsMaterialId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              item.qty = (item.qty || 0) + (planItem.recQty || 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              item.price = planItem.price || 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |